中繼鏈合約

Contract Address

Here to get MAPO mainnet and testnet MCS contract address.

contract interface

interface RelayChainContract {
    
	function transferOutToken(address _token, bytes memory _to, uint256 _amount, uint256 _toChain) external;
    
    function transferOutNative(bytes memory _to, uint _toChain) external;
    
    function depositToken(address _token, address _to, uint _amount) external;
    
    function depositNative(address _to) external;
    
    function transferIn(uint256 _chainId, bytes memory _receiptProof) external;

    function withdraw(address _vaultToken, uint256 _vaultAmount) external;

}

User Interface

transferOutToken

Cross-chain transfer of tokens

function

function transferOutToken(address _token, bytes memory _to, uint256 _amount, uint256 _toChain) external

參數

transferOutNative

跨鏈轉出原生代幣

功能

function transferOutNative(bytes memory _to, uint256 _toChain) external

參數

depositToken

存款代幣在鏈上

功能

function depositToken(address _token, address _to, uint _amount) external

參數

depositNative

存款原生代幣在鏈上

功能

功能 depositNative(address _to) external

參數

取出

取出質押代幣及收入

功能

功能 withdraw(address _vaultToken, uint256 _vaultAmount) external

參數

信使界面

transferIn

執行跨鏈傳輸

功能

功能 transferIn(uint256 _chainId, bytes memory _receiptProof) external

參數

執行跨鏈傳輸

功能

功能 depositIn(uint256 _chainId, bytes memory _receiptProof) external

參數

數據結構

ReceiptProof包括證明和收據證明。


struct receiptProof {

    // the block header where the receipt exists
    blockHeader header;
    // This is the structure that contains the transaction log
    TxReceipt txReceipt;
    // the index of the receipt in the block
    bytes keyIndex;
    // the proof to prove the existance of the above receipt
    bytes[] proof;

}

Last updated