Overview
The Governance precompile enables participation in Sei’s on-chain governance system directly from EVM contracts. Users can vote on proposals and make deposits to support governance proposals, bridging EVM functionality with Cosmos SDK governance. Contract Address:0x0000000000000000000000000000000000001006
Key Features
- Proposal Voting: Cast votes on governance proposals with different options
- Proposal Deposits: Deposit tokens to support governance proposals
- Democratic Participation: Enable EVM contracts to participate in network governance
- Transparent Governance: All governance actions are recorded on-chain
Available Functions
State-Changing Functions
vote(uint64, int32) → bool
vote(uint64, int32) → bool
Cast a vote on a governance proposal.Parameters:
proposalID(uint64): The ID of the proposal to vote onoption(int32): The vote option (1=Yes, 2=Abstain, 3=No, 4=NoWithVeto)
1- Yes: Support the proposal2- Abstain: Neutral vote (counts toward quorum)3- No: Oppose the proposal4- NoWithVeto: Strong opposition (can cause proposal failure)
deposit(uint64) → bool
deposit(uint64) → bool
Make a deposit to support a governance proposal.Parameters:
proposalID(uint64): The ID of the proposal to deposit to
Usage Examples
- Viem
- Ethers.js
- Manual
Vote Options Explained
1. Yes (Option 1)
- Purpose: Support the proposal
- Effect: Counts toward proposal approval
- When to use: When you agree with the proposal
2. Abstain (Option 2)
- Purpose: Neutral stance but participate in quorum
- Effect: Counts toward quorum but not for/against
- When to use: When you want to participate but have no strong opinion
3. No (Option 3)
- Purpose: Oppose the proposal
- Effect: Counts against proposal approval
- When to use: When you disagree with the proposal
4. NoWithVeto (Option 4)
- Purpose: Strong opposition with penalty implications
- Effect: Can cause proposal failure and deposit forfeiture
- When to use: When you believe the proposal is harmful or spam
Common Use Cases
DAO Integration
- Automated Voting: Smart contracts can vote based on predetermined logic
- Delegation Systems: Allow token holders to delegate voting power
- Proposal Support: Automatically deposit to proposals meeting criteria
Community Governance
- Voting Campaigns: Coordinate community voting efforts
- Proposal Funding: Pool resources to support important proposals
- Governance Analytics: Track voting patterns and participation
Protocol Governance
- Parameter Updates: Vote on protocol parameter changes
- Upgrade Proposals: Participate in network upgrade decisions
- Treasury Management: Vote on treasury spending proposals
Governance Workflow
1. Proposal Lifecycle
2. Participation Strategy
Governance Best Practices
Research Before Voting
- Read proposal details thoroughly
- Understand the implications of changes
- Consider long-term effects on the network
Deposit Considerations
- Deposits help proposals reach voting stage
- Failed proposals may result in deposit forfeiture
- Consider the proposal’s likelihood of success
Vote Timing
- Vote early to signal community sentiment
- Monitor voting progress and participation
- Consider changing vote if new information emerges
Error Handling
Common errors when using the Governance precompile:- Invalid proposal ID: Proposal doesn’t exist
- Voting period ended: Cannot vote after voting period closes
- Already voted: Cannot change vote once cast
- Insufficient deposit: Deposit amount too small
Related Precompiles
- Bank: Check SEI balance before making deposits
- Staking: Voting power is based on staked tokens
- Distribution: Claim rewards from governance participation