mcms

package
v0.81.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 49 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOperationAlreadyExecuted = errors.New("operation already executed")

ErrOperationAlreadyExecuted is returned when an operation has already been executed.

Functions

func NewCommand

func NewCommand(cfg Config) (*cobra.Command, error)

NewCommand creates a new mcms command with all subcommands.

func ReadExecutionErrorFromFile

func ReadExecutionErrorFromFile(data []byte) (*evm.ExecutionError, error)

ReadExecutionErrorFromFile reads and parses an execution error from a JSON file.

Types

type Config

type Config struct {
	// Logger is the logger to use for command output. Required.
	Logger logger.Logger

	// Domain is the domain context for the commands. Required.
	Domain domain.Domain

	// ProposalContextProvider creates proposal context for analysis. Required.
	ProposalContextProvider analyzer.ProposalContextProvider

	// Deps holds optional dependencies that can be overridden.
	// If fields are nil, production defaults are used.
	Deps Deps
}

Config holds the configuration for mcms commands.

func (Config) Validate

func (c Config) Validate() error

Validate checks that all required configuration fields are set.

type DecodedExecutionError

type DecodedExecutionError struct {
	RevertReason            string
	RevertReasonDecoded     bool
	UnderlyingReason        string
	UnderlyingReasonDecoded bool
}

DecodedExecutionError contains the decoded revert reasons from an ExecutionError.

type Deps

type Deps struct {
	// EnvironmentLoader loads a deployment environment.
	EnvironmentLoader EnvironmentLoaderFunc

	// ProposalLoader loads a proposal from a file.
	ProposalLoader ProposalLoaderFunc
}

Deps holds optional dependencies that can be overridden for testing.

type EnvironmentLoaderFunc

type EnvironmentLoaderFunc func(
	ctx context.Context,
	dom domain.Domain,
	envKey string,
	lggr logger.Logger,
	opts ...cldfenvironment.LoadEnvironmentOption,
) (cldf.Environment, error)

EnvironmentLoaderFunc loads a deployment environment.

type ErrDecoder

type ErrDecoder struct {
	// contains filtered or unexported fields
}

ErrDecoder indexes custom-error selectors across many ABIs.

func NewErrDecoder

func NewErrDecoder(registry analyzer.EVMABIRegistry) (*ErrDecoder, error)

NewErrDecoder builds an index from EVM ABI registry.

type ErrSig

type ErrSig struct {
	TypeVer string
	Name    string
	Inputs  abi.Arguments
	// contains filtered or unexported fields
}

ErrSig describes a resolved custom error.

type ProposalConfig

type ProposalConfig struct {
	Kind             types.ProposalKind
	Proposal         mcms.Proposal
	TimelockProposal *mcms.TimelockProposal // nil if not a timelock proposal
	ChainSelector    uint64
	EnvStr           string
	Env              cldf.Environment
	ForkedEnv        cldfenvironment.ForkedEnvironment // populated when Fork is true
	Fork             bool
	ProposalCtx      analyzer.ProposalContext
}

ProposalConfig holds the loaded proposal configuration.

func LoadProposalConfig

func LoadProposalConfig(
	ctx context.Context,
	lggr logger.Logger,
	dom domain.Domain,
	deps *Deps,
	proposalCtxProvider analyzer.ProposalContextProvider,
	flags ProposalFlags,
	opts ...interface{},
) (*ProposalConfig, error)

LoadProposalConfig loads and validates a proposal configuration.

type ProposalFlags

type ProposalFlags struct {
	ProposalPath  string
	ProposalKind  string
	Environment   string
	ChainSelector uint64
	Fork          bool
}

ProposalFlags contains common proposal-related flags.

type ProposalLoaderFunc

type ProposalLoaderFunc func(kind types.ProposalKind, path string) (mcms.ProposalInterface, error)

ProposalLoaderFunc loads a proposal from a file.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL