Skip to main content
Sei precompiles are special smart contracts deployed at fixed addresses that expose native Sei functionality to EVM applications. They can be called like any standard smart contract using viem, ethers, or wagmi.
Available Precompiles:This page shows Bank, Staking, Governance, Distribution, JSON, and Solo. The rest are covered on their own pages: CosmWasm, Address, Pointer contracts for both pointer precompiles, and P256.
The IBC and Oracle precompiles are not exported by @sei-js/precompiles. IBC is disabled in both directions, and native Oracle queries are retired. Calls to either precompile cannot succeed on live Sei. See IBC is disabled and Oracle Precompile (Retired).
@sei-js/precompiles@3 is ESM-only and matches Sei Chain v6.6.1 ABIs. Import raw *_PRECOMPILE_ABI constants from the package root, @sei-js/precompiles/precompiles, or @sei-js/precompiles/viem. Ethers factories are on @sei-js/precompiles/ethers. The package does not expose VIEM_*_PRECOMPILE_ABI aliases. It re-exports Viem’s sei and seiTestnet definitions and also exports seiLocal (chain ID 713714, http://localhost:8545). Viem 2.55.16 or newer is required.

Setup

Bank Precompile

eth_getBalance only returns the EVM-side SEI balance. The Bank precompile lets you query the native SEI (usei) bank balance for an address:

Staking Precompile

Delegate, undelegate, and query staking state:

Governance Precompile

Vote on an active governance proposal:

Distribution Precompile

Claim staking rewards from a validator:

JSON Precompile

Parse JSON data within EVM contracts or dApps. This is useful for processing oracle responses, NFT metadata, and structured payloads:

Solo Precompile

Claim a Solo migration payload. Both functions take the signed payload as bytes and return a boolean:
Use claimSpecific with the same argument shape to claim a single payload rather than everything available to the address.

Common Patterns

Error Handling

Wrap precompile calls in try/catch and check for specific error codes:

Batch Read Operations

Fetch multiple precompile values in parallel:

Gas Limits

Precompile calls that write state need enough gas. Use estimateContractGas rather than hard-coding:
viem

Full Working Example

A Node.js script that delegates SEI and then casts a governance vote:
Run with:

Next Steps

For full ABI reference and all available functions on each precompile: