Proposals
Creating a New Proposal
Anyone can create a governance proposal, which will begin with a deposit period. Once the minimum deposit amount is reached, it will enter the voting period. Anyone can make deposits for the proposal during the deposit period.
Submitting a Proposal
To submit a new proposal, you can send a transaction that includes the proposal details and specifies the deposit amount. This deposit amount does not need to be greater than the minimum deposit (the minimum amount required to enter the voting phase), but the proposal will remain in the deposit period until the total deposit amount is met.
The transaction to submit a proposal must include a non-zero positive deposit amount.
Example:
enid tx gov submit-proposal param-change proposal.json --from $PROPOSER_KEY
Please note that we allow for expedited proposals through the --is-expedited
flag. This will halve the proposal time but requires double the deposit amount.
Querying a Proposal
You can also view the details and status (deposit period, voting period, etc.) of an existing proposal by querying a specific proposal ID.
Example:
enid query gov proposal $PROPOSAL_ID
You can also query the proposer of a specified proposal to see the address that initially submitted it.
Example:
enid query gov proposer $PROPOSAL_ID
Depositing for a Proposal
If the created proposal is in the deposit period, you can increase the deposit to encourage the proposal to move into the voting period. The deposit amount is represented in deposit amount and deposit tokens, for example, 10000ENI.
If the proposal does not reach the minimum deposit before the end of the deposit period, all deposits will be burned.
Example:
enid tx gov deposit $PROPOSAL_ID $DEPOSIT_AMOUNT --from $YOUR_KEY
Querying Deposits
Users can query a specific address's deposit on a specific proposal. This can be used to check your current deposit amount or see another account's deposit amount.
Example:
enid query gov deposit $PROPOSAL_ID $DEPOSITOR_ADDR
You can also use a separate query command to check all deposits for a proposal.
Example:
enid query gov deposits $PROPOSAL_ID
Voting on a Proposal
This allows an address to vote on a specified proposal. There are four options when voting:
Yes
No
Abstain
No with veto
Example:
enid tx gov vote $PROPOSAL_ID $VOTE_OPTION --from $VOTER_KEY --chain-id $CHAIN_ID
Weighted Voting
Weighted voting transactions allow voters to distribute voting power among various voting options. This is particularly useful for representing multiple stakeholders in different voting decisions.
When executing a weighted vote, the transaction is performed with voting weights instead of a single option. Voting weights are represented as a comma-separated string mapping voting options to their weights. The voting weights must sum up to 1 for the transaction to be valid.
Defining Weights
voting_weights=yes=0.3,no=0.2,no_with_veto=0.15,abstain=0.35
Example
enid tx gov weighted-vote $PROPOSAL_ID $VOTING_WEIGHTS --from $VOTER_KEY --chain-id $CHAIN_ID
Querying Proposal Details
This will return information for a single proposal specified by proposal_id
.
Example:
enid query gov proposal $PROPOSAL_ID --chain-id $CHAIN_ID
Querying Proposal Tally
This will return the current vote count for the provided proposal_id
.
enid query gov tally $PROPOSAL_ID --chain-id $CHAIN_ID
Querying Individual Votes
This will query the voting information for a specific voting address and proposal ID.
Example:
enid query gov vote $PROPOSAL_ID $VOTER_ADDR --chain-id $CHAIN_ID
Last updated