Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Reecepbcups/cosmos-balance-bot
Query notifications for balances on wallets with threasholds
https://github.com/Reecepbcups/cosmos-balance-bot
Last synced: 2 months ago
JSON representation
Query notifications for balances on wallets with threasholds
- Host: GitHub
- URL: https://github.com/Reecepbcups/cosmos-balance-bot
- Owner: Reecepbcups
- Created: 2022-04-21T13:15:46.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-17T05:18:33.000Z (about 2 years ago)
- Last Synced: 2024-04-14T22:51:03.272Z (9 months ago)
- Language: Python
- Size: 44.9 KB
- Stars: 13
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-cosmos - cosmos-balance-bot - Get notified about your wallet balance on multiple Cosmos SDK chains at a set interval. (Tools / Bots)
README
# cosmos-balance-bot
A useful little bot for Relayers, Validators using restake.app, Akash Escrow Accounts, hot wallets, and anything else you want to track!
Contact :
[@Reecepbcups_](https://twitter.com/Reecepbcups_)Delegate:
- [Dig-Chain](https://ping.pub/dig/staking/digvaloper1ms3k4d9j7rzpzmq3d4jg4j4kffldfnq66wxdpj)
## Setup
```sh
Open secrets.jsonNOTIFY_GOOD_BALANCES:(default: false)
- When `true`, every time the bot is run it will post for all wallets even if the account is good
- When `false`, only notifications will post if the wallet is in warning or low fundsSIMPLIFY_UDENOM_VALUES_TO_READABLE: (default: true)
- When `true` the bot will simplify the udenom values to readable values like "juno = 1" instead of "ujuno = 1000000"
(If you set this to false, ensure you also change all wallet denoms too.)WALLETS: dict{dict{"status": float64}}
- Each section specifies a wallets public address warning and low level thresholds
- Depending on the section, the notification title & color will change in relation to the warningTWITTER:
- Keys & Secrets to connect to a twitter bot account. This requires a developer.twitter.com accountDiscord:
- Webhook URL (channel settings -> Integrations -> webhook -> create new & copy URL)
- Username: What you want the webhook bot to be called
- Accounts to tag - doesn't work yet
```## Run in Akash
```sh
git clone https://github.com/Reecepbcups/cosmos-balance-bot.git
cd cosmos-balance-bot# open secrets.json & add in your wallet keys & tolerance levels
# Ensure DISCORD ENABLED is true. (It should be by default)
# You can put the other values if you wish, however there is support for environment variablesdocker login
# Build the image & push to docker hub
docker build -t username/balance-bot .
docker push username/balance-bot:latest# open the akashalytics deploy panel tool
# https://www.akashlytics.com/deploy
#
# - Create Deployment
# - From a File
#
# - Select cosmos-balance-bot/akash-deploy/cosmos-balance-deploy.yml
# - Update the image: to point to your location (username/balance-bot:latest)
# - Change the minute check and discord webhook URL to match your needs
# [If none is provided, your secrets.json will be used as default.]
#
# - You can alter the compute resources, however CPU is the majority of the cost.
# 0.25CPU, 0.5GB RAM, and 1GB storage are recommended minimum.
```## Install on a system
```sh
git clone https://github.com/Reecepbcups/cosmos-balance-botcd cosmos-balance-bot
# Ensure you have python installed first. May just be `python` depending on your system
python3 -m pip install --no-cache-dir -r requirements/requirements.txt --update# Edit secrets.json to your values, wallets, thresholds, etc.
python3 src/cosmos-balance-bot.py
```