avislash / algowatcher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Logo

AlgoWatcher

A Telegram Bot for querying and monitoring the Algorand Blockchain
Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

AlgoWatcher is a Telegram bot designed to allow users of the Telegram Messaging platform to query balances and monitor transactions on the Algorand blockchain. This bot is designed to monitor the flow of Planets into an Algorand Public Address and alert the user if it detects disruptions to that flow.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

The Algorand Python SDK must be installed. This can be installed via pip3.

pip3 install py-algorand-sdk 

Refer to py-algorand-sdk for alternative installation methods.

The Python Telegram Bot Package must also be installed. This can be installed via pip3.

pip3 install python-telegram-bot --upgrade

Refer to python-telegram-bot for alternative installation methods.

Installation

  1. Clone the repo
    git clone https://github.com/avislash/algowatcher.git
  2. Modify algowatcher.py to have the appropriate Algorand Node Address and API Key and Telegram Bot API key. These can be either hard coded or stored in a pickle file and read into the program.

3.) Run via $python3 ./algowatcher.py

Usage

To use AlgoWatcher send a /start Telegram message to @algowatcher .

The /start command displays all the commands available to the user as well as a brief description

start_cmd

To get started register an Algorand Public address to query and/or monitor via /address ADDRESS

update_address

Now that the address has been set, you can use the AlgoWatcher bot to check the current number of Algo that the address has via /getAlgoBalance

getAlgoBalance

AlgoWatcher can be used to get the amount of Planets (an Algorand Special Asset [ASA]) in the address as well with /getPlanetBalance

getPlanetBalance

In addition to Planets, AlgoWatcher can get the amount of any valid ASA registered to the Algorand Address by using /getAssetBalance ASSET_ID

getAssetBalance

To setup Planet Monitoring use the /startPlanetMonitor command.

startPlanetMonitor_default

When no inputs are supplied to the /startPlanetMonitor command then the last set interval is used (note: The default interval is 2 minutes and is set when using the /address command).

startPlanetMonitor_norgs

To change the interval use

/startPlanetMonitor INTERVALs to specify the interval in seconds or

startPlanetMonitor_seconds

/startPlanetMonitor INTERVALm to specify the interval in minutes

startPlanetMonitor_minutes

Note: The Planet Monitor only accepts inputs of seconds and minutes at this time since that covers the frequency range of how quickly Planets are issued to Algorand Accounts by PlanetWatch. The bot can be updated to accommodate input of hours and days as well should the community decide it.

Once started the Planet Monitor will alert the user at the specified interval if it does not detect any new Planets coming in.

planetMonitor_example

To stop the Planet monitor use /stopPlanetMonitor

stopPlanetMonitor

After stopping the Planet Monitor, the /startPlanetMonitor command can be used at any time to start the Planet Monitor back up either at the last set interval or a newly specified one. The monitoring interval can also be changed at any time without needing to stop monitor.

restartPlanetMonitor

The /getMonitorStatus command can be used to check the state of the Planet Monitor at any time

getMonitorStatus

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

See LICENSE for more information.

Contact

Avi Misra - | Email: avi@algowatcher.net | Telegram Handle: @avislash | LinkedIn

AlgoWatcher Bot Telegram Handle - @AlgoWatcher

AlgoWatcher Telegram Group - @AlgoWatchers

Project Link: https://github.com/avislash/algowatcher

Additional Documents & Resources

  • Algorand Developers Portal

    • Workspace Setup - This provides a great introduction and overview of the Algorand Developer Tools and Workspace
    • Hello World Transaction - This is provides a great example (in many languages) of how to do a transaction on the Algorand Network
  • Your First Telegram Bot

    • Great overview of the Python Telegram Bot SDK and provides a great overview of how to register a Bot in Telegram and hook it in with the Python Telegram Bot SDK.
  • Best ReadME Template - Where this README template was taken from. It really is the best template!

About

License:Other


Languages

Language:Python 100.0%