Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NONEVM-904] Update address book to support nonevm #15269

Merged
merged 18 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/late-seals-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

Update deployment address book to support non-evm chains
2 changes: 2 additions & 0 deletions core/capabilities/ccip/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ func (d *Delegate) ServicesForSpec(ctx context.Context, spec job.Job) (services
if err != nil {
return nil, fmt.Errorf("failed to parse chain ID %s: %w", d.capabilityConfig.ExternalRegistry().RelayID().ChainID, err)
}

// NOTE: This does not support non-evm chains
homeChainChainSelector, err := chainsel.SelectorFromChainId(homeChainChainID)
if err != nil {
return nil, fmt.Errorf("failed to get chain selector from chain ID %d", homeChainChainID)
Expand Down
2 changes: 2 additions & 0 deletions core/capabilities/ccip/oraclecreator/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ func (i *bootstrapOracleCreator) Create(ctx context.Context, _ uint32, config cc
// TODO: add an api that returns chain family.
// NOTE: this doesn't really matter for the bootstrap node, it doesn't do anything on-chain.
// Its for the monitoring endpoint generation below.

// NOTE: This does not support non-evm chains
chainID, err := chainsel.ChainIdFromSelector(uint64(config.Config.ChainSelector))
if err != nil {
return nil, fmt.Errorf("failed to get chain ID from selector: %w", err)
Expand Down
3 changes: 3 additions & 0 deletions core/capabilities/ccip/oraclecreator/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ func (i *pluginOracleCreator) Create(ctx context.Context, donID uint32, config c

// Assuming that the chain selector is referring to an evm chain for now.
// TODO: add an api that returns chain family.
// NOTE: This does not support non-evm chains
destChainID, err := chainsel.ChainIdFromSelector(uint64(config.Config.ChainSelector))
if err != nil {
return nil, fmt.Errorf("failed to get chain ID from selector %d: %w", config.Config.ChainSelector, err)
Expand Down Expand Up @@ -412,6 +413,7 @@ func decodeAndValidateOffchainConfig(
}

func (i *pluginOracleCreator) getChainSelector(chainID uint64) (cciptypes.ChainSelector, error) {
// NOTE: This does not support non-evm chains
chainSelector, ok := chainsel.EvmChainIdToChainSelector()[chainID]
if !ok {
return 0, fmt.Errorf("failed to get chain selector from chain ID %d", chainID)
Expand All @@ -420,6 +422,7 @@ func (i *pluginOracleCreator) getChainSelector(chainID uint64) (cciptypes.ChainS
}

func (i *pluginOracleCreator) getChainID(chainSelector cciptypes.ChainSelector) (uint64, error) {
// NOTE: This does not support non-evm chains
chainID, err := chainsel.ChainIdFromSelector(uint64(chainSelector))
if err != nil {
return 0, fmt.Errorf("failed to get chain ID from chain selector %d: %w", chainSelector, err)
Expand Down
3 changes: 3 additions & 0 deletions core/services/ocr2/delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ func (d *Delegate) cleanupEVM(ctx context.Context, jb job.Job, relayID types.Rel
return err
}
var chainSelector uint64
// NOTE: This does not support non-evm chains
chainSelector, err = chainselectors.SelectorFromChainId(chain.ID().Uint64())
if err != nil {
return err
Expand Down Expand Up @@ -1728,6 +1729,7 @@ func (d *Delegate) ccipCommitGetSrcProvider(ctx context.Context, jb job.Job, plu
return nil, 0, fmt.Errorf("get offRamp static config: %w", err)
}

// NOTE: This does not support non-evm chains
srcChainID, err = chainselectors.ChainIdFromSelector(offRampConfig.SourceChainSelector)
if err != nil {
return nil, 0, err
Expand Down Expand Up @@ -1883,6 +1885,7 @@ func (d *Delegate) ccipExecGetSrcProvider(ctx context.Context, jb job.Job, plugi
return nil, 0, fmt.Errorf("get offRamp static config: %w", err)
}

// NOTE: This does not support non-evm chains
srcChainID, err = chainselectors.ChainIdFromSelector(offRampConfig.SourceChainSelector)
if err != nil {
return nil, 0, err
Expand Down
3 changes: 3 additions & 0 deletions core/services/ocr2/plugins/ccip/config/chain_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func GetChainFromSpec(spec *job.OCR2OracleSpec, chainSet legacyevm.LegacyChainCo
}

func GetChainByChainSelector(chainSet legacyevm.LegacyChainContainer, chainSelector uint64) (legacyevm.Chain, int64, error) {
// NOTE: This does not support non-evm chains
chainID, err := chainselectors.ChainIdFromSelector(chainSelector)
if err != nil {
return nil, 0, err
Expand All @@ -36,10 +37,12 @@ func GetChainByChainID(chainSet legacyevm.LegacyChainContainer, chainID uint64)
}

func ResolveChainNames(sourceChainId int64, destChainId int64) (string, string, error) {
// NOTE: This does not support non-evm chains
sourceChainName, err := chainselectors.NameFromChainId(uint64(sourceChainId))
if err != nil {
return "", "", err
}
// NOTE: This does not support non-evm chains
destChainName, err := chainselectors.NameFromChainId(uint64(destChainId))
if err != nil {
return "", "", err
Expand Down
1 change: 1 addition & 0 deletions core/services/relay/evm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ func NewRelayer(ctx context.Context, lggr logger.Logger, chain legacyevm.Chain,
sugared := logger.Sugared(lggr).Named("Relayer")
mercuryORM := mercury.NewORM(opts.DS)
cdcFactory := sync.OnceValues(func() (llo.ChannelDefinitionCacheFactory, error) {
// NOTE: This does not support non-evm chains
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these notes intended to be TODOs, or is this purely documentary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

documentation

chainSelector, err := chainselectors.SelectorFromChainId(chain.ID().Uint64())
if err != nil {
return nil, fmt.Errorf("failed to get chain selector for chain id %s: %w", chain.ID(), err)
Expand Down
1 change: 1 addition & 0 deletions core/services/relay/evm/write_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
func NewWriteTarget(ctx context.Context, relayer *Relayer, chain legacyevm.Chain, gasLimitDefault uint64, lggr logger.Logger) (*targets.WriteTarget, error) {
// generate ID based on chain selector
id := fmt.Sprintf("write_%[email protected]", chain.ID())
// NOTE: This does not support non-evm chains
chainName, err := chainselectors.NameFromChainId(chain.ID().Uint64())
if err == nil {
id = fmt.Sprintf("write_%[email protected]", chainName)
Expand Down
30 changes: 16 additions & 14 deletions deployment/address_book.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,22 @@ type AddressBookMap struct {
mtx sync.RWMutex
}

// save will save an address for a given chain selector. It will error if there is a conflicting existing address.
func (m *AddressBookMap) save(chainSelector uint64, address string, typeAndVersion TypeAndVersion) error {
_, exists := chainsel.ChainBySelector(chainSelector)
if !exists {
// Save will save an address for a given chain selector. It will error if there is a conflicting existing address.
func (m *AddressBookMap) Save(chainSelector uint64, address string, typeAndVersion TypeAndVersion) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update the Save test with some other family addresses

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did this become public? i don't see anything that using it in other packages.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

case added!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah +1 @krehermann this should remain a private helper, there's already a public Save. Not sure how this actually compiles it looks like it has the same signature as the public Save?

family, err := chainsel.GetSelectorFamily(chainSelector)
if err != nil {
return errors.Wrapf(ErrInvalidChainSelector, "chain selector %d", chainSelector)
}
if address == "" || address == common.HexToAddress("0x0").Hex() {
return errors.Wrap(ErrInvalidAddress, "address cannot be empty")
}
if common.IsHexAddress(address) {
// IMPORTANT: WE ALWAYS STANDARDIZE ETHEREUM ADDRESS STRINGS TO EIP55
address = common.HexToAddress(address).Hex()
} else {
return errors.Wrapf(ErrInvalidAddress, "address %s is not a valid Ethereum address, only Ethereum addresses supported", address)
if family == chainsel.FamilyEVM {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could add your aptos specific validation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have any yet, but we'll create a ticket to add it later. We are already tackling hardening tasks like this one

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was toying with an idea of building in aptos and other chain or family validations into the chainlink-selectors repo, so we'd have a set of reusable validations keyed off of chain ID in a way that hides all the conditionality from calling code. Valid addresses was definitely in the right zone. Doing it here is fine, but we should think about making this more generally usable.

if address == "" || address == common.HexToAddress("0x0").Hex() {
return errors.Wrap(ErrInvalidAddress, "address cannot be empty")
}
if common.IsHexAddress(address) {
// IMPORTANT: WE ALWAYS STANDARDIZE ETHEREUM ADDRESS STRINGS TO EIP55
address = common.HexToAddress(address).Hex()
} else {
return errors.Wrapf(ErrInvalidAddress, "address %s is not a valid Ethereum address, only Ethereum addresses supported for EVM chains", address)
}
}
if typeAndVersion.Type == "" {
return fmt.Errorf("type cannot be empty")
Expand Down Expand Up @@ -142,8 +144,8 @@ func (m *AddressBookMap) Addresses() (map[uint64]map[string]TypeAndVersion, erro
}

func (m *AddressBookMap) AddressesForChain(chainSelector uint64) (map[string]TypeAndVersion, error) {
_, exists := chainsel.ChainBySelector(chainSelector)
if !exists {
_, err := chainsel.GetChainIDFromSelector(chainSelector)
if err != nil {
return nil, errors.Wrapf(ErrInvalidChainSelector, "chain selector %d", chainSelector)
}

Expand Down
2 changes: 2 additions & 0 deletions deployment/ccip/propose.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func NewTestMCMSConfig(t *testing.T, e deployment.Environment) MCMSConfig {
func SignProposal(t *testing.T, env deployment.Environment, proposal *timelock.MCMSWithTimelockProposal) *mcms.Executor {
executorClients := make(map[mcms.ChainIdentifier]mcms.ContractDeployBackend)
for _, chain := range env.Chains {
// NOTE: This does not support non-evm chains
chainselc, exists := chainsel.ChainBySelector(chain.Selector)
require.True(t, exists)
chainSel := mcms.ChainIdentifier(chainselc.Selector)
Expand Down Expand Up @@ -141,6 +142,7 @@ func GenerateAcceptOwnershipProposal(
// TODO: Accept rest of contracts
var batches []timelock.BatchChainOperation
for _, sel := range chains {
// NOTE: This does not support non-evm chains
chain, _ := chainsel.ChainBySelector(sel)
acceptOnRamp, err := state.Chains[sel].OnRamp.AcceptOwnership(deployment.SimTransactOpts())
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions deployment/ccip/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,12 @@ func (s CCIPOnChainState) View(chains []uint64) (map[string]view.ChainView, erro
m := make(map[string]view.ChainView)
for _, chainSelector := range chains {
// TODO: Need a utility for this
// NOTE: This does not support non-evm chains
chainid, err := chainsel.ChainIdFromSelector(chainSelector)
if err != nil {
return m, err
}
// NOTE: This does not support non-evm chains
chainName, err := chainsel.NameFromChainId(chainid)
if err != nil {
return m, err
Expand Down
2 changes: 2 additions & 0 deletions deployment/common/view/nops.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ func GenerateNopsView(nodeIds []string, oc deployment.OffchainClient) (map[strin
IsEnabled: nodeDetails.Node.IsEnabled,
}
for sel, ocrConfig := range node.SelToOCRConfig {
// NOTE: This does not support non-evm chains
chainid, err := chainsel.ChainIdFromSelector(sel)
if err != nil {
return nv, err
}
// NOTE: This does not support non-evm chains
chainName, err := chainsel.NameFromChainId(chainid)
if err != nil {
return nv, err
Expand Down
1 change: 1 addition & 0 deletions deployment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ func NodeInfo(nodeIDs []string, oc NodeChainConfigsLister) (Nodes, error) {
if err != nil {
return nil, err
}
// NOTE: This does not support non-evm chains
sel, err := chain_selectors.SelectorFromChainId(uint64(evmChainID))
if err != nil {
return nil, err
Expand Down
1 change: 1 addition & 0 deletions deployment/environment/devenv/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ type ChainConfig struct {
func NewChains(logger logger.Logger, configs []ChainConfig) (map[uint64]deployment.Chain, error) {
chains := make(map[uint64]deployment.Chain)
for _, chainCfg := range configs {
// NOTE: This does not support non-evm chains
selector, err := chainselectors.SelectorFromChainId(chainCfg.ChainID)
if err != nil {
return nil, fmt.Errorf("failed to get selector from chain id %d: %w", chainCfg.ChainID, err)
Expand Down
1 change: 1 addition & 0 deletions deployment/environment/devenv/don.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ func (n *Node) ExportEVMKeysForChain(chainId string) ([]*clclient.ExportedEVMKey
// ReplayLogs replays logs for the chains on the node for given block numbers for each chain
func (n *Node) ReplayLogs(blockByChain map[uint64]uint64) error {
for sel, block := range blockByChain {
// NOTE: This does not support non-evm chains
chainID, err := chainsel.ChainIdFromSelector(sel)
if err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions deployment/environment/memory/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func generateMemoryChain(t *testing.T, inputs map[uint64]EVMChain) map[uint64]de
chains := make(map[uint64]deployment.Chain)
for cid, chain := range inputs {
chain := chain
// NOTE: This does not support non-evm chains
sel, err := chainsel.SelectorFromChainId(cid)
require.NoError(t, err)
backend := NewBackend(chain.Backend)
Expand Down
1 change: 1 addition & 0 deletions deployment/environment/memory/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type Node struct {

func (n Node) ReplayLogs(chains map[uint64]uint64) error {
for sel, block := range chains {
// NOTE: This does not support non-evm chains
chainID, _ := chainsel.ChainIdFromSelector(sel)
if err := n.App.ReplayFromBlock(big.NewInt(int64(chainID)), block, false); err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions deployment/keystone/changeset/update_node_capabilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func (req *MutateNodeCapabilitiesRequest) Validate() error {
if len(req.P2pToCapabilities) == 0 {
return fmt.Errorf("p2pToCapabilities is empty")
}
// NOTE: This does not support non-evm chains
_, exists := chainsel.ChainBySelector(req.RegistryChainSel)
if !exists {
return fmt.Errorf("registry chain selector %d does not exist", req.RegistryChainSel)
Expand Down
2 changes: 2 additions & 0 deletions deployment/keystone/changeset/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ func ViewKeystone(e deployment.Environment) (json.Marshaler, error) {
}
chainViews := make(map[string]view.KeystoneChainView)
for chainSel, contracts := range state.ContractSets {
// NOTE: This does not support non-evm chains
chainid, err := chainsel.ChainIdFromSelector(chainSel)
if err != nil {
return nil, err
}
// NOTE: This does not support non-evm chains
chainName, err := chainsel.NameFromChainId(chainid)
if err != nil {
return nil, err
Expand Down
1 change: 1 addition & 0 deletions deployment/keystone/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func (r ConfigureContractsRequest) Validate() error {
return fmt.Errorf("don validation failed for '%s': %w", don.Name, err)
}
}
// NOTE: This does not support non-evm chains
_, ok := chainsel.ChainBySelector(r.RegistryChainSel)
if !ok {
return fmt.Errorf("chain %d not found in environment", r.RegistryChainSel)
Expand Down
2 changes: 2 additions & 0 deletions deployment/keystone/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ func NodeOperator(name string, adminAddress string) capabilities_registry.Capabi
}

func AdminAddress(n *Node, chainSel uint64) (string, error) {
// NOTE: This does not support non-evm chains
cid, err := chainsel.ChainIdFromSelector(chainSel)
if err != nil {
return "", fmt.Errorf("failed to get chain id from selector %d: %w", chainSel, err)
Expand Down Expand Up @@ -355,6 +356,7 @@ func firstChainConfigByType(ccfgs []*v1.ChainConfig, t v1.ChainType) (*v1.ChainC
}

func registryChainConfig(ccfgs []*v1.ChainConfig, t v1.ChainType, sel uint64) (*v1.ChainConfig, error) {
// NOTE: This does not support non-evm chains
chainId, err := chainsel.ChainIdFromSelector(sel)
if err != nil {
return nil, fmt.Errorf("failed to get chain id from selector %d: %w", sel, err)
Expand Down
11 changes: 11 additions & 0 deletions integration-tests/ccip-tests/actions/ccip_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ func (ccipModule *CCIPCommon) WaitForPriceUpdates(
destChainId uint64,
allTokens []common.Address,
) error {
// NOTE: This does not support non-evm chains
destChainSelector, err := chainselectors.SelectorFromChainId(destChainId)
if err != nil {
return err
Expand Down Expand Up @@ -557,6 +558,7 @@ func (ccipModule *CCIPCommon) WatchForPriceUpdates(ctx context.Context, lggr *ze
return fmt.Errorf("no event subscription found")
}
processEvent := func(value, timestamp *big.Int, destChainSelector uint64, raw types.Log) error {
// NOTE: This does not support non-evm chains
destChain, err := chainselectors.ChainIdFromSelector(destChainSelector)
if err != nil {
return err
Expand Down Expand Up @@ -663,6 +665,7 @@ func (ccipModule *CCIPCommon) SyncUSDCDomain(destTransmitter *contracts.TokenTra
if destTransmitter == nil {
return fmt.Errorf("invalid address")
}
// NOTE: This does not support non-evm chains
destChainSelector, err := chainselectors.SelectorFromChainId(destChainID)
if err != nil {
return fmt.Errorf("invalid chain id %w", err)
Expand Down Expand Up @@ -1391,6 +1394,7 @@ func (sourceCCIP *SourceCCIPModule) DeployContracts(lane *laneconfig.LaneConfig)
log.Info().Msg("Deploying source chain specific contracts")

sourceCCIP.LoadContracts(lane)
// NOTE: This does not support non-evm chains
sourceChainSelector, err := chainselectors.SelectorFromChainId(sourceCCIP.Common.ChainClient.GetChainID().Uint64())
if err != nil {
return fmt.Errorf("getting chain selector shouldn't fail %w", err)
Expand Down Expand Up @@ -1827,6 +1831,7 @@ func (sourceCCIP *SourceCCIPModule) SendRequest(
gasLimit *big.Int,
) (common.Hash, time.Duration, *big.Int, error) {
var d time.Duration
// NOTE: This does not support non-evm chains
destChainSelector, err := chainselectors.SelectorFromChainId(sourceCCIP.DestinationChainId)
if err != nil {
return common.Hash{}, d, nil, fmt.Errorf("failed getting the chain selector: %w", err)
Expand Down Expand Up @@ -1896,6 +1901,7 @@ func DefaultSourceCCIPModule(
return nil, err
}

// NOTE: This does not support non-evm chains
destChainSelector, err := chainselectors.SelectorFromChainId(destChainId)
if err != nil {
return nil, fmt.Errorf("failed getting the chain selector: %w", err)
Expand Down Expand Up @@ -2061,6 +2067,7 @@ func (destCCIP *DestCCIPModule) DeployContracts(
contractDeployer := destCCIP.Common.Deployer
log.Info().Msg("Deploying destination chain specific contracts")
destCCIP.LoadContracts(lane)
// NOTE: This does not support non-evm chains
destChainSelector, err := chainselectors.SelectorFromChainId(destCCIP.Common.ChainClient.GetChainID().Uint64())
if err != nil {
return fmt.Errorf("failed to get chain selector for destination chain id %d: %w", destCCIP.Common.ChainClient.GetChainID().Uint64(), err)
Expand Down Expand Up @@ -2649,6 +2656,7 @@ func DefaultDestinationCCIPModule(
return nil, err
}

// NOTE: This does not support non-evm chains
sourceChainSelector, err := chainselectors.SelectorFromChainId(sourceChainId)
if err != nil {
return nil, fmt.Errorf("failed to get chain selector for source chain id %d: %w", sourceChainId, err)
Expand Down Expand Up @@ -2858,6 +2866,7 @@ func (lane *CCIPLane) Multicall(noOfRequests int, multiSendAddr common.Address)
if err != nil {
return fmt.Errorf("failed to form the ccip message: %w", err)
}
// NOTE: This does not support non-evm chains
destChainSelector, err := chainselectors.SelectorFromChainId(lane.Source.DestinationChainId)
if err != nil {
return fmt.Errorf("failed getting the chain selector: %w", err)
Expand Down Expand Up @@ -3043,10 +3052,12 @@ func (lane *CCIPLane) ExecuteManually(options ...ManualExecutionOption) error {
}
}
}
// NOTE: This does not support non-evm chains
destChainSelector, err := chainselectors.SelectorFromChainId(lane.DestChain.GetChainID().Uint64())
if err != nil {
return err
}
// NOTE: This does not support non-evm chains
sourceChainSelector, err := chainselectors.SelectorFromChainId(lane.SourceChain.GetChainID().Uint64())
if err != nil {
return err
Expand Down
1 change: 1 addition & 0 deletions integration-tests/ccip-tests/load/ccip_loadgen.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ func (c *CCIPE2ELoad) Call(_ *wasp.Generator) *wasp.Response {
lggr.Debug().Str("triggeredAt", time.Now().GoString()).Msg("triggering transfer")
var sendTx *types.Transaction

// NOTE: This does not support non-evm chains
destChainSelector, err := chain_selectors.SelectorFromChainId(sourceCCIP.DestinationChainId)
if err != nil {
res.Error = fmt.Sprintf("reqNo %d err %s - while getting selector from chainid", msgSerialNo, err.Error())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ func (m *CCIPMultiCallLoadGenerator) MergeCalls() ([]contracts.CCIPMsgData, map[
statDetails := make(map[string]MultiCallReturnValues)

for _, e2eLoad := range m.E2ELoads {
// NOTE: This does not support non-evm chains
destChainSelector, err := chain_selectors.SelectorFromChainId(e2eLoad.Lane.Source.DestinationChainId)
if err != nil {
return ccipMsgs, statDetails, err
Expand Down
Loading