Skip to main content

ERC721Mintable

Functionality available for contracts that implement the IERC721 and IMintableERC721 interfaces.

Allows you to mint new NFTs on the contract.

By default, the NFT metadata is uploaded and pinned to IPFS before minting. You can override this default behavior by providing a string that points to valid metadata object instead of an object.

Mint

Mint a new NFT to the connected wallet.

var data = await contract.ERC721.Mint(new NFTMetadata()
{
name = "My NFT", // Name of the NFT
image = "my-image-url", // An image URL or IPFS URI
// Any other valid metadata properties
});
Configuration

metadata

Provide a string that points to, or an NFTMetadata struct containing valid metadata object.

If you provide a struct, the metadata is uploaded and pinned to IPFS before the NFT(s) are minted.

The image property can be an IPFS URI, or a URL to an image.

MintTo

The same as mint, but allows you to specify the address of the wallet that will receive the NFT rather than using the connected wallet address.

var data = await contract.ERC721.MintTo("{{wallet_address}}", new NFTMetadata()
{
name = "My NFT", // Name of the NFT
image = "my-image-url", // An image URL or IPFS URI
// Any other valid metadata properties
});
Configuration

walletAddress

The address of the wallet you want to mint the NFT to.

Must be a string.

metadata

See metadata configuration above.