Skip to main content

Custom Contract

Most of the time artist can deploy Verse contract with one click using our UI, however if you'd like to write your own contract that is also possible. The only requirements are:

  • implement mint method (since Verse performs minting on behalf of the user)
  • grant Verse wallet permission to call mint method

Delegated minting can be implemented in a similar way as shown below.

address public mintingManager;

modifier onlyMinter() {
require(msg.sender == mintingManager);
_;
}

function mint(address to, uint256 tokenId) public onlyMinter {
// your custom implementation
}

function mintBatch(address[] memory to, uint256[] memory tokenIds) public onlyMinter {
// your custom implementation
}

Verse will display the art based on the data returned in tokenURI.