mintOnMetadata
This method works on NFT smart contracts v2. If you want to mint on a v1 smart contract, please use the corresponding method.
Mint on previously created metadata. Make sure to attach the required price! If the metadata was created using the ftAddress
parameter, you need to make sure to pass the same the ftAddress
and ftDecimals
to this method.
If you want specific token IDs, you can specify those via the tokenIds
parameter. If your token IDs are already in use, this will cause a smart contract panic. You can also mint multiple tokens without specifying token IDs using the amount
parameter. Make sure that there is no mismatch between your tokenIds
and amount
parameters.
The nftContactId
can be supplied as an argument or through the TOKEN_CONTRACT
environment variable.
As with all new SDK api methods, this call should be wrapped in execute and passed a signing method. For a guide showing how to make a contract call with mintbase-js click here
mintOnMetadata(args: MintOnMetadataArgs): NearContractCall
mintOnMetadata
takes a single argument of type MintOnMetadataArgs
React example
Example usage of mint method in a hypothetical React component:
Last updated