tfgrid_monitoring_bot

command module
v0.0.0-...-02c01e1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

README

tfgrid monitoring bot

This is a bot to monitor the balance in accounts and send warnings if it is under some limit.

How to start

  • Create a new telegram bot if you don't have.
  • Create a new env file .env, for example:
TESTNET_MNEMONIC=<your mainnet mnemonic>
MAINNET_MNEMONIC=<your testnet mnemonic>
TFTS_LIMIT=70000
BOT_TOKEN=<your token>
CHAT_ID=<your chat ID>
MINS=<number of minutes between each message>
  • Create a new json file wallets.json and add the list of addresses you want to monitor, for example:
{ 
    "mainnet": ["<your address>"],
    "testnet": ["<your address>"] 
}
  • Run
make build
bin/tfgridmon -e .env -w wallets.json

Create a bot if you don't have

  • Open telegram app
  • Create a new bot
1. Find telegram bot named "@botfarther"
2. Type /newbot
  • Get the bot token
1. In the same bot named "@botfarther"
2. Type /token
3. Choose your bot
  • Get your chat ID
1. Search for @RawDataBot and select Telegram Bot Raw from the drop-down list.
2. In the json returned, you will find it in section message -> chat -> id

Test

make test

Documentation

Overview

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL