Skip to content

Commit

Permalink
Update evm.go
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaveracll committed Nov 21, 2024
1 parent 2a8c348 commit 3686a70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ func ChainIdFromSelector(chainSelectorId uint64) (uint64, error) {
return 0, fmt.Errorf("chain not found for chain selector %d", chainSelectorId)
}

// Deprecated, this only supports EVM chains, use the chain agnostic `GetChainDetailsByChainIDAndFamily` instead
func SelectorFromChainId(chainId uint64) (uint64, error) {
if chainSelectorId, exist := evmChainIdToChainSelector[chainId]; exist {
return chainSelectorId.ChainSelector, nil
}
return 0, fmt.Errorf("chain selector not found for chain %d", chainId)
}

// Deprecated, this only supports EVM chains, use the chain agnostic `NameFromChainId` instead
func NameFromChainId(chainId uint64) (string, error) {
details, exist := evmChainIdToChainSelector[chainId]
if !exist {
Expand Down

0 comments on commit 3686a70

Please sign in to comment.