Mint a NFT With Image and Metadata In 1 Transaction
This section describes how to mint a NFT within a Collection.
Last updated
Was this helpful?
This section describes how to mint a NFT within a Collection.
Last updated
Was this helpful?
To use this method, you need an .
You also need to have the address of an XXX contract deployed, the address you are minting to, the path to the image, the name, description, and attributes for the NFT that will be minted. You will need to specify the blockchain network the NFT collection is on, i.e. one of the following supported networks:
avalanche
bnbchain
dogechain
ethereum
fantom
polygon
Assuming you have , you can use the following code in your file (instructions on modifying it follows):
apiKey
string
required
network
string
required
see above for valid networks
contractAddress
string
required
deployed contract address
addressToMintTo
string
required
valid EVM address
image
string
required
can be 1) image file path, 2) URL, or 3) base64 string
nftName
string
required
nftDescription
string
required
attributes
json
optional
must be an array. Example: [ { "trait_type": "color", "value": "blue" } ]
options
object
optional
set metadata storage option (default "arweave"). ex. { metadataStorage: "filecoin" }
see here on how to get an