Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Timelock ds.ContractType = bindings.ShortTimelock MCMS ds.ContractType = bindings.ShortMCMS )
var ( Version1_6_0 = *semver.MustParse("1.6.0") // MCMS contract versions TimelockVersion = *semver.MustParse("0.0.3") MCMSVersion = *semver.MustParse("0.0.4") // Core contracts LinkToken ds.ContractType = "LinkToken" TONNative ds.ContractType = "TONNative" Router ds.ContractType = bindings.ShortRouter OnRamp ds.ContractType = bindings.ShortOnRamp OffRamp ds.ContractType = bindings.ShortOffRamp FeeQuoter ds.ContractType = bindings.ShortFeeQuoter // Internal contracts Deployer ds.ContractType = bindings.ShortDeployer MerkleRoot ds.ContractType = bindings.ShortMerkleRoot SendExecutor ds.ContractType = bindings.ShortSendExecutor ReceiveExecutor ds.ContractType = bindings.ShortReceiveExecutor // Utilities TonReceiver ds.ContractType = bindings.ShortReceiver Counter ds.ContractType = "Counter" )
Duplicates of chainlink/deployment/ccip/ to avoid import loops
var LongToShortContractType = func() map[tvm.FullyQualifiedName]ds.ContractType { m := make(map[tvm.FullyQualifiedName]ds.ContractType, len(bindings.ShortToFQT)) for short, fqt := range bindings.ShortToFQT { m[fqt] = ds.ContractType(short) } return m }()
LongToShortContractType maps the fully qualified contract name (as used in contracts-pkg.json and pkg/bindings/index.go) to the ds.ContractType value used in the datastore. The authoritative short names are defined in pkg/bindings/index.go as Short* constants.
Functions ¶
func LoadMCMSOnChainState ¶
func LoadMCMSOnChainState(e cldf.Environment) (map[uint64]MCMSChainState, error)
TODO refactor state management for different protocol NONEVM-3181
func LoadOnchainState ¶
func LoadOnchainState(e cldf.Environment) (map[uint64]CCIPChainState, error)
Types ¶
type CCIPChainState ¶
type CCIPChainState struct {
LinkTokenAddress address.Address
TONNativeAddress address.Address
OffRamp address.Address
Router address.Address
OnRamp address.Address
FeeQuoter address.Address
ReceiverAddress address.Address
}
CCIPChainState holds a Go binding for all the currently deployed CCIP contracts on a chain. If a binding is nil, it means there is no such contract on the chain.
func LoadCCIPOnChainStateUsingDataStore ¶
func LoadCCIPOnChainStateUsingDataStore(dataStore ds.DataStore, chainSelector uint64) (CCIPChainState, error)
func (CCIPChainState) GenerateView ¶
func (s CCIPChainState) GenerateView(e *cldf.Environment, selector uint64, chainID string) (TONChainView, error)
type MCMSChainState ¶
type MCMSChainState struct {
ByQualifier map[string]*MCMSSuiteState
}
MCMSChainState holds a Go binding for all the currently deployed MCMS contracts on a chain, indexed by qualifier. If a binding is nil, it means there is no such MCMS suite contracts on the chain for that qualifier.
func LoadMCMSOnChainStateUsingDataStore ¶
func LoadMCMSOnChainStateUsingDataStore(dataStore ds.DataStore, chainSelector uint64) (MCMSChainState, error)
type MCMSSuiteState ¶
type MCMSSuiteState struct {
// 3x MCMS contracts, each gets a role in the timelock
Proposer *address.Address
Canceller *address.Address
Bypasser *address.Address
// Timelock contract address for this MCMS suite
Timelock *address.Address
}
MCMSSuiteState holds the state of a single MCMS deployment - currently includes all contracts addresses.
type TONChainView ¶
type TONChainView struct {
ChainSelector uint64 `json:"chainSelector,omitempty"`
ChainID string `json:"chainID,omitempty"`
OnRamp map[string]onramp.View `json:"onRamp,omitempty"`
Router map[string]router.View `json:"router,omitempty"`
FeeQuoter map[string]feequoter.View `json:"feeQuoter,omitempty"`
OffRamp map[string]offramp.View `json:"offRamp,omitempty"`
}