https://github.com/pinebit/eth-listener
A simple console app listening to your ETH transactions
https://github.com/pinebit/eth-listener
Last synced: 6 months ago
JSON representation
A simple console app listening to your ETH transactions
- Host: GitHub
- URL: https://github.com/pinebit/eth-listener
- Owner: pinebit
- License: mit
- Created: 2022-04-17T09:54:14.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-02-08T15:21:56.000Z (about 3 years ago)
- Last Synced: 2025-02-22T12:12:18.546Z (about 1 year ago)
- Language: Go
- Size: 164 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eth-listener
A simple console (server) app that is listening to your ETH transactions.
Whenever it detects a transfer for one of the specified ETH accounts, it logs details to the console and also sends a notification to your Telegram bot.
## Configuration
All configuration is done by editing `config.yaml` file.
You must specify at least:
1. ETH node URL. If you don't have one, use 3rd-party providers such as [alchemy](https://alchemy.com/?r=62491cd8ac883927) for free.
2. Add ETH account addresses you want to watch, there may be many addresses. Each address can have a human-readable alias.
Additionally, if you wish to receive notifications to your TG bot:
3. Confgiure your Telegram bot by specifying bot's token and your Telegram username.
## Usage
After you edited `config.yaml`, just start the app by `go run .`
When a new transaction is detected, you will see more log entires such as "received" or "sent":
```
2022/04/23 09:28:10 Metamask sent 0.1 LINK to 0x313573780DB563D6574424A08740f24787a0D6Ba, new balance: 15.2734 LINK
```
To terminate the app, just hit `Ctrl+C`.
## Telegram integration
Telegram bot supports two commans: `/subscribe` and `/unsubscribe`.
The first command will enable bot's notifications and the second command will stop notifications.
The `username` specified in `config.yaml` will restrict other users to see your notifications and/or subscribe/unsubscribe.