This is the first project in Polygon-Advance, in this project, I was tasked to deploy an NFT collection on the Ethereum blockchain, Map the collection to Polygon, and Transfer 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 installAfter installing the dependencies, run the test file by using the following command:
npx hardhat testBefore 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 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 goerliThe 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 goerliThis project is licensed under the MIT License.