🦾INTERFACE

Here the interface of a collection smart contract deployed with Certhis

pragma solidity >=0.7.0 <0.9.0;
interface MyInterface {
    event Approval(
        address indexed owner,
        address indexed approved,
        uint256 indexed tokenId
    );
    event ApprovalForAll(
        address indexed owner,
        address indexed operator,
        bool approved
    );
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );
    event Transfer(
        address indexed from,
        address indexed to,
        uint256 indexed tokenId
    );

    function MAX_SUPPLY() external view returns (uint256);

    function approve(address to, uint256 tokenId) external;

    function balanceOf(address owner) external view returns (uint256);

    function buy_token(
        address _to,
        uint256 _nft_id,
        address _affiliation
    ) external payable returns (bool);

    function collection_id() external view returns (uint256);

    function current_minted(address _address) external view returns (uint256);

    function edit_nft(
        uint256 _nft_id,
        uint16 _sellable_type,
        address _sellable_currency,
        uint256 _sellable_amount
    ) external returns (bool);

    function freeze(bool _freez_mint, bool _freez_buy) external returns (bool);

    function getApproved(uint256 tokenId) external view returns (address);

    function get_nft(uint256 _nft_id)
        external
        view
        returns (certhis_struct.NFT memory);

    function index_nft() external view returns (uint256);

    function isApprovedForAll(address owner, address operator)
        external
        view
        returns (bool);

    function mint_p1(
        uint16 nb_mint,
        address _to,
        certhis_struct.NFT memory _nft,
        certhis_struct.mint_proof memory _mint_proof
    ) external payable returns (bool);

    function name() external view returns (string memory);

    function owner() external view returns (address);

    function ownerOf(uint256 tokenId) external view returns (address);

    function renounceOwnership() external;

    function royaltyInfo(uint256 _tokenId, uint256 _salePrice)
        external
        view
        returns (address, uint256);

    function safeMint(
        address _to,
        certhis_struct.NFT memory _nft,
        certhis_struct.mint_proof memory _mint_proof
    ) external payable returns (uint256);

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) external;

    function setApprovalForAll(address operator, bool approved) external;

    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    function symbol() external view returns (string memory);

    function tokenByIndex(uint256 index) external view returns (uint256);

    function tokenOfOwnerByIndex(address owner, uint256 index)
        external
        view
        returns (uint256);

    function tokenURI(uint256 _nft_id) external view returns (string memory);

    function totalSupply() external view returns (uint256);

    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    function transferOwnership(address newOwner) external;
}

interface certhis_struct {
    struct NFT {
        uint256 nft_id;
        uint256 collection_id;
        address owner_address;
        address creator_address;
        string token_uri;
        uint16 sellable_type;
        address sellable_currency;
        uint256 sellable_amount;
        bool minted;
        uint16 royalties;
        address affiliation;
    }

    struct mint_proof {
        uint256 price_for_mint;
        address currency_for_mint;
        bytes32[] proof_price;
        bytes32[] proof_mint;
    }
}

Last updated