Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sahilaujla/eth-and-erc20-scripts

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.
https://github.com/sahilaujla/eth-and-erc20-scripts

bot erc20 eth gasfee

Last synced: about 1 month ago
JSON representation

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.

Awesome Lists containing this project

README

        

# 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.