Skip to content

Scripts for sending ERC20 tokens programatically, sending ETH programatically, sending max ETH, calculating gasFee and gasLimit before sending the transaction. Can be used to make bots.

Notifications You must be signed in to change notification settings

SahilAujla/eth-and-erc20-scripts

Repository files navigation

ETH & ERC20 scripts

sendERC20.js - script for ERC20 token transfers using ethers.js and estimating gasLimit ahead of time.

sendMaxETH.js - script for sending the maximum ETH that the user has in the account, it calculates the gasFees ahead of time and subtracts that from the total balance to get the max transferrable ETH value and transfers it to another account.

It shows how to calculate gasFee for a transaction before executing the transaction and how to programatically send ETH using ethers.js.

About

Scripts for sending ERC20 tokens programatically, sending ETH programatically, sending max ETH, calculating gasFee and gasLimit before sending the transaction. Can be used to make bots.

Topics

Resources

Stars

Watchers

Forks