NFTTransfer

可以将平台 NFT 划转到区块链上,也可以将链上的NFT资产划转到平台账户。

INFTTransfer.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

interface INFTTransfer {
    event DepositBatchERC721(
        address indexed from,
        address indexed to,
        address indexed token,
        uint256[] ids
    );
    event WithdrawBatchERC721(
        address indexed from,
        address indexed to,
        address indexed token,
        uint256[] ids
    );
    event DepositBatchERC1155(
        address indexed from,
        address indexed to,
        address indexed token,
        uint256[] ids,
        uint256[] amounts
    );
    event WithdrawBatchERC1155(
        address indexed from,
        address indexed to,
        address indexed token,
        uint256[] ids,
        uint256[] amounts
    );

    //------------------------------------------------------------
    // interface.
    //------------------------------------------------------------
    function depositBatchERC721(
        address from,
        address token,
        uint256[] memory ids
    ) external;

    function withdrawBatchERC721(
        address to,
        address token,
        uint256[] memory ids
    ) external;

    function depositBatchERC1155(
        address from,
        address token,
        uint256[] memory ids,
        uint256[] memory amounts
    ) external;

    function withdrawBatchERC1155(
        address to,
        address token,
        uint256[] memory ids,
        uint256[] memory amounts
    ) external;

    function ownerOf(address token, uint256 id) external view returns (address);
}
depositBatchwithdrawBatchownerOf

Good to know: Using the 'Page Link' block lets you link directly to a page. If this page's name, URL or parent location changes, the reference will be kept up to date. You can also mention a page – like swapTokenToUsdt – if you don't want a block-level link.

最后更新于