Skip to content

Latest commit

 

History

History

propy

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Propy

Git2 (3)

  • Never miss a vote!
  • Other bots only alert of a new vote, this bot will alert you of votes you haven't made
  • Simple setup

Setup:

  1. Clone this repo to a server you use for monitoring

  2. Fill out config.json example:

{
  "slack":{
        "token":"<[youtube guide how to get token](https://www.youtube.com/watch?v=h94FK8h1OJU)",
        "channel":"#governance"
  },
  "chains":[
        {
           "name":"Chihuahua",
           "address":"chihuahua15tnycxe9csn7mkul4vvlyxlkd9jyqlw4ns0wgc",
           "endpoint":"<check cosmos.directory for public endpoint>"
        },
        {
         "name":"Injective",
         "address":"inj16gdnrnl224ylje5z9vd0vn0msym7p58fcf4cak",
         "endpoint":"<check cosmos.directory for public endpoint>"
        }
  ]
}

Create Start Script

  1. make directory for script:
    mkdir -p ~/scripts/

  2. create script:
    vim ~/scripts/propy.sh
    paste this in:

#! /bin/bash
source $HOME/.bashrc

python3 /$USER/cosmos-automations/bots/propy/main.py --config /$USER/cosmos-automations/bots/propy/config.json --slack

Note: either set USER to a value (ex. export USER=admin) or replace user with the user you using /admin/cosmos-automations or /root/cosmos-automations/

  1. make executable:
    chmod +x start_script.sh

  2. create systemd service:
    vim /etc/systemd/system/propy.service paste this in:

[Unit]
Description=prop alerts

[Service]
Type=simple
User=$USER
ExecStart=/$USER/scripts/propy.sh
Restart=on-failure

Note: either set USER to a value (ex. export USER=admin) or replace user with the user you using /admin/cosmos-automations or /root/cosmos-automations/

  1. Test run systemd service:
    systemctl daemon-reload
    systemctl enable propy.service
    systemclt start propy.service

Schedule with timer

  1. create systemd timer:
    vim /etc/systemd/system/propy.timer

paste this in:

[Unit]
Description=check for props

[Timer]
OnCalendar=*-*-* 13:00:00 UTC

[Install]
WantedBy=multi-user.target
  1. start timer:
    systemctl daemon-reload
    systemctl enable propy.timer
    systemclt start propy.timer

You're done! Now you should get alerts daily of the props you haven't yet voted on.

Contributing

If you would like to contribute to this repository, which is very much appreciated, make sure to check out the resources below.