Skip to main content

List your NFT collection

Overview

This guide describes the steps for listing your NFT collection on Mavis Market, which includes creating an NFT contract, preparing metadata, and displaying your collection on the testnet and mainnet.

Prerequisites

  • Approval to list NFTs on Mavis Market. To apply, fill in the form.
  • Basic knowledge of Solidity, the language for writing smart contracts.

Step 1. Create an NFT contract on the testnet

This step walks you through creating a smart contract used for minting your NFTs.

  1. To write an NFT smart contract, use Sky Mavis's ERC721Common smart contract, which extends the OpenZeppelin ERC721 smart contract and incorporates additional necessary methods for smoother operation. Find the required dependencies in the contract-template repository.

    contract-template/src/ERC721Common.sol
    // SPDX-License-Identifier: UNLICENSED
    pragma solidity ^0.8.0;

    import "./refs/IERC721State.sol";
    import "./refs/ERC721Nonce.sol";
    import "./ERC721PresetMinterPauserAutoIdCustomized.sol";

    abstract contract ERC721Common is ERC721Nonce, ERC721PresetMinterPauserAutoIdCustomized, IERC721State {
    constructor(string memory name, string memory symbol, string memory baseTokenURI)
    ERC721PresetMinterPauserAutoIdCustomized(name, symbol, baseTokenURI)
    {}

    /**
    * @inheritdoc IERC721State
    */
    function stateOf(uint256 _tokenId) external view virtual override returns (bytes memory) {
    require(_exists(_tokenId), "ERC721Common: query for non-existent token");
    return abi.encodePacked(ownerOf(_tokenId), nonces[_tokenId], _tokenId);
    }

    /**
    * @dev Override `ERC721-_baseURI`.
    */
    function _baseURI()
    internal
    view
    virtual
    override(ERC721, ERC721PresetMinterPauserAutoIdCustomized)
    returns (string memory)
    {
    return super._baseURI();
    }

    /**
    * @dev Override `IERC165-supportsInterface`.
    */
    function supportsInterface(bytes4 interfaceId)
    public
    view
    virtual
    override(ERC721, ERC721PresetMinterPauserAutoIdCustomized)
    returns (bool)
    {
    return super.supportsInterface(interfaceId);
    }

    /**
    * @dev Override `ERC721PresetMinterPauserAutoIdCustomized-_beforeTokenTransfer`.
    */
    function _beforeTokenTransfer(address _from, address _to, uint256 _firstTokenId, uint256 _batchSize)
    internal
    virtual
    override(ERC721Nonce, ERC721PresetMinterPauserAutoIdCustomized)
    {
    super._beforeTokenTransfer(_from, _to, _firstTokenId, _batchSize);
    }

    /**
    * @dev Bulk create new tokens for `_recipients`. Tokens ID will be automatically
    * assigned (and available on the emitted {IERC721-Transfer} event), and the token
    * URI autogenerated based on the base URI passed at construction.
    *
    * See {ERC721-_mint}.
    *
    * Requirements:
    *
    * - the caller must have the `MINTER_ROLE`.
    */
    function bulkMint(address[] calldata _recipients)
    external
    virtual
    onlyRole(MINTER_ROLE)
    returns (uint256[] memory _tokenIds)
    {
    require(_recipients.length > 0, "ERC721Common: invalid array lengths");
    _tokenIds = new uint256[](_recipients.length);

    for (uint256 _i = 0; _i < _recipients.length; _i++) {
    _tokenIds[_i] = _mintFor(_recipients[_i]);
    }
    }
    }
  2. Inside the repository is a SampleERC721 contract that extends the ERC721Common contract. Using this contract as a base, you can customize it to fit your needs.

    contract-template/src/mock/SampleERC721.sol
    // SPDX-License-Identifier: MIT

    pragma solidity ^0.8.0;

    import "./ERC721Common.sol";

    /**
    * @title TestNFT
    * TestNFT - a contract for a test NFT.
    */
    contract TestNFT is ERC721Common {
    constructor() ERC721Common("TestNFT", "TestNFT", "https://link.to.base.metadata.uri/") {}
    }
  3. Prepare metadata for your NFTs by following our NFT metadata standards. You can use one of the two types of metatada conventions:

    // Type 1 - store metadata in an `attributes` array
    {
    "name": "NFT 1",
    "description": "Example NFT",
    "image": "https://example.com/nft-1-image.png",
    "external_url": "https://marketplace.example.com/nft/1",
    "attributes": [
    {
    "display_type": "number",
    "trait_type": "Level",
    "value": 3
    },
    {
    "display_type": "string",
    "trait_type": "Hat",
    "value": "Blue Bandana"
    },
    ...
    ]
    }
    // Type 2 - store metadata in a `properties` object
    {
    "name": "NFT 1",
    "description": "Example NFT",
    "image": "https://example.com/nft-1-image.png",
    "external_url": "https://marketplace.example.com/nft/1",
    "properties": {
    "Level": 3,
    "Hat": "Blue Bandana",
    ...
    }
    }
  4. Mint your NFT and associate the metadata with it.

Check out a sample collection deployed on the Saigon testnet: ApeironPlanet.

Step 2. Display your collection on Mavis Market testnet

Mavis Market needs additional information and images of your collection, which will be displayed on the storefront and your collection's page.

To share this information with us, fill in the form. We'll review your submission and list your collection on the Mavis Market testnet. When it's live, you can review it to ensure that everything looks good.

The following image is an example of a collection page on Mavis Market:

Here are the elements on the collection page corresponding to the form fields:

  1. Collection's name
  2. Studio or developer's name
  3. Collection's thumbnail or avatar (512x512 pixels, up to 600 KB)
  4. Collection banner (2560x640 pixels, up to 600 KB)
  5. Smart contract address
  6. Creator fee
  7. X (Twitter) link
  8. Discord link
  9. Website link

The "Homepage banner" field corresponds to the banner on the Mavis Market homepage (https://marketplace.skymavis.com). This banner should be a 2448x840 image with the file size of up to 600 KB. You can also reuse the collection banner and resize it to 2448x840 pixels.

Here's an example of the Mavis Market homepage banner:

Step 3. Launch the collection on Mavis Market mainnet

After reviewing your collection on the testnet, you can schedule the mainnet launch with our team. On the specified date, Sky Mavis will deploy your NFT contract on the mainnet and transfer ownership to you.

See also

Was this helpful?
Happy React is loading...