0x0000000000000000000000000000000000001006
The Sei governance precompile lets EVM applications submit proposals, vote, deposit tokens, and read proposal state.
What is a precompile? A precompile is a special smart contract that the Sei protocol itself deploys at a fixed address. It exposes custom native chain logic to EVM-based applications. To the EVM, it behaves like a regular contract, but it executes privileged, low-level logic efficiently.
How does the governance precompile work?
The governance precompile at address0x0000000000000000000000000000000000001006 exposes transactions such as vote(), voteWeighted(), deposit(), and submitProposal(), and queries such as proposal() and tallyResult().
- EVM contracts and dApps can call governance functions like any other smart contract method.
- Governance operations run natively at the chain level, which makes them efficient.
- You do not need a separate wallet integration.
Use cases
- Voting interfaces: Create user-friendly tools for governance participation.
- Automated governance: Build smart contracts that vote based on predetermined strategies.
- Governance aggregators: Build platforms that aggregate and simplify governance participation.
Sei governance overview
Sei governance follows a structured timeline with specific parameters:Governance process
- Proposal submission: Submit a proposal with a minimum deposit of 3,500 SEI.
- Deposit period: The proposal has 2 days to accumulate the minimum deposit or reach the expedited threshold.
- Voting period: When the proposal meets the minimum deposit, voting is active for 3 days (1 day for expedited proposals). After
votingEndTimepasses,vote(),voteWeighted(),voteWithAuthorization(), anddeposit()revert for that proposal, even whileproposal()still reports the voting period status. - Tallying: The results are calculated from the quorum and voting thresholds. Sei tallies a bounded number of votes in each block, so a proposal with many votes can keep the voting period status for a few blocks after
votingEndTimebefore it moves to its final status.
- Since v6.8.0, a voter’s first vote on a proposal costs an extra 100,000 gas. Changing an existing vote does not. Estimate gas with
eth_estimateGasinstead of hard-coding a limit. - When an expedited proposal fails, it becomes a regular proposal after its expedited tally finishes. Its
votingEndTimebecomes the time of that block plusvotingPeriodminusexpeditedVotingPeriodfromparams(). Votes from the expedited round do not carry over, so vote again in the regular round. - Sei settles at most 1,000 deposit records per block, oldest proposal first, starting in the block where the proposal’s deposit period expires or its tally finishes. A proposal with more deposit records, or one queued behind other finished proposals, settles over several blocks. Until then,
getDeposit()anddeposits()still return its deposits.
To learn more about the governance process on Sei, read the governance explainer.
Functions
The governance precompile exposes these functions:Transaction functions
Authorization-based functions
The governance precompile can also create native Cosmos authz grants, so one account (the grantee) can vote or submit proposals for another account (the granter). These functions are available since v6.7.0. Each grant covers one message type and expires at a Unix timestamp. The caller and every address argument must have an associated Sei address.Authorization grants are scoped by message type:
grantVoteAuthorization authorizes only votes, and grantProposalAuthorization authorizes only proposal submissions. Grant and revoke each type independently. A grant must have an expiration in the future, and voteWithAuthorization / submitProposalWithAuthorization fail if no matching, unexpired grant exists for the caller. Revoking a grant that does not exist reverts. SEI that you attach to submitProposalWithAuthorization moves to proposer and counts as the proposer’s deposit, so any refund goes to proposer.Query functions
Use these read-only methods to read proposal state from a contract. The vote and deposit queries aregetVote and getDeposit, because the transactions already use the names vote and deposit. Tools such as ethers.js do not handle overloaded function names well.
Using the contract
Setup
Prerequisites
Before you start, make sure that you have:- Node.js (v18 or higher)
- The npm or yarn package manager
- MetaMask or another compatible EVM wallet, configured for Sei Mainnet
- SEI tokens for gas and governance deposits (a minimum of 3,500 SEI to submit a proposal)
Install dependencies
Install the required packages to interact with Sei precompiles:Import precompile components
Precompile address: The governance precompile is deployed at
0x0000000000000000000000000000000000001006.Get SEI tokens
Buy SEI tokens from supported exchanges:- Centralized exchanges: Binance, Coinbase, KuCoin, Gate.io
- Decentralized exchanges: Astroport, Dragonswap (on Sei)
- Bridge options: Several cross-chain bridges support SEI
Contract initialization
Set up your provider, signer, and contract instance:Vote options
The governance system uses these vote options:Voting power
Your voting power depends on:- Staked SEI: The amount of SEI that you staked with validators
- Delegation: SEI delegated to validators counts toward voting power
- Liquid SEI: Unstaked SEI does not give voting power
Only staked SEI gives voting power. To vote in governance, you must delegate your tokens to validators.
Validation functions
Before you send governance transactions, use these helper functions to validate the inputs:Step-by-step guide: Using the governance precompile
Submit a proposal
Deposit requirements:
- Minimum deposit: A proposal needs 3,500 SEI to enter the voting period.
- Expedited processing: A proposal needs 7,000 SEI for a voting period of only 1 day.
- Deposit period: The proposal has 2 days to meet the minimum. If it does not, the proposal fails and the deposits are burned.
- Multiple deposits: Anyone can contribute to reach the minimum threshold.
Vote on a proposal
Weighted voting
Critical requirement: Make sure that the option weights in a weighted vote sum to exactly 1.0. If they do not, the transaction fails. The Sei governance module enforces this strictly. Even small rounding errors cause a rejection.
Deposit to a proposal
Complete integration example
Create a script that interacts with the governance precompile:governance-mainnet-demo.mjs
Running the example
- Create a new directory and initialize npm:
- Install dependencies:
- Create a
.envfile:
-
Create the demo file:
Copy the complete integration example above into
governance-mainnet-demo.mjs. -
Make sure that you have enough SEI:
- A minimum of 3,500 SEI for the proposal deposit
- More SEI for gas and for optional extra deposits
- Staked SEI for voting power
- Run the script:
Expected output
Troubleshooting
Common issues and solutions
Insufficient deposit
No voting power
Invalid vote option
Weighted vote validation
Error code reference
Need help? If you have problems, use these resources:
- Discord: Sei Community Discord
- GitHub: Sei Protocol repository
- Explorer: View proposals on Sei Explorer