EVM Chains Contract
Message EVM Chains Contract
contract interface
interface MessageEvmChainContract {
enum MessageType {
CALLDATA,
MESSAGE
}
struct MessageData {
bool relay;
MessageType msgType;
bytes target;
bytes payload;
uint256 gasLimit;
uint256 value;
}
function initialize(address _wToken, address _lightNode) public;
function transferOut(
uint256 _toChain,
bytes memory _messageData,
address _feeToken
) external payable returns(bool);
function transferIn(uint256 _chainId, bytes memory _receiptProof) external;
}initialize
perform initialization
function
function initialize(address _wToken, address _lightNode)public
parameters
_wToken
address
This is wrap contract address
_lightNode
address
This is the LightClient contract address
transferOut
Cross-chain transfer of message
function
function transferOut(uint256 _toChain,CallData memory _callData) external
parameters
_toChain
address
Target chain id to transfer out
_messageData
bytes
This structure contains information across the chain
_feeToken
address
Toke address for payment of handling charges
transferIn
Perform cross-chain transfer
function
function transferIn(uint256 _chainId, bytes memory _receiptProof) external
parameters
_chainId
uint256
source chain id
_receiptProof
bytes
source chain transfer proof
Data structure
ReceiptProof includes the proof and the receipt to prove.
Last updated
Was this helpful?