Skip to main content

ITokenRegistry

Git Source

This interface is used to map token addresses from one evm chain to another.

Functions

getForeignToken

Local token address => Foreign EVM chain ID => Foreign Token address

function getForeignToken(address _localToken, uint256 _foreignEvmChainId) external view returns (address);

getLocalToken

Foreign token address => Foreign EVM chain ID => Local Token address

function getLocalToken(address _foreignToken, uint256 _foreignEvmChainId) external view returns (address);

setToken

Associates a local and a foreign token addresse.

function setToken(address _localToken, uint256 _foreignEvmChainId, address _foreignToken) external;

Parameters

NameTypeDescription
_localTokenaddressThe local token address.
_foreignEvmChainIduint256The foreign EVM chain ID.
_foreignTokenaddressThe foreign token address.

Events

TokenRegistered

event TokenRegistered(address indexed localToken, uint256 indexed evmChainId, address indexed foreignToken);