Documentation
¶
Index ¶
- Constants
- Variables
- func AddLaneTONConfig(env *cldf.Environment, onRamp []byte, from, to uint64, ...) config.LaneConfig
- func RandomUint32() (uint32, error)
- func SendCCIPMessage(e cldf.Environment, state state.CCIPChainState, sourceChain uint64, ...) (uint64, any, error)
- type AddTonLanes
- type DeployCCIPContracts
- type DeployCCIPContractsCfg
- type SetOCR3Config
- type SetOCR3OffRampConfig
Constants ¶
View Source
const ( ChainSelEVMTest90000001 = 909606746561742123 DestGasOverhead = 300_000 // Commit and Exec costs CalldataGasPerByteBase = 16 CalldataGasPerByteHigh = 40 CalldataGasPerByteThreshold = 3000 )
Variables ¶
View Source
var ( // TODO Remove in favor of the canonical model EvmFeeQuoterDestChainConfig = config.FeeQuoterDestChainConfig{ IsEnabled: true, MaxNumberOfTokensPerMsg: 10, MaxDataBytes: 30_000, MaxPerMsgGasLimit: 3_000_000, DestGasOverhead: DestGasOverhead, DestGasPerPayloadByteBase: CalldataGasPerByteBase, DestGasPerPayloadByteHigh: CalldataGasPerByteHigh, DestGasPerPayloadByteThreshold: CalldataGasPerByteThreshold, DestDataAvailabilityOverheadGas: 100, DestGasPerDataAvailabilityByte: 16, DestDataAvailabilityMultiplierBps: 1, ChainFamilySelector: config.EVMFamilySelector, EnforceOutOfOrder: false, DefaultTokenFeeUSDCents: 25, DefaultTokenDestGasOverhead: 90_000, DefaultTxGasLimit: 200_000, GasMultiplierWeiPerEth: 11e17, GasPriceStalenessThreshold: 0, NetworkFeeUSDCents: 10, } EvmFeeQuoterDestChainCanonicalConfig = lanes.FeeQuoterDestChainConfig{ IsEnabled: true, MaxNumberOfTokensPerMsg: 10, MaxDataBytes: 30_000, MaxPerMsgGasLimit: 3_000_000, DestGasOverhead: DestGasOverhead, DestGasPerPayloadByteBase: CalldataGasPerByteBase, DestGasPerPayloadByteHigh: CalldataGasPerByteHigh, DestGasPerPayloadByteThreshold: CalldataGasPerByteThreshold, DestDataAvailabilityOverheadGas: 100, DestGasPerDataAvailabilityByte: 16, DestDataAvailabilityMultiplierBps: 1, ChainFamilySelector: config.EVMFamilySelector, EnforceOutOfOrder: false, DefaultTokenFeeUSDCents: 25, DefaultTokenDestGasOverhead: 90_000, DefaultTxGasLimit: 200_000, GasMultiplierWeiPerEth: 11e17, GasPriceStalenessThreshold: 0, NetworkFeeUSDCents: 10, } // TODO Remove in favor of the canonical model // Default fee quoter config for TON CCIP testing TonFeeQuoterDestChainConfig = config.FeeQuoterDestChainConfig{ IsEnabled: true, MaxNumberOfTokensPerMsg: 0, MaxDataBytes: 100, MaxPerMsgGasLimit: 100, DestGasOverhead: 0, DestGasPerPayloadByteBase: 0, DestGasPerPayloadByteHigh: 0, DestGasPerPayloadByteThreshold: 0, DestDataAvailabilityOverheadGas: 0, DestGasPerDataAvailabilityByte: 0, ChainFamilySelector: config.TVMFamilySelector, EnforceOutOfOrder: false, DefaultTokenFeeUSDCents: 0, DefaultTokenDestGasOverhead: 0, DefaultTxGasLimit: 1, GasMultiplierWeiPerEth: 0, GasPriceStalenessThreshold: 0, NetworkFeeUSDCents: 0, } // Default fee quoter config for TON CCIP testing TonFeeQuoterDestChainCanonicalConfig = lanes.FeeQuoterDestChainConfig{ IsEnabled: true, MaxNumberOfTokensPerMsg: 0, MaxDataBytes: 100, MaxPerMsgGasLimit: 100, DestGasOverhead: 0, DestGasPerPayloadByteBase: 0, DestGasPerPayloadByteHigh: 0, DestGasPerPayloadByteThreshold: 0, DestDataAvailabilityOverheadGas: 0, DestGasPerDataAvailabilityByte: 0, ChainFamilySelector: config.TVMFamilySelector, EnforceOutOfOrder: false, DefaultTokenFeeUSDCents: 0, DefaultTokenDestGasOverhead: 0, DefaultTxGasLimit: 1, GasMultiplierWeiPerEth: 0, GasPriceStalenessThreshold: 0, NetworkFeeUSDCents: 0, } )
View Source
var TonTokenAddr = address.MustParseRawAddr("0:0000000000000000000000000000000000000000000000000000000000000001")
Functions ¶
func AddLaneTONConfig ¶
func AddLaneTONConfig(env *cldf.Environment, onRamp []byte, from, to uint64, fromFamily, toFamily string, gasPrices map[uint64]*big.Int) config.LaneConfig
TODO add TON token price into func parameters
func RandomUint32 ¶
func SendCCIPMessage ¶
func SendCCIPMessage( e cldf.Environment, state state.CCIPChainState, sourceChain uint64, msg router.CCIPSend) (uint64, any, error)
TODO Consider move chainlink core AnyMsgSentEvent and CCIPSendReqConfig to CLDF? SendCCIPMessage sends a CCIP request from a TON chain using the standard router.CCIPSend message. TODO: add TokenAmounts support for TON token transfers
Types ¶
type AddTonLanes ¶
type AddTonLanes struct{}
func (AddTonLanes) Apply ¶
func (cs AddTonLanes) Apply(env cldf.Environment, cfg config.UpdateTonLanesConfig) (cldf.ChangesetOutput, error)
func (AddTonLanes) VerifyPreconditions ¶
func (cs AddTonLanes) VerifyPreconditions(env cldf.Environment, cfg config.UpdateTonLanesConfig) error
type DeployCCIPContracts ¶
type DeployCCIPContracts struct{}
DeployCCIPContracts deploys Ton chain packages and modules
func (DeployCCIPContracts) Apply ¶
func (cs DeployCCIPContracts) Apply(env cldf.Environment, cfg DeployCCIPContractsCfg) (cldf.ChangesetOutput, error)
func (DeployCCIPContracts) VerifyPreconditions ¶
func (cs DeployCCIPContracts) VerifyPreconditions(_ cldf.Environment, _ DeployCCIPContractsCfg) error
type DeployCCIPContractsCfg ¶
type DeployCCIPContractsCfg struct {
TonChainSelector uint64
ContractsVersion string
Params config.ChainContractParams
}
func DeployChainContractsConfig ¶
func DeployChainContractsConfig(t *testing.T, env cldf.Environment, chainSelector uint64, contractVersion string, idForContracts uint32) DeployCCIPContractsCfg
func (DeployCCIPContractsCfg) Validate ¶
func (c DeployCCIPContractsCfg) Validate() error
type SetOCR3Config ¶
type SetOCR3Config struct{}
SetOCR3Config updates OCR3 Offramp configurations
func (SetOCR3Config) Apply ¶
func (cs SetOCR3Config) Apply(env cldf.Environment, cfg SetOCR3OffRampConfig) (cldf.ChangesetOutput, error)
func (SetOCR3Config) VerifyPreconditions ¶
func (cs SetOCR3Config) VerifyPreconditions(env cldf.Environment, cfg SetOCR3OffRampConfig) error
type SetOCR3OffRampConfig ¶
type SetOCR3OffRampConfig struct {
RemoteChainSels []uint64
Configs map[operation.PluginType]operation.OCR3ConfigArgs
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.