ILayerZeroV2BridgeEncoder
Inherits: IBridgeEncoder
Functions
getLzEndpointId
EVM chain ID => LayerZero endpoint ID
function getLzEndpointId(uint256 evmChainId) external view returns (uint32);Parameters
| Name | Type | Description |
|---|---|---|
| evmChainId | uint256 |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint32 |
isOftRegistered
OFT => Whether the OFT is registered
function isOftRegistered(address oft) external view returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
| oft | address |
Returns
| Name | Type | Description |
|---|---|---|
| <none> | bool |
setLzEndpointId
Associates an EVM chain ID with a LayerZero endpoint ID in the contract storage.
function setLzEndpointId(uint256 evmChainId, uint32 lzEndpointId) external;Parameters
| Name | Type | Description |
|---|---|---|
| evmChainId | uint256 | The EVM chain ID. |
| lzEndpointId | uint32 | The LayerZero endpoint ID. |
addOft
Registers an OFT contract.
function addOft(address oft) external;Parameters
| Name | Type | Description |
|---|---|---|
| oft | address | The address of the OFT. |
removeOft
Unregisters an OFT contract.
function removeOft(address oft) external;Parameters
| Name | Type | Description |
|---|---|---|
| oft | address | The address of the OFT. |
Events
LzEndpointIdRegistered
event LzEndpointIdRegistered(uint256 indexed evmChainId, uint32 indexed lzEndpointId);Parameters
| Name | Type | Description |
|---|---|---|
| evmChainId | uint256 | |
| lzEndpointId | uint32 |
OftAdded
event OftAdded(address indexed oft);Parameters
| Name | Type | Description |
|---|---|---|
| oft | address |
OftRemoved
event OftRemoved(address indexed oft);Parameters
| Name | Type | Description |
|---|---|---|
| oft | address |