Giter Club home page Giter Club logo

anchorchecker's Introduction

Чтобы бот завелся нужен config.cfg в той же директории что и сам бот, структура этого файла следующая:

[TELEGRAM]
API_TOKEN: <your token here>

Задача Надо реализовать бота-проверяльщика для мониторинга состояния Anchor Protocol в блокчейне Terra. Протокол - средство для получения пассивного дохода путем предоставлениям криптовалютных займов другим участникам. Участие в протоколе - дело рискованное. Поэтому необходимо уметь мониторить:

  • ключевую ставку в протоколе
  • резервы

Изменения по этим показателям запрашиваются в блокчейне и поступают пользователю в Телеграм-бот. Это очень удобно, потому что многие пользователи Terra сидят в Телеграме.

Сторонние Сервисы Штука для работы с Telegram API, наша самописная штука на Node.js, которая, в свою очередь, работает на Anchor SDK.

Документация https://shibaeff.github.io/anchorBotDocs/

Интерфейс

/apy - add a new APY notifier

/list - list all current notifiers

/anc_price - get the current price of ANC token

/luna_price - get the current price of LUNA

/anc_cap - get the current ANC token market cap

/ust_cap - get the current UST market cap

/ust_price - get the current UST price

/help - show this help

Deploy

local, simple:

  1. set your configs to config.cfg (telegram), set global LC_ALL
[TELEGRAM]
API_TOKEN = 0xyourToken
[REMOTE]
HOST=0.0.0.0
  1. run LC_ALL=ru_RU.UTF8 python3 . or python3 .

docker-based, local:

  1. set your configs to .env
KEY=5241538
LC_ALL=ru_RU.UTF8
  1. run docker-compose up

docker-based, remote:

  1. set your configs to .env
KEY=5241538
LC_ALL=ru_RU.UTF8
  1. run deploy.sh [email protected] - where you want to deploy

Checkup

  • flake8, pydocstyle: run doit run_checks
  • tests: 5 tests for functions, located at anchor_binding
  • documentation is available here: ; documentation was generated with sphinx (use doit docs)
  • localization: run doit compile_run; before deployment set LC_ALL (english is default, ru_RU.UTF8 should be set in env)
  • automatization: Dockerfile, docker-compose are available.

anchorchecker's People

Contributors

ipsavitsky avatar shibaeff avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

anchorchecker'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.