MOS interface

MOSV2 is a token cross-chain service that operates on EVM-compatible ecosystems. It primarily offers four token cross-chain modes:

  • transferOutToken This mode is used to initiate cross-chain requests for transferring specific tokens to the target chain.

  • transferOutNative It is used to initiate cross-chain requests for transferring native tokens of the source chain to the target chain.

  • depositToken In this mode, tokens are transferred from the source chain to the target chain for staking or collateralization.

  • depositNative Native tokens of the source chain are transferred to the target chain for staking or collateralization in this mode.

Please refer to a more detailed code implementation for specifics IMOSV2

If you want to perform cross-chain operations using MOSV2, you can use the following interfaces

// SPDX-License-Identifier: MIT

pragma solidity 0.8.7;

interface IMOSV2 {
    function transferOutToken(address _token, bytes memory _to, uint _amount, uint _toChain) external;
    function transferOutNative(bytes memory _to, uint _toChain) external payable;
    function depositToken(address _token, address to, uint _amount) external;
    function depositNative(address _to) external payable ;


    event mapTransferOut(uint256 indexed fromChain, uint256 indexed toChain, bytes32 orderId,
        bytes token, bytes from, bytes to, uint256 amount, bytes toChainToken);

    event mapTransferIn(uint256 indexed fromChain, uint256 indexed toChain, bytes32 orderId,
        address token, bytes from,  address to, uint256 amount);

    event mapDepositOut(uint256 indexed fromChain, uint256 indexed toChain, bytes32 orderId,
        address token, bytes from, address to, uint256 amount);

}

MOSV3 is a message-based cross-chain service that primarily operates in EVM-compatible ecosystems. It is responsible for transferring information from the source chain to the target chain for message updates and execution. It not only supports cross-chain token transfers but also enables the update of contract information.

  • transferOut It is primarily responsible for popping cross-chain message logs and has messengers for executing message delivery on the target chain.

  • getMessageFee Its main responsibility is to estimate the fees for cross-chain transactions from the source chain to the target chain.

Please refer to a more detailed code implementation for specificsIMOSV3

Last updated