Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions proposal-vote-script/Instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# proposal-vote-script

This script will help you to vote for the proposal if it's not voted already.
You just have to clone the repo, configure the `config.toml` and run the the script.

Clone the repo
```sh
git clone https://github.com/vitwit/cosmos-utils.git

cd cosmos-utils/proposal-vote-script
```

#### Configure the config.toml

```sh
cp example.config.toml config.toml
```
and replace these values with your validator details.

- *lcd_endpoint*

LCD endpoint of your validator, which will be used to get proposals info and votes of it.

- *deamon*

Deamon name of the network (ex: regen, akash). This will be used to execute the vote tx command.

- *key_name*

Key name of your validator. Name of the account from which you want to vote.

- *account_address*

Account address of your validator. This address will be used to get your votes for particular proposal.

- *chain_id*

Chain ID of your node.

- *fees*

Fees to execute the tx.

#### Run the script

- Build and run the using binary

```sh
go build -o proposal-script && ./proposal-script
```
- or run
```sh
go run main.go
```
1 change: 0 additions & 1 deletion proposal-vote-script/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ type (
}
// Config
Config struct {
RPCEndpoint string `mapstructure:"rpc_endpoint"`
LCDEndpoint string `mapstructure:"lcd_endpoint"`
Deamon string `mapstructure:"deamon"`
KeyName string `mapstructure:"key_name"`
Expand Down
3 changes: 1 addition & 2 deletions proposal-vote-script/example.config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
rpc_endpoint = "http://localhost:26657"
lcd_endpoint = "http://localhost:1317"
deamon = "regen"
key_name = "validator"
Expand All @@ -7,4 +6,4 @@ chain_id = "test"
fees = "5000uregen"

[scraper]
rate = "4s"
rate = "4s"