Skip to main content

List NFTs on Mavis Market

Overview

The Mavis Market is an NFT secondary marketplace. In a secondary sale, a game studio lists an NFT collection on Mavis Market, letting users trade the collection items with each other, while the creator receives a royalty fee for each transaction.

Mavis Market is designed to help you reach a broader audience by listing your collection on the storefront and collection page. You can customize the collection's page with a banner, avatar, and links to your social media accounts.

Prerequisites

Basic knowledge of Solidity for smart contract development.

Steps

Step 1. Create an NFT smart contract

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 ERC-721 smart contract and incorporates other methods for smooth operation. Find the required dependencies in the contract-template repository.
// 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]);
}
}
}
  1. 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.
// 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/") {}
}
  1. Prepare metadata for your NFTs by following our NFT metadata standards. For example:
// 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",
...
}
}

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

Step 2. Deploy your contract on the Saigon testnet

Deploy and verify your contract on the Saigon testnet to ensure that everything works as expected.

For more information, see Deploy a smart contract and Verify a smart contract.

Step 3. Submit information about your collection

To display the information about your collection on the Mavis Market's storefront and your collection's page, fill in the form.

Note: If you have more than one collection to list, submit each collection in its own form.

After submitting the form, inform your Sky Mavis point of contact to list your collections on the Mavis Market's staging environment for testing.

Your collection page should look similar to this:

The elements on the collection page correspond to the following fields in the collection form:

  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 4. Submit assets for Ronin Wallet

To display your assets in Ronin Wallet, provide information as requested by your Sky Mavis point of contact.

Generally, the information includes the following:

  • ERC-721 contract address
  • Collection banner (375x166)
  • Collection avatar (100x100)
  • ABI as a JSON file
  • Tokens to test
  • Your desired classification in Ronin Wallet's Trusted Domain System (TDS). For more information, see Register your appp in TDS.

Step 5. Review the collection on staging

After Sky Mavis publishes your collection on the Mavis Market staging environment, mint some NFTs and associate the metadata with them.

Step 6. Launch on the Ronin mainnet

After reviewing your collection on staging, on the specified date, Sky Mavis deploys your NFT contract on the Ronin mainnet, and publishes the collection on the Mavis Market production environment.

The users can start buying and selling your items.

See also