This service periodically checks the balance of specified Ethereum wallets and sends alerts to a Slack channel if the balance falls below a defined threshold. The service is built with Go and can be run inside a Docker container.
- Periodically checks Ethereum wallet balances.
- Sends alerts to a Slack channel if the balance is below the threshold.
- Configurable via a YAML file.
- Runs as a Docker container.
- Docker
- Go 1.22.4 (if running locally)
Create a config.yaml
file with the following structure:
slackWebhook: "https://hooks.slack.com/services/your/slack/webhook"
rpcUrl: "https://eth.llamarpc.com"
explorerUrl: "https://etherscan.io/"
intervalInSecs: 600
wallets:
- name: "My-wallet-1"
address: "0xC2Ae2e17fE7A18CcA845bf59899C4eAAAAAAAAAA"
thresholdInEth: 1
- name: "My-wallet-2"
address: "0xC2Ae2e17fE7A18CcA845bf59899C4eBBBBBBBBBB"
thresholdInEth: 0.001
Note: The pre-built Docker image can be found here
-
Build the Docker image:
docker build -t wallet-checker .
-
Create and update the
config.yaml
file:cp sample-config.yaml config.yaml nano config.yaml
-
Run the Docker container:
docker run -d --name wallet-checker-container -v ./config.yaml:/app/config.yaml wallet-checker
-
Install dependencies:
go mod download
-
Build the application:
go build -o wallet-checker
-
Create and update the
config.yaml
file:cp sample-config.yaml config.yaml nano config.yaml
-
Run the application:
./wallet-checker
The service logs important events, including balance checks and alerts, with timestamps. Logs are printed to the standard output.
If a wallet’s balance falls below the defined threshold, an alert is sent to the configured Slack channel. The alert includes:
- Wallet name
- Current balance
- Threshold
- Link to the wallet on the explorer
Contributions are welcome! Please open an issue or submit a pull request.
For questions or support, please contact [[email protected]].