# Submit a Praposal

#### On this page

* [<mark style="color:blue;">Submitting a Governance Proposal</mark>](#submitting-a-governance-proposal)
* [<mark style="color:blue;">Hosting supplementary materials</mark>](#hosting-supplementary-materials)
* [<mark style="color:blue;">Formatting the JSON file for the governance proposal</mark>](#formatting-the-json-file-for-the-governance-proposal)
* [<mark style="color:blue;">Sending the transaction that submits your governance proposal</mark>](#sending-the-transaction-that-submits-your-governance-proposal)
  * [<mark style="color:blue;">Walkthrough example</mark>](#walkthrough-example)
  * [<mark style="color:blue;">Verifying your transaction</mark>](#verifying-your-transaction)
  * [<mark style="color:blue;">Troubleshooting a failed transaction</mark>](#troubleshooting-a-failed-transaction)
  * [<mark style="color:blue;">Depositing funds after a proposal has been submitted</mark>](#depositing-funds-after-a-proposal-has-been-submitted)
  * [<mark style="color:blue;">Submitting your proposal to the testnet</mark>](#submitting-your-proposal-to-the-testnet)

### Submitting a Governance Proposal <mark style="color:blue;">#</mark> <a href="#submitting-a-governance-proposal" id="submitting-a-governance-proposal"></a>

If you have a final draft of your proposal ready to submit, you may want to push your proposal live on the testnet first. These are the three primary steps to getting your proposal live on-chain.

1. (**Optional**) <mark style="color:blue;">H</mark>[<mark style="color:blue;">osting supplementary materials</mark>](#hosting-supplementary-materials) for your proposal with IPFS (InterPlanetary File System)
2. [<mark style="color:blue;">Formatting the JSON file</mark>](#formatting-the-json-file-for-the-governance-proposal) for the governance proposal transaction that will be on-chain
3. [<mark style="color:blue;">Sending the transaction</mark> ](#sending-the-transaction-that-submits-your-governance-proposal)that submits your governance proposal on-chain

### Hosting supplementary materials <mark style="color:blue;">#</mark> <a href="#hosting-supplementary-materials" id="hosting-supplementary-materials"></a>

In general we try to minimize the amount of data pushed to the blockchain. Hence, detailed documentation about a proposal is usually hosted on a separate censorship resistant data-hosting platform, like IPFS.

Once you have drafted your proposal, ideally as a Markdown file, you can upload it to the IPFS network:

2. either by [<mark style="color:blue;">running an IPFS node and the IPFS software</mark>](https://ipfs.io/), or
3. using a service such as [<mark style="color:blue;">https://pinata.cloud</mark>](https://pinata.cloud)

Ensure that you “pin” the file so that it continues to be available on the network. You should get a URL like this: <https://ipfs.io/ipfs/QmbkQNtCAdR1CNbFE8ujub2jcpwUcmSRpSCg8gVWrTHSWD> The value QmbkQNtCAdR1CNbFE8ujub2jcpwUcmSRpSCg8gVWrTHSWD is called the `CID` of your file - it is effectively the file’s hash.

If you uploaded a markdown file, you can use the IPFS markdown viewer to render the document for better viewing. Links for the markdown viewer look like `https://ipfs.io/ipfs/QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/example#/ipfs/<CID>`, where `<CID>` is your CID. For instance the link above would be: <https://ipfs.io/ipfs/QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/> example#/ipfs/QmbkQNtCAdR1CNbFE8ujub2jcpwUcmSRpSCg8gVWrTHSWD

Share the URL with others and verify that your file is publicly accessible.

The reason we use IPFS is that it is a decentralized means of storage, making it resistant to censorship or single points of failure. This increases the likelihood that the file will remain available in the future.

### Formatting the JSON file for the governance proposal <mark style="color:blue;">#</mark> <a href="#formatting-the-json-file-for-the-governance-proposal" id="formatting-the-json-file-for-the-governance-proposal"></a>

Prior to sending the transaction that submits your proposal on-chain, you must create a JSON file. This file will contain the information that will be stored on-chain as the governance proposal. Begin by creating a new text (.txt) file to enter this information. Use these[ <mark style="color:blue;">best practices</mark>](https://ictech.gitbook.io/icplaza-docs/chain-dev/best-practices) as a guide for the contents of your proposal. When you’re done, save the file as a .json file. See the examples that follow to help format your proposal.

Each proposal type is unique in how the JSON should be formatted. See the relevant section for the type of proposal you are drafting:

* \[Text Proposals]
* \[Community Pool Spend Proposals]
* \[Parameter Change Proposals]

Once on-chain, most people will rely upon network explorers to interpret this information with a graphical user interface (GUI).

**Note**: In future, this formatting [<mark style="color:blue;">may be changed to be more standardized</mark>](https://github.com/ICPlaza/ICPlaza-sdk/issues/5783) with other the types of governance proposals.

### Sending the transaction that submits your governance proposal <mark style="color:blue;">#</mark> <a href="#sending-the-transaction-that-submits-your-governance-proposal" id="sending-the-transaction-that-submits-your-governance-proposal"></a>

For information on how to use ICTechd (the command line interface) to submit an on-chain proposal through the governance module, please refer to the \[ICTech resource] for the ICTech Hub documentation.

#### Walkthrough example <mark style="color:blue;">#</mark> <a href="#walkthrough-example" id="walkthrough-example"></a>

This is the command format for using ICTechd (the command-line interface) to submit your proposal on-chain:

```
ICPlazad tx gov submit-proposal \
  --title=<title> \
  --description=<description> \
  --type="Text" \
  --deposit="1000000uatom" \
  --from=<name> \
  --chain-id=<chain_id>
```

If `<proposal type>` is left blank, the type will be a Text proposal. Otherwise, it can be set to `param-change` or `community-pool-spend`. Use `--help` to get more info from the tool.

For instance, this is the complete command that I could use to submit a **testnet** parameter-change proposal right now: `ICPlazad tx gov submit-proposal param-change param.json --from gavin --chain-id ICPlaza-13007 --node 45.77.218.219:26657`

This is the complete command that I could use to submit a **mainnet** parameter-change proposal right now: `ICPlazad tx gov submit-proposal param-change param.json --from gavin --gas 500000 --fees 7500uatom --chain-id ICPlazahub-3 --node ICPlaza-node-1.figment.io:26657`

1. `ICPlazad` is the command-line interface client that is used to send transactions and query the ICPlaza Hub
2. `tx gov submit-proposal param-change` indicates that the transaction is submitting a parameter-change proposal
3. `--from gavin` is the account key that pays the transaction fee and deposit amount
4. `--gas 500000` is the maximum amount of gas permitted to be used to process the transaction
   * the more content there is in the description of your proposal, the more gas your transaction will consume
   * if this number isn’t high enough and there isn’t enough gas to process your transaction, the transaction will fail
   * the transaction will only use the amount of gas needed to process the transaction
5. `--fees` is a flat-rate incentive for a validator to process your transaction
   * the network still accepts zero fees, but many nodes will not transmit your transaction to the network without a minimum fee
   * many nodes (including the Figment node) use a minimum fee to disincentivize transaction spamming
   * 7500uatom is equal to 0.0075 ATOM
6. `--chain-id ICPlazahub-3` is ICPlaza Hub 3. For current and past chain-id’s, please look at the \[ICTech/mainnet resource]
   * the testnet chain ID is \[ICTech-13007]. For current and past testnet information, please look at the \[testnet repository]
7. `--node` ICTech`-node-1.figment.io:26657` is using Figment Networks’ node to send the transaction to the ICPlaza Hub 3 network

**Note**: be careful what you use for `--fees`. A mistake here could result in spending hundreds or thousands of ATOMs accidentally, which cannot be recovered.

#### Verifying your transaction <mark style="color:blue;">#</mark> <a href="#verifying-your-transaction" id="verifying-your-transaction"></a>

After posting your transaction, your command line interface will provide you with the transaction’s hash, which you can either query using ICTechd or by searching the transaction hash using \[Mintscan] 0506447AE8C7495DE970736474451CF23536DF8EA837FAF1CF6286565589AB57). The hash should look something like this: `0506447AE8C7495DE970736474451CF23536DF8EA837FAF1CF6286565589AB57`

#### Troubleshooting a failed transaction <mark style="color:blue;">#</mark> <a href="#troubleshooting-a-failed-transaction" id="troubleshooting-a-failed-transaction"></a>

There are a number of reasons why a transaction may fail. Here are two examples:

1. **Running out of gas** - The more data there is in a transaction, the more gas it will need to be processed. If you don’t specify enough gas, the transaction will fail.
2. **Incorrect denomination** - You may have specified an amount in ‘utom’ or ‘atom’ instead of ‘uatom’, causing the transaction to fail.

If you encounter a problem, try to troubleshoot it first, and then ask for help on the ICTech Hub forum: \[<https://forum.ICTech.network>]. We can learn from failed attempts and use them to improve upon this guide.

#### Depositing funds after a proposal has been submitted <mark style="color:blue;">#</mark> <a href="#depositing-funds-after-a-proposal-has-been-submitted" id="depositing-funds-after-a-proposal-has-been-submitted"></a>

Sometimes a proposal is submitted without having the minimum token amount deposited yet. In these cases you would want to be able to deposit more tokens to get the proposal into the voting stage. In order to deposit tokens, you’ll need to know what your proposal ID is after you’ve submitted your proposal. You can query all proposals by the following command:

```
ICPlazad q gov proposals
```

If there are a lot of proposals on the chain already, you can also filter by your own address. For the proposal above, that would be:

```
ICPlazad q gov proposals --depositor ICPlaza1hxv7mpztvln45eghez6evw2ypcw4vjmsmr8cdx
```

Once you have the proposal ID, this is the command to deposit extra tokens:

```
ICPlazad tx gov deposit <proposal-id> <deposit> --from <name>
```

In our case above, the `<proposal-id>` would be 59 as queried earlier. The `<deposit>` is written as `500000uatom`, just like the example above.

#### Submitting your proposal to the testnet <mark style="color:blue;">#</mark> <a href="#submitting-your-proposal-to-the-testnet" id="submitting-your-proposal-to-the-testnet"></a>

You may want to submit your proposal to the testnet chain before the mainnet for a number of reasons:

1. To see what the proposal description will look like
2. To signal that your proposal is about to go live on the mainnet
3. To share what the proposal will look like in advance with stakeholders
4. To test the functionality of the governance features

Submitting your proposal to the testnet increases the likelihood that you will discover a flaw before deploying your proposal on mainnet. A few things to keep in mind:

* you’ll need testnet tokens for your proposal (ask around for a faucet)
* the parameters for testnet proposals are different (eg. voting period timing, deposit amount, deposit denomination)
* the deposit denomination is in ‘muon’ instead of ‘uatom’

[<mark style="color:blue;">← Best Practices</mark>](https://ictech.gitbook.io/icplaza-docs/chain-dev/best-practices)

[ <mark style="color:blue;">Community Pool →</mark>](https://ictech.gitbook.io/icplaza-docs/chain-dev/community-pool)
