proposalutils

package
v0.95.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BypasserManyChainMultisig        cldf.ContractType = "BypasserManyChainMultiSig"
	CancellerManyChainMultisig       cldf.ContractType = "CancellerManyChainMultiSig"
	ProposerManyChainMultisig        cldf.ContractType = "ProposerManyChainMultiSig"
	ManyChainMultisig                cldf.ContractType = "ManyChainMultiSig"
	RBACTimelock                     cldf.ContractType = "RBACTimelock"
	CallProxy                        cldf.ContractType = "CallProxy"
	ManyChainMultisigProgram         cldf.ContractType = "ManyChainMultiSigProgram"
	RBACTimelockProgram              cldf.ContractType = "RBACTimelockProgram"
	AccessControllerProgram          cldf.ContractType = "AccessControllerProgram"
	ProposerAccessControllerAccount  cldf.ContractType = "ProposerAccessControllerAccount"
	ExecutorAccessControllerAccount  cldf.ContractType = "ExecutorAccessControllerAccount"
	CancellerAccessControllerAccount cldf.ContractType = "CancellerAccessControllerAccount"
	BypasserAccessControllerAccount  cldf.ContractType = "BypasserAccessControllerAccount"
)

Variables

View Source
var (
	ErrMissingTimelockBinding = errors.New("missing Timelock RBACTimelock binding")
	ErrMissingCancellerMCM    = errors.New("missing CancellerMcm ManyChainMultiSig binding")
	ErrMissingProposerMCM     = errors.New("missing ProposerMcm ManyChainMultiSig binding")
	ErrMissingBypasserMCM     = errors.New("missing BypasserMcm ManyChainMultiSig binding")
	ErrMissingCallProxy       = errors.New("missing CallProxy binding")
)

Functions

func BatchOperationForChain

func BatchOperationForChain(
	chain uint64, toAddress string, data []byte, value *big.Int, contractType string, tags []string,
) (mcmstypes.BatchOperation, error)

BatchOperationForChain creates an mcmstypes.BatchOperation containing a single transaction for the given chain selector. It delegates to TransactionForChain, so it supports EVM and Solana chains.

func GetAptosRoleFromAction

func GetAptosRoleFromAction(action mcmstypes.TimelockAction) (mcmsaptossdk.TimelockRole, error)

func McmsInspectorForChain

func McmsInspectorForChain(env cldf.Environment, chain uint64, opts ...MCMSInspectorOption) (mcmssdk.Inspector, error)

McmsInspectorForChain builds an mcmssdk.Inspector for a single chain in the given environment. The chain must be present in env.BlockChains, otherwise an error is returned.

func McmsInspectors

func McmsInspectors(env cldf.Environment) (map[uint64]mcmssdk.Inspector, error)

McmsInspectors builds an mcmssdk.Inspector for every chain in the environment, returning them keyed by uint64 chain selector. All inspectors use the default TimelockActionSchedule action.

func TransactionForChain

func TransactionForChain(
	chain uint64, toAddress string, data []byte, value *big.Int, contractType string, tags []string,
) (mcmstypes.Transaction, error)

TransactionForChain builds an mcmstypes.Transaction for the given chain selector. It currently supports EVM and Solana chains; other chain families return an error.

Types

type GasBoostConfig

type GasBoostConfig struct {
	InitialGasLimit   uint64 `json:"initialGasLimit"`
	GasLimitIncrement uint64 `json:"gasLimitIncrement"`
	InitialGasPrice   uint64 `json:"initialGasPrice"`
	GasPriceIncrement uint64 `json:"gasPriceIncrement"`
}

GasBoostConfig defines the configuration for EVM gas boosting during retries. It allows customization of the initial gas limit, gas limit increment, initial gas price, and gas price increment.

type MCMSInspectorOption

type MCMSInspectorOption func(*mcmsInspectorOptions)

MCMSInspectorOption configures how MCMS inspectors are built.

func WithTimelockAction

func WithTimelockAction(action mcmstypes.TimelockAction) MCMSInspectorOption

WithTimelockAction sets the timelock action used by the inspector. When omitted, the default action is TimelockActionSchedule.

type MCMSRole

type MCMSRole string

MCMSRole represents a named role within the MCMS system (e.g. proposer, bypasser, canceller).

const (
	ProposerRole  MCMSRole = "PROPOSER"
	BypasserRole  MCMSRole = "BYPASSER"
	CancellerRole MCMSRole = "CANCELLER"
)

func (MCMSRole) String

func (role MCMSRole) String() string

type MCMSWithTimelockConfig

type MCMSWithTimelockConfig struct {
	Canceller        mcmstypes.Config `json:"canceller"`
	Bypasser         mcmstypes.Config `json:"bypasser"`
	Proposer         mcmstypes.Config `json:"proposer"`
	TimelockMinDelay *big.Int         `json:"timelockMinDelay"`
	Label            *string          `json:"label"`
	GasBoostConfig   *GasBoostConfig  `json:"gasBoostConfig"`
	Qualifier        *string          `json:"qualifier"`
}

MCMSWithTimelockConfig holds the configuration for an MCMS with timelock. Unlike the legacy MCMSWithTimelockConfigLegacy type above, this variant uses the newer mcmstypes.Config definitions.

type MCMSWithTimelockConfigLegacy deprecated

type MCMSWithTimelockConfigLegacy struct {
	Canceller        config.Config `json:"canceller"`
	Bypasser         config.Config `json:"bypasser"`
	Proposer         config.Config `json:"proposer"`
	TimelockMinDelay *big.Int      `json:"timelockMinDelay"`
	Label            *string       `json:"label"`
}

Deprecated: use MCMSWithTimelockConfig. This will be removed once all CCIP code is migrated to use the new MCMSWithTimelockConfig type.

type MCMSWithTimelockContracts

type MCMSWithTimelockContracts struct {
	CancellerMcm *ownerhelpers.ManyChainMultiSig
	BypasserMcm  *ownerhelpers.ManyChainMultiSig
	ProposerMcm  *ownerhelpers.ManyChainMultiSig
	Timelock     *ownerhelpers.RBACTimelock
	CallProxy    *ownerhelpers.CallProxy
}

MCMSWithTimelockContracts holds the Go bindings for a MCMSWithTimelock standard contract deployment.

func (MCMSWithTimelockContracts) Validate

func (state MCMSWithTimelockContracts) Validate() error

Validate checks all contract bindings are non-nil, ensuring the struct is ready for use generating views or interactions.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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