Minting a Large Number of cNFTs.
This code example demonstrates how to mint a large number (e.g., 100) of cNFTs.
The code uses SQLite to store taker addresses and minted signatures.
This is for experimental purposes only.
demo.mp4
- Setup
- Add Taker Address to DB(SQLite)
- Upload JSON Metadata(e.g. Arweave)
- Create Merkle Tree
- Mint cNFT
% cd umi
% mv .env.example .env
% npm i
% cd ..
% cd cNFT
% mv .env.example .env
Replace "ENDPOINT" in the .env file with your API key.
Get your API Key here: Metaplex DAS API RPCs
% npm i
% npx prisma migrate dev --name init
If you want to test minting, generate random taker address. You can modify taker address in takerAddress.csv.
% ts-node src/generateRandomPublicKey.ts > src/assets/takerAddress.csv
Add the taker address to the DB.
% ts-node src/addTakerAddressToDB.ts
% cd ..
% cd umi
% ts-node src/irysUploader.ts
% cd ..
% cd cNFT
% ts-node src/createMerkleTree.ts
Write your Merkle Tree to src/mintWithoutCollection.ts.
% ts-node src/mintWithoutCollection.ts
You can stop it at anytime with command+C.
% ts-node src/findAllTakers.ts
Init Table:
% npx prisma migrate dev --name init
Reset Data:
% npx prisma migrate reset