Documentation
¶
Index ¶
- func AddressesForChain(env cldf.Environment, chainSelector uint64, qualifier string) (map[string]cldf.TypeAndVersion, error)
- func GetAddressTypeVersionByQualifier(store datastore.AddressRefStore, chainSelector uint64, qualifier string) (map[string]cldf.TypeAndVersion, error)
- func LoadAddressesFromDataStore(ds datastore.DataStore, chainSelector uint64, qualifier string) (map[string]cldf.TypeAndVersion, error)deprecated
- func MaybeLoadMCMSWithTimelockState(env cldf.Environment, chainSelectors []uint64) (map[uint64]*MCMSWithTimelockState, error)
- func MaybeLoadMCMSWithTimelockStateDataStore(env cldf.Environment, chainSelectors []uint64) (map[uint64]*MCMSWithTimelockState, error)
- func MaybeLoadMCMSWithTimelockStateDataStoreWithQualifier(env cldf.Environment, chainSelectors []uint64, qualifier string) (map[uint64]*MCMSWithTimelockState, error)
- func MaybeLoadMCMSWithTimelockStateWithQualifier(env cldf.Environment, chainSelectors []uint64, qualifier string) (map[uint64]*MCMSWithTimelockState, error)
- type LinkTokenState
- type MCMSWithTimelockState
- func GetMCMSWithTimelockState(store datastore.AddressRefStore, chain cldf_evm.Chain, qualifier string) (*MCMSWithTimelockState, error)
- func MaybeLoadMCMSWithTimelockChainState(chain cldf_evm.Chain, addresses map[string]cldf.TypeAndVersion) (*MCMSWithTimelockState, error)
- func MaybeLoadMCMSWithTimelockChainStateFromRefs(chain cldf_evm.Chain, refs []datastore.AddressRef) (*MCMSWithTimelockState, error)
- type StaticLinkTokenState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressesForChain ¶
func AddressesForChain(env cldf.Environment, chainSelector uint64, qualifier string) (map[string]cldf.TypeAndVersion, error)
AddressesForChain combines addresses from both DataStore and AddressBook making it backward compatible. This version supports qualifiers for filtering DataStore addresses. When a qualifier is specified, only DataStore addresses with that qualifier are returned (no AddressBook merge) to ensure isolation between different deployments.
func GetAddressTypeVersionByQualifier ¶
func GetAddressTypeVersionByQualifier(store datastore.AddressRefStore, chainSelector uint64, qualifier string) (map[string]cldf.TypeAndVersion, error)
GetAddressTypeVersionByQualifier loads addresses from DataStore for a specific chain and qualifier. It returns a map of address to TypeAndVersion. Refs with a nil Version are skipped; if none remain, it returns an error. Each address must be a non-zero hex-encoded EVM address (see common.IsHexAddress).
func LoadAddressesFromDataStore
deprecated
func LoadAddressesFromDataStore(ds datastore.DataStore, chainSelector uint64, qualifier string) (map[string]cldf.TypeAndVersion, error)
LoadAddressesFromDataStore loads addresses from DataStore with optional qualifier. This is a public utility function that can be used by other packages to avoid duplication.
Deprecated: Use GetAddressTypeVersionByQualifier instead.
func MaybeLoadMCMSWithTimelockState ¶
func MaybeLoadMCMSWithTimelockState(env cldf.Environment, chainSelectors []uint64) (map[uint64]*MCMSWithTimelockState, error)
MaybeLoadMCMSWithTimelockState loads the MCMSWithTimelockState state for each chain in the given environment.
func MaybeLoadMCMSWithTimelockStateDataStore ¶
func MaybeLoadMCMSWithTimelockStateDataStore(env cldf.Environment, chainSelectors []uint64) (map[uint64]*MCMSWithTimelockState, error)
MaybeLoadMCMSWithTimelockStateDataStore loads the MCMSWithTimelockState state for each chain in the given environment from the DataStore.
func MaybeLoadMCMSWithTimelockStateDataStoreWithQualifier ¶
func MaybeLoadMCMSWithTimelockStateDataStoreWithQualifier(env cldf.Environment, chainSelectors []uint64, qualifier string) (map[uint64]*MCMSWithTimelockState, error)
func MaybeLoadMCMSWithTimelockStateWithQualifier ¶
func MaybeLoadMCMSWithTimelockStateWithQualifier(env cldf.Environment, chainSelectors []uint64, qualifier string) (map[uint64]*MCMSWithTimelockState, error)
MaybeLoadMCMSWithTimelockStateWithQualifier loads the MCMSWithTimelockState state for each chain in the given environment, supporting qualifiers for filtering addresses from env.DataStore.
Types ¶
type LinkTokenState ¶
type LinkTokenState struct {
LinkToken *link_token.LinkToken
}
func MaybeLoadLinkTokenChainState ¶
func MaybeLoadLinkTokenChainState(chain cldf_evm.Chain, addresses map[string]cldf.TypeAndVersion) (*LinkTokenState, error)
func (LinkTokenState) GenerateLinkView ¶
func (s LinkTokenState) GenerateLinkView() (linkv10.LinkTokenView, error)
type MCMSWithTimelockState ¶
type MCMSWithTimelockState struct {
CancellerMcm *bindings.ManyChainMultiSig
BypasserMcm *bindings.ManyChainMultiSig
ProposerMcm *bindings.ManyChainMultiSig
Timelock *bindings.RBACTimelock
CallProxy *bindings.CallProxy
}
MCMSWithTimelockState holds the Go bindings for a MCMSWithTimelock contract deployment. It is public for use in product specific packages. Either all fields are nil or all fields are non-nil.
func GetMCMSWithTimelockState ¶
func GetMCMSWithTimelockState(store datastore.AddressRefStore, chain cldf_evm.Chain, qualifier string) (*MCMSWithTimelockState, error)
GetMCMSWithTimelockState loads the MCMSWithTimelockState for a specific chain and qualifier from the DataStore. It filters AddressRefs to avoid key collisions that occur when multiple contract types share the same address (e.g. bypasser and canceller).
func MaybeLoadMCMSWithTimelockChainState ¶
func MaybeLoadMCMSWithTimelockChainState(chain cldf_evm.Chain, addresses map[string]cldf.TypeAndVersion) (*MCMSWithTimelockState, error)
MaybeLoadMCMSWithTimelockChainState looks for the addresses corresponding to contracts deployed with DeployMCMSWithTimelock and loads them into a MCMSWithTimelockState struct. If none of the contracts are found, it returns a non-nil state struct whose binding fields are all nil. An error indicates: - Found but was unable to load a contract - It only found part of the bundle of contracts - If found more than one instance of a contract (we expect one bundle in the given addresses)
func MaybeLoadMCMSWithTimelockChainStateFromRefs ¶
func MaybeLoadMCMSWithTimelockChainStateFromRefs(chain cldf_evm.Chain, refs []datastore.AddressRef) (*MCMSWithTimelockState, error)
MaybeLoadMCMSWithTimelockChainStateFromRefs is the DataStore-native equivalent of MaybeLoadMCMSWithTimelockChainState. It accepts []datastore.AddressRef directly, to preserve entries when multiple contract types share the same address (e.g. bypasser and canceller).
func (MCMSWithTimelockState) GenerateMCMSWithTimelockView ¶
func (state MCMSWithTimelockState) GenerateMCMSWithTimelockView() (v1_0.MCMSWithTimelockView, error)
func (*MCMSWithTimelockState) TimelockContracts ¶
func (s *MCMSWithTimelockState) TimelockContracts() cldfproposalutils.MCMSWithTimelockContracts
TimelockContracts implements cldfproposalutils.EVMMCMSWithTimelock for MCMS timelock proposal helpers.
func (MCMSWithTimelockState) Validate ¶
func (state MCMSWithTimelockState) Validate() error
Validate checks that all fields are non-nil, ensuring it's ready for use generating views or interactions.
type StaticLinkTokenState ¶
type StaticLinkTokenState struct {
StaticLinkToken *link_token_interface.LinkToken
}
func MaybeLoadStaticLinkTokenState ¶
func MaybeLoadStaticLinkTokenState(chain cldf_evm.Chain, addresses map[string]cldf.TypeAndVersion) (*StaticLinkTokenState, error)
func (StaticLinkTokenState) GenerateStaticLinkView ¶
func (s StaticLinkTokenState) GenerateStaticLinkView() (linkv10.StaticLinkTokenView, error)