Overview
The Governance precompile provides a Solidity interface to the Cosmos SDKx/gov module. Smart contracts can submit proposals, vote, and query governance state.
Precompile Address: 0x0000000000000000000000000000000000000805
Gas Costs
| Method Type | Gas Cost |
|---|---|
| Transactions | 2000 + (30 x bytes of input) |
| Queries | 1000 + (3 x bytes of input) |
Transaction Methods
| Method | Description |
|---|---|
submitProposal | Submit a JSON proposal with deposit |
cancelProposal | Cancel a proposal |
vote | Cast a vote on an active proposal |
voteWeighted | Cast a weighted vote with split options |
deposit | Deposit tokens to a proposal |
Query Methods
| Method | Description |
|---|---|
getConstitution | Get the active constitution text |
getProposal | Get proposal details by ID |
getProposals | List proposals with optional status, voter, depositor, and pagination filters |
getVote | Get a specific vote record |
getVotes | List votes for a proposal |
getDeposit | Get a specific deposit record |
getDeposits | List deposits for a proposal |
getTallyResult | Get current tally for a proposal |
getParams | Get governance parameters |