Telegram Terra LTV alerts bot
Requires:
- running mongodb
- running redis
- python ^3.9 and poetry or docker
envvar | required | default | description |
---|---|---|---|
BOT_TOKEN | Yes | - | Telegram bot token |
LCD_URL | Yes | - | Terra lcd url |
CHAIN_ID | Yes | - | Terra chaind id |
ANCHOR_MARKET_CONTRACT | Yes | - | Anchor market contract address |
ANCHOR_OVERSEER_CONTRACT | Yes | - | Anchor overseer contact address |
DEBUG | No | - | Set logging to debug |
DB_NAME | No | ltv |
Mongo database name |
DB_HOST | No | localhost |
Mongo database host |
DB_PORT | No | 27017 |
Mongo port host |
REDIS_URL | No | redis://localhost |
Redis url connexion Yesing |
With docker
docker build -t terra-ltv-bot .
docker run \
--name terra-ltv-bot \
-e BOT_TOKEN="${BOT_TOKEN}" \
-e LCD_URL="https://lcd.terra.dev" \
-e CHAIN_ID="columbus-4" \
-e ANCHOR_MARKET_CONTRACT="terra1sepfj7s0aeg5967uxnfk4thzlerrsktkpelm5s" \
-e ANCHOR_OVERSEER_CONTRACT="terra1tmnqgvg567ypvsvk6rwsga3srp7e3lg6u0elp8" \
# + additional config
terra-ltv-bot
We will take into consideration any pull requests.
Please try to respect conventional commit messages and ensure your code passes basic code style and typing tests by running make all
.
With poetry installed:
poetry install
Start redis and mongodb:
docker compose up -d # or docker-compose up -d
Run the bot from source:
poetry run terra-ltv-bot
help - Display an help message
subscribe - Subscribe to an address LTV alerts
list - List all subscribed addresses and their current LTV
unsubscribe - Unsubscribe to an address LTV alerts
ltv - Retreive LTV for an arbitrary address