eth-listener

command module
v0.0.0-...-4017d6a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2023 License: MIT Imports: 21 Imported by: 0

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL