useMintNFT
Hook for minting a new NFT on a smart contract.
Available to use on smart contracts that implement the ERC721
or ERC1155
standard.
By default, the process uploads and pins the NFT metadata to IPFS before minting.
Example
Parameters
Returns
Mutation object that to mint a new NFT token to the connected wallet
options
The mutation function takes an object with the following properties:
metadata
The metadata of the NFT to mint.
By default, the metadata
object is uploaded and pinned to IPFS before minting.
You can override this behavior by providing a string
to the metadata property. The string must be a URL that points to a valid JSON object containing standard metadata properties
to (required)
The wallet address to mint the NFT to.
Likely, you will want to mint the NFT to the currently connected wallet address.
Use the useAddress
hook to get this value.