Layer Zero
Getting Started
_lzSend(
_dstEid, // the destination endpoint id
_payload, // encoded message payload being sent
_options, // message execution options
MessagingFee(msg.value, 0), // the fee in native gas and ZRO token
payable(msg.sender) // refund address in case of failed source message
);function _lzReceive(
Origin calldata _origin, // struct containing srcEid, sender address, and the message nonce
bytes32 _guid, // global message packet identifier
bytes calldata payload, // encoded message being received
address _executor, // the address of who executed the message
bytes calldata _extraData // appended executor data for the call
) internal override {
data = abi.decode(payload, (string)); // your receive logic here
}
Prerequisites
Deploying your Contracts
Connecting your Contracts
Last updated