This project is based on the guide, How To Batch Mint NFTs Using the ERC-721A Implementation by Ferhat Kochan.
To begin, clone the qn-guide-examples repo and navigate to this project's directory.
git clone https://github.com/quiknode-labs/qn-guide-examples.git
cd qn-guide-examples/polygon/erc721a-implementationCreate a .env file and add your environment variables in the following format:
PRIVATE_KEY=
RPC_URL=
Npm should be used to install project directories:
npm iTo compile the set of smart contracts, run the following command:
npx hardhat compileTo deploy the BatchNFTs contract to Mumbai testnet, run the following command:
npx hardhat run --network mumbai scripts/deploy.jsAs configured in
hardhat.config.jsanddeploy.js.
To mint NFTs, run the following command:
npx hardhat run --network mumbai scripts/mint.js