-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,29 @@ | ||
# ibc-client-bot | ||
# ibc-client-bot | ||
## Note: This bot is not ready for production | ||
This bot is used to check IBC client expiration time and alert when a client has time left smaller than 2days. It uses Cosmos REST endpoint to get information. | ||
Since there are many IBC clients created by mistake, instead of scan all of the network clients, the bot only checks specific clients defined by env. | ||
|
||
# Install | ||
- setup required lib | ||
``` | ||
pip3 install -r requirements.txt | ||
``` | ||
- create a bot using [BotFather](https://t.me/BotFather) | ||
- setup env | ||
``` | ||
export BOT_TOKEN=xxx | ||
export CLIENT_LIST=xxx # A list contain tuples (clientId, REST endpoint). Example: CLIENT_LIST=[('07-tendermint-13', 'https://rest.cosmos.directory/aura'),('07-tendermint-17', 'https://rest.cosmos.directory/aura')] | ||
export CHANNEL_ID=xxx # Telegram channel id for sending alerts | ||
export POLL_INTERVAL=xxx # for check new message in telegram | ||
``` | ||
- run bot | ||
``` | ||
python3 bot.py | ||
``` | ||
# How to use | ||
|
||
Command to interact with bot: | ||
``` | ||
/client_status - Check the status of clients. | ||
/help - Get help with available commands. | ||
``` |