Skip to content

Commit

Permalink
add ability to skip gov1, support yay and aye
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasochem committed May 30, 2023
1 parent 867a1ff commit 47e61e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions charts/polkadot-votebot/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ spec:
containers:
- name: polkadot-votebot-cron
image: {{ .Values.polkadot_k8s_images.polkadot_votebot_cron }}
{{ if .Values.skip_gov1 }}
command: ["/bin/sh", "-ec", "echo 'gov1 has been deactivated, skipping'"]
{{ end }}
env:
- name: PROXY_ACCOUNT_MNEMONIC
valueFrom:
Expand Down
3 changes: 3 additions & 0 deletions charts/polkadot-votebot/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ cron_schedule: "2 */3 * * *"
# sensitive
proxy_account_mnemonic: "12 word secret seed for your proxy account. it must be registered on-chain as goverenane proxy for your stash. put very little money on it"
slack_alert_token: "the token to connect to slack and send alerts"

skip_gov1: false

2 changes: 1 addition & 1 deletion polkadot-votebot-gov2-cron/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async function main() {
}
console.log(`Voting ${votes[i]["vote"]} for referendum ${i}. Reason:`);
console.log(votes[i]["reason"]);
let isAye: boolean = (votes[i]["vote"] == "aye");
let isAye: boolean = (votes[i]["vote"] in ["aye", "yay"]);

let vote = {
Standard: {
Expand Down

0 comments on commit 47e61e6

Please sign in to comment.