Skip to content

Instantly share code, notes, and snippets.

@pratikbin
Last active August 3, 2023 07:36
Show Gist options
  • Save pratikbin/869f6de536cb9b5e14f610a5734e1b47 to your computer and use it in GitHub Desktop.
Save pratikbin/869f6de536cb9b5e14f610a5734e1b47 to your computer and use it in GitHub Desktop.

To create a governance proposal in Archway, you can use the archwayd CLI. Here are the steps to follow:

  1. Install and configure the archwayd CLI on your machine. You can refer to the Archway documentation for instructions on how to set it up.

  2. Prepare your proposal by creating a JSON file that includes the necessary information. The JSON file should include the following fields:

title: The title of your proposal.

description: A detailed description of your proposal.

type: The type of proposal (e.g., "Text", "Parameter Change", etc.).

deposit: The amount of tokens you are willing to deposit for the proposal.

  1. Submit the proposal using the archwayd tx gov submit-proposal command. Here's an example command:

Before that let's add the key first

## Add mnemonics
export MNEMONICS="decade arrive thrive slim leopard waste rare orbit bring decade shadow focus purity until cinnamon captain baby pencil soldier brain palace inch can humor"
echo -e "$MNEMONICS\n\n" | archwayd keys add secure_key --keyring-backend test --recover

Simple proposal

The JSON file for this proposal type should have the following fields:

Title - the distinguishing name of the proposal, typically the way that explorers list proposals Description - the body of the proposal that further describes what is being proposed and details surrounding the proposal Changes - the changes that you want to apply to the key-value pair of a subspace (e.g, bank, gov, slashing, staking which can be found here..). To submit any changes, make sure your JSON includes subspace, key, and the proposed value

cat >proposal.json<<EOF
{
"title": "Test Proposal",
"description": "My awesome proposal",
"type": "Text",
"deposit": "1000000000000000000aarch"
}
EOF
archwayd tx gov submit-proposal --proposal=./proposal.json --from secure_key --node https://rpc.constantine.archway.tech:443 --chain-id constantine-3 --fees 180000000000000000aarch --keyring-backend test

Parameter Change (param-change)

The JSON file for this proposal type should have the following fields:

Title - the distinguishing name of the proposal, typically the way that explorers list proposals Description - the body of the proposal that further describes what is being proposed and details surrounding the proposal Changes - the changes that you want to apply to the key-value pair of a subspace (e.g, bank, gov, slashing, staking which can be found here..). To submit any changes, make sure your JSON includes subspace, key, and the proposed value

cat >param-change-proposal.json<<EOF
{
  "title": "Parameter change: decrease unbonding time to 2 days",
  "description": "Change to 2 days",
  "changes": [
    {
      "subspace": "staking",
      "key": "UnbondingTime",
      "value": "172800000000000"
    }
  ],
  "deposit": "100arch"
}
EOF
archwayd tx gov submit-proposal param-change ./param-change-proposal.json --from secure_key --node https://rpc.constantine.archway.tech:443 --chain-id constantine-3 --fees 180000000000000000aarch --keyring-backend test

By executing this command, you will submit your proposal to the Archway network.

Please note that the archwayd CLI commands should be executed in your terminal or command prompt, and you need to have the necessary permissions and access to the Archway network.

Remember to engage with the community on Discourse and Discord to gather support for your proposal and ensure its success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment