Categorygithub.com/smartcontractkit/mcms
modulepackage
0.12.0
Repository: https://github.com/smartcontractkit/mcms.git
Documentation: pkg.go.dev

# README

Many Chain Multisig System

Official documentation

Many Chain Multisig System (MCMS) provides tools and libraries to deploy, manage and interact with MCMS across multiple chains.

Development

Getting Started

Install the developments tools and dependencies to get started.

Install asdf

asdf is a tool version manager. All dependencies used for local development of this repo are managed through asdf. To install asdf:

  1. Install asdf
  2. Follow the instructions to ensure asdf is shimmed into your terminal or development environment

Install task

task is an alternative to make and is used to provide commands for everyday development tasks. To install task:

  1. Add the asdf task plugin: asdf plugin add task
  2. Install task with asdf install task
  3. Run task -l to see available commands

Installing Dependencies

Now that you have asdf and task installed, you can install the dependencies for this repo:

task install:tools

Running Tests

Run the entire test suite with:

task test

More test commands can be found by running task -l

Running Unit Tests

task test:unit

Running E2E Tests

We use Chainlink Testing Framework for E2E tests. Run them with:

task test:e2e

For verbose output just pass -v as command argument:

task test:e2e -- -v

By default, we use anvil evm. If you want to run e2e tests with specific configuration different chain etc. you need to specify path to the config after default one to override or add to the previous values. It's pattern of CTF more here:

task test:e2e CTF_CONFIGS=../config.toml,../custom_configs/avax_fuji.toml

Generating MCM Solana compiled program

To run e2e tests for solana blockchain, we need to have the MCM compiled program. MCM Solana program is located in chainlink-ccip repo. We can run go generate -tags=e2e ./e2e/... to pull in the latest version of the program from that repo and compile it. The output will be saved in e2e/artifacts/solana/ folder.

Running Ledger Signing Test

For real ledger signing verification you can run: task test:ledger

Remember to connect usb device, unlock it and open ethereum app.

Running Linters

Run the linters with:

task lint

More lint commands can be found by running task -l

Documentation

We use Docsify to generate our documentation. You can modify the docs by editing the markdown files in the docs directory.

Run the local documentation server with:

task docs

Contributing

For instructions on how to contribute to mcms, see CONTRIBUTING.md

Releasing

For instructions on how to release mcms, see RELEASE.md

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
NewChainMetadataNotFoundError creates a new ChainMetadataNotFoundError.
NewEncoderNotFoundError creates a new EncoderNotFoundError.
NewExecutable creates a new Executable from a proposal and a map of executors.
NewInconsistentConfigsError creates a new InconsistentConfigsError.
No description provided by the author
No description provided by the author
No description provided by the author
NewLedgerSigner creates a new LedgerSigner.
NewPrivateKeySigner creates a new PrivateKeySigner.
NewProposal unmarshals data from the reader to JSON and returns a new Proposal.
NewProposalBuilder creates a new ProposalBuilder.
NewQuorumNotReachedError creates a new QuorumNotReachedError.
NewSignable creates a new Signable from a proposal and inspectors, and initializes the encoders and merkle tree.
NewTimelockExecutable creates a new TimelockExecutable from a proposal and a map of executors.
NewTimelockProposal unmarshal data from the reader to JSON and returns a new TimelockProposal.
NewTimelockProposalBuilder creates a new TimelockProposalBuilder.
No description provided by the author
WithPredecessors is an option that allows the user to specify a list of that contain the predecessors for the proposal for configuring operations counts, which makes the following assumptions: - The order of the predecessors array is the order in which the proposals are intended to be executed.
WriteProposal marshals the proposal to JSON and writes it to the provided writer.
No description provided by the author

# Constants

No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

BaseProposal is the base struct for all MCMS proposals, contains shared fields for all proposal types.
BaseProposalBuilder is a generic builder for BaseProposal.
ChainMetadataNotFoundError is returned when the chain metadata for a chain is not found in a proposal.
EncoderNotFoundError is returned when an encoder is not found for a chain in a proposal.
Executable is a struct that represents a proposal that can be executed.
InconsistentConfigsError is returned when the configs for two chains are not equal to each other.
InvalidProposalKindError is returned when an invalid proposal kind is provided.
No description provided by the author
No description provided by the author
LedgerSigner signs payloads using a Ledger.
OperationNotReadyError is returned when an operation is not yet ready.
PrivateKeySigner signs payloads using a private key.
Proposal is a struct where the target contract is an MCMS contract with no forwarder contracts.
ProposalBuilder is a builder for the MCMS Proposal.
QuorumNotReachedError is returned when the quorum has not been reach as defined in a chain's MCM contract configuration.
Signable contains the proposal itself, a Merkle tree representation of the proposal, encoders for different chains to perform the signing, while the inspectors are used for retrieving contract configurations and operational counts on chain.
TimelockExecutable is a struct that represents a proposal that can be executed with a timelock.
No description provided by the author
TimelockProposalBuilder builder for timelock proposals types.

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author
No description provided by the author