LayerZeroV2BridgeAdapter
Inherits: BridgeAdapter, ILayerZeroComposer
State Variables
LAYER_ZERO_V2_BRIDGE_ID
uint16 private constant LAYER_ZERO_V2_BRIDGE_ID = 2;
Functions
constructor
constructor(address _registry, address _layerZeroV2Endpoint)
BridgeAdapter(_registry, address(0), address(0), _layerZeroV2Endpoint);
initialize
Initializer of the contract.
function initialize(address _controller, bytes calldata) external override initializer;
Parameters
| Name | Type | Description |
|---|---|---|
_controller | address | |
<none> | bytes |
receive
Allows the contract to receive Ether.
receive() external payable;
lzCompose
Composes a LayerZero message from an OApp.
function lzCompose(address _from, bytes32, bytes calldata _message, address, bytes calldata) external payable;
Parameters
| Name | Type | Description |
|---|---|---|
_from | address | The address initiating the composition, typically the OApp where the lzReceive was called. |
<none> | bytes32 | |
_message | bytes | The composed message payload in bytes. NOT necessarily the same payload passed via lzReceive. |
<none> | address | |
<none> | bytes |
_outBridgeTransferCancelDefault
Internal logic for outgoing bridge transfer cancellation default.
function _outBridgeTransferCancelDefault(uint256 transferId) internal view override returns (uint256);
_checkOutBridgeTransferIsCancellable
Checks if an outgoing bridge transfer is in a cancellable state.
function _checkOutBridgeTransferIsCancellable(uint256 transferId) internal override;
_sendOutBridgeTransfer
Handles logic specific to the external bridge protocol for sending out a bridge transfer.
function _sendOutBridgeTransfer(uint256 transferId, bytes calldata data) internal override;
Events
LzGuidCreated
event LzGuidCreated(bytes32 indexed guid, uint256 indexed transferId);