Giter VIP home page Giter VIP logo

telegram-validator-bot's Introduction

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

telegram-validator-bot's People

Contributors

furkanahmetk avatar msalel avatar socodes avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.