Submitting a Proposal
Submitting a Proposal
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.
Interacting with the GotaBit Hub via the command line in order to run queries or submit proposals has several prerequisites:
- You will need to compile from source into a binary file executable by your operating system eg. MacOS, Windows, Linux
- You will need to indicate which chain you are querying, and currently this is --chain-id gotabithub-4
- You will need to connect to a full node. You can find a list of available GotaBit Hub endpoints under the API section in the Chain Registry.
- More info is in the Walkthrough Example section.
Running a full node can be difficult for those not technically-inclined, so you may choose to use a third-party's full node. In this case, the primary security risk is that of censorship: it's the single place where you have a single gateway to the network, and any messages submitted through an untrusted node could be censored.
Hosting supplementary materials
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:
- By running an IPFS node and the IPFS software
- By using a service such as 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
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.
Sending the transaction that submits your governance proposal
This is the generic command format for using gotabitd (the command-line interface) to submit your proposal on-chain:
gotabitd tx gov submit-proposal <proposal type>\
-- <json file> \
--from <submitter address> \
--deposit <deposit in ugtb> \
--chain-id <chain id> \
--gas <max gas allocated> \
--fees <fees allocated> \
--node <node address> \
A specific example is given here:
gotabid tx gov submit-proposal community-pool-spend\
--~/community_spend_proposal.json \
--from dev-wallet \
--deposit 1000000ugtb \
--chain-id gotabit-testnet-1 \
--gas 500000 \
--fees 7500ugtb \
--node https://rpc-testnet.gotabit.dev \
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.
Depositing funds after a proposal has been submitted
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:
gotabitd 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:
gotabitd q gov proposals --depositor gio1qk5kp54unexsk8ddeq8scmcvzfgdp6rzypl96e
Once you have the proposal ID, this is the command to deposit extra tokens:
gotabitd 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 500000ugtb, just like the example above.
Submitting your proposal to the testnet
Submitting to the testnet is identical to mainnet submissions aside from a few changes:
- The chain-id is gotabit-testnet-1.
- Endpoint: https://rpc-testnet.gotabit.dev.
- You will need testnet tokens. There is a faucet available .
You may want to submit your proposal to the testnet chain before the mainnet for a number of reasons:
- To see what the proposal description will look like.
- To signal that your proposal is about to go live on the mainnet.
- To share what the proposal will look like in advance with stakeholders.
- To test the functionality of the governance features.