Skip to content

furkanahmetk/telegram-validator-bot

Casper Validator Bot

Casper Validator Bot is a Telegram bot that provides information about active validators working on Casper Network.

Prerequisites

Python3, pip and make packages should be installed on your system.

Install MongoDB

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.

How to set-up

  1. Run back-end.

  2. Clone the repository.

$ git clone https://github.com/furkanahmetk/telegram-validator-bot
  1. Navigate to repository folder.
$ cd telegram-validator-bot
  1. Create a .env file from the example.env template:
$ cp example.env .env
  1. Create a new Telegram bot. See how to

  2. Copy your Telegram bot token to .env file.

  3. Edit src/config.pg

Add your local URL and port to BASE_URL variable. It is set to 'http://localhost:5555/' by default.

  1. Run MongoDB.
$ mongosh

Run app

$ make run

Run tests

$ make test

Bot Usage

Get status of a validator:

Send a message to bot:

/status <pubKey>

Status Result

Get total delegators of a validator:

Send a message to bot:

/totaldelegators <pubKey>

Total Delegators Result

Get total stake of a validator:

Send a message to bot:

/totalstake <pubKey>

Total Stake Result

Get annual percentage yield(apy):

Send a message to bot:

/apy

APY Result

Get performance of a validator:

Send a message to bot:

/performance <pubKey>

Performance Result

Get fee of a validator:

Send a message to bot:

/fee <pubKey>

Fee Result

Get updates of a validator:

Send a message to bot to get latest information about a validator:

/update <pubKey>

Update Result

Turn on alarm

Send a message to bot to set an alarm that sends a message on any change:

/alarm <pubKey>

Alarm Result

Alarm Result

Turn off an alarm

Send a message to bot to turn of an active alarm:

/forget <pubKey>

Alarm Result

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages