This project demonstrates how to use the fxPortal contracts to transfer ERC20 tokens from Goerli to Mumbai.
- Run npm i to install dependencies
- Put your private key in the .env.examples file and rename to .env when finished
- Run npx hardhat run scripts/deploy.js --network goerli to deploy ERC20 contract
- Paste the newly deployed contract address in the tokenAddress variable for the other scripts
- Make sure to fill in your public key
- Run npx hardhat run scripts/mint.js --network goerli to mint tokens to your wallet
- Run npx hardhat run scripts/approveDeposit.js --network goerli to approve and deposit your tokens to polygon
- Wait 20-30ish minutes for tokens to show on polygon account
- Use polyscan.com to check your account for the tokens. Once they arrive, you can click on the transaction to get the contract address for polygon.
- Use this polygon contract address for your getBalance script's tokenAddress
- Run npx hardhat run scripts/getBalance.js --network mumbai to see the new polygon balance