Using our Products
ZetaChain's CLI
Governance
Parameter Change Proposal

A parameter change proposal is a governance action that proposes to change a specific module parameter of the network.

Create a proposal JSON file:

proposal.json
{
  "messages": [
    {
      "@type": "/cosmos.gov.v1.MsgExecLegacyContent",
      "authority": "zeta10d07y265gmmuvt4z0w9aw880jnsr700jvxasvr",
      "content": {
        "@type": "/cosmos.params.v1beta1.ParameterChangeProposal",
        "changes": [
          {
            "subspace": "gov",
            "key": "votingparams",
            "value": "{ \"voting_period\": \"86400000000000\" }"
          }
        ],
        "description": "Update voting period to 24 hours",
        "title": "Gov Param Change"
      }
    }
  ],
  "deposit": "1000000azeta",
  "metadata": "https://example.org/metadata.json"
}

The proposal above uses the MsgExecLegacyContent message type to wrap the ParameterChangeProposal message.

The changes array contains a list of changes to be made to the network's parameters. Each change is a JSON object with the following fields:

  • subspace: The module whose parameter is being changed.
  • key: The parameter key.
  • value: The new value of the parameter.
SubspaceKey

To query the current value of a parameter, use the following endpoint. Fill out the subspace and key query parameters with the values from the table above.

For example,

http://zetachain-athens.blockpi.network/lcd/v1/public/cosmos/params/v1beta1/params?subspace=staking&key=MaxValidators (opens in a new tab)

Returns:

{
  "param": {
    "key": "MaxValidators",
    "subspace": "staking",
    "value": "100"
  }
}

You now know that the value of the MaxValidators key in the staking subspace is an integer (currently, 100). You can use the parameter change proposal to change this value to something else.


How's your journey with ZetaChain?
Let us know