ODCutils
LZChainidMapping
Contract to manage mappings between chain id and LZ eid for cross-chain communication
See chain id list on https://chainlist.org/ See LZ eid list on https://docs.layerzero.network/v2/developers/evm/technical-reference/deployed-contracts
UnknownChainByChainid
Error thrown when chain id does not have a set LZ eid
UnknownChainByEID
Error thrown when LZ eid does not have a registered chain id
WrongChainIdentifier
Error thrown when chain id or LZ eid is zero
ChainMappingAlreadyExists
Error thrown when chain id or LZ eid are already registered
ChainMappingAdded
Event emitted when a chain id and LZ eid are registered
ChainMappingRemoved
Event emitted when a chain id and LZ eid are removed
addChainMapping
Adds a chain id and LZ eid mapping
Parameters
Name | Type | Description |
---|---|---|
chainId | uint32 | Chain id to map |
eid | uint32 | LZ eid to map |
removeChainMapping
Removes a chain id and LZ eid mapping
Parameters
Name | Type | Description |
---|---|---|
chainId | uint32 | Chain id to remove |
_chainid2eid
Retrieves LZ eid for a chain id
Parameters
Name | Type | Description |
---|---|---|
chainId | uint32 | Chain id to retrieve LZ eid for |
Return Values
Name | Type | Description |
---|---|---|
eid | uint32 | LZ eid for the chain id |
_eid2chainid
Retrieves chain id for a LZ eid
Parameters
Name | Type | Description |
---|---|---|
eid | uint32 | LZ eid to retrieve chain id for |
Return Values
Name | Type | Description |
---|---|---|
chainId | uint32 | Chain id for the LZ eid |