Casper Validator Bot is a Telegram bot that provides information about active validators working on Casper Network.
Python3, pip and make packages should be installed on your system.
Download and run the mongo db server from official website.
Also, in the Install DB File it is explained how to install and configure DB on MacOS as an example.
-
Run back-end.
-
Clone the repository.
$ git clone https://github.com/furkanahmetk/telegram-validator-bot
- Navigate to repository folder.
$ cd telegram-validator-bot
- Create a
.env
file from theexample.env
template:
$ cp example.env .env
-
Create a new Telegram bot. See how to
-
Copy your Telegram bot token to .env file.
-
Edit
src/config.pg
Add your local URL and port to BASE_URL variable. It is set to 'http://localhost:5555/' by default.
- Run MongoDB.
$ mongosh
$ make run
$ make test
Send a message to bot:
/status <pubKey>
Send a message to bot:
/totaldelegators <pubKey>
Send a message to bot:
/totalstake <pubKey>
Send a message to bot:
/apy
Send a message to bot:
/performance <pubKey>
Send a message to bot:
/fee <pubKey>
Send a message to bot to get latest information about a validator:
/update <pubKey>
Send a message to bot to set an alarm that sends a message on any change:
/alarm <pubKey>
Send a message to bot to turn of an active alarm:
/forget <pubKey>