Giter VIP home page Giter VIP logo

tfchainmon's Introduction

TFchain monitoring tool

Installation

Installing rust:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Config file

Config file be formatted like the following:

- network:
  network_url: "wss://tfchain.dev.grid.tf:433"
  accounts:
    - name: Activation Service
      address: 5GNNdXSQJC5LxKv1s2zvhCwyWyCg1msGPanHCsSNbWyu2Z2n
      threshold: 10
    - name: Bridge
      address: 5Dfiaccytu741LE8KxqegrBeVKgmCKRHU7KEuamf3igxgGW9
      threshold: 1
    - name: Offchain worker
      address: 5GRiEUaZZxuS7J1VbCvmz9LRdgyMJR9mxPE9JzCZu45JyXTx
      treshold: 1
- network:
  network_url: "wss://tfchain.grid.tf:433"
  accounts:
    - name: Activation Service
      address: 5GNNdXSQJC5LxKv1s2zvhCwyWyCg1msGPanHCsSNbWyu2Z2n
      threshold: 5

Note: you can set a treshold in TFT for each account, if the balance is below this treshold, a message will trigger

Note: url should have a port, in case of wss it's 443 otherwise it could be 9944 or 80 depending on the settings of the websocket endpoint.

Setting up a bot

Talk to botfather on telegram to create a new bot, once created you will get a token, save this for later. Now add this bot to a group on telegram, now get the chat id for this group:

Go to: https://api.telegram.org/bot<BOT_TOKEN>/getUpdates

and find the corresponding chat group and extract the ID.

Running

export TELEGRAM_BOT_TOKEN=token
export TELEGRAM_CHAT_ID=-1231231
cargo run ./config.yaml

tfchainmon's People

Contributors

dylanverstraete avatar sivanaikk avatar

Watchers

 avatar  avatar

Forkers

sivanaikk

tfchainmon's Issues

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.