Available Precompiles:
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 — useful for processing oracle responses, NFT metadata, and structured payloads: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. UseestimateGas rather than hard-coding:
viem