Skip to content

Commit

Permalink
chore: add badge + format readme
Browse files Browse the repository at this point in the history
  • Loading branch information
freak12techno committed Mar 27, 2024
1 parent 267b97e commit f459416
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

![Latest release](https://img.shields.io/github/v/release/QuokkaStake/cosmos-proposals-checker)
[![Actions Status](https://github.com/QuokkaStake/cosmos-proposals-checker/workflows/test/badge.svg)](https://github.com/QuokkaStake/cosmos-proposals-checker/actions)
[![codecov](https://codecov.io/gh/QuokkaStake/cosmos-proposals-checker/graph/badge.svg?token=3C1TDJAHZ0)](https://codecov.io/gh/QuokkaStake/cosmos-proposals-checker)

cosmos-proposals-checker is a tool that checks all configured chains for new proposals in voting period,
then notifies you if one or more of the configured wallets haven't voted on it. Like that:
Expand Down Expand Up @@ -39,7 +40,8 @@ Then we need to create a systemd service for our app:
sudo nano /etc/systemd/system/cosmos-proposals-checker.service
```

You can use this template (change the user to whatever user you want this to be executed from. It's advised to create a separate user for that instead of running it from root):
You can use this template (change the user to whatever user you want this to be executed from.
It's advised to create a separate user for that instead of running it from root):

```
[Unit]
Expand Down Expand Up @@ -78,22 +80,29 @@ sudo journalctl -u cosmos-proposals-checker -f --output cat

## How does it work?

It queries LCD nodes for the proposals list in voting period, then for each wallet it queries its vote. If you haven't voted, it spawns an alert and sends it to configured notifiers.
It queries LCD nodes for the proposals list in voting period, then for each wallet it queries its vote.
If you haven't voted, it spawns an alert and sends it to configured notifiers.

## How can I configure it?

All configuration is done via `.toml` config file, which is mandatory. Run the app with `--config <path/to/config.toml>` to specify config. Check out `config.example.toml` to see the params that can be set.
All configuration is done via `.toml` config file, which is mandatory.
Run the app with `--config <path/to/config.toml>` to specify config.
Check out `config.example.toml` to see the params that can be set.

## Notifiers

Currently, this program supports the following notifications channels:
1) Telegram

Go to @BotFather in Telegram and create a bot. After that, there are two options:
- you want to send messages to a user. This user should write a message to @getmyid_bot, then copy the `Your user ID` number. Also keep in mind that the bot won't be able to send messages unless you contact it first, so write a message to a bot before proceeding.
- you want to send messages to a channel. Write something to a channel, then forward it to @getmyid_bot and copy the `Forwarded from chat` number. Then add the bot as an admin.

To have fancy commands auto-suggestion, go to @BotFather again, select your bot -> Edit bot -> Edit description and paste the following:
- you want to send messages to a user. This user should write a message to @getmyid_bot, then copy
the `Your user ID` number. Also keep in mind that the bot won't be able to send messages unless you contact it first,
so write a message to a bot before proceeding.
- you want to send messages to a channel. Write something to a channel, then forward it to @getmyid_bot and copy
the `Forwarded from chat` number. Then add the bot as an admin.

To have fancy commands auto-suggestion, go to @BotFather again, select your bot -> Edit bot -> Edit description
and paste the following:
```
proposals - List proposals and wallets' votes on them
proposals_mute - Mutes a proposal
Expand All @@ -107,7 +116,10 @@ Then add a Telegram config to your config file (see `config.example.toml` for re

2) PagerDuty

Go to your PagerDuty page, then go to Services. Create a service if you haven't created one already. Select this service, then go to "Integrations" tab, add an integration there. Copy the integration key and add it to the `pagerduty` part in config (see `config.example.toml` for reference). Additionally, override PagerDuty URL in config if you are using EU version.
Go to your PagerDuty page, then go to Services. Create a service if you haven't created one already.
Select this service, then go to "Integrations" tab, add an integration there. Copy the integration key
and add it to the `pagerduty` part in config (see `config.example.toml` for reference).
Additionally, override PagerDuty URL in config if you are using EU version.


## Which networks this is guaranteed to work?
Expand Down

0 comments on commit f459416

Please sign in to comment.