Formatting a Proposal

Many proposals allow for long form text to be included, usually under the key description. These provide the opportunity to include markdown if formatted correctly, as well as line breaks with .

Beware, however, that if you are using the CLI to create a proposal, and setting description using a flag, the text will be escaped which may have undesired effects.

The examples shown below are of the text in a json file packaged into a submit-proposal transaction sent on-chain. More details about how to submit a proposal are in the next section, but for now just be aware that the examples are the contents of a file separate from the transaction. As a general rule, any flags specific to a proposal (e.g., Title, description, deposit, parameters, recipient) can be placed in a json file, while flags general to a transaction of any kind (e.g., chain-id, node-id, gas, fees) can remain in the CLI.

Text

Text proposals are used by delegators to agree to a certain strategy, plan, commitment, future upgrade, or any other statement in the form of text. Aside from having a record of the proposal outcome on the Swisstronik, a text proposal has no direct effect on the change Swisstronik.

There are three components:

  1. Title - the distinguishing name of the proposal, typically the way the that explorers list proposals

  2. Description - the body of the proposal that further describes what is being proposed and details surrounding the proposal

  3. Deposit - the amount that will be contributed to the deposit from the account submitting the proposal

Example

{
  "title": "Is it a great proposal?",
  "description": "This is a sample proposal description. Lorem ipsum",
  "deposit": "100000aswtr"
}

Community Pool Spend

There are five (5) components:

  1. Title - the distinguishing name of the proposal, typically the way the that explorers list proposals

  2. Description - the body of the proposal that further describes what is being proposed and details surrounding the proposal

  3. Recipient - the Swisstronik (bech32-based) address that will receive funding from the Community Pool

  4. Amount - the amount of funding that the recipient will receive (in aSWTR)

  5. Deposit - the amount that will be contributed to the deposit (in aSWTR) from the account submitting the proposal

If the description says that a certain address will receive a certain number of aSWTR, it should also be programmed to do that, but it's possible that that's not the case (accidentally or otherwise). Check that the description aligns with the 'recipient' address.

Example

{
  "title": "Proposal title",
  "description": "Extensive proposal description",
  "recipient": "swtr1qa2h6a27waactkrc6dyxrn2jzfjjfg24dgxzu8", 
  "amount": "1000000000aswtr",
  "deposit": "1000000aswtr"
}

Param Change

Changes to the gov module are different from the other kinds of parameter changes because gov has subkeys. Only the key part of the JSON file is different for gov parameter-change proposals.

For parameter-change proposals, there are arguably seven (7) components, though three are nested beneath 'Changes':

  1. Title - the distinguishing name of the proposal, typically the way the that explorers list proposals

  2. Description - the body of the proposal that further describes what is being proposed and details surrounding the proposal

  3. Changes - a component containing

  4. Subspace - Cosmos SDK / Swisstronik module with the parameter that is being changed

  5. Key - the parameter that will be changed

  6. Value - the value of the parameter that will be changed by the governance mechanism

  7. Deposit - the amount that will be contributed to the deposit (in aSWTR) from the account submitting the proposal

The components must be presented as shown in the example.

Example

 {
  "title": "Doc update test: Param change for MaxValidators",
  "description": "Testing the proposal format for increasing the MaxValidator param",
  "changes": [
    {
      "subspace": "staking",
      "key": "MaxValidators",
      "value": 200
    }
  ],
  "deposit": "100000aswtr"
}

Last updated