Skip to content

Commit

Permalink
add isEvm func
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkouv committed Jan 23, 2024
1 parent 61b3f49 commit fccd598
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions selectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,12 @@ func ChainByEvmChainID(evmChainID uint64) (Chain, bool) {
ch, exists := chainsByEvmChainID[evmChainID]
return ch, exists
}

func IsEvm(chainSel uint64) (bool, error) {
_, exists := ChainBySelector(chainSel)
if !exists {
return false, fmt.Errorf("chain %d not found", chainSel)
}
// We always return true since only evm chains are supported atm.
return true, nil
}

0 comments on commit fccd598

Please sign in to comment.