Small utility to receive slack alerts when a given EVM wallet balance is low (under given threshold).
- Create a Google Spreadsheet with two sheets
- the first one named
WalletAlerts
- the second one named
Chains
- the first one named
- In the
WalletAlerts
sheet, create the following columns
Column | Description |
---|---|
Name |
A friendly name for your wallet, used in the Slack notification |
Address |
The EVM address you want to monitor |
Threshold |
The threshold, in ETH unit, under which the alert will be sent |
Delta |
How often to send an alert: a threshold of 20 and delta of 5 will send an alert at 20, 15, 10, 5 |
Network |
The name of the chain, corresponding to its entry in the Chains sheet |
SlackHook |
A valid Slack hook URL to send the alert to |
- In the
Chains
sheet, create the following columns
Column | Description |
---|---|
name |
The name of the chain |
explorerUrl |
The Etherscan root URL, like https://etherscan.io/, used in the Slack notification |
apiUrl |
The Etherscan root API URL, like https://api.etherscan.io/, to fetch the wallet balance |
currency |
The chain main currency, used in the Slack notification |
- Fill some data
- Get the spreadsheet ID (available in URL after https://docs.google.com/spreadsheets/d/)
- Run the code
pnpm install
SPREADSHEET_ID=[your spreadhsheet id] ETHERSCAN_API_KEY_[NETWORK]=[your Etherscan API key] node index.js