This script is designed to transfer ERC-20 tokens from one Ethereum wallet to another on the Polygon network. It reads private keys from a specified JSON file and transfers tokens if the wallet balance is above a certain threshold.
- Transfer ERC-20 tokens from one wallet to another
- Checks wallet balance before transferring
- Configurable gas limit, gas price, and minimum transfer amount
- Node.js installed
- Polygon (Matic) network RPC URL
- Smart Contract address of the ERC-20 token on Polygon
- Private key file in JSON format
-
Clone the repository
-
Install the dependencies:
npm install
-
Create a
.envfile in the root directory and add the following environment variables in.env.examle -
Create a
private-keys.jsonfile in the root directory and add the private keys in the following format:[ "0x", "0x" ]Replace the private keys with the actual private keys of the wallets.
-
Run the script:
npm run start