6. Mint from your contract
After instantiating your contract in Step 4, it's now possible to mint NFTs from the contract. If you have not already done so, make sure to replace
minter
in config.js
with the address of your minter contract from the previous step.There are various minting options. You can mint for yourself, to someone's address, or mint a specific NFT to someone's address. You can also mint a batch of NFTs at a time.
You can mint a specific NFT by its token ID to a specific address as well.
yarn mint --for [tokenId] [address]
This command can be used to airdrop tokens before minting starts. There's no fee when run by the contract admin.
NOTE: This command mints the next available
tokenId
to a given address. DO NOT run this until all tokens for specific address have been minted using mint --for
above.Mint to a specific address.
yarn mint --to [address]
Simply repeat the above for every address you want to mint an NFT. The next sequential token ID will be used for each mint call. This command also has no fee for the contract admin.
You can mint a batch of NFTs in one transaction to an address.
yarn mint --to [address] --batch [num]
You can airdrop 1 NFT per unique address to a batch of addresses in one transaction. Make a list of addresses in
airdrop_addresses.csv
. Then run:yarn airdrop-file
By default, each unique address will be airdropped 1 NFT. You can override this by running the command:
yarn airdrop-file --keep-duplicates
Double check it succeeded by running the command:
yarn query
Last modified 10mo ago