Mint pattern requirements
You can choose this pattern to allow your users to mint items at claim
Last updated
You can choose this pattern to allow your users to mint items at claim
Last updated
In order to be able to use the “mint at claim” pattern the NFT contract in addition to standard ERC721/1155 ABIs, contracts should have the functions based on OpenZeppelin Access pattern ().
Please note that safeMint
function doesn’t have tokenURI
parameter, so metadata for ERC721 tokens should be uploaded to all tokens in advance and tokenURI
function should automatically compute metadata URL by concatenating baseURI
and `tokenId together.You can see an example ERC721 Mintable Contract implementation here -
When claiming ERC1155 token, Linkdrop Escrow contract will call the NFT contract's mintTo
function and empty string will be passed as tokenURI.
Metadata for each token id should be prepared before claim by minting 0 tokens and passing correct tokenURI for that token id. The NFT contract should respect that logic, please refer to the to learn more.
safeMint
for ERC721 and mint
for ERC1155 contracts should both respect MINTER_ROLE, which is computed the following way:
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");