Skip to content

Smart contract and scripts to batchmint NFTs on Ethereum and transfer to the Polygon network using FxPortal Tunnel. Technologies used: Solidity, Hardhat, Javascript

Notifications You must be signed in to change notification settings

mv3n0m/EthToPolyNFTs

Repository files navigation

EthToPoly NFTs Transfer using ERC721A

Description

This program consists of a simple Smart contract and corresponding scripts, for minting Non-Fungible Tokens (NFTs) in batch. An extended version of ERC721 standard contract is being used here, namely ERC721A, a brainchild of the Azuki Team. Using this project, one can batchmint NFTs, reducing transaction costs on Ethereum, and can tranfer those NFTs to the Polygon network using a FxERC721RootTunnel.

Getting Started

Pre-configuration

  • Place your wallet address and private key into a .env file as shown in .env.sample.
  • Download or copy ABI from FxERC721RootTunnel Contract on Goerli and place it in the assets directory as fxRootContractABI.json.

Install dependencies

    npm install

Executing program

  • While the scripts are divided into separate commands, we can still run npm start to run first 4 commands (viz.: compile, deploy, mint and transfer) merged into one.

  • To compile:

      npm run compile
    
  • To deploy:

      npm run deploy
    
  • To mint:

      npm run mint
    
  • To transfer:

      npm run transfer
    
  • To check balance:

      npm run balance
    

Note:

  • Deployment, minting and transfer are being done on the Goerli testnet.
  • After transfer, we need to wait for around half an hour for the transactions to show up in the Polygon network.
  • When the transactions are available on the Polygon network, we can copy the contract address from there and place it in contractAddress variable inside 4_checkbalance.js script, before running it.

About

Smart contract and scripts to batchmint NFTs on Ethereum and transfer to the Polygon network using FxPortal Tunnel. Technologies used: Solidity, Hardhat, Javascript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published