NodeJs script to monitor for low gas fees and mint CHI tokens. Fetches gas price from etherscan and mints CHI tokens if price is below set threshold.
Learn more about CHI gas tokens - https://medium.com/@1inch.exchange/1inch-introduces-chi-gastoken-d0bd5bb0f92b
This script might have bugs/errors that may cause you to lose funds - use at your own risk.
Most of the params are configurable and can be set as per your needs.
TOKENS_TO_MINT
number of tokens to mint in a single go - max is 140TRIGGER_GAS_PRICE
mint below this gas price - in gweiTIME_INTERVAL_IN_MIN
How often to ping for gas priceMAX_CHI_BALANCE
if chi_balance > max, no more minting - set to large value for nonstop minting
- Clone repo
npm install
- Setup
.env
file as in.env.example
- Setup configs mentioned above to safe params
node bot.js
Note : Ensure ETH balance in the provided ORIGIN_ADDRESS, otherwise transaction will fail. The needed balance will depend based on the amount of TOKENS_TO_MINT
- Send message to discord after minting
- Monitor price on Uniswap and auto-sell