The project deploys an NFT collection on the Ethereum blockchain, Maps the collection to Polygon, and Transfers assets over via the Polygon Bridge.
Download the codes by downloading the entire repository which will give you access to other contents of the repository. Navigate to the Poly_Proof project directory, run:
npm install
After installing the dependencies, run the test file by using the following command:
npx hardhat test
Before deploying, make sure to rename ".env.example" to ".env" and provide your wallet private key where required i.e. "PRIVATE_KEY= 'your wallet private key'". Run the following command to deploy the ERC721 contract to the Goerli Ethereum Testnet:
npx hardhat run scripts/deploy.js --network goerli
NOTE: After deploying the address will generate. So, copy that address into contarctAddress.js(stored in metadata folder) and also in batchMint.js(stored in scripts folder)
The script will deploy the contract
Run the following command to batch-mint NFTs using the deployed ERC721 contract:
npx hardhat run scripts/batchMint.js --network goerli
The script will mint the specified number of NFTs and assign them to your address.
Run the following commands to approve and deposit the minted NFTs from Ethereum to the Polygon Mumbai network using the FxPortal Bridge:
npx hardhat run scripts/approveDeposit.js --network goerli
This code is released under the MIT License. Feel free to use, modify, and distribute it as per the terms of the license.