> For the complete documentation index, see [llms.txt](https://docs.certhis.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.certhis.io/smart-contract/interface.md).

# INTERFACE

```solidity
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;
    }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.certhis.io/smart-contract/interface.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
