diff --git a/proposal-vote-script/Instructions.md b/proposal-vote-script/Instructions.md new file mode 100644 index 0000000..704f2bd --- /dev/null +++ b/proposal-vote-script/Instructions.md @@ -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 +``` \ No newline at end of file diff --git a/proposal-vote-script/config/config.go b/proposal-vote-script/config/config.go index 1c452e6..8b58cf6 100644 --- a/proposal-vote-script/config/config.go +++ b/proposal-vote-script/config/config.go @@ -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"` diff --git a/proposal-vote-script/example.config.toml b/proposal-vote-script/example.config.toml index e07b4db..2b50980 100644 --- a/proposal-vote-script/example.config.toml +++ b/proposal-vote-script/example.config.toml @@ -1,4 +1,3 @@ -rpc_endpoint = "http://localhost:26657" lcd_endpoint = "http://localhost:1317" deamon = "regen" key_name = "validator" @@ -7,4 +6,4 @@ chain_id = "test" fees = "5000uregen" [scraper] - rate = "4s" \ No newline at end of file +rate = "4s"