List NFT collections on Mavis Market for secondary trading
Overview
Mavis Market is an NFT secondary marketplace where users can trade collection items, and creators earn royalty fees on every transaction. Listing your NFT collection on Mavis Market is a recommended step after the primary sale to expand your collection’s reach and maintain its activity.
The marketplace helps you reach a broader audience through a customizable storefront and collection page. Add banners, avatars, and links to your social media to create a unique and engaging presence for your collection.
Prerequisites
Basic knowledge of Solidity for smart contract development.
Steps
Step 1. Construct your smart contract
This step walks you through creating a smart contract used for minting your NFTs.
-
To write an NFT smart contract, use Sky Mavis's
ERC721Common
or ERC1155Common templates.// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "./interfaces/IERC721State.sol";
import "./interfaces/IERC721Common.sol";
import "./refs/ERC721Nonce.sol";
import "./ERC721PresetMinterPauserAutoIdCustomized.sol";
abstract contract ERC721Common is ERC721Nonce, ERC721PresetMinterPauserAutoIdCustomized, IERC721State, IERC721Common {
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 interfaceId == type(IERC721Common).interfaceId || interfaceId == type(IERC721State).interfaceId
|| 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]);
}
}
} -
Inside the repository are
SampleERC721
andSampleERC1155
contracts that extends the base contracts. Using one of the sample contracts as a base, you can customize it to fit your needs.// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "../ERC721Common.sol";
contract SampleERC721 is ERC721Common {
constructor(string memory name, string memory symbol, string memory baseTokenURI)
ERC721Common(name, symbol, baseTokenURI)
{ }
} -
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",
...
}
}
Browse a sample collection deployed on the Saigon testnet: ApeironPlanet.
Step 2. Deploy to testnet
Deploy your smart contract to the Saigon testnet to ensure that everything works as expected. For more information, see Deploy a smart contract.
Step 3. Submit collection information
To display the information about your collection on the Mavis Market's storefront and your collection's page, fill in the form.
If you have more than one collection to list, submit a different form for each collection.
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:
- Collection's name
- Studio or developer's name
- Collection's thumbnail or avatar (512x512 pixels, up to 600 KB)
- Collection banner (2560x640 pixels, up to 600 KB)
- Smart contract address
- Creator fee
- X (Twitter) link
- Discord link
- 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:
- Contract address
- Collection banner (375 x 166)
- Collection avatar (100 x 100)
- ABI as a JSON file
- Tokens to test
Step 5. Review 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. Deploy to mainnet
- After reviewing your collection on staging, on the specified date, deploy your NFT contract to the Ronin mainnet and inform your Sky Mavis point of contact.
- Sky Mavis publishes the collection on the Mavis Market production environment.
The users can start buying and selling your items.