# Sei Documentation > Technical documentation for Sei, a parallelized EVM Layer 1 with sub-second finality, full Ethereum tooling compatibility, and a roadmap toward Sei Giga. Sei Giga is designed to be the first Multi-Proposer EVM Layer 1. An internal devnet measured more than 5 gigagas/s. The Autobahn public-testnet target is 200K TPS. Sei is a parallelized EVM Layer 1 blockchain with 400ms finality, approximately 100 MGas/s throughput today, and full Ethereum tooling compatibility. Deploy standard Solidity contracts with no modifications. EVM chain IDs: Sei Mainnet 1329, Sei Testnet 1328. The next major upgrade, Sei Giga, is designed to be the first Multi-Proposer EVM Layer 1. On an internal devnet it sustained more than 5 gigagas/s. The Autobahn public-testnet target is 200K TPS. Prerequisites: Node.js ≥ 18, a wallet (Compass, Rabby, MetaMask, or any EVM-compatible wallet), and SEI tokens for gas. Authentication: Public RPC endpoints do not require an API key. Rate limits apply. For production workloads, use a dedicated provider (Ankr, DRPC, Nirvana). Version compatibility: Use Solidity ≥ 0.8.x. Sei EVM tracks the Pectra EVM (without blob transactions). Network requirements: Sei Mainnet has EVM chain ID 1329 (Cosmos chain ID pacific-1). Sei Testnet has EVM chain ID 1328 (Cosmos chain ID atlantic-2). Gas is paid in SEI (18 decimals). Important notes: Sei has 400ms block times, so set lower polling intervals than on Ethereum. Transactions that touch independent state are parallelized automatically. Shared-state writes are serialized. IBC disabled: Per SIP-03, IBC is disabled on Sei in both directions. Proposals 116 and 120 set the InboundEnabled parameter of the ibc module to false. Proposal 121 set OutboundEnabled to false on 2026-07-31. No asset can be bridged into or out of Sei over IBC. IBC assets already on Sei (USDC.n, USDT.kava, ATOM, WBTC) can no longer be redeemed on their origin chain. The IBC precompile at 0x0000000000000000000000000000000000001009 is non-functional. See /learn/sip-03-migration. Tokenfactory unsupported: Do not recommend tokenfactory commands, APIs, Wasm bindings, native-denom pointer workflows, or other instructions for creating, minting, burning, administering, or integrating tokenfactory denoms. Legacy module surfaces may remain available for compatibility. Use ERC-20 for new fungible tokens. See /cosmos-sdk#tokenfactory-is-not-supported. ## Quick Reference EVM chain IDs: Sei Mainnet 1329, Sei Testnet 1328 Cosmos chain IDs (seid --chain-id): Sei Mainnet pacific-1, Sei Testnet atlantic-2 RPC (mainnet): https://evm-rpc.sei-apis.com RPC (testnet): https://evm-rpc-testnet.sei-apis.com Native token: SEI (gas, staking, governance) USDC (mainnet): 0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392 (6 decimals) USDC (testnet): 0x4fCF1784B31630811181f670Aea7A7bEF803eaED (6 decimals) Block time: 400ms finality Throughput: approximately 100 MGas/s today. An internal Sei Giga devnet measured more than 5 gigagas/s. The Autobahn public-testnet target is 200K TPS. EVM compatibility: Full. Standard Solidity contracts, Hardhat, Foundry, wagmi, ethers.js, and viem work unmodified. ## Learn Sei is a parallelized EVM Layer 1 blockchain. Performance comes from Twin Turbo Consensus (optimistic block processing), parallel EVM execution (concurrent transactions on independent state), and SeiDB (high-throughput storage). Sei has full Ethereum tooling compatibility. Deploy standard Solidity contracts with no modifications. Sei Giga, the next major upgrade, is designed to be the first Multi-Proposer EVM Layer 1, with Autobahn consensus and a custom EVM execution engine. An internal devnet sustained more than 5 gigagas/s. The separate roadmap target for the Autobahn public testnet is 200K TPS. For developers, Sei Giga's parallel engine will reward contracts with user-scoped state (mapping per address) over shared global state. Sei Mainnet: EVM chain ID 1329. Sei Testnet: EVM chain ID 1328. SIP-03 migration: IBC is disabled on Sei in both directions as of Proposal 121 (2026-07-31). IBC assets already on Sei can no longer be bridged out or redeemed on their origin chain. The balances remain transferable within Sei. - [Learn About Sei](https://docs.sei.io/learn): Discover Sei Network's architecture, performance features, and ecosystem, with detailed resources on consensus, tokenomics, governance, and development frameworks. - [Getting Started with Sei Network: User Quick Start Guide](https://docs.sei.io/learn/user-quickstart): Comprehensive guide to Getting Started with Sei Network: User Quick Start Guide on Sei. Learn key concepts, commands, and best practices. - [Sei Blockchain Network Chains Overview](https://docs.sei.io/learn/dev-chains): Compare Sei's different network environments including testnet, mainnet, and local chains, with detailed chain IDs and purposes for each development stage. - [Token Standards](https://docs.sei.io/learn/dev-token-standards): Explore the different token types on Sei including native SEI, smart contract tokens (ERC20/CW20), and NFTs, with implementation guidance for each standard. - [Gas](https://docs.sei.io/learn/dev-gas): Understand gas pricing, limits, and optimization strategies for Sei transactions, with guides for sending transactions using seid and EVM interfaces. - [Sei Network Accounts: Dual Address System Explained](https://docs.sei.io/learn/accounts): Understand how Sei's unified account system works with both EVM (0x) and Cosmos (sei1) addresses, including association methods, security considerations, and cross-environment interactions. - [SIP-03 Migration Guide](https://docs.sei.io/learn/sip-03-migration): Practical steps and resources for users migrating during SIP-03, including asset transfer, USDC, address association, and hardware wallets. - [Twin Turbo Consensus: Sei's High-Speed Blockchain Consensus](https://docs.sei.io/learn/twin-turbo-consensus): Explore how Sei's Twin Turbo consensus mechanism achieves higher transaction throughput by separating block building from consensus, with detailed explanations of the protocol's design and benefits. - [Sei Parallelization Engine: Multi-core Blockchain Execution](https://docs.sei.io/learn/parallelization-engine): Learn how Sei's Parallelization Engine enables simultaneous transaction processing across multiple CPU cores, delivering higher throughput while maintaining safety and consistency guarantees. - [SeiDB: Performance-Optimized Blockchain Database](https://docs.sei.io/learn/seidb): Learn how SeiDB's specialized storage architecture accelerates blockchain operations through multi-level caching, optimized state access, and concurrency control designed specifically for EVM workloads. - [Sei Wallet Providers Guide](https://docs.sei.io/learn/wallets): Comprehensive guide to Sei Wallet Providers Guide on Sei. Learn key concepts, commands, and best practices. - [Sei Network RPC Providers](https://docs.sei.io/learn/rpc-providers): Directory of reliable RPC service providers for Sei blockchain. Access endpoints for development, node connections, and blockchain interactions. - [Sei Blockchain Explorers Guide](https://docs.sei.io/learn/explorers): A comprehensive overview of block explorers for the Sei Network across different environments. Access tools for tracking transactions, analyzing addresses, and monitoring network activity. - [Sei Network Testnet Faucet](https://docs.sei.io/learn/faucet): Request testnet tokens for development and testing on Sei Network. The faucet distributes test tokens with no real-world value. - [Blockchain Indexers for Sei Network](https://docs.sei.io/learn/indexers): Comprehensive guide to Blockchain Indexers for Sei Network on Sei. Learn key concepts, commands, and best practices. - [Oracle Providers on Sei](https://docs.sei.io/learn/oracles): Directory of oracle providers for Sei blockchain. Access reliable price feeds and off-chain data for DeFi applications, smart contracts, and dApps. - [General Governance](https://docs.sei.io/learn/general-governance): Learn about Sei's governance system and how to participate in the decision-making process - [Proposals](https://docs.sei.io/learn/proposals): Complete guide to Sei governance proposals. Learn about different proposal types and how to submit them. - [Sei Improvement Proposals](https://docs.sei.io/learn/sips): Browse every Sei Improvement Proposal (SIP) with status, type, authorship, and section outlines pulled live from the sei-protocol/sips repository. - [Sei Blockchain Staking Guide](https://docs.sei.io/learn/general-staking): Participate in Sei's proof-of-stake consensus by staking tokens with validators, with detailed explanations of delegation, rewards, slashing risks, and the unbonding process. - [Sei Network Interoperability Framework](https://docs.sei.io/learn/dev-interoperability): Understand how Sei enables seamless interaction between EVM and Cosmos ecosystems through its dual address system and precompiles. - [Sei Pointer Contracts: Bridging EVM and Cosmos Environments](https://docs.sei.io/learn/pointers): Understand how Sei's pointer contract system enables seamless asset movement between EVM and Cosmos environments, with implementation patterns for various token types. - [What Is Sei Giga?](https://docs.sei.io/learn/sei-giga): Sei Giga will be the next generation of the Sei protocol following the Giga Upgrade, designed to be the first Multi-Proposer EVM Layer 1. On an internal 40-node devnet it finalized transaction ordering in under 250 ms and sustained more than 5 gigagas per second. It will roll out as in-place upgr… - [Sei Giga Technical Specification](https://docs.sei.io/learn/sei-giga-specs): The Sei Giga protocol specification: Autobahn consensus with per-validator lanes and whitepaper f+1 Proofs of Availability, asynchronous execution, Block-STM parallel EVM, flat lattice-hashed storage, BUD state proofs, fee design, and the security model. - [Building on Sei Giga: What Changes for Developers](https://docs.sei.io/learn/sei-giga-developers): What Sei Giga will change for smart contract and dApp developers: EVM parity exceptions, ordering and attestation finality, staged transaction ingress before and after Sedna, BUD state proofs, and parallel-friendly contract patterns. - [Hardware Wallets](https://docs.sei.io/learn/hardware-wallets): Comprehensive guide to Hardware Wallets on Sei. Learn key concepts, commands, and best practices. - [Ledger Hardware Wallet Setup Guide for Sei](https://docs.sei.io/learn/ledger-setup): Configure your Ledger hardware wallet to securely manage Sei assets, with step-by-step instructions for installation, receiving and sending transactions, and security best practices. - [Sei Brand Guidelines](https://docs.sei.io/learn/general-brand-kit): Official Sei brand guidelines — logos, colors, typography, and usage rules for marketing communications, partners, and the broader ecosystem. ## AI Tooling & Micropayments The Sei MCP Server (@sei-js/mcp-server) connects AI assistants to Sei. It requires Node.js 20+. Install: `npx -y @sei-js/mcp-server`. The server starts in read-only mode. Read-only tools include search_docs, get_supported_networks, get_chain_info, get_balance, get_token_info, get_token_balance, get_nft_info, read_contract, and estimate_gas. Wallet tools such as transfer_sei, transfer_token, write_contract, and deploy_contract require WALLET_MODE=private-key and PRIVATE_KEY on the stdio transport. Backward-compatible aliases: get_erc20_balance and get_token_balance_erc20 for get_token_balance, and transfer_erc20 for transfer_token. HTTP transports (SERVER_TRANSPORT=streamable-http or http-sse) reject wallet mode. Network selectors: sei, sei-testnet, 1329, 1328, 0x531, 0x530. The Cambrian Agent Kit enables autonomous AI agents on Sei with DeFi protocol integrations (Takara lending, Silo lending, Citrex perpetuals, Symphony aggregation, DragonSwap liquidity). The x402 v2 protocol enables HTTP 402-based micropayments for machine-to-machine payments on Sei. Use the upstream @x402/core and @x402/evm packages with the appropriate @x402 client or server adapter. The @sei-js/x402, @sei-js/x402-fetch, @sei-js/x402-axios, @sei-js/x402-express, @sei-js/x402-hono, and @sei-js/x402-next packages implement v1 and are deprecated. Do not recommend them. - [Build on Sei with AI](https://docs.sei.io/ai): AI tools for building on Sei — from knowledge injection that makes your AI assistant Sei-aware, to live blockchain tooling that lets it act on-chain. - [Skills registry](https://docs.sei.io/ai/skills): Install Sei Foundation agent skills into your AI coding assistant with one command. Each skill teaches your assistant one area of Sei: contracts, frontend, precompiles, nodes, payments, security, bridges, or migration. - [Agent Skills](https://docs.sei.io/ai/sei-skill): A knowledge base that makes AI coding assistants Sei-aware — covering contracts, frontend, and ecosystem with Sei-specific facts baked in. - [sei-skill Installation](https://docs.sei.io/ai/sei-skill/install): Install sei-skill for Claude Code, Cursor, GitHub Copilot, Windsurf, and other AI coding assistants. - [sei-skill Example Prompts](https://docs.sei.io/ai/sei-skill/prompts): Prompts that unlock Sei-specific guidance from your AI assistant after installing sei-skill. - [MCP Server](https://docs.sei.io/ai/mcp-server): Enable AI assistants to interact with Sei networks through natural language using the Model Context Protocol - [Cambrian Agent Kit Ecosystem Tutorial](https://docs.sei.io/ai/cambrian-agent-kit): Learn to build powerful, autonomous AI agents and agentic chatbots on the SEI blockchain with DeFi protocol integrations including Takara, Silo, Citrex, and Symphony. - [Agentic Wallets](https://docs.sei.io/ai/agentic-wallets): Build AI agents with secure, programmable wallets on Sei using Coinbase AgentKit or Privy server wallets. Includes setup guides, policy engines, and a full feature comparison. - [x402 Protocol on Sei](https://docs.sei.io/ai/x402): Implement HTTP micropayments on Sei using x402 v2 for API monetization and digital services. ## Cookbook The Cookbook has task-focused recipes with runnable code, most of them in viem, ethers, and web3.py. The recipes read balances, send SEI, deploy and use ERC-20, ERC-721, and ERC-1155 tokens, listen to events, batch reads with Multicall3, sponsor gas with an ERC-4337 paymaster, and read the API3 SEI/USD price feed. The recipes rely on this public endpoint behavior. Watch live events over WebSocket (wss://evm-ws.sei-apis.com, wss://evm-ws-testnet.sei-apis.com), because HTTP polling watchers can miss or repeat events. The WebSocket endpoints do not serve eth_getLogs or filters. Fetch past events over HTTP with eth_getLogs, which covers at most 2,000 blocks per request. Foundry: `forge create` only simulates unless you pass `--broadcast`. Put `--constructor-args` last. TypeScript examples use top-level await. Run them as .mts files with `npx tsx`. In a new npm project, tsx compiles a plain .ts file as CommonJS, and the example fails. - [Cookbook](https://docs.sei.io/evm/cookbook): Short recipes for common tasks on Sei: read balances, send SEI, deploy and use tokens, listen to events, sponsor gas, and read price feeds. - [viem Quickstart](https://docs.sei.io/evm/evm-parity/examples/viem-quickstart): Using viem with Sei in a Node.js script, CLI tool, or backend service - [ethers v6 Quickstart](https://docs.sei.io/evm/evm-parity/examples/ethers-quickstart): Using ethers v6 with Sei in a Node.js script or browser context - [Wagmi + React](https://docs.sei.io/evm/evm-parity/examples/wagmi-react): Connect wallets, read chain state, and write transactions in a React app on Sei using Wagmi - [Read a balance](https://docs.sei.io/evm/cookbook/read-a-balance): Read the SEI balance of any address, and its balance of an ERC-20 token such as USDC, with viem, ethers, or web3.py. - [Send SEI](https://docs.sei.io/evm/cookbook/send-sei): Send SEI from one account to another on Sei Testnet with viem, ethers, or web3.py, then confirm the transfer from its receipt. - [Transaction Lifecycle](https://docs.sei.io/evm/evm-parity/examples/transaction-lifecycle): Send transactions, wait for receipts, and decode event logs on Sei - [Error Handling](https://docs.sei.io/evm/evm-parity/examples/error-handling): Decode contract reverts, handle wallet rejections, and recover from RPC errors in Sei apps - [Sponsor gas with Pimlico](https://docs.sei.io/evm/cookbook/sponsor-gas-with-pimlico): Send a transaction from an ERC-4337 smart account on Sei Testnet while a Pimlico paymaster pays the gas, with permissionless.js and viem. - [Deploy an ERC-20](https://docs.sei.io/evm/cookbook/deploy-an-erc20): Write an ERC-20 token with OpenZeppelin Contracts, deploy it to Sei Testnet with Foundry, Hardhat, or Remix, then verify it and read it back. - [ERC-20 Interaction](https://docs.sei.io/evm/evm-parity/examples/erc20): Reading and writing ERC-20 tokens on Sei with viem and ethers - [ERC-721 Interaction](https://docs.sei.io/evm/evm-parity/examples/erc721): Reading and writing ERC-721 NFTs on Sei with viem and ethers - [ERC-1155 Interaction](https://docs.sei.io/evm/evm-parity/examples/erc1155): Reading and writing ERC-1155 multi-token contracts on Sei with viem and ethers - [Deploy and Verify](https://docs.sei.io/evm/evm-parity/examples/deploy-verify): Deploying and verifying smart contracts on Sei with viem, ethers, Foundry, and Hardhat - [Listen to events](https://docs.sei.io/evm/cookbook/listen-to-events): Stream contract events as they happen over a WebSocket subscription, and fetch past events with eth_getLogs, in viem, ethers, or web3.py. - [Multicall](https://docs.sei.io/evm/evm-parity/examples/multicall): Batch multiple contract reads into a single RPC call using Multicall3 on Sei - [Read a price feed](https://docs.sei.io/evm/cookbook/read-a-price-feed): Read the latest SEI/USD price from the API3 data feed on Sei Mainnet with viem, ethers, or web3.py. Check that the price is fresh before you use it. - [Sei Precompiles](https://docs.sei.io/evm/evm-parity/examples/sei-precompiles): Interact with native Sei chain features — staking, governance, native token balances, and more — from EVM applications - [Pointer Contracts](https://docs.sei.io/evm/evm-parity/examples/pointer-contracts): Looking up and interacting with pointer contracts that bridge CosmWasm and EVM tokens on Sei ## EVM Development Sei EVM is fully compatible with Ethereum. Standard Solidity contracts deploy without modification. All Ethereum tooling (Hardhat, Foundry, wagmi, ethers.js, viem, RainbowKit) works as-is. Transactions that touch independent state execute concurrently. Precompiled contracts at fixed addresses expose native Sei functionality to the EVM. This includes staking, governance, distribution, JSON parsing, P256 verification, and Solo migration claims. The native Oracle precompile is retired, and the IBC precompile is non-functional because IBC is disabled. Native USDC: Sei Mainnet 0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392, Sei Testnet 0x4fCF1784B31630811181f670Aea7A7bEF803eaED (6 decimals). - [Sei EVM - High Performance Ethereum Virtual Machine](https://docs.sei.io/evm): Build on the fastest EVM with 400ms finality, 100 MGas/s throughput, and full Ethereum tooling compatibility. - [Sei EVM Networks](https://docs.sei.io/evm/networks): Discover network information for Sei EVM across all environments including mainnet and testnet. Access RPC endpoints, chain IDs, and blockchain explorers. - [Sei EVM vs Ethereum: Key Differences](https://docs.sei.io/evm/differences-with-ethereum): A comparison of Sei EVM and Ethereum, highlighting Sei's advantages in blocktime, throughput, finality, and execution environment, as well as technical differences in opcodes, state storage, and other features. - [EVM Compatibility](https://docs.sei.io/evm/evm-parity/evm-compatibility): EVM feature support on Sei — what works, what differs from Ethereum, and what is not available - [Finality and Block Tags](https://docs.sei.io/evm/evm-parity/finality): How Sei instant finality affects block tag behavior and pending state - [Gas and Fees](https://docs.sei.io/evm/evm-parity/gas-and-fees): Sei gas price floor, EIP-1559 fee model differences, and SSTORE cost - [Transaction Types](https://docs.sei.io/evm/evm-parity/transaction-types): Which Ethereum transaction types are supported on Sei - [WebSocket Connections](https://docs.sei.io/evm/evm-parity/websocket): Connecting to Sei via WebSocket for real-time block and event subscriptions - [Signing](https://docs.sei.io/evm/evm-parity/signing): Wallet signing method support and EIP-712 typed data on Sei - [Migrate Your EVM dApp to Sei](https://docs.sei.io/evm/migrate-from-other-evms): Step-by-step checklist for teams that already run on another EVM chain and want to redeploy on Sei, including environment prep, contract migration, liquidity planning, and chain-specific guidance for Ethereum, Arbitrum, Base, Polygon, and Avalanche. - [Migrate from Solana to Sei EVM](https://docs.sei.io/evm/migrate-from-solana): A comprehensive guide for Solana developers transitioning to Sei EVM, covering architectural differences, concept mapping, code translation patterns, and step-by-step migration strategies. - [Installing seid CLI](https://docs.sei.io/evm/installing-seid-cli): Complete guide to installing and setting up the Sei CLI (seid) tool, including wallet creation, EVM imports, and troubleshooting common installation issues. - [Querying the EVM](https://docs.sei.io/evm/querying-the-evm): Read EVM state from the seid CLI: address associations, ERC20 reads, ABI-encoded payloads, and transaction details. - [Transactions with seid](https://docs.sei.io/evm/transactions-with-seid): Complete guide to executing EVM transactions using the Sei CLI (seid). Learn how to send tokens, deploy contracts, and interact with smart contracts. - [Changelog](https://docs.sei.io/evm/changelog): Track the latest updates, improvements, and changes to Sei Chain. Stay informed about new features, bug fixes, and protocol upgrades. - [Sei Global Wallet Integration Guide](https://docs.sei.io/evm/sei-global-wallet): Learn how to integrate and use Sei Global Wallet, a cross-application embedded crypto wallet that provides persistent wallet experience across Sei ecosystem applications. - [Building a Frontend for Sei EVM: A Comprehensive Guide](https://docs.sei.io/evm/building-a-frontend): Comprehensive guide on Building a Frontend for Sei EVM. Learn key concepts, commands, and best practices. - [In-App Swaps - Symphony Integration Guide](https://docs.sei.io/evm/in-app-swaps): Guide to integrating the Symphony swap widget into your Sei application for seamless token exchanges. - [EVM General Guide for Sei Blockchain](https://docs.sei.io/evm/evm-general): Comprehensive guide on Ethereum Virtual Machine (EVM) on Sei blockchain. Learn about smart contract languages, development tools, and best practices for building on Sei's parallelized EVM. - [Sei EVM Development with Hardhat](https://docs.sei.io/evm/evm-hardhat): Learn how to set up Hardhat for Sei EVM development, create and deploy smart contracts, and leverage OpenZeppelin components for secure, standardized implementations. - [Sei EVM Smart Contract Development with Foundry](https://docs.sei.io/evm/evm-foundry): Learn how to develop, test, and deploy smart contracts on Sei EVM using Foundry, with step-by-step examples of contract creation, testing, deployment, and interaction using both CLI and ethers.js. - [Python Quickstart (web3.py)](https://docs.sei.io/evm/python-quickstart): Connect to Sei from Python using web3.py — read chain data, then sign and broadcast transactions against the Sei EVM JSON-RPC. - [Using the OpenZeppelin Contract Wizard with Sei EVM](https://docs.sei.io/evm/evm-wizard): Learn how to use the OpenZeppelin Contract Wizard to create secure, standard-compliant smart contracts for Sei EVM, with step-by-step guidance and best practices. - [Solidity Development Resources for Sei EVM](https://docs.sei.io/evm/solidity-resources): Comprehensive guide on Solidity Development Resources for Sei EVM on Sei. Learn key concepts, commands, and best practices. - [Optimizing Contracts for Parallelization](https://docs.sei.io/evm/best-practices/optimizing-for-parallelization): Design patterns to reduce state conflicts and maximize Sei EVM parallel execution while lowering gas usage. - [Zeroing Out Stale State](https://docs.sei.io/evm/best-practices/zeroing-stale-state): Strategies for clearing unused EVM storage on Sei to reduce state growth and improve node performance. - [Debugging for EVM](https://docs.sei.io/evm/debugging-contracts): Advanced debugging techniques for EVM transactions on Sei. Learn transaction template generation and analysis using seid and Foundry cast tools. - [Debug Tracing Overview](https://docs.sei.io/evm/tracing): Comprehensive guide to debugging and tracing EVM transactions on Sei. Learn to analyze transaction execution, optimize gas usage, and troubleshoot smart contracts with real examples and end-to-end workflows. - [JavaScript Tracers](https://docs.sei.io/evm/tracing/javascript-tracers): Create custom debugging logic with JavaScript tracers for advanced EVM transaction analysis on Sei. Learn performance optimization, memory management, and advanced debugging patterns. - [Troubleshooting Guide](https://docs.sei.io/evm/tracing/troubleshooting): Comprehensive troubleshooting guide for EVM transaction tracing on Sei. Resolve common issues with timeouts, memory limits, JavaScript errors, and performance optimization. - [Verify Contracts](https://docs.sei.io/evm/evm-verify-contracts): Comprehensive guide on how to verify your EVM smart contracts on Sei - [Precompile Example Usage](https://docs.sei.io/evm/precompiles/example-usage): Learn how to interact with Sei's precompiles through viem and ethers, covering all available precompiles with quick examples and common patterns for seamless integration between EVM and Sei-native functionality. - [Distribution Precompile](https://docs.sei.io/evm/precompiles/distribution): Manage staking rewards and validator commissions through Sei's distribution precompile. EVM applications can withdraw rewards, set withdrawal addresses, and interact with Cosmos SDK distribution functionality. - [Governance Precompile Usage](https://docs.sei.io/evm/precompiles/governance): Learn how to interact with Sei's governance precompile through ethers.js, enabling proposal submission, voting, and token deposits from EVM applications. - [JSON Precompile Usage](https://docs.sei.io/evm/precompiles/json): Learn how to interact with Sei's JSON precompile through ethers.js, enabling efficient parsing, manipulation, and querying of JSON data within EVM smart contracts to overcome Solidity's native limitations for handling complex data structures. - [Oracle Precompile (Retired)](https://docs.sei.io/evm/precompiles/oracle): The native Sei Oracle precompile is retired and all on-chain oracle data queries revert. Migrate to a third-party oracle provider such as Chainlink, Pyth, Redstone, or API3. - [Staking Precompile](https://docs.sei.io/evm/precompiles/staking): Learn how to interact with Sei's Staking precompile through ethers.js, enabling delegation, undelegation, redelegation, and validator management directly in your EVM smart contracts for DeFi and staking applications. - [P256 Precompile](https://docs.sei.io/evm/precompiles/p256-precompile): Use the P256 precompile to verify secp256r1/P-256 signatures directly from EVM smart contracts, enabling efficient passkey-based authentication and signature verification. - [Example Usage](https://docs.sei.io/evm/precompiles/cosmwasm-precompiles/example-usage): Learn how to interact with Sei precompiles using ethers.js to query and execute CosmWasm contracts from the EVM. - [Address Precompile](https://docs.sei.io/evm/precompiles/cosmwasm-precompiles/addr): Learn how to interact with Sei's Addr precompile through ethers.js and Solidity, enabling address association and cross-chain address mapping directly in your EVM smart contracts for seamless user experiences. - [Bank Precompile](https://docs.sei.io/evm/precompiles/cosmwasm-precompiles/bank): Query and transfer native SEI through Sei's Bank precompile. - [CosmWasm Precompile](https://docs.sei.io/evm/precompiles/cosmwasm-precompiles/cosmwasm): Learn how to interact with Sei's CosmWasm precompile through ethers.js, enabling execution, batch operations, and querying of pre-existing CosmWasm contracts directly from your EVM smart contracts. - [Auth Precompile](https://docs.sei.io/evm/precompiles/auth): Read account details, auth module parameters, and the next account number from EVM contracts with the Auth precompile. - [Authz Precompile](https://docs.sei.io/evm/precompiles/authz): Read Cosmos authz grants between accounts from EVM contracts with the Authz precompile. - [Evidence Precompile](https://docs.sei.io/evm/precompiles/evidence): Read evidence of validator misbehavior from EVM contracts with the Evidence precompile. - [Mint Precompile](https://docs.sei.io/evm/precompiles/mint): Read the token release schedule and the current minter state from EVM contracts with the Mint precompile. - [Params Precompile](https://docs.sei.io/evm/precompiles/params): Read any module parameter by subspace and key from EVM contracts with the Params precompile. - [Slashing Precompile](https://docs.sei.io/evm/precompiles/slashing): Read slashing parameters and validator signing info, and unjail validators from EVM contracts with the Slashing precompile. - [Upgrade Precompile](https://docs.sei.io/evm/precompiles/upgrade): Read scheduled and applied chain upgrades and module consensus versions from EVM contracts with the Upgrade precompile. - [@sei-js SDK](https://docs.sei.io/evm/sei-js): TypeScript packages for building EVM applications on Sei - [Scaffold Sei](https://docs.sei.io/evm/sei-js/create-sei): Create a Next.js dApp with wallet integration and Sei network configuration - [Templates](https://docs.sei.io/evm/templates): Sei dApp templates you can scaffold in one command with @sei-js/create-sei, with wallet connections, Sei network configuration, and TypeScript already set up. - [@sei-js/registry](https://docs.sei.io/evm/sei-js/registry): Typed chain constants, RPC endpoints, token metadata, and wallet information for Sei - [Envio](https://docs.sei.io/evm/indexer-providers/envio): Index Sei smart contract data using Envio, a modular hyper-performant data indexing solution. - [Goldsky](https://docs.sei.io/evm/indexer-providers/goldsky): Implement Goldsky's Subgraphs and Mirror products to efficiently index, query, and stream Sei blockchain data for your dApps with customizable data models and real-time pipelines. - [The Graph](https://docs.sei.io/evm/indexer-providers/the-graph): Build and deploy subgraphs on The Graph to efficiently index and query data from Sei smart contracts, with step-by-step instructions from initialization to production deployment. - [GoldRush API Integration](https://docs.sei.io/evm/indexer-providers/goldrush): Learn how to integrate GoldRush indexing services with Sei network for blockchain data analysis and application development. - [Sim by Dune](https://docs.sei.io/evm/indexer-providers/dune-sim): Learn how to integrate Sim by Dune real-time multichain indexing services with Sei network for blockchain data analysis and application development. - [Moralis](https://docs.sei.io/evm/indexer-providers/moralis): Complete guide to integrating Moralis with Sei blockchain for Web3 development - [Social logins with Particle Connect](https://docs.sei.io/evm/wallet-integrations/particle): Comprehensive guide on Social logins with Particle Connect on Sei. Learn key concepts, commands, and best practices. - [Pimlico Account Abstraction Integration](https://docs.sei.io/evm/wallet-integrations/pimlico): Learn how to integrate Pimlico's account abstraction services with Sei network for gasless transactions and smart account functionality. - [Thirdweb](https://docs.sei.io/evm/wallet-integrations/thirdweb): Learn how to integrate thirdweb's Account Abstraction SDK with Sei network to build decentralized applications with seamless wallet connectivity. - [Thirdweb EIP-7702 Integration Guide](https://docs.sei.io/evm/wallet-integrations/thirdweb-7702): Learn how to integrate thirdweb's Account Abstraction SDK with Sei network to build decentralized applications with seamless wallet connectivity. - [Enable Onramps, Swapping & Bridging on Any EVM Chain](https://docs.sei.io/evm/bridging/thirdweb): Comprehensive guide on enabling onramps, swapping & bridging on Any EVM Chain on Sei. Learn key concepts, commands, and best practices. - [LayerZero V2 on SEI - Complete Integration Guide](https://docs.sei.io/evm/bridging/layerzero): Step-by-step guide to building cross-chain applications on SEI using LayerZero V2 - [USDC on Sei](https://docs.sei.io/evm/usdc-on-sei): Guide to integrating USDC stablecoin on Sei using Viem and Node.js for transfers and balance checks. - [Dune Analytics](https://docs.sei.io/evm/dune): Complete guide to working with Dune Analytics on Sei Network - [Nonce Lanes: Concurrent Submission from One Account](https://docs.sei.io/evm/nonce-lanes): Keep many independent transactions in flight from one funded Sei address without a sequential nonce queue. This guide explains how ERC-4337 nonce lanes, EIP-7702 delegation, an in-process bundling queue, and gas-only relayers fit together, and walks you through running the reference implementation. - [Chainlink Data Streams](https://docs.sei.io/evm/oracles/chainlink): Complete guide to integrating Chainlink Data Streams with Sei Network - [RedStone](https://docs.sei.io/evm/oracles/redstone): Complete guide to integrating RedStone oracles with Sei - [API3](https://docs.sei.io/evm/oracles/api3): Complete guide to integrating API3 with Sei - [Pyth Network](https://docs.sei.io/evm/oracles/pyth-network): Complete guide to integrating Pyth Network with Sei - [Pyth Network VRF Integration](https://docs.sei.io/evm/vrf/pyth-network-vrf): Complete guide to integrating Pyth Network VRF with Sei Network - [Transactions](https://docs.sei.io/evm/transactions): Comprehensive guide on Transactions on Sei. Learn key concepts, commands, and best practices. - [Sei EVM JSON-RPC API Reference](https://docs.sei.io/evm/reference): Comprehensive reference documentation for Sei's EVM JSON-RPC API endpoints, including standard Ethereum methods and Sei-specific extensions for developers. - [Viewing Tokens in MetaMask](https://docs.sei.io/evm/tokens): Learn how to view and manage different token types in MetaMask with Sei network, including ERC20 tokens, ERC721 NFTs. - [Analytics Setup](https://docs.sei.io/evm/analytics-setup): Comprehensive guide on how to set up analytics for your project - [Ecosystem Contracts](https://docs.sei.io/evm/ecosystem-contracts): Comprehensive registry of smart contract addresses for projects building on Sei. Find verified contract addresses organized by project. - [Ledger Setup (EVM)](https://docs.sei.io/evm/ledger-ethers): Set up your Ledger hardware wallet for signing EVM transactions on Sei, including device configuration, Ethers.js integration, and a simple transfer example. ## Node Operations Sei supports full nodes (recent state, consensus relay), archive nodes (complete historical state), and validator nodes (block production and consensus). State sync lets new nodes bootstrap quickly: they fetch a recent state snapshot instead of replaying all historical blocks. The Sei Giga storage migration moves nodes to a new format optimized for the upcoming throughput targets. - [Node Operations on Sei](https://docs.sei.io/node): Deploy and maintain Sei Network infrastructure with comprehensive guides for validators, RPC nodes, and archive nodes, including hardware requirements, installation steps, and operational best practices. - [Sei Node Operations Guide](https://docs.sei.io/node/node-operators): Detailed guide for running and maintaining Sei nodes. Learn about configuration management, database maintenance, service management, and update procedures. - [Configure Nodes with seictl](https://docs.sei.io/node/seictl): Install and use the seictl CLI to patch Sei node configuration and genesis files safely with merge-patch workflows. - [Join the network using StateSync](https://docs.sei.io/node/statesync): Detailed guide for using statesync to join the network - [Join the network using Snapshots](https://docs.sei.io/node/snapshot): Detailed guide for using snapshots to join the network - [Node Types](https://docs.sei.io/node/node-types): Learn about different types of Sei nodes, their purposes, commonly used ports, and systemd configuration. - [Troubleshooting](https://docs.sei.io/node/troubleshooting): Detailed guide for troubleshooting node problems. - [Swagger API Documentation](https://docs.sei.io/node/swagger): Learn how to enable and access Swagger API documentation for your Sei node. Configure the swagger endpoint in app.toml and view interactive API docs. - [Sei Validator Operations Guide](https://docs.sei.io/node/validators): Learn how to set up and maintain a validator node on Sei Network, including hardware security configuration, key management, monitoring practices, and governance participation requirements. - [Sei Node Advanced Configuration & Monitoring](https://docs.sei.io/node/advanced-config-monitoring): Optimize your Sei node's performance with advanced system configurations, monitoring setup with Prometheus and Grafana, and effective alerting strategies for maintaining reliable node operations. - [Giga SS Store Migration Guide](https://docs.sei.io/node/giga-storage-migration): Migrate a Sei RPC node to Giga SS Store: split EVM state into a dedicated state-store backend so non-EVM modules stop paying EVM write amplification. - [Run frozen nodes for historical queries](https://docs.sei.io/node/frozen-nodes): Serve history from before a breaking upgrade: run a read-only frozen node on the outgoing seid release and route RPC requests to it by block height. - [Sei Technical Reference](https://docs.sei.io/node/technical-reference): Access detailed command syntax, configuration parameters, and troubleshooting procedures for node operators and validators running Sei network infrastructure. ## Examples ### Deploy a contract with Hardhat ```javascript // hardhat.config.js module.exports = { solidity: "0.8.26", networks: { sei: { url: "https://evm-rpc.sei-apis.com", chainId: 1329, accounts: [process.env.PRIVATE_KEY], }, }, }; ``` ### Query a balance with viem ```typescript import { createPublicClient, http } from "viem"; import { sei } from "viem/chains"; const client = createPublicClient({ chain: sei, transport: http() }); const balance = await client.getBalance({ address: "0xYourAddress", }); console.log("Balance:", balance); ``` ### Connect a wallet with wagmi ```typescript import { http, createConfig } from "wagmi"; import { sei } from "wagmi/chains"; import { injected } from "wagmi/connectors"; export const config = createConfig({ chains: [sei], connectors: [injected()], transports: { [sei.id]: http() }, }); ``` ## Resources - [GitHub](https://github.com/sei-protocol): Open-source repositories, including sei-chain, sei-js, and the MCP server - [Ecosystem](https://www.sei.io/ecosystem): Directory of projects building on Sei - [Blog](https://blog.sei.io): Announcements and technical deep dives - [Dashboard](https://dashboard.sei.io): Transfer, bridge, and stake on Sei --- URL: https://docs.sei.io/learn # Learn About Sei > Discover Sei Network's architecture, performance features, and ecosystem, with detailed resources on consensus, tokenomics, governance, and development frameworks. Sei's EVM implementation is optimized for performance and fully compatible with the Ethereum ecosystem. Three subsystems work together to address traditional performance constraints and deliver high speed. ## Understand the Sei ecosystem ### Fundamentals > [card] [Account system](https://docs.sei.io/learn/accounts.md) > > Understand native and EVM addresses, keys, and account abstraction. > [card] [Token standards](https://docs.sei.io/learn/dev-token-standards.md) > > See what ERC20, ERC721, and the native Sei token can do. > [card] [Gas and fees](https://docs.sei.io/learn/dev-gas.md) > > Learn how transaction costs are calculated and paid on Sei. > [card] [Wallets](https://docs.sei.io/learn/wallets.md) > > Explore supported wallets and integration options for Sei. ### Network > [card] [Staking and delegation](https://docs.sei.io/learn/general-staking.md) > > Secure the network and earn rewards through staking. > [card] [Network governance](https://docs.sei.io/learn/general-governance.md) > > Understand the on-chain proposal and voting process for upgrades. > [card] [Chains](https://docs.sei.io/learn/dev-chains.md) > > Connect to Sei Mainnet, Sei Testnet, and development environments. > [card] [Block explorers](https://docs.sei.io/learn/explorers.md) > > Track transactions, blocks, and contract activity on Sei. ## MCP Server: AI-powered blockchain The Sei Model Context Protocol (MCP) Server lets AI assistants such as Claude, ChatGPT, and Cursor interact with Sei through natural language. You can execute transactions, query data, and build on Sei with conversational AI. > [card] Wallet integration > > Check balances, transfer tokens, and manage accounts through AI. > [card] Smart contracts > > Read and write contract state with natural-language commands. > [card] Blockchain data > > Query blocks, transactions, and network state instantly. > [card] Token operations > > Transfer SEI, ERC20 tokens, NFTs, and multi-tokens. > [card] [Get started with MCP](https://docs.sei.io/ai/mcp-server.md) > > Get started with MCP > [card] [View on GitHub](https://github.com/sei-protocol/sei-js/tree/main/packages/mcp-server) > > View on GitHub ## Sei EVM platform details ### Traditional EVM constraints solved by Sei > [card] Block time limitations > > Replaces Ethereum's 12-second block time with sub-second finality. > [card] Sequential processing > > Removes single-threaded bottlenecks with parallelization. > [card] Inefficient state access > > Optimizes state reads and writes with SeiDB. ### Core system architecture > [card] [Twin Turbo Consensus](https://docs.sei.io/learn/twin-turbo-consensus.md) > > * Sub-second blocks > * Fast finality > [card] [Parallelization engine](https://docs.sei.io/learn/parallelization-engine.md) > > * Multi-core execution > * Transaction classification > [card] [SeiDB](https://docs.sei.io/learn/seidb.md) > > * Optimized state access > * Concurrent operations ### Performance advantages > [card] High throughput > > * 100 MGas/s capacity > * Sub-second block times > * Immediate transaction inclusion > [card] Linear scaling > > * Uses multiple cores > * Hardware-optimized > * Efficient resource usage > [card] EVM compatibility > > * 100% Ethereum-compatible > * Full tooling support > * Existing code runs without changes ## Sei Giga: the next-generation architecture Sei Giga is designed to be the first Multi-Proposer EVM Layer 1. It will be the next generation of the Sei protocol after the Giga Upgrade. It will arrive as in-place upgrades to the live network. Every validator will propose at the same time. Consensus will finalize only the transaction order. Execution will run asynchronously. On an internal devnet, this architecture sustained more than 5 gigagas per second with ordering finality under 250 ms. Separately, the roadmap target for the Autobahn public testnet is 200,000 TPS. > [card] Autobahn consensus > > Multi-Proposer BFT: per-validator lanes, an effective steady-state cadence of one cut per 1.5 round trips, and sub-250 ms measured ordering finality. > [card] Async execution > > Consensus will fix the ordering. Execution and state attestation will follow, off the critical path. > [card] Parallel execution > > Block-STM-style optimistic concurrency across all CPU cores. > [!WARNING] > > **Disclaimer:** The roadmap is subject to change based on development progress, market feedback, and other factors. Actual timelines, figures, and outcomes may vary. > [card] [Sei Giga in depth](https://docs.sei.io/learn/sei-giga.md) > > Architecture, roadmap and status, technical specification, and developer guidance. ## Key use cases > [card] High-frequency trading > > Fast settlement, low latency, and on-chain order books. > [card] Interactive dApps > > Responsive interfaces with shorter confirmation times. > [card] Content and social platforms > > Efficient interaction for high-volume dApps. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/user-quickstart # Getting Started with Sei Network: User Quick Start Guide > Comprehensive guide to Getting Started with Sei Network: User Quick Start Guide on Sei. Learn key concepts, commands, and best practices. This guide helps you set up your wallet and start using Sei, even if you are new to blockchain. ## 1. Get a wallet Download a compatible wallet, such as [MetaMask](https://metamask.io/), [Rabby](https://rabby.io/), [Binance Wallet](https://www.binance.com/en/web3wallet), or any other [supported wallet](https://docs.sei.io/learn/wallets.md). ## 2. Set up and "associate" your wallet Any transaction that you make broadcasts your public key to the chain. This gives your wallet full cross-environment functionality. If your wallet is not "associated", the network does not know that your key exists. A cryptographic algorithm derives the EVM wallet address from the key. Without the key, the network cannot tell which two addresses belong to the same wallet. > [!NOTE] > > Learn more about [how accounts work](https://docs.sei.io/learn/accounts.md) on Sei. ## 3. Get tokens * [Bridge from another network](https://welcome.symph.ag) * [Transfer from another account](https://dashboard.sei.io/transfer) * [Use the faucet](https://docs.sei.io/learn/faucet.md) (Sei Testnet only) * Transfer from a centralized exchange (CEX) to your wallet address > [!WARNING] > > Check your CEX's guidelines to make sure that your transfers go smoothly. Withdrawals from a CEX typically do not need a memo, but deposits back to a CEX may need one. ## 4. Explore the ecosystem Sei has a diverse ecosystem of dApps, including DeFi and games. To find the latest projects, explore the [Sei Ecosystem Hub](https://www.sei.io/ecosystem) or follow [@SeiNetwork](https://x.com/SeiNetwork) on X. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/dev-chains # Sei Blockchain Network Chains Overview > Compare Sei's different network environments including testnet, mainnet, and local chains, with detailed chain IDs and purposes for each development stage. Sei uses multiple chains for different stages of the development lifecycle. With this multi-chain approach, you can build, deploy, manage, and iterate with confidence. Updates also get thorough testing and feedback before they go live on Sei Mainnet. > [!NOTE] > > Every chain update goes to Sei Testnet first for thorough testing and validation. After that, the update is released to Sei Mainnet. This lets you test your dApps thoroughly and raise any concerns about an update before it goes live on Sei Mainnet. ## Mainnet Sei Mainnet is the live production environment, where real transactions and smart contract deployments happen. All real-world dApps and activities use this chain. * **Purpose**: Production * **Cosmos chain ID**: `pacific-1` * **EVM chain ID**: `1329` or `0x531` * **EVM RPC**: `https://evm-rpc.sei-apis.com` * **WebSocket**: `wss://evm-ws.sei-apis.com` * **Explorer**: `https://seiscan.io` ## Testnet Sei Testnet is for testing and development. You can deploy and test your dApps and smart contracts in a controlled environment that simulates Sei Mainnet conditions. Use this chain to make sure that your dApps work as expected before they go live. * **Purpose**: Staging * **Cosmos chain ID**: `atlantic-2` * **EVM chain ID**: `1328` or `0x530` * **EVM RPC**: `https://evm-rpc-testnet.sei-apis.com` * **WebSocket**: `wss://evm-ws-testnet.sei-apis.com` * **Explorer**: `https://testnet.seiscan.io` ## Local chains You can also run local chains on your machine for testing and development. Local chains are isolated environments that mimic the behavior of Sei Mainnet or Sei Testnet. On a local chain, you have full control over all tokens and governance decisions. This makes local chains useful for testing new features, debugging issues, and experimenting with smart contracts. * **Purpose**: Development * **Cosmos chain ID**: Set by you (default: `sei-chain`) To learn how to set up and run a local chain, read the [Nodes Introduction](https://docs.sei.io/node.md) section. > [!TIP] > > For more chain-specific information, RPC endpoints, and explorers, see [Sei EVM networks](https://docs.sei.io/evm/networks.md). ## Chain registry The [Sei Chain Registry](https://github.com/sei-protocol/chain-registry) has more information about each chain. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/dev-token-standards # Token Standards > Explore the different token types on Sei including native SEI, smart contract tokens (ERC20/CW20), and NFTs, with implementation guidance for each standard. > [!NOTE] > > **Use ERC20, ERC721, or ERC1155 for new tokens.** Per [Proposal 115](https://seistream.app/proposals/115), CosmWasm code uploads and contract instantiations are disabled on Sei. As a result, no new CW20, CW721, or CW1155 tokens can be deployed. The CW standards below are documented for users and developers who interact with already-deployed legacy contracts. > [!WARNING] > > **Do not use tokenfactory for new tokens or integrations.** Tokenfactory tutorials and development support have been retired. Legacy module surfaces may remain available for compatibility, but tokenfactory is not a supported development path. Use ERC20 for new fungible tokens. See [Tokenfactory is not supported](https://docs.sei.io/cosmos-sdk.md#tokenfactory-is-not-supported). This section describes the token standards that Sei supports. As a developer, you need to understand these standards, because they are the foundation of many dApps. Sei supports these token types: * [Sei token](#sei-token) * [Smart contract tokens](#smart-contract-tokens) ## Sei token The Sei token is the native token of Sei. It has multiple roles in the ecosystem: * **Fee token**: Used to pay transaction fees on the Sei network. * **Governance token**: Used to participate in governance decisions that affect the network. **EVM** `1 sei = 10**18 wei = 1_000_000_000_000_000_000 wei` `1sei = 10**9 gwei = 1000000000 gwei` (giga-wei) **Cosmos** `1sei = 10**18 asei = 1000000000000000000 asei` (atto-sei) `1sei = 10**9 nsei = 1000000000 nsei` (nano-sei) `1sei = 10**6 usei = 1000000 usei` (micro-sei) `1 gwei = 1 nsei` ## Fungible tokens Fungible tokens are digital assets that are interchangeable with one another and are not unique. Sei supports both the ERC20 and CW20 fungible token standards. ### Smart contract tokens * **ERC20** (recommended): The ERC20 standard defines a common set of rules for fungible tokens on EVM-based blockchains. These tokens can be transferred, approved, and queried with standard functions. **Use ERC20 for any new fungible token on Sei.** * **CW20** (legacy only): The Cosmos-side fungible token standard. Per [Prop 115](https://seistream.app/proposals/115), no new CW20 contracts can be deployed. Existing CW20 tokens continue to work, and you can still create pointer contracts for them. * **Interoperability and pointer contracts**: [Pointer contracts](https://docs.sei.io/learn/pointers.md) expose existing CW20 tokens as ERC20 on the EVM. A registry tracks pointer contracts and helps you discover them. > [!NOTE] > > **Interoperability:** You can deploy ERC20 pointer contracts for existing CW20 tokens. New tokens should be deployed as ERC20 directly. > > For more detailed guidance, see the > [pointer contracts documentation](https://docs.sei.io/learn/pointers.md). ## NFTs Non-fungible tokens (NFTs) represent unique digital assets. For new NFT collections, Sei supports ERC721 and ERC1155, and their royalty-aware counterparts through ERC2981. Sei also supports legacy CW721 and CW1155 contracts. * **ERC721 and ERC1155** (recommended): EVM standards for non-fungible and semi-fungible tokens. **Use these for any new NFT collection on Sei.** * **ERC2981**: Defines a royalty mechanism for NFTs so that creators receive a percentage of sales. * **CW721 and CW1155** (legacy only): Per [Prop 115](https://seistream.app/proposals/115), no new CW721 or CW1155 contracts can be deployed. Existing collections continue to work, and you can expose them on the EVM through pointer contracts. * **Interoperability**: As with fungible tokens, legacy CW NFT collections can interact with the EVM through pointer contracts. ## Wrapped Sei (wSei) To interact with some dApps, you may need to wrap your Sei tokens first (similar to Wrapped ETH on Ethereum). The Wrapped Sei Token (WSEI) is deployed at the contract address [`0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7`](https://seiscan.io/address/0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7). This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/dev-gas # Gas > Understand gas pricing, limits, and optimization strategies for Sei transactions, with guides for sending transactions using seid and EVM interfaces. Gas measures the computational effort required to execute a transaction or contract on the Sei network. Transaction fees are paid in SEI, and they incentivize validators to process transactions and smart contracts. ## Key terms and concepts ### Gas Gas is a unit of measurement for the work done to execute a transaction. The amount of gas depends on the complexity of the transaction. ### Gas price The gas price is the amount of SEI paid per unit of gas that a transaction uses. You set the gas price, and it is used to calculate the transaction fee. ### Gas limit The gas limit is the maximum amount of gas that you want the transaction to use. If the gas limit is too low, the node that executes the transaction runs out of gas. The transaction then fails, and it uses up the entire gas limit. ### Fee `Fee = Gas Price * Gas Used`. The gas limit caps the maximum possible charge at `Gas Price * Gas Limit`. On Sei, excess gas (the gas limit beyond the actual gas used) may not be refunded in full or in part. Because of this, avoid gas limits far above what a transaction needs. For details, see [Sei EVM vs Ethereum](https://docs.sei.io/evm/differences-with-ethereum.md). To estimate fees on Sei, query the network directly with the standard EVM JSON-RPC methods `eth_gasPrice`, `eth_maxPriorityFeePerGas`, and `eth_feeHistory`. These methods return real-time gas pricing from the chain, so you do not need a third-party service. For examples, see [Estimating gas prices](#estimating-gas-prices) below. ### Maximum gas The maximum gas limit for a transaction prevents complex transactions from using excessive resources. You can find the maximum gas limits for each chain in the [Sei chain registry](https://github.com/sei-protocol/chain-registry/blob/main/gas.json). You can also query the `/consensus_params` endpoint of the RPC node (for example, [https://rpc.sei-apis.com/consensus\_params](https://rpc.sei-apis.com/consensus_params)). ### Minimum gas price Sei enforces minimum gas prices to prevent spam transactions. These prices are set per chain, and the [chain registry](https://github.com/sei-protocol/chain-registry/blob/main/gas.json) lists them. ### Max bytes Each transaction has a maximum size in bytes, which is set per chain. You can query this limit directly on the RPC node with the `/consensus_params` endpoint. ### Max gas for queries Because queries also use gas, there is a maximum gas limit for queries. This limit is specific to each RPC. To find it, check with your RPC provider. ## Sending gas in transactions When you submit a transaction for broadcast, you specify the gas price and the gas limit to create the fee. ### Using `seid` With `seid`, the `--fees` flag sets the fee. You can set the gas limit with the `--gas` flag and the gas price with the `--gas-prices` flag. ```sh theme={"dark"} seid tx bank send --gas --gas-prices --fees ``` ### Using EVM (wagmi) ```ts theme={"dark"} import { parseEther, parseGwei } from 'viem'; import { sendTransaction } from '@wagmi/core'; import { config } from './config'; // your wagmi config await sendTransaction(config, { to: '0xRecipientAddress', value: parseEther('1'), // 1 SEI gasPrice: parseGwei('100'), // 100 gwei (legacy tx; omit to use EIP-1559 maxFeePerGas/maxPriorityFeePerGas) gas: 21000n }); ``` ## Optimizing gas prices for smart contracts To optimize gas prices, follow efficient coding practices for smart contracts: * Minimize storage operations. * Use fixed-size data structures where possible. * Avoid unnecessary computations. ## Estimating gas prices You can read real-time gas pricing directly from the network, without a third-party service. Sei's EVM RPC exposes the standard Ethereum JSON-RPC methods for gas estimation: * `eth_gasPrice`: Returns the current recommended gas price for legacy transactions. * `eth_maxPriorityFeePerGas`: Returns the suggested priority fee (tip) for EIP-1559 transactions. * `eth_feeHistory`: Returns recent base fees and priority-fee percentiles. It helps you build custom fee strategies. Query the current gas price on Sei Mainnet directly: ```sh theme={"dark"} curl -sS https://evm-rpc.sei-apis.com \ -H "Content-Type: application/json" \ --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":1}' ``` Most EVM libraries wrap these methods for you. For example, with viem: ```ts theme={"dark"} import { createPublicClient, http } from 'viem'; import { sei } from 'viem/chains'; const client = createPublicClient({ chain: sei, transport: http('https://evm-rpc.sei-apis.com') }); // Legacy gas price const gasPrice = await client.getGasPrice(); // EIP-1559 fee suggestion const { maxFeePerGas, maxPriorityFeePerGas } = await client.estimateFeesPerGas(); ``` This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/accounts # Sei Network Accounts: Dual Address System Explained > Understand how Sei's unified account system works with both EVM (0x) and Cosmos (sei1) addresses, including association methods, security considerations, and cross-environment interactions. Every account on Sei has a unique public key. You can use this public key to generate multiple wallet addresses, and these addresses are functionally the same. They look different, but they both point to the same destination: your account. Depending on the dApp, they may be used interchangeably. The difference is like the difference between the numeral "2" and the word "two". They both define the same value, but they may be used in different contexts. * **"hex" address**: Starts with `0x` and is EVM-based. * **"bech32" address**: Starts with `sei1` and is used for Cosmos functions. ![Address derivation](https://mintcdn.com/seilabs/szEAtr1JphlH_mVc/assets/address-derivation.png?fit=max\&auto=format\&n=szEAtr1JphlH_mVc\&q=85\&s=23cfcb90fbd44a69781b884302670b92) Although these addresses look different, they share the same underlying account. After the two addresses are linked through association (described below), any action that you take with one address also affects the other. After association, if you deposit funds into your EVM address, you can access and use the same funds with your Sei address. The reverse is also true. The two addresses behave as one account. Until the addresses are associated, they are treated as separate accounts with separate balances (see **Before linking** below). Both addresses of an account are derived from the same **public key**. The chain can recognize the link between them only **after it knows the public key**. The chain learns the public key through association. ## Key points ### Before linking * The Bech32 (`sei...`) and EVM (`0x...`) addresses are treated as **separate accounts**. * They have separate balances until they are linked. * If the EVM address receives Cosmos tokens before association, a temporary Cosmos Bech32 address holds them. The tokens transfer to the associated address when the addresses are linked. * Some types of transactions are **not possible** (see the table below). ### After linking * Both addresses show the same balance. * Applications can query either address format. ## Wallet association and transfer limitations Some actions are **not possible** before the wallets are associated: * Transfers of **CW-based tokens** (for example, CW20, CW721, and CW1155) from a non-EVM wallet to an **unassociated EVM address**. * Transfers of **ERC-based tokens** (for example, ERC-20, ERC-721, and ERC-1155) from an EVM wallet to an **unassociated Cosmos address**. ## Methods of association | Method | Security risk | User action required | | - | - | - | | 1. Broadcast a transaction | Low | Association happens automatically | | 2. Direct private key | High | Use the private key directly | | 3. Signed message | Medium | Sign a predefined message to prove ownership *(recommended for wallets)* | | 4. Public key | Low | Send a compressed public key for association | > [!NOTE] > > Each method makes the **public key** known to the chain. The chain then associates the EVM-compatible and Bech32 addresses automatically. All four methods go through the on-chain `addr` precompile (`0x0000000000000000000000000000000000001004`) or the EVM ante handler. They are available on every Sei EVM RPC. > [!NOTE] > > The legacy `sei_associate` JSON-RPC method is no longer available. Method 3 offers the same wallet-signed-message flow through the `addr` precompile. You can also find constants for the `addr` precompile in the [Sei-Chain/precompiles](https://github.com/sei-protocol/sei-chain/tree/main/precompiles/addr) repository. ## Method 1: Broadcast a transaction * When an account broadcasts a transaction, such as a token transfer, its public key is recorded on-chain. * After the public key is known, the EVM address and the Bech32 address are linked automatically. * As a result, balances and transactions are accessible from both address formats. ## Method 2: Direct private key association > [!CAUTION] > > **Security risk**: **High**. This method requires direct access to the private key. An exposed private key can compromise the wallet. This method uses the private key directly to interact with the network. ```ts theme={"dark"} import { createPublicClient, createWalletClient, http } from 'viem'; import { privateKeyToAccount } from 'viem/accounts'; import { seiTestnet } from 'viem/chains'; import { ADDRESS_PRECOMPILE_ABI, ADDRESS_PRECOMPILE_ADDRESS } from '@sei-js/precompiles'; const PRIVATE_KEY = ''; const publicClient = createPublicClient({ chain: seiTestnet, transport: http() }); const client = createWalletClient({ chain: seiTestnet, transport: http() }); const account = privateKeyToAccount(PRIVATE_KEY); const response = await client.writeContract({ account, address: ADDRESS_PRECOMPILE_ADDRESS, abi: ADDRESS_PRECOMPILE_ABI, functionName: 'associate', args: ['0', '0', '0', 'example_message'], gasPrice: BigInt(100_000_000_000) }); console.log(response); ``` ## Method 3: Associate via signed message > [!WARNING] > > **Security risk**: **Medium**. This method requires you to sign a specific message with the private key. In this method, you sign a predefined message to prove that you own the account. ```ts theme={"dark"} import { createWalletClient, http, parseSignature, toHex } from 'viem'; import { privateKeyToAccount, generatePrivateKey } from 'viem/accounts'; import { seiTestnet } from 'viem/chains'; import { ADDRESS_PRECOMPILE_ABI, ADDRESS_PRECOMPILE_ADDRESS } from '@sei-js/precompiles'; const client = createWalletClient({ chain: seiTestnet, transport: http() }); const associate = async () => { const account = privateKeyToAccount(''); const newPk = generatePrivateKey(); const newAccount = privateKeyToAccount(newPk); const message = 'associate'; const signature = await newAccount.signMessage({ message }); const parsedSignature = parseSignature(signature); const customMessage = `\x19Ethereum Signed Message:\n${message.length}${message}`; const response = await client.writeContract({ account, address: ADDRESS_PRECOMPILE_ADDRESS, abi: ADDRESS_PRECOMPILE_ABI, functionName: 'associate', args: [toHex(Number(parsedSignature.v) - 27), parsedSignature.r, parsedSignature.s, customMessage], gasPrice: BigInt(100_000_000_000) }); console.log(response); }; associate(); ``` ## Method 4: Associate via public key > [!NOTE] > > **Security risk**: **Low**. This method uses the public key, which is less sensitive than the private key. This method compresses the public key and sends it for association. ```ts theme={"dark"} import secp256k1 from 'secp256k1'; import { createWalletClient, http } from 'viem'; import { privateKeyToAccount, generatePrivateKey } from 'viem/accounts'; import { seiTestnet } from 'viem/chains'; import { ADDRESS_PRECOMPILE_ABI, ADDRESS_PRECOMPILE_ADDRESS } from '@sei-js/precompiles'; const client = createWalletClient({ chain: seiTestnet, transport: http() }); const associateViaPubkey = async () => { const account = privateKeyToAccount(''); const newPk = generatePrivateKey(); const newAccount = privateKeyToAccount(newPk); const publicKeyBuffer = Buffer.from(newAccount.publicKey.slice(2), 'hex'); const compressedPubKey = secp256k1.publicKeyConvert(publicKeyBuffer, true); const response = await client.writeContract({ account, address: ADDRESS_PRECOMPILE_ADDRESS, abi: ADDRESS_PRECOMPILE_ABI, functionName: 'associatePubKey', args: [Buffer.from(compressedPubKey).toString('hex')], gasPrice: BigInt(100_000_000_000) }); console.log(response); }; associateViaPubkey(); ``` ## Query linked addresses To resolve either side of an existing association, call the `addr` precompile at `0x0000000000000000000000000000000000001004` with a standard `eth_call`. The precompile is available on every Sei RPC. ### Fetch Bech32 address for an EVM address ```bash theme={"dark"} curl -X POST $SEIEVM -H "Content-Type: application/json" -d '{ "jsonrpc": "2.0", "method": "eth_call", "params": [{ "to": "0x0000000000000000000000000000000000001004", "data": "0x0c3c20ed000000000000000000000000" }, "latest"], "id": 1 }' ``` The selector `0x0c3c20ed` is `getSeiAddr(address)`. The call returns the bech32 `sei1…` address as an ABI-encoded string. If the EVM address is not associated yet, the call reverts. In TypeScript with viem: ```ts theme={"dark"} import { createPublicClient, http } from 'viem'; import { sei } from 'viem/chains'; const ADDR_PRECOMPILE = '0x0000000000000000000000000000000000001004'; const ADDR_ABI = [ { name: 'getSeiAddr', type: 'function', stateMutability: 'view', inputs: [{ name: 'addr', type: 'address' }], outputs: [{ name: 'response', type: 'string' }] }, { name: 'getEvmAddr', type: 'function', stateMutability: 'view', inputs: [{ name: 'addr', type: 'string' }], outputs: [{ name: 'response', type: 'address' }] }, ] as const; const client = createPublicClient({ chain: sei, transport: http() }); const seiAddr = await client.readContract({ address: ADDR_PRECOMPILE, abi: ADDR_ABI, functionName: 'getSeiAddr', args: ['0x…'], }); ``` ### Fetch EVM address for a Sei address ```ts theme={"dark"} const evmAddr = await client.readContract({ address: ADDR_PRECOMPILE, abi: ADDR_ABI, functionName: 'getEvmAddr', args: ['sei1…'], }); ``` If the address has never been associated, the precompile reverts. Handle the revert as a "not linked" result instead of re-throwing it. ## Deriving addresses from the public key Both address formats come from the same secp256k1 public key, but they use **different hashing schemes**. The bech32 (`sei1…`) side follows the standard Cosmos derivation (`SHA256` then `RIPEMD160` of the **compressed** public key). The EVM (`0x…`) side follows the standard Ethereum derivation (`keccak256` of the **uncompressed** public key without its `0x04` prefix byte). ### Sei address derivation The Cosmos address is derived from the public key in these steps: 1. Take the **compressed** secp256k1 public key (33 bytes, with a first byte of `0x02` or `0x03`). 2. Hash it with `SHA256`. 3. Hash the result with `RIPEMD160` to get a 20-byte digest. 4. Encode that digest in Bech32 format with the `sei` prefix. Example implementation: ```ts theme={"dark"} import { bech32 } from 'bech32'; import { sha256 } from '@noble/hashes/sha256'; import { ripemd160 } from '@noble/hashes/ripemd160'; /** * @param compressedPublicKey 33-byte secp256k1 pubkey in compressed form */ export function deriveSeiAddress(compressedPublicKey: Uint8Array): string { const digest = ripemd160(sha256(compressedPublicKey)); return bech32.encode('sei', bech32.toWords(digest)); } ``` ### EVM address derivation The EVM-compatible address is derived in these steps: 1. Take the **uncompressed** secp256k1 public key (65 bytes, with a first byte of `0x04`). 2. Drop the leading `0x04` prefix byte, so that the input to the hash is the bare 64-byte `(x, y)` coordinate pair. 3. Hash these bytes with `keccak256`. 4. Take the **last 20 bytes** of the hash and format them as `0x…` hex. Example implementation: ```ts theme={"dark"} import { keccak_256 } from '@noble/hashes/sha3'; /** * @param uncompressedPublicKey 65-byte secp256k1 pubkey in uncompressed form (leading 0x04) */ export function deriveEVMAddress(uncompressedPublicKey: Uint8Array): string { const hash = keccak_256(uncompressedPublicKey.slice(1)); return `0x${Buffer.from(hash.slice(-20)).toString('hex')}`; } ``` ### Summary * **Sei address**: `bech32('sei', RIPEMD160(SHA256(compressedPubKey)))` (20 bytes, Cosmos-standard derivation). * **EVM address**: `'0x' + keccak256(uncompressedPubKey[1:])[-20:]` (the last 20 bytes of the keccak256 hash, Ethereum-standard derivation). * The two formats share an account because the chain stores the **public key** itself on association. Either format can be derived deterministically from the public key. ### Why it works Both formats are deterministic address schemes derived from the public key. The public key is recorded on-chain through any of the four association methods above, or implicitly through a first signed transaction. After that, the chain can derive both formats itself and route any incoming reference to the same account. ### Recap * Accounts are linked automatically when a transaction is broadcast. You can also associate them manually through the `addr` precompile (`associate` or `associatePubKey`). * Both address formats share the same **public key**. * After linking, dApps and tools can access balances consistently across both address formats. ## HD paths and coin types When you derive a private key from a mnemonic phrase, the hierarchical deterministic (HD) path has multiple parameters, including the coin type. The coin type determines the blockchain ecosystem that the key is derived for. This matters when you work with different wallets and blockchains. ### Coin type parameter The second parameter in the HD path specifies the coin type, which the BIP-44 standard defines. This parameter identifies the blockchain ecosystem of the derived keys. * **Ethereum (coin type 60)**: Wallets such as MetaMask use coin type 60. The typical HD path for Ethereum is `m/44'/60'/0'/0/0`. * **Cosmos (coin type 118)**: Wallets for Cosmos-based chains, such as OKX, use coin type 118. The typical HD path for Cosmos is `m/44'/118'/0'/0/0`. ### Implications You cannot use an Ethereum mnemonic phrase (coin type 60) directly in a Cosmos wallet (coin type 118) to access the same accounts. The HD path determines a different set of keys for each coin type, so the derived addresses differ. ### Private key export You can export your private key from MetaMask (derived with coin type 60) and import it into any Cosmos wallet. This works because a derived private key can be used across different blockchain ecosystems, if the receiving wallet supports the import function. You can then manage your assets across various blockchains with the same underlying cryptographic key. ### Example HD paths * **Traditional Cosmos path**: `m/44'/118'/0'/0/0` * **Traditional EVM path**: `m/44'/60'/0'/0/0` ## Generating wallets ### Deriving bech32 and hex addresses from pubkey Sei derives a bech32 address (Cosmos and Tendermint style) and a hex address (Ethereum style) from the same public key. Each format uses its own hashing scheme. The bech32 address uses the Cosmos-standard `SHA256` then `RIPEMD160`. The hex address uses the `keccak256` method, which is common in EVM networks. These snippets have detailed comments. They show the correct method to derive both bech32 and hex addresses from a given ECDSA secp256k1 key: > [accordion] Python - from pubkey > > ```python theme={"dark"} > import base64 > import json > from hashlib import sha256, new as hashlib_new > from coincurve import PublicKey > from bech32 import bech32_encode, convertbits > from Crypto.Hash import keccak > > # Example input, replace with the actual pubkey JSON string > pubkey_json = '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Agmik4xkmF57hNjzykYHP3gRu1Mpae4B5BCiwx7jmRzI"}' > > # Extract the base64-encoded key from the JSON-like string > pubkey_dict = json.loads(pubkey_json) > pubkey_base64 = pubkey_dict['key'] > > # Decode the base64-encoded public key > public_key_compressed = base64.b64decode(pubkey_base64) > > # Ensure the public key length is 33 bytes (compressed key format) > if len(public_key_compressed) != 33: > raise ValueError(f"Invalid public key length, expected 33 bytes for compressed format, got {len(public_key_compressed)}") > > # Debugging: Print the public key details > print(f"Compressed public key (hex): {public_key_compressed.hex()}") > > # SHA-256 on the compressed public key > sha256_digest = sha256(public_key_compressed).digest() > # Debugging: Print SHA-256 digest > print(f"SHA-256 Digest: {sha256_digest.hex()}") > > # RIPEMD-160 on SHA-256 hash > ripemd160 = hashlib_new('ripemd160') > ripemd160.update(sha256_digest) > ripemd160_digest = ripemd160.digest() > # Debugging: Print RIPEMD-160 digest > print(f"RIPEMD-160 Digest: {ripemd160_digest.hex()}") > > # Convert the digest to 5-bit groups for Bech32 encoding > five_bit_ripemd160 = convertbits(ripemd160_digest, 8, 5, pad=True) > bech32_address = bech32_encode("sei", five_bit_ripemd160) > > print(f"Bech32 Cosmos Address: {bech32_address}") > > # Decompress the public key to 65 bytes > public_key = PublicKey(public_key_compressed).format(compressed=False) > > # Debugging: Print the public key details > print(f"Decompressed public key length: {len(public_key)}") > print(f"Decompressed public key (hex): {public_key.hex()}") > > # Derive Ethereum Address using Keccak-256 > keccak_hash = keccak.new(digest_bits=256) > keccak_hash.update(public_key[1:]) # Exclude the first byte (0x04) > digest_keccak = keccak_hash.digest() > eth_address = digest_keccak[-20:] > eth_address_hex = '0x' + eth_address.hex() > > print(f"Ethereum Address: {eth_address_hex}") > ``` > [accordion] TypeScript - from pubkey > > ```typescript theme={"dark"} > import { fromBase64 } from '@cosmjs/encoding'; > import { sha256 } from '@noble/hashes/sha256'; > import { ripemd160 } from '@noble/hashes/ripemd160'; > import { keccak_256 } from '@noble/hashes/sha3'; > import { secp256k1 } from '@noble/curves/secp256k1'; > import { bech32 } from 'bech32'; > > // Utility function to convert bits for Bech32 encoding > function convertBits(data: Uint8Array, fromBits: number, toBits: number, pad: boolean): number[] { > let acc = 0; > let bits = 0; > const result: number[] = []; > const maxv = (1 << toBits) - 1; > > for (const value of data) { > acc = (acc << fromBits) | value; > bits += fromBits; > while (bits >= toBits) { > bits -= toBits; > result.push((acc >> bits) & maxv); > } > } > > if (pad) { > if (bits > 0) { > result.push((acc << (toBits - bits)) & maxv); > } > } else if (bits >= fromBits || (acc << (toBits - bits)) & maxv) { > throw new Error('Unable to convert bits'); > } > > return result; > } > > // Define the prefix for the Bech32 address (e.g., "sei" for Sei network) > const chainPrefix = 'sei'; > > // Public key JSON string (replace with actual data) > const pubkeyJson = '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AiN+aFvHgjblWPaP9Er5p005JjPX3nj4I/+jA6W4BOho"}'; > > // Parse the JSON string to extract the public key in Base64 format > const pubkeyDict = JSON.parse(pubkeyJson); > const pubkeyBase64 = pubkeyDict.key; > > console.log('Original public key JSON:', pubkeyJson); > console.log('Parsed public key object:', pubkeyDict); > console.log('Base64-encoded public key:', pubkeyBase64); > > // Decode the Base64-encoded public key to its compressed form > const publicKeyCompressed = fromBase64(pubkeyBase64); > > console.log('Compressed public key (bytes):', publicKeyCompressed); > console.log('Compressed public key (hex):', Buffer.from(publicKeyCompressed).toString('hex')); > > // Perform SHA-256 hashing on the compressed public key > const sha256Digest = sha256(publicKeyCompressed); > console.log('SHA-256 hash of public key (hex):', Buffer.from(sha256Digest).toString('hex')); > > // Perform RIPEMD-160 hashing on the SHA-256 digest > const ripemd160Digest = ripemd160(sha256Digest); > console.log('RIPEMD-160 hash of SHA-256 hash (hex):', Buffer.from(ripemd160Digest).toString('hex')); > > // Convert the RIPEMD-160 digest to a 5-bit array for Bech32 encoding > const fiveBitArray = convertBits(ripemd160Digest, 8, 5, true); > > // Encode the 5-bit array into a Bech32 address with the specified prefix > const bech32Address = bech32.encode(chainPrefix, fiveBitArray); > > console.log(`Bech32 Cosmos Address: ${bech32Address}`); > > // Decompress the public key to its uncompressed form (65 bytes) and exclude the first byte > const publicKeyUncompressed = secp256k1.ProjectivePoint.fromHex(publicKeyCompressed).toRawBytes(false).slice(1); > > // Perform Keccak-256 hashing on the uncompressed public key to derive the Ethereum address > const keccakHash = keccak_256(publicKeyUncompressed); > const ethAddress = '0x' + Buffer.from(keccakHash.slice(-20)).toString('hex'); > > console.log('Uncompressed public key (hex):', Buffer.from(publicKeyUncompressed).toString('hex')); > console.log('Keccak-256 hash of uncompressed public key (hex):', Buffer.from(keccakHash).toString('hex')); > console.log(`Ethereum Address: ${ethAddress}`); > ``` > [accordion] TypeScript - full derivation from private key > > ```typescript theme={"dark"} > import { sha256 } from '@noble/hashes/sha256'; > import { ripemd160 } from '@noble/hashes/ripemd160'; > import { keccak_256 } from '@noble/hashes/sha3'; > import { secp256k1 } from '@noble/curves/secp256k1'; > import { bech32 } from 'bech32'; > > // Utility function to convert bits for Bech32 encoding > function convertBits(data: Uint8Array, fromBits: number, toBits: number, pad: boolean): number[] { > let acc = 0; > let bits = 0; > const result: number[] = []; > const maxv = (1 << toBits) - 1; > > for (const value of data) { > acc = (acc << fromBits) | value; > bits += fromBits; > while (bits >= toBits) { > bits -= toBits; > result.push((acc >> bits) & maxv); > } > } > > if (pad) { > if (bits > 0) { > result.push((acc << (toBits - bits)) & maxv); > } > } else if (bits >= fromBits || (acc << (toBits - bits)) & maxv) { > throw new Error('Unable to convert bits'); > } > > return result; > } > > // Function to generate addresses from a private key > function generateAddresses(privateKeyHex: string): { > seiAddress: string; > ethAddress: string; > } { > // Ensure the private key is exactly 32 bytes long > const privateKey = Uint8Array.from(Buffer.from(privateKeyHex.padStart(64, '0'), 'hex')); > if (privateKey.length !== 32) { > throw new Error('Private key must be 32 bytes long.'); > } > > // Derive the compressed public key from the private key > const publicKey = secp256k1.getPublicKey(privateKey, true); > const publicKeyBytes = publicKey; > > // Perform SHA-256 hashing on the compressed public key > const sha256Digest = sha256(publicKeyBytes); > > // Perform RIPEMD-160 hashing on the SHA-256 digest > const ripemd160Digest = ripemd160(sha256Digest); > > // Convert the RIPEMD-160 digest to a 5-bit array for Bech32 encoding > const fiveBitArray = convertBits(ripemd160Digest, 8, 5, true); > > // Bech32 address with "sei" prefix > const seiAddress = bech32.encode('sei', fiveBitArray, 256); > > // Derive the uncompressed public key from the private key and exclude the first byte > const publicKeyUncompressed = secp256k1.getPublicKey(privateKey, false).slice(1); > > // Perform Keccak-256 hashing on the uncompressed public key to derive the Ethereum address > const keccakHash = keccak_256(publicKeyUncompressed); > const ethAddress = `0x${Buffer.from(keccakHash).slice(-20).toString('hex')}`; > > return { seiAddress, ethAddress }; > } > > // Example usage of the generateAddresses function > const privateKeyHex = '907ab4bf7fc60cff'; > const { seiAddress, ethAddress } = generateAddresses(privateKeyHex); > > console.log(`Sei Address: ${seiAddress}`); > console.log(`Ethereum Address: ${ethAddress}`); > ``` This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/sip-03-migration # SIP-03 Migration Guide > Practical steps and resources for users migrating during SIP-03, including asset transfer, USDC, address association, and hardware wallets. > [!CAUTION] > > **IBC is now disabled on Sei in both directions. IBC assets can no longer be bridged off Sei.** > > [Proposal #121](https://seistream.app/proposals/121) passed on July 31, 2026 and set the `ibc` module's `OutboundEnabled` parameter to `false`. Inbound IBC was already disabled by [Proposal #116](https://seistream.app/proposals/116) and [Proposal #120](https://seistream.app/proposals/120). Both directions are now closed. > > If you hold any IBC asset on Sei, **there is no longer a route to redeem or bridge it back to its origin chain**. This includes [USDC.n](https://seiscan.io/address/0x3894085Ef7Ff0f0aeDf52E2A2704928d1Ec074F1) (USDC via Noble), [USDT.kava](https://seiscan.io/address/0xb75d0b03c06a926e488e2659df1a861f860bd3d1) (Kava USDT), ATOM, and WBTC. The bridge-out and IBC-based migration routes that were available before no longer work. > > These balances still exist on Sei and can still be transferred between Sei addresses. However, they can no longer be redeemed for the underlying asset. For the current state, see [IBC is disabled](#ibc-is-disabled). For the status of each asset, see [Affected IBC assets](#affected-ibc-assets). This page lists the most important practical actions for the SIP-03 migration, with links to the official resources. > [!NOTE] > > For the full proposal text, see: > > * The [official SIP-03](https://github.com/sei-protocol/sips/blob/main/sips/sip-3.md) > > * Governance [Proposal #99](https://seistream.app/proposals/99): started the migration. > > * Governance [Proposal #115](https://seistream.app/proposals/115): disabled CosmWasm code uploads and contract instantiations. No new CosmWasm contracts can be deployed on Sei. > > * Governance [Proposal #116](https://seistream.app/proposals/116): disabled inbound IBC transfers by setting the `ibc` module's `InboundEnabled` parameter to `false`. IBC assets bridged from Cosmos chains can no longer arrive on Sei. > > * Governance [Proposal #120](https://seistream.app/proposals/120): set `InboundEnabled` to `false` again, as a follow-up to Proposal #116. Outbound IBC was unchanged at the time. > > * Governance [Proposal #121](https://seistream.app/proposals/121): disabled outbound IBC transfers by setting the `ibc` module's `OutboundEnabled` parameter to `false`. IBC assets can no longer leave Sei. It passed on July 31, 2026. ## What most users need to do * If you use Keplr or Leap (Cosmos-style wallets), move any assets on the native address (sei1...) to an EVM-compatible address (0x...). Use the Asset Transfer tool linked below. * If you already use Compass or another EVM wallet, you do not need to do anything. Continue as normal. ## IBC is disabled IBC (Inter-Blockchain Communication) is the Cosmos protocol that moved tokens between Sei and other Cosmos-SDK chains such as Noble, Kava, and Cosmos Hub. Assets that arrived this way exist on Sei as vouchers. A voucher is an `ibc/...` denom in the bank module, backed by the real asset escrowed on the origin chain. The only way to redeem a voucher is to send it back over the same channel that it came in on. Both directions are now closed. Two parameters on Sei's `ibc` module control this, and both are `false`: | Parameter | Gates | Current value | | :- | :- | :- | | `InboundEnabled` | IBC transfers arriving on Sei | `false` | | `OutboundEnabled` | IBC transfers leaving Sei | `false` | Each parameter was set by a governance parameter change, which takes effect when the proposal executes. There is no separate upgrade or activation step. Inbound IBC was closed first, by Proposals #116 and #120. Outbound IBC closed on July 31, 2026, with Proposal #121. | Proposal | Change | Effect | | :- | :- | :- | | [#115](https://seistream.app/proposals/115) | `wasm.uploadAccess` and `wasm.instantiateAccess` → `Nobody` | No new CosmWasm contracts can be deployed | | [#116](https://seistream.app/proposals/116) | `ibc.InboundEnabled` → `false` | IBC assets can no longer arrive on Sei | | [#120](https://seistream.app/proposals/120) | `ibc.InboundEnabled` → `false` | Re-applied the inbound block | | [#121](https://seistream.app/proposals/121) | `ibc.OutboundEnabled` → `false` | IBC assets can no longer leave Sei | ### What this means in practice **No longer possible:** * Bridging any asset onto Sei over IBC. * Bridging any asset off Sei over IBC, including sending a voucher back to its origin chain to redeem the underlying asset. * IBC-based migration routes, such as sending USDC.n back to Noble to convert it to native USDC, or routing ATOM and WBTC out through Skip:Go. * The **IBC precompile** at `0x0000000000000000000000000000000000001009`. Its transfer methods cannot succeed, and there is no replacement. Do not build against it. **Unaffected:** * Native SEI transfers, staking, delegations, and rewards. * The Sei EVM, ERC-20 tokens, and native and CW pointer contracts. * Existing `ibc/...` balances in the bank module. They remain queryable and transferable between Sei addresses, including through their ERC-20 pointers. Only the redemption path off Sei is gone. * Already-deployed CosmWasm contracts, which can still be executed and queried. [Proposal #115](https://seistream.app/proposals/115) blocked only uploads and instantiations. It is a separate change from the IBC parameters. > [!NOTE] > > If you have an IBC transfer that was submitted but never completed, contact [Sei Tech Chat](https://t.me/+KZdhZ1eE-G01NmZk) or [Discord](https://discord.com/invite/sei). Both directions are closed, so do not assume that a pending transfer will settle or refund on its own. ## Affected IBC assets The assets below reached Sei over a bridge that is now closed. None of them has a route back to its origin chain. | Asset | Token contract | Arrived via | Route off Sei | | :- | :- | :- | :- | | **USDC.n (USDC via Noble)** | [seiscan](https://seiscan.io/address/0x3894085ef7ff0f0aedf52e2a2704928d1ec074f1) [seistream](https://seistream.app/address/0x3894085Ef7Ff0f0aeDf52E2A2704928d1Ec074F1) | IBC (Noble) | None (outbound IBC disabled) | | **USDT.kava (USDT via Kava)** | [seiscan](https://seiscan.io/token/0xb75d0b03c06a926e488e2659df1a861f860bd3d1) [seistream](https://seistream.app/address/0xB75D0B03c06A926e488e2659DF1A861F860bD3d1) | IBC (Kava) | None (outbound IBC disabled) | | **ATOM** | [seistream](https://seistream.app/address/0xaF5fd7Df92B103B40b9Ed8D0d002696a5436E4D8) | IBC (Cosmos Hub) | None (outbound IBC disabled) | | **WBTC** | [seistream](https://seistream.app/address/0xe369ddC65Ec947FCB10262AA0E08C3fB9823001a) | IBC | None (outbound IBC disabled) | | **USDCso (Wormhole, Solana)** | [seistream](https://seistream.app/address/0x8eEDF32a4FC6fB78DDF231Cd3CcF6b7B8dF9D99d) | Wormhole | None (Portal Bridge withdrawn) | | **Wormhole-bridged WETH** | [mintscan](https://www.mintscan.io/sei/assets/factory%2Fsei189adguawugk3e55zn63z8r9ll29xrjwca636ra7v7gxuzn98sxyqwzt47l%2F4tLQqCLaoKKfNFuPjA9o39YbKUwhR1F8N29Tz3hEbfP2) | Wormhole | None (Portal Bridge withdrawn) | | **USDCet (Wormhole, Ethereum)** | [seistream](https://seistream.app/address/0xa272ee55434655970f7226c95eF0068a22994B84) | Wormhole | None (Portal Bridge withdrawn) | | **USDCop (Wormhole, Optimism)** | [seistream](https://seistream.app/address/0xC489C59b1131D379Cbc3A42AD154bBD6f1050F7c) | Wormhole | None (Portal Bridge withdrawn) | | **USDTbs (Wormhole, BSC Chain)** | [seistream](https://seistream.app/address/0x0bf5F17f0a71cf2bC014DD875e35E4B02311b8F1) | Wormhole | None (Portal Bridge withdrawn) | The Wormhole-bridged assets are not IBC vouchers and were not affected by Proposals #116, #120, or #121. They are listed here because Portal Bridge (legacy) is no longer available as a route off Sei. ### What you can still do * **Transfer within Sei.** These balances move normally between Sei addresses and through their ERC-20 pointer contracts. * **Swap on a Sei DEX.** Swaps do not use IBC and still execute. These tokens can no longer be redeemed for the underlying asset, so the liquidity available for them is limited and may decline further. Check the quote before you trade. * **Contact support.** For anything else, including incomplete transfers and assets not listed above, ask for help in [Sei Tech Chat](https://t.me/+KZdhZ1eE-G01NmZk) or [Discord](https://discord.com/invite/sei). The mention of third-party platforms does not constitute an endorsement. You should do your own research before you use any third-party service. ## Key tools and resources ### 1) Asset Transfer (native ↔ EVM) * Use the official Sei Dashboard to move assets between native addresses (Keplr, Leap, Fin) and EVM addresses (MetaMask, Compass, and others). Go to [Sei Dashboard Transfer](https://dashboard.sei.io/evm-upgrade) or to the **Bridge** tab at [Sei Dashboard Bridge](https://dashboard.sei.io/bridge). When to use this: * You used Keplr or Leap before, and you want your assets to be available in an EVM wallet from now on. * You need to access tokens in dApps that now expect an EVM (0x) address. ### 2) USDC on Sei Sei now supports native USDC and Circle's CCTP V2. USDC from Noble (USDC.n) is deprecated. * QuickStart: [USDC on Sei](https://docs.sei.io/evm/usdc-on-sei.md) * Background: [USDC & CCTP v2 announcement](https://www.circle.com/blog/native-usdc-and-cctp-v2-are-coming-to-sei) #### If you still hold USDC.n > [!WARNING] > > The route that sent USDC.n back to Noble to be reissued as native USDC required outbound IBC. As of [Proposal #121](https://seistream.app/proposals/121), this route **no longer works**. USDC.n can no longer be redeemed through Noble or through Circle's CCTP. The only remaining option on Sei is an on-chain swap, which does not use IBC: * [DragonSwap](https://dragonswap.app/) or [Symphony](https://symph.ag/?tokenIn=0x3894085ef7ff0f0aedf52e2a2704928d1ec074f1\&tokenOut=0xe15fc38f6d8c56af07bbcbe3baf5708a2bf42392). Slippage depends on whatever liquidity remains for USDC.n. **For DeFi suppliers of USDC.n (Yei, Takara Lend, and other protocols):** * If you have not already done so, wind down and withdraw your positions. Supplied USDC.n cannot be redeemed off Sei. If you hold a balance that you cannot resolve this way, contact [Sei Tech Chat](https://t.me/+KZdhZ1eE-G01NmZk) or [Discord](https://discord.com/invite/sei). ### 3) Address association (Seistream) [Seistream's SIP-03 migration page](https://seistream.app/migrate-sip03) links your EVM (`0x...`) and Cosmos (`sei1...`) addresses for the **native SEI token** in three guided steps. It is a community-built tool that simplifies the standard association flow. Address association is the one-time, on-chain step that links your `0x...` and `sei1...` addresses, so that a single key controls both. You must complete it **before** the SIP-03 upgrade. After the upgrade, Cosmos (`sei1...`) interfaces stop working, and addresses can no longer be associated. To learn how association works, see [Account Linking](https://docs.sei.io/learn/accounts.md). What the tool does: 1. **Connect wallet**: Connect any EVM wallet with an injected provider (MetaMask, Keplr, Rabby, Compass, Tangem, Trust Wallet, OKX, and most others). 2. **Gas + association**: Cover the small amount of SEI needed for gas. Seistream has a faucet for Sei Mainnet to help with this. Then submit the transaction that associates your `0x...` and `sei1...` addresses on-chain. Any outgoing EVM transaction registers the link automatically. 3. **Transfer from Cosmos**: Send your existing native SEI from the old Cosmos wallet to the linked `sei1...` address. The SEI then becomes spendable from your EVM wallet. This tool is a simpler alternative to the manual association flow in [Migrating a hardware or mnemonic-only wallet](#migrating-a-hardware-or-mnemonic-only-wallet). > [!WARNING] > > Seistream handles association for the **native SEI token only**. It does nothing for USDC.n, USDT.kava, ATOM, WBTC, or other IBC-bridged assets. For their status, see [Affected IBC assets](#affected-ibc-assets). Seistream is a third-party tool, and its inclusion here is not an endorsement. You should do your own research before you connect a wallet. ## Migrating a hardware or mnemonic-only wallet If your wallet can export a raw private key, the simplest path is to import that key into an EVM wallet. A private key does not depend on the coin type. It gives the same `0x...` and `sei1...` addresses in any wallet, so you do not need to move any funds. If your wallet cannot export a private key, you can still migrate: move your funds to a new EVM-native account, as described below. ### When private-key export isn't an option A raw private key always works, but two common setups do not give you one: * **Mnemonic-only wallets.** Some wallets back up only a recovery phrase, not a raw private key. Sei's Cosmos (`sei1...`) accounts use coin type 118 (`m/44'/118'/0'/0/0`). If you import the same phrase into an EVM wallet such as MetaMask, the wallet derives it on coin type 60 (`m/44'/60'/0'/0/0`). The result is a different account with no access to the original funds. The underlying private key would import correctly if the wallet exposed it, but a mnemonic-only wallet does not. * **Hardware wallets (such as Ledger).** A Ledger does not export the private key or seed under any circumstances. It only lets you switch between the Cosmos app (coin type 118) and the Ethereum app (coin type 60). These apps control separate accounts with different addresses. The Cosmos-app account cannot be used from an EVM wallet. For background, see [HD paths and coin types](https://docs.sei.io/learn/accounts.md#hd-paths-and-coin-types). ### Migration steps This procedure works because every account has exactly one EVM (`0x...`) address and one Cosmos (`sei1...`) address, both derived from the same key. Funds sent to the new account's `sei1...` address are therefore spendable from the EVM wallet that holds its `0x...` address. > [!TIP] > > If you prefer a guided flow, use [Seistream's SIP-03 migration tool](https://seistream.app/migrate-sip03). It walks through the same steps: connect an EVM wallet, cover gas, associate addresses, and then transfer native SEI from the Cosmos side. See [Address association (Seistream)](#3-address-association-seistream). The tool covers native SEI only. The manual steps below work for any wallet that you control. **1. Create a new account in an EVM wallet you control** Use MetaMask, Compass, Rabby, or a Ledger with its Ethereum app. This creates a new `0x...` address. **2. Fund the new address with a small amount of SEI** Approximately 0.1 SEI is enough. Association is an on-chain transaction, so the account needs SEI for gas. Fund the address from an exchange withdrawal or from any EVM wallet that already holds SEI. **3. Associate the new account on the Sei Dashboard** Connect the new EVM account to the [Sei Dashboard](https://dashboard.sei.io). Then complete address association. This records the public key on-chain and links the `0x...` address to its `sei1...` counterpart. The dashboard then shows the linked `sei1...` address, which is the destination for the next step. For details on association, see [Account Linking](https://docs.sei.io/learn/accounts.md). **4. Send a test transfer of 1 SEI** From the original Cosmos wallet (Keplr, Leap, the Ledger Cosmos app, and so on), send 1 SEI to the `sei1...` address from step 3. This is a standard Cosmos-to-Cosmos transfer. **5. Confirm receipt** Because the addresses are associated, the test amount should appear under the new account on the dashboard. It should also appear as a spendable balance in the EVM wallet. **6. Transfer the remaining balance** After you confirm the test transfer, send the rest of the funds the same way. The assets are then held by an account whose key you control from an EVM wallet. > [!WARNING] > > Send the 1 SEI test transfer and confirm receipt before you move the full balance. Verify that the destination matches the exact `sei1...` address shown after association in step 3. ### Notes and limitations * **Complete this before the SIP-03 upgrade.** After the Cosmos interface is deprecated, addresses can no longer be associated, and `sei1...` transfers can no longer be broadcast. You must complete steps 3 and 4 before then. * **This procedure moves liquid balances only.** Staked SEI must be unbonded first, and the unbonding period is 21 days. See the staking question in the [FAQ](#faq). * **Associate before sending.** If you associate the new account before you transfer, the funds arrive at the correct, immediately spendable address instead of a temporary holding address. * **Optional verification.** To confirm the paired `sei1...` address independently, call `getSeiAddr(0x...)` on the `addr` precompile. See [Query linked addresses](https://docs.sei.io/learn/accounts.md#query-linked-addresses). ## FAQ ### I am a Keplr / Leap wallet user; do I need to do anything? Yes. Use the Asset Transfer tool to make your assets available in an EVM wallet. See the Asset Transfer section above. ### I use Compass wallet; do I need to do anything? No, you do not need to do anything. Compass makes sure that your assets are available through EVM. Continue to connect to Sei as you would to any EVM chain. ### My wallet only shows a recovery phrase, or I use a Ledger — how do I migrate? If you can export a raw private key, import it into an EVM wallet. This always works, because the key gives the same addresses in any wallet. Some setups cannot export a private key, such as a wallet that exports only a recovery phrase, or a Ledger that only switches between apps. In that case, follow these steps: 1. Create a new account in an EVM wallet that you control. 2. Fund the new account with a small amount of SEI. 3. Associate the new account to reveal its paired `sei1...` address. 4. Send a 1 SEI test transfer to that address. Then send your existing Cosmos funds to the same address. For the full procedure, see [Migrating a hardware or mnemonic-only wallet](#migrating-a-hardware-or-mnemonic-only-wallet). ### I stake SEI — do I need to do anything? It depends on whether your Cosmos (`sei1...`) and EVM (`0x...`) addresses are **associated (linked)**. The Cosmos staking module handles staking on Sei. After SIP-03, Cosmos-native transaction interfaces will no longer be available. However, the underlying staking state is preserved, and associated addresses can access it through EVM. **If your addresses are associated:** You do not need to do anything. After the upgrade, your existing delegations, rewards, and unbonding state will be fully accessible through EVM. You can continue to manage your stake from an EVM wallet with the [Staking Precompile](https://docs.sei.io/evm/precompiles/staking.md) or the [Sei Dashboard](https://dashboard.sei.io/stake). **If your addresses are NOT associated:** You must act before the upgrade. After SIP-03, you will not be able to associate addresses or manage delegations through a Cosmos wallet. Your options: 1. **Associate your addresses** before the upgrade. To do this, connect your Cosmos wallet on the [Sei Dashboard](https://dashboard.sei.io), or use any of the methods described in [Accounts](https://docs.sei.io/learn/accounts.md). After association, your staking state is accessible through EVM, and you do not need to unbond. 2. **Unbond your stake**, and then migrate the assets to an EVM wallet with the [Asset Transfer tool](https://dashboard.sei.io/evm-upgrade). **The unbonding period is 21 days.** For your tokens to be liquid in time, you must start this process at least 21 days before the Cosmos shutdown. To check whether your addresses are linked, see [Query linked addresses](https://docs.sei.io/learn/accounts.md#query-linked-addresses). > [!WARNING] > > **Do not confuse address linking with staking migration.** The `sei1...` and `0x...` addresses point to the same underlying account only after explicit association. Before that, the chain cannot recognize the link. Without association, your staked SEI will not be accessible through EVM after the upgrade. You will also have no way to unbond or claim rewards. ### Can I still bridge assets into or out of Sei over IBC? No. [Proposal #116](https://seistream.app/proposals/116) and [Proposal #120](https://seistream.app/proposals/120) disabled inbound IBC. [Proposal #121](https://seistream.app/proposals/121) disabled outbound IBC on July 31, 2026. The `InboundEnabled` and `OutboundEnabled` parameters on the `ibc` module are now both `false`, so the chain does not accept IBC transfers in either direction. See [IBC is disabled](#ibc-is-disabled). ### I hold an IBC asset on Sei — is it gone? The balance is not gone. It still exists in the bank module, and it is still visible in explorers and wallets. You can still transfer it between Sei addresses and through its ERC-20 pointer. However, you can no longer send it back over IBC to redeem the underlying asset on its origin chain. See [What you can still do](#what-you-can-still-do). ### I hold USDC.n (USDC via Noble) — what should I do? USDC.n can no longer be redeemed. The migration route sent USDC.n back to Noble over IBC and reissued it as native USDC through Circle's CCTP. That route required outbound IBC, which [Proposal #121](https://seistream.app/proposals/121) disabled on July 31, 2026. An on-chain swap to native USDC on a Sei DEX does not use IBC and still executes, subject to whatever liquidity remains. See [If you still hold USDC.n](#if-you-still-hold-usdc-n) above. For background, read the original announcement: [Holders of USDC.n Need to Swap or Migrate](https://blog.sei.io/announcements/holders-of-usdcn-need-to-swap-or-migrate/). This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/twin-turbo-consensus # Twin Turbo Consensus: Sei's High-Speed Blockchain Consensus > Explore how Sei's Twin Turbo consensus mechanism achieves higher transaction throughput by separating block building from consensus, with detailed explanations of the protocol's design and benefits. ## Introduction Sei's consensus mechanism, often called Twin Turbo Consensus, is a set of optimizations designed for low block finality times. The target is approximately 400 milliseconds. Sei does not use a new consensus algorithm to reach this finality. Instead, Sei significantly enhances the underlying Tendermint Byzantine Fault Tolerant (BFT) consensus engine and tunes its configuration aggressively. The consensus engine also integrates tightly with Sei's parallel execution layer and the SeiDB storage system. The goal is near-instant transaction confirmation, which supports a new class of high-performance dApps, particularly dApps built for the EVM. ## Core concept: pipelined & parallelized consensus Sei reaches sub-second finality by aggressively optimizing and parallelizing the standard BFT consensus flow. Traditional Tendermint proceeds through distinct rounds of propose, prevote, precommit, and commit, somewhat sequentially, for each block height. In contrast, Sei heavily pipelines these operations and integrates them closely with parallel transaction execution. The optimized flow includes these enhancements: 1. **Aggressive timeout configuration:** Sei uses heavily tuned Tendermint consensus parameters. Configuration settings (for example, `UnsafeProposeTimeoutOverride` and `UnsafeCommitTimeoutOverride`) can enforce much shorter durations for block proposal, voting, and commit rounds than standard Tendermint configurations. This contributes directly to the sub-second target block time. Faster gossip propagation for consensus messages further reduces communication latency between validators. The `unsafe-overrides-enabled` flag in the `[consensus]` section of the node config gates these `Unsafe*TimeoutOverride` fields. This flag defaults to `false`. With the default, the node ignores the overrides and uses the on-chain timeout consensus parameters instead. The node applies the overrides only when `unsafe-overrides-enabled` is set to `true`. During the transition period, it also applies them while the on-chain timeout parameters still match the legacy values. In practice, the on-chain consensus parameters should govern timeout tuning, not these unsafe per-node overrides. 2. **Mempool management & transaction preparation:** Even before the block proposal for height `H` formally begins, validators can start to process transactions intended for that block. This work includes collecting transactions from the network, decoding them concurrently (`DecodeTransactionsConcurrently`), analyzing potential state dependencies (`GenerateEstimatedWritesets`), and potentially pre-fetching required state data from SeiDB. This "pre-consensus" preparation minimizes the work needed when the actual proposal for height `H` arrives. 3. **Optimized BFT rounds with parallel execution integration:** The main optimization is the close integration with Sei's parallelization engine. When a validator receives a block proposal for height `H`, it can start execution before the prevote and precommit rounds complete: * The validator dispatches the block's transactions to the parallel execution engine (`ProcessTXsWithOCC`, `DeliverTxBatch`). * Transactions execute *optimistically and concurrently* on multiple worker goroutines. Mechanisms such as `CacheMultiStore` buffer the state changes. * At the same time, the validator takes part in the standard BFT prevote and precommit voting rounds for the proposed block `H`. 4. **Rapid finalization and commit:** Transaction execution overlaps significantly with the consensus voting process. This greatly reduces the time between reaching 2/3+ precommits for block `H` and having the resulting state changes ready to commit. When consensus is reached, the validated state changes that were buffered during parallel execution are committed efficiently to the underlying SeiDB storage layer. This commit uses the high I/O capabilities of SeiDB. **Optimized & pipelined consensus** > [card] Pre-consensus (TX preparation) > > * Transaction collection & analysis > * State prefetching (SeiDB) > [card] Optimized BFT consensus (voting & concurrent execution) > > * Block proposal reception & initial validation > * BFT voting (prevote/precommit) > * Parallel TX execution (optimistic) *(Consensus reached)* → **Finalize state & commit to SeiDB** This diagram shows the conceptual overlap. Transaction preparation feeds into a process where BFT voting happens *alongside* parallel transaction execution. The preceding concurrent work lets the final commit to SeiDB happen quickly after consensus. ## Performance impact for EVM developers This optimized consensus flow has these benefits: * Sei has instant, deterministic finality. A transaction is final as soon as its block is committed, within the target block time of approximately 400 ms. There is no probabilistic confirmation window or multi-block wait. This removes the long confirmation waits that are common on other chains. * The low latency improves the user experience. Interactions feel instantaneous, which brings dApps closer to traditional web services. * The speed makes previously impractical on-chain applications possible, for example high-frequency trading components, real-time price oracles (critical for stable DeFi), and responsive on-chain games. * Complex DeFi workflows that involve multiple transactions (for example, approve-swap-stake) can execute in sequence within roughly a second. This improves capital efficiency and simplifies user interactions. Sei keeps core EVM compatibility alongside these performance gains. This includes standard gas models and support for Solidity, Vyper, and common Ethereum development tools. ### Leveraging fast finality in Solidity The rapid block times enable and encourage these development patterns: **1. Minimal confirmation waits:** Off-chain applications and scripts should rely on one block confirmation (`txResponse.wait(1)`) for probabilistic finality. This significantly speeds up application logic that depends on transaction inclusion. ```javascript theme={"dark"} // Fast transaction submission leveraging ~400ms finality async function sendTransaction(tx) { // ... prepare transaction ... const signedTx = await wallet.signTransaction(transaction); const txResponse = await provider.sendTransaction(signedTx); // Wait for ONE block confirmation const receipt = await txResponse.wait(1); // Returns quickly console.log(`Tx ${receipt.transactionHash} confirmed in block ${receipt.blockNumber} (~400ms)`); return receipt; // Proceed with logic assuming finality } ``` **2. Practical multi-step interactions:** Complex sequences of multiple dependent transactions become efficient and user-friendly. ```javascript theme={"dark"} // Example: Multi-step DeFi operation (Approve + Swap + Deposit) async function executeDeFiStrategy(tokenAddress, amount) { const approveTx = await erc20.approve(ROUTER_ADDRESS, amount); await approveTx.wait(1); // ~400ms const swapTx = await router.swapExactTokensForETH(/* ... */); await swapTx.wait(1); // ~400ms const depositTx = await lendingPool.deposit(/* ... */); await depositTx.wait(1); // ~400ms // Total time ~1.2 seconds console.log('Multi-step strategy completed.'); return { /* ... results ... */ }; } ``` **3. Time-sensitive contract logic:** Smart contracts can implement logic that is sensitive to short time intervals, measured reliably in blocks. * **Short-duration auctions and votes:** Contracts can define processes that resolve within seconds or minutes. They can use `block.number` for precise timing, based on the block interval of approximately 400 ms. * **High-frequency oracles:** Oracles can push updates much more frequently, for example every few seconds (a small number of blocks). This gives DeFi protocols fresher data. ```solidity theme={"dark"} // Example: High-Frequency Oracle Update Constraint contract HighFrequencyOracle { uint256 public lastUpdateBlock; // Allow update every 5 blocks (~2 seconds) uint256 public updateFrequency = 5; function updatePrice(bytes32 asset, uint256 price) external /* ... */ { // Enforce minimum block interval between updates require(block.number >= lastUpdateBlock + updateFrequency, "Update too frequent"); // ... update price state ... lastUpdateBlock = block.number; // ... emit event ... } // Check price freshness (e.g., < 25 blocks = ~10 seconds) function isPriceFresh(bytes32 asset) external view returns (bool) { return block.number - lastUpdateBlock < 25; } } ``` ### Compatibility and future directions Sei's consensus optimizations keep full compatibility with the EVM standard. Existing smart contracts, dApps, and developer tools work normally. Ongoing and future work focuses on further optimizing the pipeline. It includes: * Advanced state management techniques, such as predictive loading and EVM-specific caching integrated with SeiDB * Potential bytecode optimizations or JIT compilation for the EVM execution layer * Building cross-chain communication protocols that use Sei's fast finality This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/parallelization-engine # Sei Parallelization Engine: Multi-core Blockchain Execution > Learn how Sei's Parallelization Engine enables simultaneous transaction processing across multiple CPU cores, delivering higher throughput while maintaining safety and consistency guarantees. ## Introduction Many blockchain systems use traditional sequential execution models. The Sei parallelization engine is a core component designed to increase transaction processing throughput beyond the limits of these models. The engine executes non-conflicting transactions in a block concurrently. It uses multi-core processors to improve performance and scalability. This page gives a technical explanation of its architecture and mechanisms. > [!TIP] > > The parallelization engine lets Sei process transactions concurrently across multiple CPU cores. This significantly increases throughput, and the outcomes stay deterministic and identical to sequential processing. ## Core mechanism: optimistic concurrency control The parallelization engine uses an **Optimistic Concurrency Control (OCC)** strategy. Pessimistic approaches lock state resources before execution. OCC instead lets transactions execute in parallel, based on an initial *estimation* of the state they will access. Conflicts (for example, two transactions that write to the same state key) are detected *during* or *after* this parallel execution phase. When conflicts occur, the engine resolves them, often by re-executing the conflicting transactions. This approach minimizes overhead when conflicts are infrequent and increases overall throughput. ## System architecture **Sei parallelization engine** > [card] Transaction preprocessing > > * Classifier > * Batch formation > * Gas estimation > [card] Dependency analysis > > * Access analysis > * Dependency mapping > * Contract interaction > [card] Parallel execution > > * Worker pool > * State transitions > * Speculative execution > [card] Conflict resolution > > * Conflict detection > * Sequential re-execution > [card] SeiDB & consensus > > * State Commit > * MVCC support This architecture lets Sei process transactions in parallel and keep the results consistent and correct. ### 1. Transaction preprocessing Before execution can begin, incoming transactions go through preparatory processing. The system converts raw transaction bytes into structured transaction objects. These objects let the system identify message types and transaction characteristics. Initial validation also happens at this stage, through ante handlers that verify signatures, fees, and other prerequisites. The system also identifies certain critical transactions, such as oracle price feed updates. These transactions may need prioritized execution so that their data is processed on time. Based on this initial analysis, the system groups transactions into batches for later processing stages. This step is the basis for parallel execution. ### 2. Dependency analysis (estimation) This stage is the backbone of the OCC approach. The system estimates potential state accesses for each transaction instead of determining exact dependencies. An access control module analyzes each transaction to predict which state keys it might read or write during execution. Specialized Dependency Generator functions predict potential state access patterns for each transaction type. The precision of this analysis depends on transaction complexity: For simple transactions such as token transfers, the system can determine precisely which account balances the transaction will access. For complex smart contract interactions, it is much harder to predict all potential storage accesses. For these complex cases, the generators give broader estimates that acknowledge areas of uncertainty. For example, a token transfer between accounts `A` and `B` generates estimated read-write sets that include: * Read access to account `A`'s balance * Read access to account `B`'s balance * Write access to account `A`'s balance * Write access to account `B`'s balance * Read access to any related metadata or configuration The dependency analyzer might also consider secondary effects such as: * Fee payment impacts on the transaction sender's account * Potential interactions with staking or governance mechanisms if the tokens have such properties > [!NOTE] > > For smart contract calls, the analyzer uses heuristic methods that consider these inputs: > > * The contract's address and storage layout > * The specific function selectors being called > * Any parameters passed to the contract functions > * Historical patterns of state access from previous similar calls The dependency generator outputs an estimated read-write set for each transaction. These sets contain the state keys that the transaction is expected to access. They also carry metadata for each prediction: the access type (read or write) and a confidence level. The system uses these confidence levels in scheduling decisions to minimize the likelihood of conflicts. The output of this phase is an "estimated writeset" for each transaction. The writeset predicts the transaction's effect on state. It is an important input for the next phase, execution planning. ### 3. Parallel execution The system uses the estimated writesets to attempt concurrent execution in these steps: 1. **Batch organization**: The system organizes transactions and their associated writesets for processing. * Transactions are grouped logically, based on estimated dependencies * The system creates execution units with appropriate metadata * Priority queues determine processing order for maximum throughput * Metadata tags track transaction relationships for later conflict analysis 2. **Worker assignment**: A pool of execution workers (typically implemented as goroutines) is ready to process transactions concurrently. * The worker pool size adapts dynamically to system resources * CPU core allocation strategies optimize for NUMA architectures * Specialized workers can execute specific transaction types * Load balancing algorithms redistribute work for maximum resource use 3. **Strategic scheduling**: The scheduler assigns transactions to workers based on estimated writesets and groups non-conflicting transactions together. * Graph-based scheduling algorithms minimize potential conflicts * The scheduler includes lookahead capabilities for multi-step dependency chains * Execution time estimates prioritize shorter transactions when appropriate * Locality-aware scheduling places related transactions on the same worker when beneficial 4. **Buffered execution**: Workers execute transactions and write all state modifications to a temporary buffer instead of the main state store. * Each worker keeps an isolated transaction context * The execution engine applies gas metering and limits * Buffered state operations capture all read and write operations * Intermediate results remain isolated until conflict detection completes 5. **Runtime tracking**: The system monitors which state keys are read and written during execution. This builds an accurate picture of the real (versus estimated) state access patterns. * Access tracking captures both direct and indirect state interactions * Runtime statistics feed back into the dependency estimation system * Execution anomalies trigger adaptive scheduling adjustments * Performance metrics identify optimization opportunities The engine uses these advanced techniques to maximize parallelism: * Adaptive batch sizing based on system load and conflict rates * Predictive execution of high-probability transaction paths * Distributed execution capabilities across multiple physical nodes when available * Resource throttling to prevent worker starvation ### 4. Conflict detection & resolution The system must identify and resolve any conflicts that appear during and after parallel execution. The process has these steps: 1. **Conflict identification**: The system compares the actual read-write sets recorded during execution. A conflict exists when one transaction reads state that another concurrent transaction wrote, or when multiple transactions write to the same state key. The conflict detector implements several optimized algorithms: * A hash-based data structure tracks state accesses in memory for efficient lookup * Bloom filters run fast preliminary conflict checks * A deterministic conflict resolution order prevents cyclic dependencies during re-execution * Precise timestamp tracking makes sure that sequencing follows arrival order Common conflict patterns include: * Read-After-Write (RAW): Transaction `B` reads a key that Transaction `A` has modified * Write-After-Read (WAR): Transaction `B` modifies a key that Transaction `A` has read * Write-After-Write (WAW): Multiple transactions try to modify the same key 2. **Conflict resolution**: When the system detects conflicts, it runs a resolution strategy: * It identifies the conflicting transactions as a group * It removes their results from the temporary state buffer * It re-executes the conflicting set in a deterministic, sequential order to make sure the results are correct The deterministic order depends on these transaction prioritization rules: * Critical system transactions get the highest priority * Oracle updates and price feeds get elevated priority * Standard transactions follow their original sequence in the block * Gas price and other economic factors may influence the ordering The resolution system keeps its isolation guarantees through careful state management: * Conflict groups remain isolated from successfully processed transactions * The temporary buffer preserves successfully executed state transitions * Resolution attempts track their own read-write sets to detect cascading conflicts > [!NOTE] > > This conflict resolution makes the final state after parallel execution identical to the state that sequential processing would produce. This keeps the blockchain consistent. ### 5. Fallback mechanism The OCC approach includes a safety mechanism for situations where parallel execution cannot succeed: 1. **Failure detection**: The system detects a failure condition when parallel execution encounters excessive conflicts or critical errors. 2. **State rollback**: The system discards all state changes from the failed parallel attempt. 3. **Sequential reprocessing**: As a fallback, the system processes the entire transaction batch sequentially. This fallback guarantees that the chain can always make progress, even in worst-case scenarios where parallelization is ineffective for a particular block. ## Interaction with SeiDB The parallelization engine works closely with SeiDB, Sei's custom storage layer. SeiDB's State Commit layer gives the low-latency read and write access that concurrent execution at high transaction volume needs. Its asynchronous commit also lets block state finalize quickly. This creates an efficient pipeline for block processing. SeiDB integration has several technical advantages for parallelization: **Performance optimizations:** * Multi-version concurrency control (MVCC) at the storage level supports multiple execution attempts * Lock-free read operations prevent stalls during parallel transaction execution * Memory-mapped state caching reduces I/O overhead for frequently accessed keys * Batch commit optimizations minimize disk write amplification **Parallelization-specific features:** * Snapshot isolation gives each transaction execution a consistent view of state * Atomic multi-key operations keep multi-part state transitions consistent * Versioned state access supports concurrent reads of different state versions * Optimized rollback lets the engine discard speculative state changes quickly **Storage architecture alignment:** * The key-value structure mirrors the state access patterns in the dependency analysis * Prefix-based organization aligns with contract and module-based access patterns * Hybrid storage tiers optimize for different access patterns across workloads * Asynchronous persistence decouples block execution from storage commit latency > [!NOTE] > > The tight integration between the parallelization engine and SeiDB lets the system maintain high throughput. This holds even under challenging workloads with complex dependency patterns or high conflict rates. ## Performance impact The parallelization engine improves performance significantly: | Transaction type | Sequential TPS | Parallel TPS | Improvement | | - | - | - | - | | Simple transfers | 3,000 | 15,000+ | 5x | | ERC-20 transfers | 2,200 | 9,500+ | 4.3x | | DEX swaps | 800 | 2,800+ | 3.5x | | Complex contracts | 500 | 1,500+ | 3x | These improvements scale with CPU core count. Sei can therefore take full advantage of modern server hardware. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/seidb # SeiDB: Performance-Optimized Blockchain Database > Learn how SeiDB's specialized storage architecture accelerates blockchain operations through multi-level caching, optimized state access, and concurrency control designed specifically for EVM workloads. ## Introduction SeiDB is a specialized database system designed to optimize blockchain state storage for the Ethereum Virtual Machine (EVM). It addresses fundamental performance constraints in traditional blockchain storage systems with optimizations that target the EVM's specific state access patterns. This page explains the technical design and main components of SeiDB. ## Core technical design Traditional blockchain databases store state in structures optimized for cryptographic verification, not for transaction execution speed. SeiDB uses a hybrid architecture that keeps cryptographic verifiability and also speeds up state access. The design goals include: * Minimizing storage slot access latency even at peak load * Maximizing state operation throughput for both reads and writes * Enabling parallel execution for non-conflicting state operations * Maintaining consistent performance under variable workloads ## System architecture SeiDB implements a multi-layered architecture optimized for EVM state management: **SeiDB core** > [card] EVM cache system > [card] Query processor > [card] Storage engine > [card] Merkle trie optimizer > [card] Storage indexer > [card] LSM-tree manager > [card] Concurrency control > [card] Version manager > [card] I/O scheduler > [card] Ethereum compatibility layer Each component in this architecture addresses specific performance bottlenecks in traditional blockchain storage systems. The integrated design supports specialized optimization at each level and keeps the system cohesive. ### EVM-optimized storage engine The storage engine is the foundation of SeiDB and its biggest departure from traditional blockchain state databases. Standard Ethereum implementations use a single Merkle Patricia Trie for all storage. SeiDB instead uses a hybrid approach that combines cryptographic verification with performance optimizations from modern database systems. The main techniques include: * **Enhanced Merkle Patricia Trie**: The implementation keeps the cryptographic properties that consensus validation requires and also addresses performance bottlenecks. SeiDB's node caching greatly reduces I/O overhead. A priority retention system keeps hot nodes in memory. It analyzes access frequency and recency patterns across multiple blocks. * **Incremental state root calculation**: The system uses specialized techniques that avoid recalculating entire trie branches when only leaf nodes change. This method speeds up finalization for blocks whose transactions affect different state areas. The calculation reuses intermediate hash values from unchanged subtrees. The system can then derive the state root quickly, even after thousands of storage modifications. * **Direct storage slot indexing**: SeiDB maps composite keys (address + slot) to their storage location. This technique reduces lookup complexity from O(log n) to near-constant time for most operations. The indexing system stays consistent through a dual-update mechanism that modifies both the index and the underlying trie atomically. * **Account-level optimizations**: The system applies different strategies to external accounts (user wallets) and contract accounts. Contract accounts get specialized treatment with code caching and execution context preservation. The code caching mechanism relies on contract bytecode being immutable after deployment. It keeps frequently accessed contracts in memory, with custom deserialization to minimize runtime overhead. * **Optimized Bloom filters**: The storage engine speeds up negative lookups (checks for non-existent keys) during contract execution. These filters use multi-layer filtering, sized dynamically to the active working set, to minimize false positives during typical workloads. ### Multi-level cache architecture The caching system has multiple specialized caches, each optimized for particular EVM access patterns. General-purpose databases, by contrast, use uniform caching strategies. The system includes: * **Hot slot cache**: This component keeps frequently used storage slots in memory. It uses a frequency-recency hybrid eviction policy tuned for blockchain workloads. This adaptive approach gets better hit rates than static caching policies. The cache separates frequently accessed slots from burst-access slots to prevent cache thrashing during high-intensity operations. * **Account state cache**: This cache keeps complete information for recently accessed addresses, including code, balance, nonce, and metadata. It uses predictive loading, based on transaction analysis, to improve hit rates during smart contract interactions. The predictive engine analyzes calldata patterns and historical interaction graphs to preload contract accounts that are likely to be accessed. * **Execution context cache**: This specialized cache preserves partial execution environments for frequently called contracts. When the same contract executes repeatedly with similar call patterns, this contextual caching reduces setup overhead compared to cold execution. The context includes pre-validated jump destinations, resolved address references, and warmed storage slots. ### Concurrency management SeiDB's concurrency control system uses optimistic concurrency control (OCC), adapted specifically for the EVM's state access patterns. The system applies semantic knowledge of common smart contract behavior to minimize conflicts. The transaction execution process follows these steps: 1. The system analyzes transaction targets, calldata patterns, and historical access data to create an initial dependency graph. 2. Transactions without overlapping state dependencies execute in parallel, in isolated worker threads. 3. The system monitors the actual storage accesses during execution and compares them with the predictions to identify conflicts. 4. When conflicts occur, the system re-executes only the minimal conflict sets, in sequential order. For common operations such as token transfers, SeiDB applies specialized conflict handlers that understand operation semantics. The semantic analysis identifies token sender and recipient addresses from calldata and method signatures. This understanding reduces false conflicts for common ERC-20 token operations. The worker pool adjusts parallelism dynamically based on observed conflict rates. During periods with few conflicts, the system increases worker count to maximize throughput. When conflict rates rise, it reduces parallelism to avoid wasting resources on speculative execution that might need to be reverted. The scheduler has a feedback loop that monitors aborted transactions. The loop adjusts the parallelism factor within milliseconds after it detects a change in workload patterns. ### I/O optimization SeiDB implements storage I/O optimizations designed specifically for blockchain workloads. These workloads typically involve append-heavy state changes. The main optimization techniques include: * **Log-structured storage**: The system organizes state into multiple levels. Recent changes stay in memory, and older state moves to progressively larger but slower storage tiers. This architecture turns random writes into sequential operations to improve write throughput. The storage layer keeps a memory-resident delta table that captures recent modifications. It periodically flushes these changes to persistent storage in optimized batches. * **Priority-based I/O scheduling**: The I/O subsystem prioritizes operations based on whether they are on the critical path. State reads that transaction validation requires get the highest priority. State updates come next, and background operations get the lowest priority. The scheduler also batches operations: it combines multiple small I/O operations into larger, more efficient ones. * **State versioning**: SeiDB uses multi-version concurrency control designed for the block-based execution model of blockchains. Each block creates a new state version. Versions use full state snapshots at epoch boundaries and delta encoding for the blocks in between. The versioning system supports point-in-time queries against historical state. Differential storage and periodic compaction keep the storage overhead minimal. * **Configurable persistence**: The database has adjustable durability guarantees, based on node type and network requirements. The options range from fully synchronous writes to asynchronous persistence with periodic checkpoints. The configuration system lets operators make explicit tradeoffs between performance and durability, based on the role of their node in the network. ## Performance characteristics SeiDB is designed for substantial performance improvements over traditional EVM state implementations. The architecture aims to improve both throughput and latency across various operation types. > [!NOTE] > > The performance characteristics in this section are design targets, not verified benchmarks. Actual performance will vary with hardware configuration, workload patterns, and network conditions. Production deployments should run their own benchmarks to validate performance in their specific environment. ### Storage operation throughput SeiDB is designed to significantly improve throughput across all major categories of storage operations, particularly storage reads and account lookups. These improvements come from the architecture, not from hardware scaling, and the performance gains apply to all operation types. ### Latency profile The system is designed to keep latency consistently low across different load conditions, from low to peak usage. For applications that need predictable performance, this stable latency is one of SeiDB's most significant advantages. The system aims to keep response times relatively stable even at high load. Traditional implementations, by contrast, may show severe latency spikes during high network activity. ## Optimization patterns If you understand certain storage access patterns, you can take full advantage of SeiDB's architecture. Existing contracts work without modification, but contracts designed with these patterns perform even better. ### Localized storage access SeiDB's caching mechanisms work best when related data is stored in localized regions: ```solidity theme={"dark"} // Suboptimal: Random storage access pattern contract BasicStorage { mapping(uint256 => uint256) public values; function processValues(uint256[] calldata keys) external { for (uint i = 0; i < keys.length; i++) { values[keys[i]] = values[keys[i]] + 1; } } } // Optimized: Localized storage access contract OptimizedStorage { mapping(uint256 => mapping(uint256 => uint256)) public valuesByBucket; function processValuesBatch(uint256 bucket, uint256[] calldata keys, uint256[] calldata vals) external { for (uint i = 0; i < keys.length; i++) { valuesByBucket[bucket][keys[i]] = vals[i]; } } } ``` In the optimized version, related values cluster under common bucket keys. This organization matches SeiDB's caching strategy, which loads entire buckets into memory as a unit. The pattern performs better than randomized access, particularly for operations that process many values in a single transaction. ### Contention reduction Smart contracts that handle high transaction volumes benefit from storage designs that minimize contention on storage locations: ```solidity theme={"dark"} // Suboptimal: High contention design contract HighContentionContract { uint256 public totalOperations; function recordOperation() external { totalOperations++; // High contention point // Other operation logic } } // Optimized: Sharded counter design contract LowContentionContract { mapping(uint256 => uint256) public operationsByDay; function recordOperation() external { uint256 today = block.timestamp / 86400; operationsByDay[today]++; // Temporal sharding reduces contention // Other operation logic } function getTotalOperations(uint256 daysToInclude) external view returns (uint256) { uint256 total = 0; uint256 today = block.timestamp / 86400; for (uint256 i = 0; i < daysToInclude; i++) { total += operationsByDay[today - i]; } return total; } } ``` The optimized contract shards the counter across time-based buckets. This greatly reduces contention when multiple transactions execute concurrently. SeiDB's concurrency control system recognizes these sharded patterns and executes transactions that affect different shards in parallel. This approach increases throughput for high-volume contracts during peak load conditions. ## Technical integration ### EVM compatibility SeiDB keeps complete compatibility with the Ethereum protocol specifications while it improves performance: * Full support for all EVM opcodes and precompiled contracts * Identical state transition logic to standard Ethereum implementations * Consistent gas cost model for all operations * Complete compatibility with JSON-RPC API endpoints Because of these compatibility guarantees, existing smart contracts, development tools, and infrastructure components work without modification. The system goes through extensive compatibility testing against the official Ethereum test suites. The tests verify that results are identical to the reference implementations. ### Deployment configurations SeiDB's architecture supports various deployment configurations optimized for different node roles: * **Validator nodes** prioritize state consistency and durability through synchronous I/O operations and redundant state verification * **API service nodes** optimize for query throughput and low-latency responses with larger cache allocations and specialized read paths * **Archive nodes** use specialized storage strategies for efficient historical state access, including custom indexing for time-based queries * **Light clients** benefit from optimized state proof generation with compact inclusion proofs for partial state verification Each configuration tunes the SeiDB components to specific requirements and keeps protocol compatibility. The configuration framework gives fine-grained control over cache sizes, worker pools, I/O policies, and persistence strategies to match the operational needs of different node types. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/wallets # Sei Wallet Providers Guide > Comprehensive guide to Sei Wallet Providers Guide on Sei. Learn key concepts, commands, and best practices. You need a wallet to manage assets and interact with Sei. There are several types of wallets, and each type has different features and levels of security. > [!WARNING] > > Avoid importing a wallet mnemonic manually from an EVM-only wallet app into a Cosmos-based wallet app, or the reverse. Because the [coin types](https://en.bitcoin.it/wiki/BIP_0044#Coin_type) differ, the import may generate unexpected wallet addresses. ## Types of wallets 1. **Software wallets**: These are applications or browser extensions that manage private keys and interact with the blockchain. They are easy to use and available on both desktop and mobile devices. 2. **Hardware wallets**: These are physical devices that store private keys securely offline. They are more secure, but less convenient for frequent transactions. 3. **Passkey-based wallets**: These wallets use passkeys for authentication instead of traditional seed phrases. This adds another layer of security. ## Recommended wallets | Wallet | EVM | Auth Method | Coin Type | Type | Mobile | Link | | - | - | - | - | - | - | - | | MetaMask | ✅ | Mnemonic / Privkey | 60 | Software | ✅ | [MetaMask](https://metamask.io/) | | Backpack | ✅ | Mnemonic / Privkey | 60 | Software | ✅ | [Backpack](https://backpack.app/) | | Binance Wallet | ✅ | MPC / Keyless | 60 | Software | ✅ | [Binance Wallet](https://www.binance.com/en/web3wallet) | | Dynamic | ✅ | Any | All | Embedded | ✅ | [Dynamic Wallet](https://dynamic.xyz) | | Privy | ✅ | Email / Social / Passkey / Wallet | 60 | Embedded | ✅ | [Privy](https://privy.io) | | Rabby | ✅ | Mnemonic / Priv/Passkey | 60 | Software | ✅ | [Rabby Wallet](https://chromewebstore.google.com/detail/rabby-wallet/acmacodkjbdgmoleebolmdjonilkdbch) | | OKX | ✅ | Mnemonic / Privkey | 118 / 60 | Software | ✅ | [OKX Wallet](https://web3.okx.com/wallet/sei-evm) | | Gem Wallet | ✅ | Mnemonic / Privkey | 118 / 60 | Software | ✅ | [Gem Wallet](https://gemwallet.com/sei-wallet/) | Wallets with coin type 118 use the Cosmos hierarchical deterministic (HD) derivation path. Sei's address-association system still maps the same key to a unique EVM `0x...` address. For more on coin types, HD paths, and how to derive wallet addresses correctly, see [HD paths and coin types](https://docs.sei.io/learn/accounts.md#hd-paths-and-coin-types). ## Hardware wallets | Wallet | EVM | Cosmos | Coin Type | Type | Mobile | Link | | - | - | - | - | - | - | - | | Ledger | ✅ | ✅ | 118 / 60 | Hardware | ❌ | [Ledger](https://www.ledger.com/) | | Arculus | ✅ | ✅ | 118 / 60 | Hardware | ✅ | [Arculus](https://www.getarculus.com/) | ## Integration guides * [Pimlico Wallet](https://docs.sei.io/evm/wallet-integrations/pimlico.md) * [Particle Wallet](https://docs.sei.io/evm/wallet-integrations/particle.md) ## All wallets This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/rpc-providers # Sei Network RPC Providers > Directory of reliable RPC service providers for Sei blockchain. Access endpoints for development, node connections, and blockchain interactions. RPC providers offer endpoints that let you interact with Sei. They also offer archive nodes and other services. Providers include: This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/explorers # Sei Blockchain Explorers Guide > A comprehensive overview of block explorers for the Sei Network across different environments. Access tools for tracking transactions, analyzing addresses, and monitoring network activity. ## What is a block explorer? A block explorer is the most common way to look up all kinds of on-chain information. With an explorer, you do not need to download the entire blockchain ledger. Most block explorers have tools to view the network, and some have tools to interact with it. These tools include: * Transaction tracking: View and track individual transactions on the blockchain. The information typically includes transaction hashes, input and output data, tokens transferred, fees paid, and any error messages for the transaction. It also includes the addresses of other wallets or contracts that a given wallet has interacted with. * Block information: Details about each block, such as height (sequence), timestamp, total size, and details on the transactions in the block. * Address queries: Find specific wallet addresses with their token balances and transaction history. You can also get details on contract addresses and non-wallet accounts. * Network statistics: Statistics and analytics about the blockchain, such as the total number of blocks, transaction throughput, network hash rate, and staking and governance data. * Smart contracts: Query smart contract states, deployments, and interactions with other wallets or addresses. Some explorers may also show the raw code of the contract. > [!NOTE] > > In rare cases, some information may be misinterpreted. Use off-chain data as a guide only. ## Sei explorers > [tab] Sei Mainnet > > * [Seiscan](https://seiscan.io): A block explorer for Sei Mainnet. > * [Seistream](https://seistream.app/): A real-time transaction streaming and monitoring tool for Sei Mainnet. > * [NG Explorer](https://sei.explorers.guru): A blockchain explorer from Nodes Guru for Sei Mainnet. > [tab] Sei Testnet > > * [Seiscan](https://testnet.seiscan.io): A block explorer for Sei Testnet. > * [Seistream](https://testnet.seistream.app/): A real-time transaction streaming and monitoring tool for Sei Testnet. > * [NG Explorer](https://testnet.sei.explorers.guru): A blockchain explorer from Nodes Guru for Sei Testnet. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/faucet # Sei Network Testnet Faucet > Request testnet tokens for development and testing on Sei Network. The faucet distributes test tokens with no real-world value. > [!WARNING] > > This faucet distributes only Sei Testnet tokens. These tokens have no real-world value and are intended for testing. ## Request tokens To receive SEI on Sei Testnet, enter your EVM (`0x`) address below. Testnet ## Usage notes * **Rate limits**: Each address can request tokens once per day. Wait 24 hours between requests. * **Testnet only**: Tokens are distributed on Sei Testnet and cannot be used on Sei Mainnet. * **Gas coverage**: One request gives enough SEI to cover hundreds of transactions on Sei Testnet. ## Testnet USDC If you need USDC to test ERC-20 workflows, use the Circle Faucet to get USDC on Sei Testnet. * [Circle Faucet](https://faucet.circle.com) * [USDC on Sei Guide](https://docs.sei.io/evm/usdc-on-sei.md) > [!NOTE] > > If the faucet is temporarily unavailable, try again later. You can also ask for help in the [Sei Discord](https://discord.gg/sei) or [Telegram](https://t.me/+KZdhZ1eE-G01NmZk) developer channels. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/indexers # Blockchain Indexers for Sei Network > Comprehensive guide to Blockchain Indexers for Sei Network on Sei. Learn key concepts, commands, and best practices. Indexers collect and organize blockchain data so that dApps can query Sei data at scale. They have structured APIs and real-time updates, and they perform significantly better than direct queries to nodes. ## Why use indexers? * Query millions of transactions in milliseconds with optimized database structures. * Filter, sort, and aggregate blockchain data with GraphQL and REST APIs. * Receive live blockchain data through WebSocket connections and webhooks. ## Available indexers The indexers below let you query Sei data with high performance and reliability. > [!NOTE] > > The Sei community develops the projects listed here. Inclusion on this site does not constitute endorsement. For questions about a project, contact that project directly. * Indexers give sub-second query response times at production scale, with GraphQL or REST APIs and real-time subscriptions. * These are community-developed projects. For support, contact each project directly. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/oracles # Oracle Providers on Sei > Directory of oracle providers for Sei blockchain. Access reliable price feeds and off-chain data for DeFi applications, smart contracts, and dApps. Oracles connect blockchain networks to real-world data. They securely bring off-chain price data on-chain. DeFi protocols, smart contracts, and dApps can then access reliable external information. ## Use cases * **DeFi developers:** Query real-time prices and time-weighted average prices (TWAPs) for liquidations and trading * **dApp builders:** Access reliable price feeds for any dApp * **Infrastructure providers:** Build enhanced oracle services on top of existing oracles ## Available providers This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/general-governance # General Governance > Learn about Sei's governance system and how to participate in the decision-making process Sei uses an on-chain governance system that lets SEI holders participate in decisions about the network. The system is built on the Cosmos SDK governance module, with several enhancements specific to Sei's architecture. ## How governance works 1. **Proposal submission**: Anyone can submit a governance proposal with an initial deposit. 2. **Deposit period**: Community members can contribute to the proposal deposit. 3. **Voting period**: When the proposal reaches the minimum deposit, voting begins. 4. **Execution**: Approved proposals are executed automatically. ### Governance logic * **Quorum requirement**: For a proposal to be valid, a minimum percentage of bonded tokens must participate in the vote. * **Approval threshold**: To pass, a proposal must receive more than 50% approval (excluding abstain votes), or 66.7% for expedited proposals. * **Veto protection**: If more than 33.4% of votes are "NoWithVeto", the proposal is vetoed, regardless of other vote counts. ## Network parameters ### Sei Mainnet These are the live network parameters for Sei Mainnet. | Parameter | Value | Description | | - | - | - | | Minimum deposit | 3500 SEI | Required to enter the voting period | | Expedited minimum deposit | 7000 SEI | Required to enter the expedited voting period | | Deposit period | 2 days | Time to collect the minimum deposit | | Voting period | 3 days | Duration for voting | | Expedited voting period | 24 hours | Duration for expedited voting | | Quorum | 33.4% | Minimum participation required | | Expedited quorum | 66.7% | Fast-track proposals | | Approval threshold | 50% | Standard proposals | | Expedited threshold | 66.7% | Fast-track proposals | | Veto threshold | 33.4% | Maximum veto votes allowed | ### Sei Testnet Sei Testnet uses these changed parameters for testing. | Parameter | Value | Description | | - | - | - | | Minimum deposit | 10 SEI | Reduced for testing | | Expedited minimum deposit | 20 SEI | Reduced for testing | | Voting period | 12 hours | Fast testing cycles | | Expedited voting period | 6 hours | Fast testing cycles | ## Vote types ### Voting options 1. **Yes**: Support the proposal as written. This vote counts toward the approval threshold. 2. **No**: Oppose the proposal. This vote counts against the approval threshold. 3. **Abstain**: Take a neutral position. This vote counts toward quorum, but not toward the approval threshold. 4. **NoWithVeto**: Strongly oppose the proposal. If these votes exceed the veto threshold, they can veto the proposal. ## Weighted voting With weighted voting, validators and delegators can split their voting power across multiple options. * You can distribute voting power across different options based on the strength of your preference. * You can use percentage allocations to express a nuanced position on a complex proposal. ## Proposal outcomes | Outcome | Conditions | | - | - | | Passed | Quorum met (≥33.4% participation) · Approval threshold met (≥50% or ≥66.7% for expedited) · Veto threshold not exceeded (less than 33.4% NoWithVeto) | | Rejected | Quorum met but approval threshold not met · Majority voted "No" | | Failed (no quorum) | Less than 33.4% of bonded tokens participated · Proposal automatically fails | | Vetoed | More than 33.4% of votes were "NoWithVeto" · Indicates strong community opposition | ## Best practices ### Community engagement * Read each proposal and understand its implications before you vote. * Participate in community forums and discussions to better understand different perspectives. * Consider the long-term implications of each proposal for the network and ecosystem. * Follow governance updates, and participate actively in the democratic process. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/proposals # Proposals > Complete guide to Sei governance proposals. Learn about different proposal types and how to submit them. This guide shows how to create and submit governance proposals on Sei. It covers the proposal types, their requirements, and the submission commands. > [!NOTE] > > For governance parameters and voting requirements, see the [Overview](https://docs.sei.io/learn/general-governance.md) section. ## Proposal types & submission ### Text proposals Text proposals are non-binding proposals for community discussion. Use them to collect community input and build consensus on important topics. **Common uses** * Strategic direction * Policy agreements * Network guidelines **Examples** * Community input and consensus building * Non-binding governance decisions * Foundation for policy discussions * Protocol direction and priorities ```bash theme={"dark"} seid tx gov submit-proposal \ --title "Community Initiative Proposal" \ --description "Detailed description of the initiative..." \ --type Text \ --deposit 3500000000usei \ --from mykey \ --chain-id pacific-1 ``` ### Parameter change proposals Parameter change proposals modify network parameters without a software upgrade. **Common changes** * Governance parameters * Staking parameters * Fee structures **Prerequisites** * Valid JSON format * Complete documentation of the change * Impact assessment * Testing results ```bash theme={"dark"} seid tx gov submit-proposal param-change proposal.json \ --deposit 3500000000usei \ --from mykey \ --chain-id pacific-1 ``` > [!NOTE] > > **Example `proposal.json`:** ```json theme={"dark"} { "title": "Update Staking Parameters", "description": "This proposal updates the maximum number of validators from 100 to 125.", "changes": [ { "subspace": "staking", "key": "MaxValidators", "value": 125 } ] } ``` ### Software upgrade proposals Software upgrade proposals coordinate network-wide software upgrades. The upgrade executes automatically at a specified block height. **Common uses** * Protocol upgrades * Security patches * New features * Performance improvements **Prerequisites** * Upgrade height specification * Binary release information * Migration documentation * Validator coordination ```bash theme={"dark"} seid tx gov submit-proposal software-upgrade v2.1.0 \ --upgrade-height 15000000 \ --upgrade-info "https://github.com/sei-protocol/sei-chain/releases/v2.1.0" \ --title "Sei v2.1.0 Upgrade" \ --description "Network upgrade to v2.1.0 with enhanced performance" \ --deposit 3500000000usei \ --from mykey \ --chain-id pacific-1 ``` ## Expedited proposals Expedited proposals are a fast-track process for urgent network changes that need immediate attention. They have higher deposit and approval requirements, and a shorter timeline. * Security patches and critical fixes * Emergency parameter adjustments * Time-sensitive network upgrades ```bash theme={"dark"} seid tx gov submit-proposal software-upgrade emergency-patch \ --upgrade-height 15100000 \ --upgrade-info "https://github.com/sei-protocol/sei-chain/releases/emergency-patch" \ --title "Emergency Security Patch" \ --description "Critical security fix requiring immediate deployment" \ --deposit 7000000000usei \ --expedited \ --from mykey \ --chain-id pacific-1 ``` ## Proposal management ### Query & monitor | Command | Purpose | Example | | - | - | - | | `seid q gov proposals` | List all proposals | `--status voting_period` | | `seid q gov proposal [id]` | Get a specific proposal | `seid q gov proposal 42` | | `seid q gov votes [id]` | Check voting results | `seid q gov votes 42` | | `seid q gov tally [id]` | View vote tally | `seid q gov tally 42` | ### Voting ```bash theme={"dark"} # Vote on a proposal seid tx gov vote [proposal-id] [vote-option] \ --from mykey \ --chain-id pacific-1 # Vote options: yes, no, abstain, no_with_veto seid tx gov vote 42 yes \ --from mykey \ --chain-id pacific-1 ``` ### Deposit management ```bash theme={"dark"} # Add deposit to proposal seid tx gov deposit [proposal-id] [amount] \ --from mykey \ --chain-id pacific-1 # Example: Add 1000 SEI to proposal 42 seid tx gov deposit 42 1000000000usei \ --from mykey \ --chain-id pacific-1 ``` This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/sips # Sei Improvement Proposals > Browse every Sei Improvement Proposal (SIP) with status, type, authorship, and section outlines pulled live from the sei-protocol/sips repository. A Sei Improvement Proposal (SIP) is a design document for a change to Sei. It might cover a new protocol feature, a change to how the project runs, or a convention for the wider ecosystem. Writing one is how you put an idea in front of the community, and how the reasoning behind a decision is recorded. Every SIP lives in the [sei-protocol/sips](https://github.com/sei-protocol/sips) repository, and the list below reads from it directly. Titles, statuses, authors, and section outlines come from the source files, not from a copy that can become outdated. > [!NOTE] > > A SIP is not the same as an on-chain governance proposal. The SIP holds the design and the reasoning. The on-chain proposal is the vote that enacts it. One SIP can take several governance proposals to carry out, as SIP-3 did. For the on-chain process, see [Governance](https://docs.sei.io/learn/general-governance.md) and [Proposals](https://docs.sei.io/learn/proposals.md). ## All proposals ## Proposal types Every SIP declares a type, and the type decides how much community consensus it needs. [SIP-1](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#sip-type) defines all three. | Type | Scope | Needs consensus | | - | - | - | | [Standard](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#standard) | Changes that affect most implementations of Sei, such as consensus, networking, RPC, EVM and CosmWasm behavior, and contract standards. It must also declare a category. | Yes | | [Process](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#process) | Changes around Sei rather than inside it, such as developer tooling, node and validator procedures, and the SIP process itself. | Yes | | [Informational](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#informational) | Guidelines or information for the community, with no change to the protocol or development environment. | No | ### Categories A Standard SIP must also declare one of five [categories](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#sip-category). | Category | Covers | | - | - | | Core | Consensus, execution, storage, and account signatures | | Networking | Mempool and network protocols | | Interface | RPC specifications and lower-level naming conventions | | Framework | EVM and CosmWasm contracts and primitives included in the Sei codebase | | Application | New EVM or CosmWasm standards and primitives that sit outside the Sei codebase | ## Status lifecycle A successful SIP usually moves through Draft, Review, Last Call, Final, Implemented, and Activated. Each card above shows the status recorded in that proposal's own source file. | Status | What it means | | - | - | | [Idea](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#idea) | Written, but not yet admitted to the process and not yet numbered. | | [Draft](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#draft) | An editor has accepted the formatting and assigned a number. The author now gathers community feedback. | | [Review](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#review) | The author has worked through early feedback. At least three assigned reviewers now give a formal review. | | [Fast Track](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#fast-track) | For proposals that already reached consensus outside the SIP process. It runs the same way as Review. | | [Last Call](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#last-call) | A final window for objections, usually at least one week. | | [Final](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#final) | Accepted, and the specification is now frozen. | | [Implemented](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#implemented) | Development is complete, but the feature is not yet live on Sei Mainnet. | | [Activated](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#activated) | Live on Sei Mainnet. | | [Stagnant](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#stagnant) | Inactive for four weeks while in Draft, Review, or Last Call. | | [Withdrawn](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#withdrawn) | The author has withdrawn the proposal. | | [Living](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#living) | A continuously updated proposal that never reaches Final, such as SIP-1 itself. | > [!NOTE] > > After a SIP reaches Final, nobody can withdraw or edit it. To change an accepted specification, submit a new SIP that extends or replaces the original. ## Guides for specific proposals SIP-3 and SIP-4 both affect how you use and build on Sei. These pages cover what they mean in practice. > [card] [SIP-3 migration guide](https://docs.sei.io/learn/sip-03-migration.md) > > What SIP-3 changes for asset holders, and how to move off Cosmos-native addresses. > [card] [Gas and transaction fees](https://docs.sei.io/learn/dev-gas.md) > > How Sei's EIP-1559 implementation works, including the parameters SIP-4 revises. > [card] [Cosmos-SDK deprecation](https://docs.sei.io/cosmos-sdk.md) > > Legacy Cosmos SDK and CosmWasm documentation, deprecated under SIP-3. ## Submit a proposal Anyone can author a SIP. Before you write one, discuss the idea with the community to find out whether the proposal is needed at all. **1. Read SIP-1** [SIP-1](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md) defines the process, the header fields your file needs, and what authors and editors are each responsible for. **2. Raise the idea with the community** Open a thread in [GitHub Discussions](https://github.com/sei-protocol/sips/discussions) to collect early feedback, especially from the people who would implement the change. **3. Fork the repository and add your file** Fork [sei-protocol/sips](https://github.com/sei-protocol/sips). In your fork, create your proposal at `sips/sip-temporary_title.md`. Put any images in `assets/sip-temporary_title/`. **4. Match the required format** Start the file with the two-column header table. Follow the section structure described in [SIP format](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#sip-format). Keep the title under 64 characters. Do not end the title with a period. **5. Open a pull request** Submit the pull request from your fork. A [SIP editor](https://github.com/sei-protocol/sips/blob/main/sips/sip-1.md#sip-editor) reviews the formatting, assigns a number, moves the status to Draft, and opens the official comments thread. > [!TIP] > > From Draft onward, you are responsible for keeping the proposal moving. An editor helps you find the right people to talk to, but does not push the process forward for you. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/general-staking # Sei Blockchain Staking Guide > Participate in Sei's proof-of-stake consensus by staking tokens with validators, with detailed explanations of delegation, rewards, slashing risks, and the unbonding process. Sei uses staking to secure the network and reach consensus through a delegated proof-of-stake (dPoS) mechanism. Validators and delegators who stake help maintain and secure the network. PoS chains rely on staked economic value instead of computational power. This makes them more energy efficient and scalable. Staking also lets you contribute to the health and growth of the Sei ecosystem, and take part in [governance](https://docs.sei.io/learn/general-governance.md) decisions by voting on proposals. In a dPoS system, token holders secure the network by delegating their tokens to validators. Validators produce new blocks and validate transactions. In return for their support, delegators earn a portion of the staking rewards. A validator's weight is based on the number of tokens delegated to them plus their own stake. The Sei protocol incentivizes validators and delegators with staking rewards from gas and genesis token unlocks. All rewards are distributed to delegators in proportion to their delegation, and the validator keeps a percentage as commission. You can view a validator's commission rate on the Sei Dashboard, or query the validator information on-chain. ## How to stake You can stake on Sei through the Sei Dashboard, the `seid` CLI, or API calls. * **Sei Dashboard**: [Staking](https://dashboard.sei.io/stake) * **`seid` CLI**: `seid tx staking [command] [flags]` * **REST or RPC**: `GET/POST /staking/*` ## Key concepts ### Delegation When you delegate tokens to a validator, you earn a portion of the staking rewards. Your delegation adds to the validator's total stake, which helps secure the network. ### Delegators Delegators are token holders who stake their SEI tokens with a validator. Their tokens add to the validator's total stake. Delegators earn a portion of the transaction fees as staking rewards. Staked SEI remains under the control of the delegator, but it cannot be traded freely during the staking period. ### Un-delegation Undelegation is the process of withdrawing your staked tokens. It starts a 21-day unbonding period. During this period, the tokens do not earn rewards and cannot be transferred. After the unbonding period, the tokens return to your wallet and are available for transactions. ### Re-delegation Redelegation lets you move staked tokens from one validator to another without the unbonding period. When you redelegate, the tokens move instantly. However, the new validator is barred from further redelegations for 21 days. This restriction maintains stability and prevents abuse. Each account can have a maximum of 7 redelegations in progress at the same time. A redelegation is not complete until its 21-day period ends. ### Bonding Bonding is the process of committing your SEI tokens to a validator. You can do this through delegation. The tokens are locked and add to the validator's stake. They start to earn rewards immediately. ### Un-bonding Delegators can unbond, or unstake, their SEI tokens. This starts a 21-day period. During this period, the tokens do not earn rewards and cannot be transferred. After this period, the tokens return to the delegator's wallet and become available for transactions. Delegators can redelegate to another validator instantly, without waiting for the unbonding period to end. ### Jailing For network uptime and overall security, validators must meet strict standards and participate in the consensus process consistently. If a validator does not meet these standards, it can be jailed. A jailed validator is excluded from participating in consensus for a period and does not generate rewards during this time. > [!NOTE] > > If a validator misbehaves and is jailed, you can still perform all staking operations with that validator, including claiming rewards, delegating, and undelegating. The system currently does not penalize misbehavior, so validator misconduct has no slashing consequences. ### Slashing Sei does not slash funds. ## Common questions ### How are staking rewards calculated? Staking rewards depend on the total amount of SEI staked and on the validator's performance. Rewards are distributed in proportion to the amount that each delegator stakes. For more details, see [Delegators](#delegators). ### Can I change my validator without un-bonding? Yes. You can use redelegation to move your stake from one validator to another without waiting for the unbonding period to end. For more details, see [Re-delegation](#re-delegation). This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/dev-interoperability # Sei Network Interoperability Framework > Understand how Sei enables seamless interaction between EVM and Cosmos ecosystems through its dual address system and precompiles. > [!NOTE] > > **CosmWasm deployments are frozen, and IBC is disabled in both directions.** Per [Proposal 115](https://seistream.app/proposals/115), no new CosmWasm contracts can be uploaded or instantiated on Sei. Proposals [116](https://seistream.app/proposals/116), [120](https://seistream.app/proposals/120), and [121](https://seistream.app/proposals/121) disabled inbound and then outbound IBC transfers. No asset can be bridged into or out of Sei over IBC. > > The interoperability features on this page apply to **already-deployed** CosmWasm contracts, native Bank Module assets, and Cosmos-SDK modules accessed through precompiles. Tokenfactory is not a supported development path. Do not use native-denom pointers or Bank Module interfaces to build tokenfactory integrations. For new smart contract development, build directly on the EVM. See [SIP-3](https://github.com/sei-protocol/sips/blob/main/sips/sip-3.md), [Tokenfactory is not supported](https://docs.sei.io/cosmos-sdk.md#tokenfactory-is-not-supported), and the [SIP-03 Migration Guide](https://docs.sei.io/learn/sip-03-migration.md). ## Dual address support Sei uses two distinct address types: * **EVM (0x) address:** Ethereum-style addresses with the "0x" prefix. * **Cosmos address:** Bech32 addresses with the "sei1" prefix. Both addresses are derived from the same public key, so your assets work across both formats. You can find your corresponding wallet addresses in the Sei Dashboard. For more details, read our [article on interoperability](https://blog.sei.io/sei-v2-interoperability/). ## Virtual machine interoperability EVM and existing CosmWasm smart contracts coexist on Sei, but they run in different execution environments. This is a problem for users, because their wallets typically support only one execution environment. Developers have the same problem. Existing tools and libraries can interact with only EVM or only Wasm (for example, EthersJS for EVM and CosmJS for Wasm). To connect EVM and Wasm, Sei exposes Cosmos-SDK modules and already-deployed CosmWasm contracts to the EVM through precompiled contracts. New smart contracts on Sei should be deployed directly on the EVM. ## Precompile contracts Sei precompiles are smart contracts built directly into the Sei EVM environment. Users and developers can use them to access Cosmos-SDK functions through the EVM RPC interface. To learn how to use EVM precompiles, see the [Example Usage](https://docs.sei.io/evm/precompiles/example-usage.md) section. ## Example diagram ![Interoperability](https://mintcdn.com/seilabs/szEAtr1JphlH_mVc/assets/interoperability.png?fit=max\&auto=format\&n=szEAtr1JphlH_mVc\&q=85\&s=627916f13ccb6a95abd7ce56fabe2324) *Access to all tokens and contracts on Sei* This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/pointers # Sei Pointer Contracts: Bridging EVM and Cosmos Environments > Understand how Sei's pointer contract system enables seamless asset movement between EVM and Cosmos environments, with implementation patterns for various token types. > [!WARNING] > > **Pointer contracts are primarily a legacy and migration tool.** Per [Proposal 115](https://seistream.app/proposals/115), no new CosmWasm contracts can be uploaded or instantiated on Sei. Because of this, the pointer flow from CW20, CW721, and CW1155 to ERC20, ERC721, and ERC1155 applies only to already-deployed CosmWasm contracts. > > Do not use native-denom pointers to build IBC or tokenfactory integrations. IBC is disabled in both directions, and tokenfactory is not a supported development path. Existing IBC balances may remain accessible through their pointers, but a pointer does not restore the route to the origin chain. For new tokens or NFTs, deploy ERC20, ERC721, or ERC1155 contracts directly on the EVM. Pointer contracts let tokens work in both the EVM and Cosmos environments. A pointer is intended to be efficient and quick to deploy. It is an interpreter between the "languages" of the two execution environments. ## Why pointer contracts ![Without Pointer Contracts](https://mintcdn.com/seilabs/szEAtr1JphlH_mVc/assets/pointer-contracts-without.png?fit=max\&auto=format\&n=szEAtr1JphlH_mVc\&q=85\&s=08760d514ffc07aa7b28cc73d182928d) *A world without pointer contracts* Wallets and clients for feature-rich protocols typically support only one execution environment. EVM wallets handle ERC-20 coins and ERC-721 NFTs. They cannot interact with Cosmos-SDK-based assets, because the token standards and interaction methods are different. Clients built for other protocols, such as Cosmos and its various SDK modules, have the same problem. They cannot directly interact with Ethereum-based contracts or ERC tokens. Pointer contracts solve this problem. They make either protocol interoperable, regardless of the client interface. ![With Pointer Contracts](https://mintcdn.com/seilabs/szEAtr1JphlH_mVc/assets/pointer-contracts-simplified.png?fit=max\&auto=format\&n=szEAtr1JphlH_mVc\&q=85\&s=0bf1c5e2277bb9f00a60b57155bf305a) *With pointer contracts, wallets in either environment can access all tokens* ## How pointer contracts work ![How Pointer Contracts Work](https://mintcdn.com/seilabs/szEAtr1JphlH_mVc/assets/pointer-contracts-how-it-works.png?fit=max\&auto=format\&n=szEAtr1JphlH_mVc\&q=85\&s=c0c0aa401f46a4ba779b7a33e26b3360) *Pointer contracts enable interoperability* Each smart contract can have only **one** associated pointer contract. The pointer contract must be registered on chain when it is deployed. This prevents conflicts and gives a reference point to verify that the paired contract is authentic. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/sei-giga # What Is Sei Giga? > Sei Giga will be the next generation of the Sei protocol following the Giga Upgrade, designed to be the first Multi-Proposer EVM Layer 1. On an internal 40-node devnet it finalized transaction ordering in under 250 ms and sustained more than 5 gigagas per second. It will roll out as in-place upgrades to the live Sei network. Sei Giga will be the next generation of the Sei protocol after the Giga Upgrade. It is designed to be the first Multi-Proposer EVM Layer 1. Every validator will propose transactions at the same time. Consensus will finalize only the order of those transactions. Execution and state attestation will happen after that, off the critical path. On an internal devnet of 40 nodes across 20 regions, Giga sustained more than 5 gigagas per second (5 billion gas per second). At that throughput, ordering finality was under 250 ms. The separate public-testnet roadmap target is 200,000 TPS. Giga will ship as a series of in-place upgrades to the live Sei network, not as a new chain. > [!NOTE] > > **Status (August 2026):** The [Giga whitepaper v2.0](https://arxiv.org/abs/2505.14914) was published in June 2026. The mandatory [Sei v6.6 release](https://github.com/sei-protocol/sei-chain/releases/tag/v6.6.0) brought the first execution (Ares) and storage (Eidos) components to Sei Mainnet on August 4. Ares became the default execution path for upgraded nodes. Eidos storage migration remains phased and operator-controlled. Broader Eidos and Ares work continues, and the Autobahn consensus testnet is the next milestone on the [official roadmap](https://giga.seilabs.io). Functionality not yet activated remains forward-looking and subject to change. ## Sei Giga at a glance | Property | Sei Giga | | - | - | | Architecture | Multi-Proposer (MCP) EVM Layer 1: every validator will propose concurrently | | Consensus | Autobahn BFT: per-validator data lanes with periodic cut-of-tips ordering | | Consensus cadence | Effective steady-state cadence of one committed cut per 1.5 network round trips under pipelining, not submission-to-finality latency | | Finality | Sub-250 ms ordering finality, measured on an internal devnet (whitepaper v2.0, June 2026) | | Throughput | More than 5 gigagas/s sustained on an internal devnet, and a separate roadmap target of 200,000 TPS for the Autobahn testnet | | Execution | Asynchronous, after ordering finality. Block-STM-style parallel EVM with optimistic concurrency control | | State commitment | Lattice-hash divergence digests over each block's write log (no Merkle state root on the hot path) | | State proofs | Block Update Digests (BUDs). Proof cost scales with per-block updates, not total state size | | Transaction ingress | No traditional public mempool. Before Sedna, complete transactions route to validator lanes. The later [Sedna](https://docs.sei.io/learn/sei-giga-specs.md#sedna-private-dissemination) milestone introduces coded symbol bundles | | EVM compatibility | Will be equivalent to Ethereum mainnet except EIP-4844 blobs, `PREVRANDAO`, the state root, the block gas limit, and the fee mechanism | | Security model | Whitepaper model: BFT with `n = 3f + 1` replicas. Live implementation thresholds are stake-weighted. Under the stated assumptions, safety does not depend on network timing, and liveness requires network stabilization | | Delivery | Phased, in-place upgrades of the live Sei network that keep the existing chain ID | ## Why does Sei Giga exist? Giga's design goal is efficient, fast, and fair on-chain trading. This workload needs high throughput, low latency, and bounded censorship and MEV (maximal extractable value) risk. Sei Labs' [Giga announcement](https://blog.sei.io/announcements/giga/) describes the gap: Ethereum mainnet processes on the order of 100 TPS. Comparable web2 systems handle around 100,000 complex transactions per second. Closing that gap on a single decentralized EVM chain means removing three bottlenecks that all single-proposer blockchains share: 1. One leader per block. In Tendermint-style consensus, a single proposer's bandwidth and connectivity cap the whole network's throughput each round. Giga will make every validator a proposer with its own data lane. 2. Consensus waits for execution. Traditional chains execute transactions and agree on the resulting state root inside the consensus loop, so heavy blocks slow finality. Giga will reach consensus on ordering only and execute asynchronously. 3. Merkle write amplification. Per-write Merkle tree updates multiply disk I/O as state grows. Giga will replace the hot-path Merkle tree with a flat key-value store and homomorphic lattice hashes. Sei's [current architecture](https://docs.sei.io/learn/twin-turbo-consensus.md) already pushed the single-proposer model near its limits: approximately 400 ms blocks, [optimistic parallel execution](https://docs.sei.io/learn/parallelization-engine.md), and [SeiDB](https://docs.sei.io/learn/seidb.md). Giga will replace the model instead of tuning it further. ## How will Sei Giga work? Giga is designed to separate the work of a blockchain into four decoupled stages: data dissemination, ordering, execution, and state attestation. Each stage is designed to run concurrently instead of blocking the next. ### Autobahn consensus Giga will order transactions with [Autobahn](https://arxiv.org/abs/2401.10369), a Byzantine Fault Tolerant consensus protocol that separates data dissemination from ordering: * Each validator will continuously stream batches of transactions ("cars") into its own hash-chained lane, in parallel with every other validator. * In the whitepaper's replica-count model, a Proof of Availability (PoA) will certify a batch after `f + 1` replica votes. Under the stated assumptions, this guarantees at least one honest holder. The implementation applies stake-weighted thresholds. * Consensus will periodically commit a cut: a snapshot of the latest certified tip of every lane. Lanes are hash-chained, so committing a tip implicitly commits everything behind it. One consensus decision can therefore finalize many blocks of data at once. * Pipelined slots are designed for an effective steady-state cadence of one committed cut per 1.5 network round trips, versus three full rounds for Tendermint. This is a throughput cadence, not a submission-to-finality guarantee. Validators will vote on compact certificates instead of downloading full blocks first. Single proposer versus Multi-Proposer architecture One leader per height versus every validator proposing concurrently. In Giga, consensus will commit a cut of all lane tips, so a single decision will finalize many blocks of data. The whitepaper's design goal is for dissemination throughput to scale with participating validator bandwidth instead of one leader's connection. It reports more than 50 times Tendermint's throughput in its evaluated setup while retaining the stated BFT assumptions. The full protocol and assumptions are in the [consensus specification](https://docs.sei.io/learn/sei-giga-specs.md#consensus-autobahn). ### Asynchronous execution and state attestation Giga will have two distinct finality signals: * Ordering finality: under the protocol's stated fault and cryptographic assumptions, consensus has fixed the transaction order. This is the sub-250 ms signal. Execution follows it, so a receipt or execution result is not available at this stage. * State attestation finality: validators have executed the block and computed a compact divergence digest over its write log. A two-thirds voting-power quorum has also attested to that digest in a later block. Applications can inspect the execution result after a node produces the receipt. Whether receipt-level confirmation is sufficient depends on the application's risk policy. High-value or cross-chain flows should wait for state attestation finality. Ordering, execution, and attestation run as a pipeline Consensus will keep ordering new blocks while earlier blocks execute and their divergence digests are attested. Ordering finality will be the fast signal. State attestation will follow a bounded number of blocks later. Execution is designed to be deterministic. Nodes that apply the same ordered transactions to the same starting state should compute the same result. Ordering continues while execution catches up. Divergence below one-third of voting power can be isolated. Divergence beyond the Byzantine threshold is designed to pause the chain. Signing two different digests for the same block will be slashable equivocation. ### Parallel execution After ordering is final, each block will execute across all CPU cores with optimistic concurrency control: * All transactions in a block will start to execute in parallel, and each will buffer its writes privately. * A validation phase will detect conflicts (a transaction read or wrote state that an earlier-ordered transaction wrote). It will then re-execute only the conflicting transactions. * The committed result will be identical to sequential execution in block order. Under sustained contention, the engine will fall back to sequential execution with unchanged semantics. Sei Labs' research found that [64.85% of historical Ethereum transactions could have been parallelized](https://blog.sei.io/research-64-85-of-ethereum-transactions-can-be-parallelized/) this way. Contract-level guidance for maximizing parallelism is in the [developer guide](https://docs.sei.io/learn/sei-giga-developers.md#writing-parallel-friendly-contracts). ### Flat storage and lattice hashes Giga's storage layer is designed for a network that will produce petabytes of new data per year at full load: * Flat key-value store: every account and storage slot will map directly to an entry in a log-structured merge (LSM) tree. There will be no per-write Merkle path updates. Hot state will be served from RAM. Disk writes will be asynchronous, with a write-ahead log for crash recovery. * Lattice-hash commitments: instead of a state root, each block's write log will be committed with a homomorphic multiset hash (LtHash). Validators will attest to this digest. Disputes will be resolved by bisecting chunked digests to find the first divergent write. * Block Update Digests (BUDs): Merkle proofs over per-block updates will replace global state proofs. Proof cost will then scale with how much a block changed, not with the total size of the state. Light clients and bridges will consume these attested digests. * Tiered storage: recent, hot data will live on local high-performance SSDs. Historical data will move to a distributed columnar store for analytics and audit workloads. Sei v6.6 shipped the first [Eidos](#how-will-sei-giga-ship) support for separating EVM history into dedicated storage. Node migration remains phased and operator-controlled. The FlatKV and lattice-hash state-commitment model described above remains a later phase. Its code is operator-gated and off by default. Details are in the [storage specification](https://docs.sei.io/learn/sei-giga-specs.md#storage). ## What will change from today's Sei? | Layer | Sei today (v2) | Sei Giga | | - | - | - | | Block proposal | One proposer per height | Every validator will propose concurrently in its own lane | | Consensus | [Twin Turbo Consensus](https://docs.sei.io/learn/twin-turbo-consensus.md) (optimized Tendermint), \~400 ms | Autobahn: PoA-certified lanes with cut-of-tips ordering, effective 1.5-round-trip steady-state cadence, sub-250 ms measured ordering finality | | Execution | Interleaved with consensus, optimistically parallel ([OCC](https://docs.sei.io/learn/parallelization-engine.md)) | Fully asynchronous after ordering finality, with Block-STM-style OCC | | State commitment | Merkle app hash ([SeiDB](https://docs.sei.io/learn/seidb.md): memiavl) | Lattice-hash divergence digests attested after execution, with no Merkle root on the hot path | | State proofs | IAVL/Merkle proofs | Block Update Digests (BUDs) with a governance-set proof window | | Mempool | Gossiped mempool | No public gossiped mempool. Complete transactions route to lanes before Sedna. The later [Sedna](https://docs.sei.io/learn/sei-giga-specs.md#sedna-private-dissemination) milestone adds coded-fragment ingress | | Fee model | EIP-1559-style base fee + priority fee to the proposer | Three-part fees (1559-style execution fee, ordering fee, distribution fee), with tips socialised across validators | | Chain surface | EVM + legacy Cosmos modules | EVM-only stack (through [SIP-3](https://docs.sei.io/learn/sip-03-migration.md)) | ## What will happen to a transaction on Sei Giga? Giga will have no traditional public mempool. The initial Autobahn flow and the later Sedna flow differ: * Before Sedna activates, an RPC node will route the complete signed transaction to a validator proposal lane. * After the [Sedna](https://docs.sei.io/learn/sei-giga-specs.md#sedna-private-dissemination) milestone activates, ingress will distribute coded symbol bundles across selected lanes. Executors will reconstruct the transaction after the finalized symbols cross the decode threshold. The resulting privacy depends on the coding parameters and adversary assumptions described in the Sedna paper. Transaction journey from submission to attestation The initial Autobahn transaction flow before Sedna. An RPC node routes the complete signed transaction to a lane, consensus fixes its order, execution produces the receipt, and attestation follows. The diagram and steps below describe the initial Autobahn flow before Sedna: 1. You will send a signed transaction to an RPC node, which will route it toward a validator. Allocation will be stake-weighted. For censorship resistance, you will be able to submit the same transaction to several validators. 2. The validator will append the transaction to its next batch and chain that batch into its lane. 3. When the batch reaches the availability threshold, it will hold a Proof of Availability, and the lane tip will advance. The threshold is `f + 1` replicas in the whitepaper model and stake-weighted in the implementation. 4. Pipelined consensus will commit a cut of all lane tips. Your transaction's position will then be fixed. This is ordering finality. On the internal devnet, it arrived in under 250 ms. 5. Each executing validator or full node will merge the cut into one sequence with the deterministic tip-priority rule. It will drop duplicates by hash and execute the result in parallel. Duplicate copies will not execute and will not pay execution costs twice. 6. Validators will attest to the block's divergence digest in a later block. This is state attestation finality. The [developer guide](https://docs.sei.io/learn/sei-giga-developers.md#finality-on-giga-which-signal-to-wait-for) explains which finality signal to use for each use case. ## How will Giga handle MEV and fees? Multi-Proposer chains remove the single sequencer's private block-building monopoly. However, they create new MEV channels of their own: same-tick duplicate stealing, proposer-to-proposer orderflow deals, and races around PoA latency. Sei Labs formalized these in a [dedicated MEV paper](https://arxiv.org/abs/2511.13080). Giga will address them at the protocol level: * The merge rule will be deterministic. The order of transactions within a committed cut will be a pure function of lane contents. Lanes will sort by their highest included tip, intra-lane order will be preserved, and duplicates will be dropped. Arrival timing and proposer discretion will have no effect on the order. * Under the proposed design, priority fees from each epoch will be pooled and distributed to validators by stake and measured liveness. They will not be paid directly to the carrying proposer. Copying a high-tip transaction into another lane would not earn an extra protocol fee. Routing through a specific proposer would not receive a direct protocol payment. Side payments remain outside the current specification. A tip determines position under the protocol's merge rule. * Fees will come in three parts: an EIP-1559-style execution fee, a strictly enforced ordering fee (the priority fee), and a distribution fee on duplicate submissions. Duplicates will be dropped at merge time, and only one copy will execute. The other copies will receive a partial tip refund. * Sedna is intended to add pre-execution privacy. Transactions will travel through [Sedna](https://docs.sei.io/learn/sei-giga-specs.md#sedna-private-dissemination) as coded symbol bundles spread across selected lanes. The privacy guarantee will depend on the coding parameters and the number of colluding lanes. For the full mechanism, see [MEV and fee design](https://docs.sei.io/learn/sei-giga-specs.md#mev-and-fee-design). ## How will Sei Giga ship? Giga will arrive as a sequence of named upgrades to the live Sei network ([Sei Labs, July 2026](https://blog.sei.io/the-giga-whitepaper-2/)). The canonical tracker is [giga.seilabs.io](https://giga.seilabs.io). Status as of August 2026: Giga roadmap progress track The eleven roadmap milestones from giga.seilabs.io. Ares is the default execution path on upgraded v6.6 nodes, Eidos migration remains phased, and the Autobahn testnet is next. | Milestone | Scope | Status | | - | - | - | | Giga whitepaper v1 | Initial specification ([arXiv 2505.14914](https://arxiv.org/abs/2505.14914)), MEV formalization ([arXiv 2511.13080](https://arxiv.org/abs/2511.13080)) | Complete | | Internal devnet | Geo-distributed devnet sustaining [5 gigagas/s with Autobahn](https://seiresearch.io/articles/sei-giga-achieving-5-gigagas-with-autobahn-consensus) | Complete | | Giga whitepaper v2 | Revised spec (June 2026): sub-250 ms finality, Sedna, BUDs, fee model, post-quantum path | Complete | | Eidos upgrade | Storage rebuild. Sei v6.6 shipped the first migration support, and node rollout and broader storage work continue | In progress (first components shipped) | | Ares upgrade | Execution rebuild. The first phase activated in v6.6 with per-transaction v2 fallback, and broader execution work continues | In progress (first phase live) | | SIP-3 | Pre-Giga consolidation to an EVM-only stack (see the [migration guide](https://docs.sei.io/learn/sip-03-migration.md)) | In progress | | Autobahn testnet | Multi-Proposer, order-first consensus with asynchronous state on a public testnet, with a target of 200,000 TPS and 400 ms finality. A final consensus whitepaper will accompany it | Coming soon | | Autobahn mainnet | The live Sei network will upgrade to Autobahn consensus | Coming soon | | Sedna upgrade | Private transaction dissemination (the "private mempool" milestone): transaction fragments will spread across lanes and be reassembled only after ordering | Coming soon | | Hermes testnet | Next-generation consensus beyond Autobahn (whitepaper forthcoming) | Coming soon | | Hermes mainnet | Hermes will merge into Sei Mainnet | Coming soon | Sei v6.6 brought the first Ares and Eidos components to Sei Mainnet at upgrade height `224201091` on August 4, 2026. Ares became the default execution path for upgraded nodes. Eidos migration remains phased and operator-controlled. Autobahn consensus, FlatKV and lattice-hash state commitment, and Sedna remain separate milestones or operator-gated work. Node operators should follow the [release-specific configuration reference](https://docs.sei.io/node/node-operators.md#giga-storage-and-giga-executor) and not infer settings from roadmap status. > [!WARNING] > > There is no public Giga testnet yet (as of August 2026). There is therefore no separate Giga chain ID, RPC endpoint, or faucet. Anything that claims otherwise is not official. Current network endpoints remain those of [Sei Mainnet and Sei Testnet](https://docs.sei.io/learn/dev-chains.md). ## Performance claims and targets Each row gives its source and date. Devnet figures are Sei Labs' internal measurements. Consensus comparisons are whitepaper claims. Testnet figures are targets, not measurements. | Metric | Value | Context | Source (date) | | - | - | - | - | | Throughput | >5 gigagas/s sustained | Internal devnet, 40 nodes across 20 regions | [Whitepaper v2.0](https://arxiv.org/abs/2505.14914) (June 2026) | | Ordering finality | \<250 ms | Same devnet (v1 reported \<400 ms, and the Feb 2025 devnet \~700 ms across 4 regions) | Whitepaper v2.0 (June 2026) | | Consensus cadence | 1.5 round trips (vs 3 in Tendermint) | Effective steady-state cadence under Autobahn pipelining, not per-transaction latency | Whitepaper §1.1 and §3.4 (2026) | | Throughput vs Tendermint | >50× | Autobahn vs single-proposer Tendermint | Whitepaper §1.1 (2026). See also the [Autobahn explainer](https://blog.sei.io/autobahn-sei-gigas-multi-proposer-approach-to-blockchain-consensus) (Apr 2025) | | Block production | \~70× (180 blocks vs 2.5) | Multi-Proposer lanes vs single proposer | Whitepaper §1.1 (2026) | | Parallelizable EVM workload | 64.85% | Historical Ethereum transactions | [Sei research](https://blog.sei.io/research-64-85-of-ethereum-transactions-can-be-parallelized/) (2024) | | Autobahn testnet target | 200,000 TPS, 400 ms finality | Public testnet milestone | [giga.seilabs.io](https://giga.seilabs.io) (May 2026) | ## Learn more > [card] [Technical specification](https://docs.sei.io/learn/sei-giga-specs.md) > > The full protocol spec: Autobahn, asynchronous execution, storage, MEV and fee design, security model, and glossary. > [card] [Developer guide](https://docs.sei.io/learn/sei-giga-developers.md) > > What will change for contracts and dApps: finality semantics, fees, proofs, and parallel-friendly patterns. > [card] [Giga whitepaper v2.0](https://arxiv.org/abs/2505.14914) > > The canonical specification on arXiv, by Marsh, Landers, Jog, and Ranchal-Pedrosa (June 2026). > [card] [Official roadmap](https://giga.seilabs.io) > > Live milestone tracker for the Giga upgrade. > [card] [SIP-3 migration](https://docs.sei.io/learn/sip-03-migration.md) > > The EVM-only consolidation that clears the path to Giga. > [card] [Today's architecture](https://docs.sei.io/learn/twin-turbo-consensus.md) > > Twin Turbo Consensus, the parallelization engine, and SeiDB: the system that Giga will replace. > [!WARNING] > > **Disclaimer:** The roadmap is subject to change based on development progress, market feedback, and other factors. Actual timelines, figures, and outcomes may vary. *Last updated August 2026* This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/sei-giga-specs # Sei Giga Technical Specification > The Sei Giga protocol specification: Autobahn consensus with per-validator lanes and whitepaper f+1 Proofs of Availability, asynchronous execution, Block-STM parallel EVM, flat lattice-hashed storage, BUD state proofs, fee design, and the security model. This page specifies the Sei Giga protocol as defined in the [Giga whitepaper v2.0](https://arxiv.org/abs/2505.14914) by Marsh, Landers, Jog, and Ranchal-Pedrosa (June 2026). It also includes implementation notes from the [sei-chain](https://github.com/sei-protocol/sei-chain) v6.6 release and its Sei Mainnet activation (August 2026). The specification below is forward-looking and subject to change until the corresponding upgrades activate on the Sei network. For a conceptual introduction, start with the [Sei Giga overview](https://docs.sei.io/learn/sei-giga.md). For practical guidance, see the [developer guide](https://docs.sei.io/learn/sei-giga-developers.md). ## Protocol at a glance | Property | Specification | | - | - | | Chain type | Permissionless Proof-of-Stake EVM Layer 1. SEI will remain the native gas, fee, and staking asset | | Fault model | Whitepaper model: `n = 3f + 1` replicas, up to `f` faulty. The implementation weights votes by stake | | Synchrony assumption | Partial synchrony: under the stated fault and cryptographic assumptions, safety does not depend on network timing. Liveness resumes after network stabilization | | Consensus | Autobahn: per-validator data lanes with leader-driven cut-of-tips ordering | | Data availability quorum | Whitepaper: `f + 1` replica votes (Proof of Availability). Implementation thresholds are stake-weighted | | Ordering quorum | Whitepaper: `n - f` prepare/commit votes. Implementation thresholds are stake-weighted | | Consensus cadence | Effective steady-state cadence of one committed cut per 1.5 network round trips under pipelining, not submission-to-finality latency | | Execution | Asynchronous, post-ordering, and deterministic, with Block-STM-style optimistic concurrency control | | State attestation | Two-thirds voting-power signatures over per-block lattice-hash divergence digests, included in a later block | | State commitment | Homomorphic multiset hash (LtHash) over the block write log, with no Merkle state root on the hot path | | State proofs | Block Update Digests (BUDs) + SuperBUDs, governance-configurable proof window | | Transaction ingress | No traditional public mempool. Before Sedna, complete transactions route to validator lanes. The later [Sedna](#sedna-private-dissemination) milestone introduces coded symbol bundles | | Transaction encoding | Flat, length-prefixed, single-pass zero-copy decoding (not RLP) | | EVM compatibility | Ethereum-equivalent except EIP-4844, `PREVRANDAO`, state root, block gas limit, fee mechanism | | Fee model | Three-part: EIP-1559-style execution fee + ordering fee (priority) + distribution fee (duplicates) | | Measured performance | >5 gigagas/s, sub-250 ms ordering finality (internal devnet of 40 nodes across 20 regions, reported in whitepaper v2.0, June 2026) | ## Network and security model The equations in the whitepaper use a replica-count model with `n = 3f + 1`, of which at most `f` replicas are Byzantine. The `sei-chain` implementation applies stake-weighted voting thresholds. When you reason about the live network, do not interpret `f` as a raw validator count. Under the whitepaper's fault and cryptographic assumptions, even an extended network delay does not allow two conflicting proposals to receive valid commit certificates. The network may pause during a disruption and resume when message delays return within the protocol's timing bounds. * Safety: no two conflicting proposals can both obtain a valid commit certificate in the same consensus slot. Attesting to two different divergence digests for the same finalized block will be slashable equivocation. This is because quorum intersection guarantees that at least one honest validator would have to sign both. * Censorship resistance: when a proposal reaches the availability threshold, at least one honest replica stores its data under the stated assumptions. The threshold is `f + 1` replicas in the whitepaper model and stake-weighted in the implementation. A correct leader must then include the proposal in a future cut. This is designed to limit censorship to a finite delay. Users will also be able to submit a transaction to multiple validators at once ([deduplicated at merge](#mev-and-fee-design), with a partial tip refund). * Execution divergence: divergence below one-third of voting power can be isolated. Divergence beyond the Byzantine threshold is designed to pause the chain. * Staking: validators will continue to bond SEI and can be slashed for malicious behavior. The complete slashing schedule, reward functions, and tokenomics for Giga are deferred to future work. For today's staking parameters, see [Staking](https://docs.sei.io/learn/general-staking.md). ## Consensus: Autobahn Sei Giga will order transactions with [Autobahn](https://arxiv.org/abs/2401.10369) (Giridharan, Suri-Payer, Abraham, Alvisi, and Crooks, 2024), a BFT protocol that decouples data dissemination from ordering. The paper positions it between view-based and DAG-based protocols. View-based protocols (HotStuff, Tendermint) can stall during network "blips." DAG-based protocols (Narwhal-style) can add good-case latency. Under the paper's evaluated conditions, Autobahn combines an asynchronous data layer with partially synchronous ordering and reports DAG-class throughput at roughly half the latency. ### Data dissemination: lanes and Proofs of Availability * Every validator `r` will maintain its own lane: an append-only, hash-chained sequence of transaction batches (called cars). A proposal is the tuple `Prop = ⟨pos, batch, parentRef⟩`, signed by `r`. Here, `pos` is the lane sequence number, and `parentRef` is the hash of the previous proposal in the same lane. * Validators that receive a proposal will verify that it extends the lane correctly and return a signed vote over its digest. When the proposer collects `f + 1` matching votes, it will assemble a Proof of Availability (PoA), a certificate that the data is retrievable. * `f + 1` is enough because any such quorum contains at least one correct replica that held the full data when it voted. That replica serves the data until all correct replicas have it. Giga's design deliberately keeps the smaller quorum (instead of `2f + 1`) because commitment itself triggers full replication along the execution path. A larger quorum would only add certification latency. * The latest proposal in a lane that holds a PoA is the lane's tip. Lanes are hash-chained, so certifying a tip implicitly attests the availability of every earlier proposal in that lane. Earlier entries do not need to be certified again. Lanes of chained proposals certified by Proofs of Availability, committed as a cut of tips Each validator will chain batches into its own lane. The whitepaper uses f + 1 replica votes for availability. The implementation applies stake-weighted thresholds. All validators will disseminate batches in parallel without waiting for consensus. The design aims to move dissemination off the ordering critical path and use aggregate validator bandwidth instead of one leader's uplink. Actual bottlenecks depend on workload, network conditions, and implementation limits. ### Ordering: cuts of tips Consensus will periodically fix a global order by committing a cut, a vector of every lane's current certified tip: 1. Prepare. The slot's leader (chosen by stake-weighted selection, as in Tendermint) will bundle the latest certified tips into a cut proposal. Replicas will validate the PoAs and broadcast prepare votes. At `n - f` votes, these votes form a PrepareQC. 2. Commit. Replicas will exchange commit votes over the PrepareQC. In the whitepaper's replica-count model, a CommitQC formed from `n - f` votes finalizes the cut. 3. Pipelining. Slots will overlap. As soon as replicas see the Prepare message for slot `s`, they can begin slot `s + 1`. The next leader may start proposing while the previous cut is still in its commit phase. With quadratic communication and pipelining, the design targets an effective steady-state cadence of one committed cut per 1.5 network round trips. Tendermint uses three full rounds. This cadence is not a per-transaction finality guarantee. Pipelined consensus slots with prepare and commit phases Slots will overlap: replicas will begin slot s+1 as soon as they see the Prepare message for slot s. The target is an effective steady-state cadence of one committed cut per 1.5 network round trips, not per-transaction latency. Committing one cut will finalize every uncommitted proposal in every lane up to the referenced tips. A single consensus decision can therefore commit many blocks' worth of data at once. For this reason, the whitepaper anticipates roughly 70 times higher block production than the single-proposer design (180 versus 2.5 blocks per second). Validators will vote on compact certificates only. A replica that is missing batch data will fetch it after commit, off the critical path. ### Leader failure and recovery If a leader fails to make progress, replicas will fall back to a standard view change. A timeout certificate will elect a new leader, and the protocol will resume. Lane dissemination is designed to continue during the view change. This confines most of the disruption to ordering latency. The Autobahn paper calls this "seamless" recovery from blips and contrasts it with the post-asynchrony recovery cost of chained-HotStuff-style protocols. Two consensus upgrades beyond launch are already specified: * Ambulance ([arXiv 2606.25099](https://arxiv.org/abs/2606.25099)) replaces the timeout race with a "protocol-rigged race" among replicas. Non-leader replicas do useful persistence work in parallel on candidate cuts built from the same certified tips. If a leader is only slow (I/O contention, garbage collection, routing trouble), the slot can finish from existing recovery state. It does not have to wait for a full timeout. Ambulance is planned as a core part of a future upgrade. * Hermes is a next-generation consensus protocol on the [official roadmap](https://giga.seilabs.io). Its whitepaper has not been published yet. ## Execution ### Two finality notions Giga will separate what consensus decides from what execution produces: | Finality | Definition | When it holds | | - | - | - | | Ordering finality | Consensus has finalized the unique total order of transactions induced by a committed cut | Sub-250 ms, measured on an internal devnet (not submission-to-receipt latency) | | State attestation finality | A later finalized block includes a valid two-thirds voting-power attestation of the block's divergence digest | A bounded number of blocks later (lag `x` depends on execution timing) | Unless stated otherwise, latency claims in Giga materials refer to ordering finality. Under the protocol's stated fault and cryptographic assumptions, ordering finality fixes the transaction sequence. State attestation finality adds a BFT-signed confirmation of the execution results. Execution happens between these two protocol signals. A receipt becomes available only after a node executes the ordered transaction. Ordering finality alone does not give an execution result. Divergence digest of block n is attested inside a later block Execution results will be committed as a lattice-hash digest rather than a state root. Validators will attest to that digest a bounded number of blocks later. ### Deterministic block transition For each finalized block, the protocol specifies the canonical transition `Apply(S_prev, context, block) → (S_new, receipts, gas, writeLog)`. Given the same pre-state, block context, ordered transactions, execution semantics, and serializable parallel schedule, conforming executors should derive byte-identical results without communicating. A transaction revert is itself an execution result and does not invalidate the rest of the block. Because of this intended determinism, execution can run off the consensus critical path. The execution client is deliberately narrow. It processes transactions and nothing else, with no tracing or log search on the hot path. Incoming blocks are pre-processed in parallel (parsing, sender recovery, signature verification), while exactly one block executes at a time. Receipt generation and indexing happen after execution, so block `n + 1` can start while block `n` post-processes. ### Parallel execution: Block-STM-style OCC Within a block, transactions execute concurrently under optimistic concurrency control (the [Block-STM](https://arxiv.org/abs/2203.06871) approach): * A later transaction `t_j` depends on an earlier `t_i` when `t_i`'s write set overlaps `t_j`'s read or write set. The block's total order keeps this dependency relation acyclic. * All transactions start to execute in parallel, and each buffers its writes privately. For each transaction, a validation phase checks whether any earlier-ordered transaction committed a write into its read or write set after it began. Conflicting transactions are rolled back and re-executed. * The committed result is provably identical to sequential execution in block order (a "valid parallel schedule"). When contention is low, most transactions commit on their first attempt. Under sustained contention, the engine may fall back to sequential execution with unchanged semantics. In `sei-chain`, the scheduler retries a transaction up to 10 times before it falls back to the sequential path. Block-STM optimistic concurrency: parallel execution with conflict re-execution All transactions in a block will start in parallel with private write buffers. Validation will re-execute only those whose reads collided with an earlier transaction's writes. Sei Labs measured that [64.85% of historical Ethereum transactions could have been parallelized](https://blog.sei.io/research-64-85-of-ethereum-transactions-can-be-parallelized/) under this model. Contract-design guidance for maximizing parallelism is in the [developer guide](https://docs.sei.io/learn/sei-giga-developers.md#writing-parallel-friendly-contracts). ### Transaction encoding Giga will replace nested RLP with a flat, length-prefixed encoding designed for single-pass, zero-copy decoding: * Fields (type, chain ID, sender, recipient, value, nonce, gas limit, signature, access list) appear in a fixed order. * Variable-length fields carry a one-byte length prefix. * A marker byte signals contract creation. * All remaining bytes are the calldata. A parser reads each transaction in one pass, with no allocation-heavy tree construction. This matters at decode rates of hundreds of thousands of transactions per second. ## EVM compatibility Sei Giga's EVM will be mostly equivalent to Ethereum mainnet. You will write contracts in standard Solidity or Vyper and deploy them with standard tooling. | Exception | What will differ on Giga | | - | - | | EIP-4844 (blob transactions) | Will not be supported. Giga will remain an L1 and will not carry rollup blob data | | `PREVRANDAO` | Will not be supported with Ethereum semantics (no beacon-chain randomness) | | State root | Blocks will carry no Merkle state root. State will be attested through [divergence digests](#lattice-hash-divergence-digests) and proven with [BUDs](#block-update-digests-buds) | | Block gas limit | Not a fixed Ethereum-style per-block constant. Lane and consensus parameters will bound throughput | | Transaction fee mechanism | Three-part model (below) instead of Ethereum's exact EIP-1559 burn semantics | ### Fee model | Component | What it prices | Mechanism | | - | - | - | | Execution fee | Gas consumed by execution | EIP-1559-style dynamic base fee driven by demand | | Ordering fee | Position in the merged order | Priority fee, strictly enforced by the [deterministic merge rule](#mev-and-fee-design) | | Distribution fee | Duplicate copies submitted for censorship resistance | Will price each extra lane slot that a duplicate occupies. Only one copy will execute, with a partial tip refund | ## Storage Giga's storage layer is designed for petabyte-per-year data production at full 5-gigagas load, while validator hardware stays practical. ### Flat state, RAM-first * Every account, storage slot, and global variable will map directly to an entry in a log-structured merge (LSM) tree. Writes will skip per-write Merkle path updates entirely. Flushes will therefore stay batched and sequential, and nothing will be re-hashed on the write path. * Frequently accessed state will be held in RAM, and reads will be served from memory in the common case. All disk writes will be asynchronous and will exist for durability only. An append-only write-ahead log (WAL) will protect them and will be replayed on crash recovery. * Storage will be tiered. Recent and hot data will sit on local high-performance SSDs. Historical data will move to a distributed columnar store built for analytical queries and audit workloads. Giga storage: RAM-first flat key-value state with WAL, tiers, and lattice-hash commitments In the proposed architecture, the write path avoids Merkle-tree updates. State lives in a RAM-first flat store with an append-only WAL. Commitments come from a homomorphic lattice hash over each block's write log. ### Lattice-hash divergence digests There will be no state root. Instead, Giga will commit to execution results with a homomorphic multiset hash (LtHash, by Lewi, Kim, Maykov, and Weis): `LH(X) = Σ h(x) mod q`. Its collision resistance rests on lattice assumptions (short integer solution style). For each block `n`: * The committed multiset `X_n` will contain one record per surviving write (after intra-block last-write-wins resolution). It will also contain one record per transaction receipt (position-bound) and one gas-accounting record. Each record will be domain-separated by type tag and height. * The block digest is `d_n = LH(X_n)`. Validators will attest to the compact commitment `D_n = H(enc(n, d_n))`. The full vector `d_n` will be exchanged only during disputes. * Disputes will resolve by bisection. The key space partitions into ranges whose chunk digests sum to the write component of `d_n` by construction. Divergent executors will therefore compare chunk digests and narrow the search. They will replay only the affected range to find the first divergent write, receipt, or gas discrepancy. The homomorphism makes this practical. Digests update incrementally as writes commit, in any order, and no tree walk is involved. ### Block Update Digests (BUDs) BUDs will restore externally verifiable state proofs (the role `eth_getProof` plays on Ethereum). Their cost will be proportional to per-block update volume, not total state size: * Every state entry will carry an 8-byte last-modified height and a 1-byte serialization version. For each block `n`, the BUD `U_n` is the Merkle root over the lexicographically sorted leaves `(key, newValue, n, prevHeight)` of that block's writes. Validators will attest `U_n` on the same delayed two-thirds voting-power schedule as the divergence digest. * A membership proof will be a Merkle path to an attested `U_n`. It will certify that `key` held `value` immediately after block `n`. It will also record when the key previously changed. Two proofs at heights `a < b` whose `b`-leaf records predecessor `a` will prove that the key was unmodified throughout `(a, b)`. * SuperBUDs will aggregate BUDs over exponentially growing aligned windows (branching base `e` and maximum level `L_max`, both governance parameters). Provers will then cover long ranges with logarithmically many digests. The guaranteed proof window will be `η = e^L_max` blocks. Archive nodes can serve older claims, but those claims fall outside the protocol guarantee. * Touch transactions will rewrite only a key's last-modified metadata. This will give long-untouched keys a fresh proof anchor. Deletions will leave tombstones, which anchor exclusion proofs and are garbage-collected after `η`. * At the activation height, a one-time synthetic write log will bootstrap every existing key. The system will reach steady state after `η` blocks. BUD trees deliberately use a classical hash, because the short proof window keeps classical collision resistance sufficient. The trees will also fall under the same [post-quantum migration schedule](#post-quantum-migration) as the rest of the protocol. Block Update Digests: per-block Merkle roots aggregated into SuperBUD windows Every block will get a Merkle root over only its own updates. SuperBUDs will aggregate those roots over exponentially sized windows so provers can cover long ranges with a few digests. Light clients, bridges, and any external verifier will consume BUD proofs against attested digests instead of Merkle-Patricia proofs against a state root. ## Networking and transaction ingress * Nodes will communicate over direct, authenticated point-to-point connections instead of network-wide gossip. Consensus messages, lane proposals, votes, and certificates will stream over dedicated channels with per-channel rate and size limits. * There will be no traditional public mempool. Before Sedna activates, RPC nodes will route complete signed transactions into validator lanes. After the later [Sedna](#sedna-private-dissemination) milestone activates, ingress will distribute coded symbol bundles across selected lanes. In the current implementation, EVM senders map deterministically to a validator shard. The implementation proxies `eth_sendRawTransaction` and pending-nonce queries to that shard's owner. * For censorship resistance, users will be able to submit the same transaction to multiple validators. Admission will be rate-limited: each validator will include at most one copy of a given transaction per epoch. Duplicates will be dropped deterministically at merge time, and only one copy will execute. Unexecuted duplicates will pay the [distribution fee](#fee-model) and earn a partial tip refund. * Four node roles will exist: * Validators will run consensus and execution. * Full nodes will run RPC plus execution for the read path. * Light nodes will run RPC only. * Data nodes will serve recent data. ### Sedna: private dissemination [Sedna](https://arxiv.org/abs/2512.17045) is planned as Giga's private dissemination layer, a later roadmap milestone after Autobahn mainnet. Senders would encode a committed transaction payload into verifiable rateless coded symbols and send addressed bundles to selected proposer lanes. Executors would reconstruct the payload after finalized symbols cross the decode threshold. The paper calls this "until-decode privacy." Its guarantees depend on the coding parameters and the number of colluding lanes. The Sedna paper compares the design with threshold-encrypted mempools. It argues that the design can give similar pre-execution privacy without an extra decryption round, and with less per-lane bandwidth. The companion incentive mechanism [PIVOT-K](https://arxiv.org/abs/2603.17614) would concentrate a sender-funded bounty on bundles that trigger decoding and ratchet away from lanes that withhold. ## MEV and fee design Multi-Proposer architectures remove the single block-builder's private ordering monopoly. However, they introduce their own MEV (maximal extractable value) channels, formalized in [MEV in Multiple Concurrent Proposer Blockchains](https://arxiv.org/abs/2511.13080). These channels are same-tick duplicate stealing, proposer-to-proposer orderflow deals, and timing races around PoA latency. Same-tick duplicate stealing means copying a visible transaction into your own lane to win the merge. Giga's countermeasures will live at the protocol level. ### Deterministic merge rule For each committed cut, every node will derive the executable sequence with the same pure function: 1. Take each lane's newly committed transactions, meaning those not in any previous cut, in their intra-lane order. 2. Sort lanes in descending order of the maximum priority fee among their new transactions. Break ties by replica index. 3. Concatenate the lanes and deduplicate by transaction hash. Only the first occurrence survives. Tip-priority merge rule: sort lanes by highest tip, keep intra-lane order, deduplicate The merged order will be a pure function of finalized lane contents. Lanes will sort by their highest included tip, order inside each lane will not change, and the first occurrence of a hash will win. The merged order is designed to depend only on finalized lane contents, not on arrival timing, wall clocks, or a node's post-consensus discretion. This is intended to reduce the opportunities for post-consensus reordering at the protocol level. ### Socialised tips All priority fees collected in an epoch (net of duplicate refunds) will be pooled. They will be distributed to validators pro rata by `stake × liveness`. Liveness will be the measured fraction of observable duties performed: consensus votes included in committed QCs, certified lane blocks produced, and signed state attestations. Governance will set the duty weighting. Payouts will be shared with delegators in the same way as block rewards. * Under the proposed fee design, copying a high-tip transaction into another lane would not capture its fee. This is intended to reduce the protocol-level revenue motive for duplicate stealing. * Validator revenue from the protocol would be independent of orderflow routing. This would reduce the protocol-level incentive to steer users to specific proposers. * Withholding or lazy participation will directly reduce a validator's payout. The whitepaper summarizes the design this way: the priority fee will buy ordering, not a relationship with a particular proposer. Side payments for intra-lane position are out of protocol scope for now and belong to the forthcoming fee-mechanism work. ## Post-quantum migration The proposed Giga architecture includes a survivability path for a sudden ECDSA break ("Q-day") that is designed to avoid a chain-wide account reset: * Before a governance-set cutoff height, any account will be able to register a post-quantum verification key. The registration (scheme identifier, PQ public key, migration nonce, optional activation height) will be signed with the account's current classical key. * During the transition window, the chain would accept classical or dual classical+PQ signatures. After the cutoff, accounts that had not registered a post-quantum key could no longer authorize transactions with their existing ECDSA key. The proposed path does not include public-key recovery or new classical EOAs after that point. Onboarding would continue through pre-registration, contract wallets, or a later native PQ account format. * The designated short-term scheme is ML-DSA (FIPS 204). The whitepaper states explicitly that this is an emergency path and is not fast enough for Giga's throughput. Post-quantum cryptography at Giga scale is open research. ## Performance claims and targets | Metric | Value | Context | Source (date) | | - | - | - | - | | Sustained throughput | >5 gigagas/s | Internal devnet: 40 nodes across 20 regions | Whitepaper v2.0 (June 2026) | | Ordering finality | \<250 ms | Same devnet. Whitepaper v1: \<400 ms. Feb 2025 devnet: \~700 ms, 4 regions | Whitepaper v2.0 (June 2026) | | Consensus cadence | 1.5 round trips vs 3 | Effective steady-state cut cadence under Autobahn pipelining, not per-transaction latency | Whitepaper §1.1 and §3.4 (2026) | | Throughput vs Tendermint | >50× | Multi-Proposer dissemination vs single leader | Whitepaper §1.1 (2026) | | Block production | \~70× (180 blocks vs 2.5) | All-lanes-at-once commits vs sequential single blocks | Whitepaper §1.1 (2026) | | Autobahn testnet target | 200,000 TPS at 400 ms finality | Public testnet milestone | [giga.seilabs.io](https://giga.seilabs.io) (May 2026) | The whitepaper publishes no fixed block gas limit, block size, or validator hardware specification for Giga. The roadmap's Autobahn testnet milestone includes the final consensus specification. Figures you may see for today's network (block times, gas limits) describe the [current architecture](https://docs.sei.io/learn/twin-turbo-consensus.md), not the anticipated architecture under Giga. ## Implementation snapshot (Sei v6.6 activation, August 2026) Giga is implemented in the open in [sei-protocol/sei-chain](https://github.com/sei-protocol/sei-chain). There is no separate Giga repository. The mandatory [v6.6 release](https://github.com/sei-protocol/sei-chain/releases/tag/v6.6.0) brought the first Ares and Eidos components to Sei Mainnet at height `224201091` on August 4, 2026. Ares became the default execution path for upgraded nodes. Eidos migration remains phased and operator-controlled. Broader work continues, and later Giga components remain inactive: | Area | Current state | | - | - | | Ares, first phase | Active on Sei Mainnet after v6.6. Eligible transactions use the Ares path. Unsupported cases rerun individually through the v2 fallback | | Giga executor defaults | From v6.6, newly generated configurations and configurations that omit the fields enable the Giga executor and OCC. Explicit `false` values opt out | | Autobahn | Implemented in `sei-tendermint/autobahn` (lanes, PoAs, prepare/commit QCs, timeout certificates). It ships in the binary but stays disabled until network activation. The committee is capped at 100 validators. The implementation uses a stake-weighted availability threshold that corresponds to the whitepaper's `f + 1` model | | Operator surface | `autobahn-config-file` in `config.toml`, with a committee file generated by `seid tendermint gen-autobahn-config`. Consensus state persists across restarts to prevent double-signing | | RPC under Autobahn | `eth_sendRawTransaction` and pending-nonce queries proxy to the sender's shard validator. Block and status endpoints route through Autobahn. `eth_subscribe` (newHeads) is supported | | Eidos migration support | Shipped in v6.6. RPC-node migration remains opt-in and operator-controlled | | Later storage phases | FlatKV/lattice-hash state commitment and the broader archive design remain operator-gated or future work. Follow the storage migration guide | | RPC-node storage | Dedicated EVM state-store split (`evm-ss-split`) that targets \~150k TPS reads. See the [Giga storage migration guide](https://docs.sei.io/node/giga-storage-migration.md) | | Testing | Differential Giga-vs-v2 execution across the Ethereum state-test suite, mixed Giga/v2 clusters, and an Autobahn integration harness | For exact keys and defaults, node operators should follow the [node configuration reference](https://docs.sei.io/node/node-operators.md#giga-storage-and-giga-executor), not this page. ## Glossary | Term | Definition | | - | - | | **Multi-Proposer (MCP)** | Architecture in which every validator proposes transaction data concurrently (the whitepaper's "multiple concurrent proposers"). Giga is designed to be the first Multi-Proposer EVM Layer 1 | | **Lane** | A validator's own append-only, hash-chained sequence of transaction batches | | **Car** | One batch of transactions in a lane (a lane entry) | | **Proposal** | Signed lane entry `⟨pos, batch, parentRef⟩` | | **PoA (Proof of Availability)** | Certificate that proves proposal data is retrievable. The whitepaper threshold is `f + 1` replicas, and the implementation threshold is stake-weighted | | **Tip** | The most recent proposal in a lane that holds a PoA | | **Cut** | The vector of all lanes' current tips committed by one consensus decision | | **Slot** | One consensus instance that commits one cut. Slots are pipelined | | **PrepareQC / CommitQC** | Quorum certificates from the prepare and commit voting phases | | **Timeout certificate** | Certificate that triggers a view change when a leader stalls | | **Blip** | A transient network disruption. Autobahn is designed to preserve lane dissemination while ordering recovers | | **Ordering finality** | Under the protocol's stated fault and cryptographic assumptions, consensus has fixed the transaction order (the sub-250 ms signal) | | **State attestation finality** | A two-thirds voting-power quorum has attested the block's execution results in a later block | | **Write log** | A block's canonical key-value write set after last-write-wins resolution | | **Divergence digest** | Compact lattice-hash commitment over a block's write log, receipts, and gas. Validators attest to it | | **LtHash** | Homomorphic multiset hash used for divergence digests. It updates incrementally, in any order | | **BUD (Block Update Digest)** | Per-block Merkle root over that block's state updates, and the basis of Giga state proofs | | **SuperBUD** | Aggregated BUD covering an exponentially sized window of blocks | | **Touch transaction** | Transaction that refreshes a key's last-modified metadata to create a fresh proof anchor | | **Proof window (η)** | Number of blocks over which BUD proofs are protocol-guaranteed (`η = e^L_max`, governance-set) | | **Merge rule** | Deterministic function from a committed cut to the executable transaction sequence (tip-priority order plus deduplication) | | **Socialised tips** | Epoch-pooled priority fees distributed by stake × liveness instead of to the carrying proposer | | **Distribution fee** | Fee component that prices duplicate submissions made for censorship resistance | | **Sedna** | Planned private dissemination milestone that uses rateless-coded, addressed bundles. Its until-decode privacy depends on coding parameters and collusion assumptions | | **PIVOT-K** | Sedna's incentive mechanism: bounties on decode-pivotal bundles plus a sender ratchet against withholding | | **Ambulance** | Planned consensus upgrade that replaces timeout-based leader recovery with a rigged race among replicas | | **Hermes** | Next-generation consensus protocol after Autobahn (whitepaper forthcoming) | | **Eidos / Ares** | Storage-rebuild and execution-client upgrades whose first components shipped in v6.6. Ares became the default execution path, and Eidos migration remains phased | ## References * [Sei Giga whitepaper v2.0](https://arxiv.org/abs/2505.14914) by Marsh, Landers, Jog, and Ranchal-Pedrosa (arXiv 2505.14914, June 2026) * [Autobahn: Seamless high speed BFT](https://arxiv.org/abs/2401.10369) by Giridharan, Suri-Payer, Abraham, Alvisi, and Crooks (arXiv 2401.10369) * [MEV in Multiple Concurrent Proposer Blockchains](https://arxiv.org/abs/2511.13080) by Landers and Marsh (arXiv 2511.13080) * [Sedna: Sharding transactions in multiple concurrent proposer blockchains](https://arxiv.org/abs/2512.17045) (arXiv 2512.17045) and its mechanism-design companion introducing [PIVOT-K](https://arxiv.org/abs/2603.17614) (arXiv 2603.17614) * [Ambulance: saving BFT through racing](https://arxiv.org/abs/2606.25099) (arXiv 2606.25099) * [Block-STM](https://arxiv.org/abs/2203.06871), the parallel execution design Giga follows (arXiv 2203.06871) * [Sei Giga: Achieving 5 Gigagas with Autobahn Consensus](https://seiresearch.io/articles/sei-giga-achieving-5-gigagas-with-autobahn-consensus), devnet results (Feb 2025) * [Autobahn: Sei Giga's Multi-Proposer approach to blockchain consensus](https://blog.sei.io/autobahn-sei-gigas-multi-proposer-approach-to-blockchain-consensus), explainer post (Apr 2025) * [The Giga Whitepaper v2](https://blog.sei.io/the-giga-whitepaper-2/), the announcement post (July 2026) * [Sei v6.6.0](https://github.com/sei-protocol/sei-chain/releases/tag/v6.6.0), mandatory Sei Mainnet upgrade (August 2026) * [sei-protocol/sei-chain](https://github.com/sei-protocol/sei-chain), the open-source implementation > [!WARNING] > > **Disclaimer:** The roadmap is subject to change based on development progress, market feedback, and other factors. Actual timelines, figures, and outcomes may vary. *Last updated August 2026, based on the Giga whitepaper v2.0 (June 29, 2026), the sei-chain v6.6 release, and the Sei Mainnet v6.6 activation.* This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/sei-giga-developers # Building on Sei Giga: What Changes for Developers > What Sei Giga will change for smart contract and dApp developers: EVM parity exceptions, ordering and attestation finality, staged transaction ingress before and after Sedna, BUD state proofs, and parallel-friendly contract patterns. Sei Giga is designed so that standard EVM contracts do not need to change. Contracts that depend on retired Sei-native surfaces, including the native Oracle precompile, must migrate separately. The EVM will be equivalent to Ethereum mainnet, with five exceptions. The exceptions are EIP-4844 blobs, `PREVRANDAO`, the state root, the block gas limit, and the transaction fee mechanism. Standard Solidity and Vyper tooling will keep working: Foundry, Hardhat, viem, and ethers. The environment around your contracts will change: * Ordering and state attestation will be separate protocol signals. * Execution receipts will arrive between them. * There will be no traditional public mempool. * A priority fee will buy a position in the order, not a proposer's favor. * State proofs will work differently. Transaction ingress will initially route complete transactions to validator lanes. The later [Sedna](https://docs.sei.io/learn/sei-giga-specs.md#sedna-private-dissemination) milestone will introduce coded symbol bundles. This page covers each change, plus the patterns that make the best use of Giga's parallel execution. > [!NOTE] > > Sei Giga will roll out as [phased upgrades to the live network](https://docs.sei.io/learn/sei-giga.md#how-will-sei-giga-ship). As of August 2026, there is no public Giga testnet yet. Sections about components that have not activated are forward-looking and subject to change. Statements about Ares v6.6, retired native Oracle queries, and IBC reflect the live network as of August 2026. To build on Sei today, start with the [EVM development guides](https://docs.sei.io/evm/evm-general.md). ## What will stay the same * Contract code: Solidity and Vyper will compile against standard EVM semantics. Opcodes and standard Ethereum precompiles will track Ethereum near parity. Retired Sei-native precompiles are outside this compatibility statement. * Tooling: the standard JSON-RPC methods will remain (`eth_call`, `eth_sendRawTransaction`, `eth_getTransactionReceipt`, `eth_feeHistory`, `eth_subscribe` for new heads), so Foundry, Hardhat, viem, ethers.js, and wagmi will work unchanged. * Accounts and signing: the same `0x` addresses and the same ECDSA flow, with a [post-quantum migration path](https://docs.sei.io/learn/sei-giga-specs.md#post-quantum-migration) specified for the long term. * The gas token: SEI will stay the native token for gas, staking, and fees. * The network itself: Giga will upgrade the live Sei network in place, with no new chain to redeploy to. ## What will change for your application | Area | On Ethereum / Sei today | On Sei Giga | What you should do | | - | - | - | - | | Finality | Block inclusion / finalized tag | Ordering finality (measured \<250 ms), execution receipt, then state attestation finality | Wait for the stage your flow requires (see [below](#finality-on-giga-which-signal-to-wait-for)) | | Mempool | Public pending pool, gossip, frontrunning games | No traditional public mempool. Complete transactions route to lanes before Sedna. The later [Sedna](https://docs.sei.io/learn/sei-giga-specs.md#sedna-private-dissemination) milestone adds coded symbol bundles | Drop pending-pool assumptions. There will be no pending stream to watch | | Priority fee | Paid to the block proposer, and buys inclusion favor | Strictly enforced for ordering, then socialised across validators by stake × liveness | Use the tip to express urgency. The protocol does not pay a specific proposer for preferential treatment | | State proofs | `eth_getProof` against the block state root on Ethereum. Sei does not support `eth_getProof` | No state root. [BUD proofs](https://docs.sei.io/learn/sei-giga-specs.md#block-update-digests-buds) against attested per-block digests | Avoid a hard dependency on `eth_getProof`. Plan for BUD-based verification | | Randomness | `PREVRANDAO` (beacon randomness) | `PREVRANDAO` not supported with Ethereum semantics | Use a VRF or oracle for randomness | | Blob transactions | EIP-4844 type-3 transactions | Will not be supported (Giga will remain an L1, not a rollup DA consumer) | Nothing to do unless you post blobs | | Block gas limit | Fixed per-block constant | No Ethereum-style fixed block gas limit. Lane and consensus parameters will bound throughput | Do not encode assumptions about a specific block gas limit | | Duplicate submission | Rebroadcasting the same transaction is free but useless | Multi-submitting to several validators will be a censorship-resistance feature. One copy will execute. Duplicates will pay a distribution fee and get a partial tip refund | Optionally multi-submit high-value transactions | ## Finality on Giga: which signal to wait for Giga will separate consensus from execution. Applications will observe three stages: * Ordering finality (measured under 250 ms on the internal devnet): consensus has fixed your transaction's position under the protocol's stated assumptions. Execution follows, so you do not get a receipt or execution result at this stage. * Execution receipt: a node has executed the ordered transaction and can report its result. This is the first stage at which your application can know whether the transaction succeeded or reverted. It is not a quorum attestation. * State attestation finality, a bounded number of blocks later: a two-thirds voting-power quorum has signed the block's [divergence digest](https://docs.sei.io/learn/sei-giga-specs.md#lattice-hash-divergence-digests). This confirms the executed results. Ordering finality, execution receipt, and state attestation stages Ordering finality fixes position but has no receipt yet. After execution, applications may use the receipt according to their risk policy. High-value and cross-chain flows should wait for the attested digest. Which signal to wait for depends on the flow: | Use case | Wait for | Why | | - | - | - | | Interactive UX, games, and payments UI | Execution receipt or state attestation, based on your risk policy | The receipt exposes the result. Attestation adds a signed quorum confirmation | | Exchange deposits, bridge withdrawals, high-value settlement | State attestation finality | Adds a signed quorum attestation of executed state before you act on it | | External verification (light clients, cross-chain) | Attested BUD proofs | Proofs anchor to attested digests, which follow the attestation schedule | A transaction revert is an execution result and does not invalidate the rest of the block. For today's finality behavior, before Giga, see [EVM finality on Sei](https://docs.sei.io/evm/evm-parity/finality.md). > [!WARNING] > > Treat receipt-level action as an application risk decision, not as a substitute for state attestation in high-value or cross-chain flows. Ordering finality alone does not reveal the execution result. ## Sending transactions without a public mempool On Autobahn before the later Sedna milestone, RPC nodes will route complete signed transactions into validator proposal lanes without a shared public pending pool. After Sedna activates, RPC ingress will distribute coded symbol bundles instead. Executors will reconstruct the transaction after the finalized symbols cross the decode threshold. Autobahn's pipelining is designed for an effective steady-state cadence of one committed cut per 1.5 network round trips. This is not a submission-to-finality guarantee. In practice: * There will be no public mempool to scan for victims. The merged execution order will be a [deterministic function](https://docs.sei.io/learn/sei-giga-specs.md#deterministic-merge-rule) of finalized lane contents. This is designed to reduce post-consensus proposer discretion. Sedna is intended to add pre-execution privacy. Its guarantees depend on coding parameters and the number of colluding lanes. * Pending semantics will change. Do not build features that depend on watching a gossiped pending-transaction stream. The validator responsible for your sender address will answer pending-nonce queries. The RPC layer will route these queries for you. * You will control your own censorship resistance. If censorship resistance matters for a transaction, submit the identical signed transaction to multiple validators. Only one copy will execute, because duplicates will be dropped by hash at merge time. Extra copies will pay a distribution fee and get part of the tip back. A single submission will be the right default for most transactions. * Each validator is designed to include at most one copy of a given transaction per epoch. Attempts to amplify a transaction within one validator's lane will therefore struggle to succeed. Cross-validator duplicates remain possible for censorship resistance and will pay the distribution fee. ## Fees on Giga Giga will price three things separately (full details in the [fee model spec](https://docs.sei.io/learn/sei-giga-specs.md#fee-model)): 1. The execution fee: an EIP-1559-style dynamic base fee for the gas a transaction consumes. `eth_feeHistory` and `eth_maxPriorityFeePerGas` will remain your estimation tools. 2. The ordering fee, better known as the priority fee. Giga will enforce it strictly: lanes in each committed cut will be ordered by their highest included tip. A higher tip will therefore buy earlier execution, deterministically. The fee will also be socialised: pooled per epoch and distributed to validators by stake and liveness. This design is intended to reduce protocol-level incentives to tip a specific proposer. Out-of-protocol side payments remain outside the current specification. 3. The distribution fee, charged per duplicate copy when you multi-submit for censorship resistance. The three components of a Giga transaction fee Execution, ordering, and duplicate distribution will be priced separately. The tip will be strictly enforced for ordering and then socialised across the validator set. For gas metering inside the EVM, Sei's existing schedule will continue to apply, including Sei's custom `SSTORE` pricing (see [gas and fees](https://docs.sei.io/evm/evm-parity/gas-and-fees.md)). The whitepaper defers the final Giga fee mechanism to a dedicated paper. Expect parameter-level details to become more definite around the Autobahn testnet. ## Writing parallel-friendly contracts Giga will execute each block with [Block-STM-style optimistic concurrency](https://docs.sei.io/learn/sei-giga-specs.md#parallel-execution-block-stm-style-occ). Transactions will run in parallel and re-execute only when their read and write sets collide. Sei Labs measured that [64.85% of historical Ethereum transactions could have been parallelized](https://blog.sei.io/research-64-85-of-ethereum-transactions-can-be-parallelized/) under this model. Your contract's storage layout will decide which side of that statistic it lands on. Transactions that touch disjoint storage will run simultaneously. Transactions that contend on one hot slot will serialize. The engine will retry conflicted transactions. Under sustained contention, it will fall back to sequential execution. This fallback is designed to protect correctness at the cost of speed. Isolated per-user state runs in parallel. A shared hot slot serializes The same four transfers, two storage layouts. Per-user slots let Block-STM commit everything in one pass. A shared counter forces retries until the transactions run one by one. ### Pattern 1: isolate state per user ```solidity theme={"dark"} // GOOD: per-user state; transfers between different users run in parallel contract OptimizedToken { mapping(address => uint256) private balances; function transfer(address to, uint256 amount) public { require(balances[msg.sender] >= amount); balances[msg.sender] -= amount; balances[to] += amount; } } // BAD: every transfer writes one global slot, so transfers serialize contract PoorToken { uint256 public totalTransfers; // every transfer conflicts here function transfer(address to, uint256 amount) public { totalTransfers++; // hot slot: blocks parallelism for the whole block // ... transfer logic } } ``` Global counters, monolithic `totalSupply` updates on every operation, shared round-robin pointers, and single-slot reward accumulators are the classic hot spots. If you need an aggregate, update it lazily, shard it (per-address buckets aggregated on read), or derive it off-chain from events. ### Pattern 2: prefer mappings over shared arrays `mapping(address => T)` lookups touch one isolated slot per user. Pushing to a shared array touches the array-length slot on every insert. This makes the length slot a hidden global counter. ### Pattern 3: emit events instead of storing history ```solidity theme={"dark"} contract EventDrivenAuction { mapping(uint256 => uint128) public highestBids; // Bid history lives in events, not storage event BidPlaced(uint256 indexed auctionId, address indexed bidder, uint256 amount); function bid(uint256 auctionId) external payable { require(msg.value > highestBids[auctionId], "Bid too low"); highestBids[auctionId] = uint128(msg.value); emit BidPlaced(auctionId, msg.sender, msg.value); } } ``` Events will be especially cost-effective on Giga. Receipt generation and log indexing will run off the execution hot path, in dedicated stores. Keeping history in events will therefore trim your write set, and the history will stay queryable. ### Pattern 4: pack storage you must share When state must be shared, make it cheap. Pack related fields into one slot, so a conflicting transaction pays for one slot conflict instead of three. ```solidity theme={"dark"} struct Position { uint128 size; // 128 bits ┐ uint64 entryTime; // 64 bits ├─ one storage slot uint64 nonce; // 64 bits ┘ } ``` ## Sei precompiles under the Giga executor [Sei v6.6](https://github.com/sei-protocol/sei-chain/releases/tag/v6.6.0) activated the first Ares execution phase on Sei Mainnet. Eligible transactions use the Ares path. When that path encounters an unsupported case, the individual transaction reruns through the v2 fallback. Eligibility is release-specific, so do not assume that every EVM transaction or precompile call uses the same fast path. Follow the [node configuration reference](https://docs.sei.io/node/node-operators.md#giga-storage-and-giga-executor) for the release you operate. The retired native Oracle precompile at `0x0000000000000000000000000000000000001008` is not a supported fallback. Its data-query methods revert. Use one of the third-party providers documented for Sei instead. ## Prepare your app for Giga today * Build EVM-only. [SIP-3](https://docs.sei.io/learn/sip-03-migration.md) consolidates Sei to an EVM-only stack ahead of Giga: CosmWasm no longer accepts new deployments. IBC is disabled in both directions: Proposals [116](https://seistream.app/proposals/116) and [120](https://seistream.app/proposals/120) disabled inbound transfers, and [121](https://seistream.app/proposals/121) disabled outbound transfers on July 31, 2026. Existing IBC balances can still move within Sei but can no longer be redeemed over IBC on their origin chain. For external data, use the providers documented for Sei: [API3](https://docs.sei.io/evm/oracles/api3.md), [Chainlink](https://docs.sei.io/evm/oracles/chainlink.md), [Pyth](https://docs.sei.io/evm/oracles/pyth-network.md), and [RedStone](https://docs.sei.io/evm/oracles/redstone.md). * Audit for hot slots. Per-user state isolation is the single most effective change for parallel throughput. The first Ares phase went live with the mandatory Sei Mainnet v6.6 upgrade on August 4, 2026. Broader Ares work continues in later releases. * Classify your confirmation flows. Decide which flows only need the fixed order, which act on an execution receipt, and which wait for state attestation. The three-stage model will then need only a configuration change, not a redesign. * Remove fragile dependencies. Anything that relies on `eth_getProof` and state roots ([not supported on Sei](https://docs.sei.io/evm/evm-parity/evm-compatibility.md#proof-verification)), `PREVRANDAO` randomness, blob transactions, or watching the public mempool will need a plan. * Do not wait for a "Giga chain." There will not be one. Giga will arrive on the network where you are already deployed. Standard EVM contracts that do not depend on retired Sei-native surfaces are designed to carry over without redeployment. ## Related * [Sei Giga overview](https://docs.sei.io/learn/sei-giga.md): architecture and roadmap * [Sei Giga technical specification](https://docs.sei.io/learn/sei-giga-specs.md): the full protocol spec and glossary * [EVM development guides](https://docs.sei.io/evm/evm-general.md): building on Sei today * [Differences with Ethereum](https://docs.sei.io/evm/differences-with-ethereum.md): current-network EVM deltas * [SIP-3 migration guide](https://docs.sei.io/learn/sip-03-migration.md): the EVM-only consolidation > [!WARNING] > > **Disclaimer:** The roadmap is subject to change based on development progress, market feedback, and other factors. Actual timelines, figures, and outcomes may vary. *Last updated August 2026, based on the Giga whitepaper v2.0 (June 29, 2026), the sei-chain v6.6 release, and the Sei Mainnet v6.6 activation.* This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/hardware-wallets # Hardware Wallets > Comprehensive guide to Hardware Wallets on Sei. Learn key concepts, commands, and best practices. Manual signing, or signing with a hardware wallet such as Ledger, keeps transaction approval secure. To sign Sei transactions, install the Ethereum app (or the dedicated Sei app) on your Ledger device. Then sign through an EVM wallet such as MetaMask. > [!NOTE] > > The legacy flow that used the Cosmos app with a Cosmos RPC endpoint is > deprecated. Per [SIP-03](https://docs.sei.io/learn/sip-03-migration.md), Cosmos-native interfaces > were scheduled for deprecation on June 15, 2026. If you still hold funds on a > Ledger Cosmos-app (`sei1...`) account, see > [Migrating a hardware or mnemonic-only wallet](https://docs.sei.io/learn/sip-03-migration.md#migrating-a-hardware-or-mnemonic-only-wallet). ## Using MetaMask with Ledger To connect your Ledger device through MetaMask and sign transactions: 1. **Install MetaMask**: Make sure that MetaMask is installed in your browser. 2. **Connect Ledger**: Open MetaMask and go to the account options. Then select **Connect Hardware Wallet**. 3. **Follow instructions**: Follow the on-screen instructions to connect your Ledger device and select the account that you want to use. 4. **Sign transactions**: After you connect, you can sign transactions directly through MetaMask with your Ledger device. **Installing the Ethereum app on Ledger** To sign transactions through MetaMask with your Ledger device, you need the Ethereum app on the device. You can install it through Ledger Live: • [Ledger App Store - Ethereum App](https://www.ledger.com/coin/wallet/ethereum) Alternatively, you can install the dedicated Sei app from the Ledger Live App Catalog. For step-by-step instructions, see [Ledger Setup](https://docs.sei.io/learn/ledger-setup.md). This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/ledger-setup # Ledger Hardware Wallet Setup Guide for Sei > Configure your Ledger hardware wallet to securely manage Sei assets, with step-by-step instructions for installation, receiving and sending transactions, and security best practices. ## Introduction The Sei network supports various crypto assets, including: * Native tokens (\$SEI) * ERC20 tokens * ERC721 NFTs A Ledger hardware wallet manages your keys securely when you interact with the Sei network. ## Requirements Before you start, make sure that you have: * A Ledger wallet device * The [Ledger Live](https://www.ledger.com/ledger-live) app, installed on your desktop or mobile device * A compatible wallet application for Sei (see the Sei documentation for recommended wallets) * A USB cable to connect your device (some models can also use Bluetooth) * The latest firmware on your Ledger device * An active internet connection ## Installation instructions ### Install Ledger Live 1. **Download Ledger Live**: Go to the [official Ledger website](https://www.ledger.com/start). Download Ledger Live for your operating system. 2. **Install Ledger Live**: Follow the installation instructions for your platform. 3. **Set up Ledger Live**: Open Ledger Live. Then follow the on-screen instructions to set up your Ledger device. 4. **Install the Sei app on Ledger**: * In Ledger Live, go to **My Ledger**. * Connect and unlock your Ledger device. * Search for "Sei" in the App Catalog. Then click **Install**. > [!NOTE] > > On Linux, add a `udev rule` to allow access to the device. You can find the script to add a rule in the [Ledger udev-rules repository](https://github.com/LedgerHQ/udev-rules). ## Setup instructions ### Using a compatible wallet application 1. **Connect your Ledger device**: * Open your compatible wallet application for Sei. * Connect your Ledger device to your computer. * Unlock your Ledger device and open the Sei app. 2. **Access the Sei network**: * In your wallet application, select the option to connect with a Ledger device. * Follow the prompts to connect to your Ledger device. ## Viewing account balance 1. Open your wallet application for Sei. 2. Make sure that your Ledger device is connected and that the Sei app is open. 3. Your account balance and asset details should appear on the main screen of the wallet application. ## How to receive crypto assets 1. **Navigate to the Receive section**: * In your wallet application, go to the **Receive** section or a similar section. * If applicable, select the crypto asset that you want to receive. 2. **Verify the receiver address**: * The wallet application displays the receiver address. * Verify that the address on the screen matches the address on your Ledger device. * To confirm the address, press the appropriate buttons on your Ledger device. > [!WARNING] > > Always verify the receiver address on your Ledger device before you share it. This prevents attacks such as address spoofing. 3. **Share the address**: * Copy the verified address. Share it with the sender, or paste it into an exchange withdrawal form. ## How to send crypto assets 1. **Navigate to the Send section**: * Go to the **Send** section (or equivalent) in your wallet application. * Select the crypto asset that you want to send. 2. **Enter transaction details**: * Enter the recipient's address. * Enter the amount that you want to send. * (Optional) Add a memo if one is required. 3. **Submit the transaction**: * Start the send process in your wallet application. 4. **Verify and confirm on the Ledger device**: * Review the transaction details on the Ledger device. * Verify that the recipient's address, amount, and other transaction details are correct. * To confirm and broadcast the transaction, press the appropriate buttons on your Ledger device. > [!WARNING] > > Always double-check the transaction details on your Ledger device before you confirm. This check is your last protection against possible attacks or errors. ## Support For more help, you can contact these support channels: * **Sei network community**: Join the official Sei network community on [Telegram](https://t.me/seinetwork) or [Discord](https://discord.gg/sei). * **Ledger support**: For Ledger-specific issues, go to the [Ledger Support Center](https://support.ledger.com/). * **Wallet support**: For wallet-related questions, see the support resources of your wallet application. ## Additional resources * **Ledger Academy**: Learn more about cryptocurrency security on the official [Ledger Academy](https://www.ledger.com/academy). > [!CAUTION] > > Never share your recovery phrase with anyone. Keep it in a safe, offline location. If your device is lost or damaged, your recovery phrase is the only way to restore access to your funds. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/learn/general-brand-kit # Sei Brand Guidelines > Official Sei brand guidelines — logos, colors, typography, and usage rules for marketing communications, partners, and the broader ecosystem. > [!NOTE] > > Follow these guidelines when you feature Sei in marketing communications, advertising, articles, websites, partner materials, and any printed assets. > > **Download the full brand kit:** [sei-brand-assets.zip](https://brand.sei.io/sei-brand-assets.zip) · Full interactive version at [brand.sei.io](https://brand.sei.io) Black and white carry the brand. Maroon and Gold are heritage accents. Use them only for emphasis and legacy moments, and never as the base palette. Sei is a parallelized EVM Layer 1. Sei Giga is designed to extend that architecture with Multi-Proposer consensus and asynchronous execution. In external communications, use sourced performance figures and distinguish live features from roadmap targets. > [!WARNING] > > **Disclaimer:** The roadmap is subject to change based on development progress, market feedback, and other factors. Actual timelines, figures, and outcomes may vary. *** 01 — Logo ## Primary logo The Sei primary lockup has two elements: the **symbol** and the **wordmark**. This lockup is the main representation of the brand. Use it consistently as a combined unit. ![Sei lockup on light background](https://mintcdn.com/seilabs/MHnOpYb4aHDlXyvi/assets/brand/logo/sei-lockup-on-light.svg?fit=max\&auto=format\&n=MHnOpYb4aHDlXyvi\&q=85\&s=3b454ed0765c5c7483cb3f1a1051b250) Lockup · Light [↓ SVG](https://docs.sei.io/assets/brand/logo/sei-lockup-on-light.svg) ![Sei lockup on dark background](https://mintcdn.com/seilabs/MHnOpYb4aHDlXyvi/assets/brand/logo/sei-lockup-on-dark.svg?fit=max\&auto=format\&n=MHnOpYb4aHDlXyvi\&q=85\&s=6b62fc8a79be1095f91cea94425afa3e) Lockup · Dark [↓ SVG](https://docs.sei.io/assets/brand/logo/sei-lockup-on-dark.svg) ## Symbol The **symbol** is the standalone Sei mark. Use it on its own only when the wordmark is already established elsewhere on the surface (for example, favicons, app icons, and watermarks). ![Sei symbol on light background](https://mintcdn.com/seilabs/MHnOpYb4aHDlXyvi/assets/brand/logo/sei-mark.svg?fit=max\&auto=format\&n=MHnOpYb4aHDlXyvi\&q=85\&s=32bdf147a3505c869caffa8c2d212f5a) Symbol · Light [↓ SVG](https://docs.sei.io/assets/brand/logo/sei-mark.svg) ![Sei symbol on dark background](https://mintcdn.com/seilabs/MHnOpYb4aHDlXyvi/assets/brand/logo/sei-mark-white.svg?fit=max\&auto=format\&n=MHnOpYb4aHDlXyvi\&q=85\&s=3649945bb794e01413c901eaa7a044fb) Symbol · Dark [↓ SVG](https://docs.sei.io/assets/brand/logo/sei-mark-white.svg) ## Token The **token mark** appears in Maroon. Black and white are fallbacks for constrained environments. ![Sei token mark in Maroon](https://mintcdn.com/seilabs/MHnOpYb4aHDlXyvi/assets/brand/logo/sei-token-maroon.svg?fit=max\&auto=format\&n=MHnOpYb4aHDlXyvi\&q=85\&s=cf73861a8f83845154e2c0f81824651c) [↓ Download SVG](https://docs.sei.io/assets/brand/logo/sei-token-maroon.svg) ## Powered by Sei This lockup is for ecosystem and partner surfaces. Keep the lockup intact, and follow the clearspace rules. ![Powered by Sei (vertical) on light](https://mintcdn.com/seilabs/MHnOpYb4aHDlXyvi/assets/brand/logo/sei-powered-by-vertical-on-light.svg?fit=max\&auto=format\&n=MHnOpYb4aHDlXyvi\&q=85\&s=c7848336e51182186f8a480819b21d93) Vertical · Light [↓ SVG](https://docs.sei.io/assets/brand/logo/sei-powered-by-vertical-on-light.svg) ![Powered by Sei (vertical) on dark](https://mintcdn.com/seilabs/MHnOpYb4aHDlXyvi/assets/brand/logo/sei-powered-by-vertical-on-dark.svg?fit=max\&auto=format\&n=MHnOpYb4aHDlXyvi\&q=85\&s=f00a8b91e62047d740abbdbb0145cc4a) Vertical · Dark [↓ SVG](https://docs.sei.io/assets/brand/logo/sei-powered-by-vertical-on-dark.svg) ![Powered by Sei (horizontal) on light](https://mintcdn.com/seilabs/MHnOpYb4aHDlXyvi/assets/brand/logo/sei-powered-by-horizontal-on-light.svg?fit=max\&auto=format\&n=MHnOpYb4aHDlXyvi\&q=85\&s=0beb6d4e8c6586c6cff8516d427d3725) Horizontal · Light [↓ SVG](https://docs.sei.io/assets/brand/logo/sei-powered-by-horizontal-on-light.svg) ![Powered by Sei (horizontal) on dark](https://mintcdn.com/seilabs/MHnOpYb4aHDlXyvi/assets/brand/logo/sei-powered-by-horizontal-on-dark.svg?fit=max\&auto=format\&n=MHnOpYb4aHDlXyvi\&q=85\&s=92fbeb61ce11119537385c8e18f9f218) Horizontal · Dark [↓ SVG](https://docs.sei.io/assets/brand/logo/sei-powered-by-horizontal-on-dark.svg) *** 02 — Color ## Color Black and white carry the brand. Maroon and Gold are heritage accents. Use them only for emphasis and legacy moments, and never as the base palette. ### Primary palette Base Color Black#000000 Base Color White#FFFFFF Headlines · CTAs · Accents Maroon#600014 Data stats · Highlights Gold#966F22 ### Neutral ramp White#FFFFFF 25#F5F5F7 50#CCCCCC 100#999999 200#666666 400#333333 600#131313 Black#000000 03 — Typography ## Primary typeface **Lateral** is our primary typeface. Use it for headlines, product UI, and anything that needs presence. Give it room in editorial layouts. Lateral ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 .,:;!?&@\* **Condensed Bold** · Display **Regular** · Body **Light** · Subtext Primary font · Headlines · Body · Copy ## Secondary typefaces Items Text ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 .,:;!?&@\* **Book** Secondary font · Editorial · Quotes · Foundation ABC Repro Mono ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 .,:;!?&@\* **Regular** Tertiary font · Data · Tickers · Captions *** 04 — Usage ## Clearspace To keep the logo clear and prominent, follow the clearspace guidelines. Leave the required space around the lockup. This space stops surrounding artwork, imagery, or the edge of a page from crowding it. ![Sei lockup with X-unit clearspace markers](https://mintcdn.com/seilabs/MHnOpYb4aHDlXyvi/assets/brand/clearspace.png?fit=max\&auto=format\&n=MHnOpYb4aHDlXyvi\&q=85\&s=10217762ad382a592c4d1608bf8555b4)
  • **Use only approved colors.** The approved colors are black, white, Maroon 100, and Gold 100.
  • **Keep proportions locked.** The symbol and wordmark ship as one unit. Do not change their relative scale.
  • **Respect clearspace and minimum size.** Leave a clearspace of X on all sides. The minimum height is 25 px.
## Cobranding Our lockup for brand partnerships follows the clearspace rule. Apply the same rule to the partner brand. Make sure that both lockups are the same height. ![Sei + partner horizontal co-branding lockup with clearspace](https://mintcdn.com/seilabs/MHnOpYb4aHDlXyvi/assets/brand/cobranding-horizontal-lockup.png?fit=max\&auto=format\&n=MHnOpYb4aHDlXyvi\&q=85\&s=0a79fbc917f7b77a01686dff5ff22320) Horizontal Lockup ![Sei + partner vertical co-branding lockup with clearspace](https://mintcdn.com/seilabs/MHnOpYb4aHDlXyvi/assets/brand/cobranding-vertical-lockup.png?fit=max\&auto=format\&n=MHnOpYb4aHDlXyvi\&q=85\&s=7caa54c99728085f70ace68ffbdc3aa8) Vertical Lockup *** > [!NOTE] > > If you need something that is not listed here, see the full interactive brand site at [brand.sei.io](https://brand.sei.io). You can also download the [complete brand kit zip](https://brand.sei.io/sei-brand-assets.zip). This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm # Sei EVM - High Performance Ethereum Virtual Machine > Build on the fastest EVM with 400ms finality, 100 MGas/s throughput, and full Ethereum tooling compatibility. ## Why choose Sei EVM? | Feature | Sei EVM | Ethereum | Other Layer 1s | | - | - | - | - | | Block time | 400 ms | \~12 s | 1-3 s | | Transaction throughput | 100 MGas/s | \~5 MGas/s | \< 50 MGas/s | | Parallelized execution | Yes | No | Limited/No | | EVM tooling compatibility | 100% | 100% | Varies | | EVM version | Pectra (without blobs) | Fusaka | Varies | > [card] [Detailed Ethereum comparison](https://docs.sei.io/evm/differences-with-ethereum.md) > > See the detailed comparison of Sei EVM and Ethereum. ## Quick start **1. Add Sei to wallet** * [Install Sei Global Wallet](https://docs.sei.io/evm/sei-global-wallet.md) * [Sei EVM network information](https://docs.sei.io/evm/networks.md) **2. Get test tokens** * [Visit the Sei faucet](https://docs.sei.io/learn/faucet.md) * [View token information](https://docs.sei.io/evm/tokens.md) **3. Start building** * [EVM general guide](https://docs.sei.io/evm/evm-general.md) * [Project templates](https://docs.sei.io/evm/templates.md) * [Cookbook recipes](https://docs.sei.io/evm/cookbook.md) ## Ready-to-deploy examples > [card] [EVM contract wizard](https://docs.sei.io/evm/evm-wizard.md) > > Generate ERC-20, ERC-721, and other contracts in minutes. Configure the contract, then copy and deploy the code. > [card] [Frontend integration](https://docs.sei.io/evm/building-a-frontend.md) > > Connect ethers.js, viem, or wagmi to your Sei EVM smart contracts. > [card] [Solidity resources](https://docs.sei.io/evm/solidity-resources.md) > > Find tools and best practices for Solidity development on Sei. ## Development tools > [card] [Deploy with Hardhat](https://docs.sei.io/evm/evm-hardhat.md) > > Deploy smart contracts on Sei EVM with Hardhat. > [card] [Deploy with Foundry](https://docs.sei.io/evm/evm-foundry.md) > > Use Foundry to build, test, and deploy contracts on Sei EVM. > [card] [JSON-RPC explorer](https://docs.sei.io/evm/reference.md) > > Browse every Sei EVM JSON-RPC method, run live requests, and copy ready-to-use code. ## Use cases > [card] [x402 payments](https://docs.sei.io/ai/x402.md) > > Use HTTP 402 Payment Required to charge for API access and premium content. > [card] [USDC on Sei](https://docs.sei.io/evm/usdc-on-sei.md) > > Integrate native USDC for stablecoin transactions. > [card] [Nonce lanes](https://docs.sei.io/evm/nonce-lanes.md) > > Keep many independent transactions in flight from one funded address with EIP-7702 and ERC-4337 nonce lanes. ## RPC endpoints Choose an official Sei Foundation endpoint or a community-maintained alternative. All endpoints support the standard EVM JSON-RPC methods. Public endpoints have rate limits. For production dApps, use a [dedicated RPC provider](https://docs.sei.io/learn/rpc-providers.md) or [run your own node](https://docs.sei.io/node.md). > [tab] Sei Mainnet > > | Endpoint | Provider | Type | Rate limit | Notes | > | - | - | - | - | - | > | `https://evm-rpc.sei-apis.com` | Sei Foundation | public | 10 req/s | Recommended for development | > | `https://evm-rpc-sei.stingray.plus` | Staketab | public | — | Community maintained | > | `https://sei-evm-rpc.publicnode.com` | PublicNode | public | 5 req/s | Community maintained | > | `https://seievm-rpc.polkachu.com` | Polkachu | public | — | Community maintained | > | `https://jsonrpc.lavenderfive.com:443/sei` | LavenderFive | public | — | Community maintained | > [tab] Sei Testnet > > | Endpoint | Provider | Type | Rate limit | Notes | > | - | - | - | - | - | > | `https://evm-rpc-testnet.sei-apis.com` | Sei Foundation | public | 20 req/s | Recommended for testing | > | `https://evm-rpc-testnet-sei.stingray.plus` | Staketab | public | — | Community maintained | > | `https://seievm-testnet-rpc.polkachu.com` | Polkachu | public | — | Community maintained | > | `https://sei-testnet.drpc.org` | dRPC | public | — | Community maintained | > [card] [Interactive JSON-RPC explorer](https://docs.sei.io/evm/reference.md) > > Search every Sei EVM JSON-RPC method, with notes on Sei-specific behavior. Switch between Sei Mainnet, Sei Testnet, and custom endpoints. Run live requests and generate ready-to-use client code. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/networks # Sei EVM Networks > Discover network information for Sei EVM across all environments including mainnet and testnet. Access RPC endpoints, chain IDs, and blockchain explorers. Sei Mainnet Sei Testnet Local Environment The panel above is interactive. For plain-text endpoints that you can copy directly, and for more provider options, see: * [Chains & endpoints](https://docs.sei.io/learn/dev-chains.md): RPC URLs and chain IDs in plain text * [RPC providers](https://docs.sei.io/learn/rpc-providers.md): more public and commercial RPC endpoints This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/differences-with-ethereum # Sei EVM vs Ethereum: Key Differences > A comparison of Sei EVM and Ethereum, highlighting Sei's advantages in blocktime, throughput, finality, and execution environment, as well as technical differences in opcodes, state storage, and other features. Sei has full EVM compatibility, but Sei EVM and Ethereum differ in some ways: | Feature | Sei EVM | Ethereum | | - | - | - | | Block time | 400 ms | 12 s | | Gas per second | \~ 100 MegaGas/s | \~ 5 MegaGas/s | | Finality | Instant (\~400 ms) | Various commitment levels (safe, latest, justified, finalized) | | Parallelized execution | Yes | No | | EVM tooling compatibility | 100% | 100% | | EVM version | Pectra (without blobs) | Fusaka | | Gas limit | 12.5 M (block cap) | 60 M (block), \~16.7 M per-tx (EIP-7825) | | Per-tx gas cap | 12.5 M (block limit) | \~16.7 M (EIP-7825) | | Byte size limit | 21 MB | No byte-denominated limits | | Execution environment | EVM and Cosmos SDK | EVM | | Address space | Dual ECDSA-derived addresses: Cosmos Bech32 (sei…) and EVM-compatible (0x…) | ECDSA-derived address (0x…) | | State storage | AVL tree (global root) | Merkle Patricia Trie (MPT) | | SSTORE gas cost | 72k (on-chain parameter, governance-adjustable) | 20k (fixed) | * Sei uses the Pectra (Prague and Electra) version of the EVM, without blob transactions. Ethereum has since upgraded to Fusaka (December 2025). Fusaka introduced PeerDAS to improve data availability. * Sei's gas limit is 12.5 M, compared with 60 M on Ethereum. The Fusaka upgrade increased Ethereum's limit from 45 M through EIP-7935. Sei also has a byte size limit of 21 MB. * Sei has instant finality. A transaction is final as soon as its block is committed (approximately 400 ms). As a result, the commitment levels typical for Ethereum (safe, latest, and justified) do not apply on Sei. > [!CAUTION] > > **Deprecation notice** > > Cosmos SDK and CosmWasm functionality is being deprecated in favor of EVM-only. For more details, see [SIP-3](https://github.com/sei-protocol/sips/blob/main/sips/sip-3.md) and [Proposal 99](https://seistream.app/proposals/99). > > [Proposal 115](https://seistream.app/proposals/115) also disables CosmWasm code uploads and contract instantiations chain-wide. As a result, you cannot deploy new CosmWasm contracts. Only `execute` and `query` against existing CosmWasm contracts remain available. * **Sei is a dual-execution environment (EVM and Cosmos SDK).** This means that: * Non-EVM transactions can update EVM-accessible state. * For example, both Cosmos transactions (bank send, wasm execute) and EVM send transactions can change an account's SEI balance. * Sei assets can exist as EVM tokens (ERC-20, ERC-721, and ERC-1155) or as legacy CosmWasm tokens (CW20, CW721, and CW1155). They can also exist as "native" Bank Module assets (Sei). Under Proposal 115, you can no longer deploy CosmWasm tokens. * User accounts on Sei have [two addresses](https://docs.sei.io/learn/accounts.md) derived from the same public key (Cosmos Bech32 and EVM-compatible 0x…). * Interoperability between EVM and Cosmos SDK modules works through [precompiles](https://docs.sei.io/evm/precompiles/example-usage.md) and [pointer contracts](https://docs.sei.io/learn/pointers.md). ## Sei EVM release Sei EVM was first deployed at these block heights and versions: ### Testnet * **Name:** `v5.5.1` * **Height:** `90526031` * **Changelog:** [https://github.com/sei-protocol/sei-chain/blob/main/CHANGELOG.md#v5.5.1](https://github.com/sei-protocol/sei-chain/blob/main/CHANGELOG.md#v5.5.1) ### Mainnet * **Name:** `v5.5.2` * **Height:** `79123881` * **Changelog:** [https://github.com/sei-protocol/sei-chain/blob/main/CHANGELOG.md#v552](https://github.com/sei-protocol/sei-chain/blob/main/CHANGELOG.md#v552) ## Opcode differences | Opcode | Sei EVM | Ethereum | Notes | | - | - | - | - | | PREVRANDAO | Returns a value derived from the current block time | Returns the RANDAO mix (EIP‑4399) | Not a randomness source. Use an oracle/VRF. `DIFFICULTY` aliases to this. | | COINBASE | Always the global fee collector address | Block proposer (miner) address | Do not assume it is the validator address. | | BASEFEE | Returns the current base fee, with no burn | Returns the current base fee. A portion is burned (EIP‑1559). | Legacy transactions must meet Sei's governance-set minimum gas price (currently `50 gwei`). Query `eth_gasPrice` for the live value. | | BLOCKHASH | Hash of the Tendermint header, with a different encoding | Keccak of the Ethereum block header | Returns hashes for the previous 256 blocks, as on Ethereum. Older, current, and future blocks return zero. Values are not interchangeable across chains. | | GASLIMIT | = 12,500,000 per block | = 60,000,000 per block | Represents the block gas limit on both chains. | | TIMESTAMP | Tendermint block time | Proposer-chosen block time | Same semantics. Do not use it for randomness. | | DIFFICULTY | Alias of PREVRANDAO | Alias of PREVRANDAO (EIP‑4399) | Returns the same value as PREVRANDAO. | | Blob‑related opcodes | Not supported (Pectra without blobs) | Supported post‑Cancun (EIP‑4844) | Blob transactions are not enabled on Sei. | ### PREVRANDAO Proof of Stake (PoS) Ethereum uses pseudo‑randomness to determine the next validator. Sei does not rely on the same method, so it does not have the "randomness" artifact that can be set as `PREVRANDAO`'s return value. On Sei, `PREVRANDAO` returns a value derived from the current block time. If your contract logic needs strong randomness, use a verifiable randomness oracle. This is also the advice for Ethereum. ### COINBASE On Sei, the coinbase address is always the EVM address of the global fee collector. ## State root Sei uses an AVL tree instead of a Merkle Patricia Trie (MPT) for data storage. Because of this, Sei does not have a per-account state root. The global state root is the AVL-tree root. It is also not equivalent to Ethereum's overall state root, which is an MPT root. ## Block hash Sei computes the block hash from the block header in Tendermint data format. As a result, it is different from Ethereum's block hash. ## Base fee & tips Sei supports all non‑blob transaction types, including the Pectra `SetCode` transaction (EIP‑7702). However, for a legacy (non EIP‑1559) transaction, you must specify a gas price at or above Sei's governance-set minimum gas price. The minimum is currently `50 gwei` on Sei Mainnet. Query the live value with `eth_gasPrice` instead of hard-coding it. Also, excess "gas wanted/gas limit" beyond the actual "gas used" may not be refunded in full or in part. You can fetch the current EIP-1559 parameters with `seid`: ```sh theme={"dark"} seid q params subspace evm KeyTargetGasUsedPerBlock key: KeyTargetGasUsedPerBlock subspace: evm value: '"850000"' ``` ```sh theme={"dark"} seid q params subspace evm KeyMaxDynamicBaseFeeUpwardAdjustment key: KeyMaxDynamicBaseFeeUpwardAdjustment subspace: evm value: '"0.007500000000000000"' ``` ## Non-EVM transactions On Sei, non-EVM transactions may update state that EVM transactions can access. The simplest example is bank balances. Both native Cosmos bank send transactions and EVM send transactions may update them. As a result, an offchain application that parses only EVM transactions may find state changes that it cannot attribute to any EVM transaction. ## EVM transaction envelope restrictions On Sei, EVM transactions are carried inside a Cosmos transaction envelope. That envelope must not contain any Cosmos-specific fields. Tooling that builds raw transactions should know about these Sei-specific differences from a plain Ethereum transaction: ### No Cosmos wrapper fields on EVM transactions An EVM transaction must not populate any of the Cosmos wrapper fields. If any of these fields are set, Sei rejects the transaction: * `memo` * `timeout_height` * extension options (`extension_options` / `non_critical_extension_options`) * `signer_infos` * fee amount, fee `payer`, and fee `granter` * top-level `signatures` The EVM transaction's own signature (`v`, `r`, `s`) is inside the EVM payload itself, so the transaction does not need any of these Cosmos-level fields. Sei applies this check uniformly to all EVM transactions. ### Whole-block rejection on transaction decode failure During proposal processing, Sei decodes every transaction in a proposed block. If any transaction fails to decode or panics during decode, Sei rejects the **entire block proposal**. It does not silently skip the offending transaction (treat it as nil) and continue with the rest of the block. This also affects block gas accounting. A transaction that could not be decoded no longer contributes zero gas and gets skipped. Instead, its presence causes Sei to reject the block proposal outright. > [!WARNING] > > Make sure that your signing and broadcast tooling submits only transactions that decode cleanly. This is a consensus-level behavior change. A single undecodable transaction now invalidates the whole proposal. Tooling that produces malformed or non-canonical transactions can no longer rely on Sei to drop them individually from an otherwise-valid block. ### Rejection of bloated (non-canonical) transaction bodies The transaction decoder rejects "bloated" transaction bodies. A bloated body has a raw protobuf wire encoding that is larger than the canonical re-marshal of the decoded body. The decoder rejects non-canonical encodings (for example, padded fields or an oversized `Any.Value`) with a decode error. This check has been enforced since v6.5.0. > [!WARNING] > > Make sure that your transaction-signing tooling produces a minimal, canonical envelope with no Cosmos wrapper fields populated. ## Finality Sei has instant finality. A transaction is final as soon as its block is committed (approximately 400 ms). This means that Ethereum's commitment levels "safe", "latest", "justified", and "finalized" are all the same on Sei. ## Pending state On Ethereum, the block proposer executes its proposed block first and updates its local state. Then it broadcasts the proposal to others. The updated state is marked "pending" until the node is accepted by other nodes. However, on Sei, the block proposer broadcasts the proposal first. It executes the proposal only if the proposal is accepted. This means that every node executes the block at roughly the same time, so Sei does not have a window when a "pending state" exists. ## Gas model & fees Sei does not burn the base fee. All transaction fees go to validators. Fees are calculated as: Transaction Fee = Gas Used × Gas Price **Practical implications** * Fee handling is simpler: use `gasPrice`, and you can omit `maxFeePerGas` and `maxPriorityFeePerGas`. * Fees are more stable, because higher throughput reduces fee spikes during busy periods. * Costs are typically lower. Many workloads that are costly on Ethereum become economical on Sei. > [!NOTE] > > * **Does Sei burn a base fee (EIP‑1559)?** No. > * **Who receives fees?** Validators. > * **Are Sei fees lower?** Yes, because of higher throughput and parallel execution. ## SSTORE gas cost On Sei, the gas cost of the `SSTORE` opcode is a configurable on-chain parameter. A governance proposal can adjust it without a chain upgrade. This lets governance tune storage costs based on EVM state size and network conditions. The `SSTORE` gas cost is currently set to the non-standard value of **72,000 gas**. This value is the same on Sei Mainnet and Sei Testnet. Governance [Proposal #109](https://seistream.app/proposals/109) ("Update EVM SSTORE set gas to 72000") set this value. The proposal changed the `evm` module parameter `KeySeiSstoreSetGasEIP2200` to `72000`. The values below are read **live** from the Sei EVM: Live SSTORE gas, measured on-chain Mainnet Testnet () · read with `eth_call` from the verified SstoreGasProbe contract. Governance can change this value. [Proposal #109](https://seistream.app/proposals/109) set it. To confirm the real cost yourself, make a live `eth_estimateGas` call against a Sei RPC. A Foundry `forge test --gas-report --fork-url ` report forks the chain *state*, but it applies revm's standard EVM gas schedule. As a result, it reports the Ethereum cost (approximately 22,100) instead of the Sei cost. The report is useful for relative profiling of your own logic, but not for the absolute storage-write cost. > [!NOTE] > > Because the `SSTORE` gas cost is a governance-controlled parameter, a governance proposal may change this value in the future. ## ERC token standards compatibility Sei EVM fully supports the common token standards: * **ERC‑20** (fungible tokens) * **ERC‑721** (NFTs) * **ERC‑1155** (multi‑token) Existing OpenZeppelin contracts and tools work unchanged. ## Testing & migration checklist * Redeploy your Solidity code to Sei Testnet. Most contracts do not need changes. * If you used SELFDESTRUCT, refactor it to a soft‑close pattern. * Remove the EIP‑1559 fee complexity from your UI. Use a single `gasPrice` input in frontends. * If you rely on on‑chain "randomness," integrate an oracle or VRF. * Size your `gasLimit` with a modest buffer. Parallel execution can make estimates vary slightly. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/evm-parity/evm-compatibility # EVM Compatibility > EVM feature support on Sei — what works, what differs from Ethereum, and what is not available # EVM compatibility This page documents EVM feature support on Sei. Each row shows whether a feature works as it does on standard Ethereum, behaves differently in a documented way, or is not available on Sei. Standard EVM tools (viem, wagmi, ethers, Foundry, and Hardhat) work on Sei for all rows marked **Supported**. Where Sei differs from Ethereum, the notes describe the difference so that you can account for it in your application. ## Status legend | Status | Meaning | | - | - | | Supported | Works on Sei EVM with standard Ethereum behavior. | | Supported with differences | Available on Sei, but intentionally differs from Ethereum. See the notes. | | Sei extension | A Sei-specific feature with no standard Ethereum equivalent. | | Not supported | Not available on Sei EVM. | ## Transactions | Feature | Sei status | Notes | | - | - | - | | Legacy transactions (type 0) | Supported with differences | The minimum gas price comes from Sei governance parameters, not a fixed floor. [See Gas and Fees.](https://docs.sei.io/evm/evm-parity/gas-and-fees.md) | | EIP-2930 access list transactions (type 1) | Supported | | | EIP-1559 fee market transactions (type 2) | Supported with differences | Sei does not burn the base fee. Fees go to validators instead. [See Gas and Fees.](https://docs.sei.io/evm/evm-parity/gas-and-fees.md) | | EIP-4844 blob transactions (type 3) | Not supported | Sei runs Pectra without blob transactions. [See Transaction Types.](https://docs.sei.io/evm/evm-parity/transaction-types.md) | | EIP-7702 set-code transactions (type 4) | Supported | | ## Account and state | Feature | Sei status | Notes | | - | - | - | | `eth_getBalance` | Supported | | | `eth_getTransactionCount` (nonce) | Supported | | | `eth_getCode` | Supported | | | `eth_getStorageAt` | Supported with differences | Governance can adjust the SSTORE cost. Do not hard-code gas assumptions. [See Gas and Fees.](https://docs.sei.io/evm/evm-parity/gas-and-fees.md) | | `eth_getProof` | Not supported | Since v6.7.0, the method returns JSON-RPC error `-32000`. [See Proof verification.](#proof-verification) | ## Blocks and finality | Feature | Sei status | Notes | | - | - | - | | `eth_getBlockByHash`, `eth_getBlockByNumber` | Supported | | | `eth_blockNumber` | Supported | | | Finality tags (`latest`, `safe`, `finalized`) | Supported with differences | Sei has instant finality. All three tags refer to the same commitment level. [See Finality.](https://docs.sei.io/evm/evm-parity/finality.md) | | Pending block state | Supported with differences | Sei does not guarantee Ethereum-style pending state visibility. Do not rely on pending transaction ordering. [See Finality.](https://docs.sei.io/evm/evm-parity/finality.md) | ## Logs, filters, and subscriptions | Feature | Sei status | Notes | | - | - | - | | `eth_getLogs` | Supported with differences | A query fails when it matches more than 10,000 logs (`max_log_no_block`) or about 64 MiB of log data (`max_log_bytes`). The query does not return partial results. Narrow the block range or the filters, then try again. [See Filter and subscription limits.](https://docs.sei.io/evm/reference.md#filter-and-subscription-limits) | | Filter lifecycle (`eth_newFilter`, `eth_getFilterChanges`, `eth_getFilterLogs`, `eth_uninstallFilter`) | Supported | | | WebSocket subscriptions (`eth_subscribe`) | Supported | [See WebSocket Connections.](https://docs.sei.io/evm/evm-parity/websocket.md) | ## Execution and simulation | Feature | Sei status | Notes | | - | - | - | | `eth_call` | Supported | | | `eth_estimateGas` | Supported | | | `debug_traceTransaction` | Supported | | | Block-level tracing | Supported | | ## Signing | Feature | Sei status | Notes | | - | - | - | | EIP-155 replay protection | Supported | | | Personal sign (`personal_sign`, `eth_sign`) | Supported | Depends on whether the connected wallet exposes the method. [See Signing.](https://docs.sei.io/evm/evm-parity/signing.md) | | EIP-712 typed data signing (`eth_signTypedData_v4`) | Supported | Depends on whether the connected wallet exposes the method. [See Signing.](https://docs.sei.io/evm/evm-parity/signing.md) | | EIP-1271 contract signature validation | Supported | [See Signing.](https://docs.sei.io/evm/evm-parity/signing.md) | ## Token standards | Feature | Sei status | Notes | | - | - | - | | ERC-20 | Supported | | | ERC-721 | Supported | | | ERC-1155 | Supported | | ## Account abstraction | Feature | Sei status | Notes | | - | - | - | | ERC-4337 | Supported | Requires a compatible bundler. Sei EVM is ERC-4337 compatible. | ## Name services | Feature | Sei status | Notes | | - | - | - | | ENS | Not supported | Sei does not run Ethereum mainnet ENS. You can deploy application-level name services as contracts. | ## Sei extensions These features are specific to Sei and have no standard Ethereum equivalent. The `@sei-js` packages expose them as a layer on top of standard EVM tooling. | Feature | Notes | | - | - | | Sei precompiles (staking, governance, distribution, P256, JSON, Solo, pointers, and the CosmWasm bridge) | EVM contracts at deterministic addresses. `@sei-js/precompiles` exports the ABIs and contract addresses for use with any standard EVM library. It does not export the retired Oracle and disabled IBC precompiles. | | Pointer contracts (CW20 ↔ ERC-20, CW721 ↔ ERC-721, CW1155 ↔ ERC-1155) | Bridge between CosmWasm and EVM token standards. Standard ERC interfaces work with pointer contracts. To look up a pointer, use `POINTERVIEW_PRECOMPILE_ADDRESS` (`0x…100A`). To register a pointer, use `POINTER_PRECOMPILE_ADDRESS` (`0x…100B`). | | Native address association (EVM ↔ Cosmos address) | Links an EVM address and a Cosmos address for the same account. Some Sei-native flows require this association first. | ## Unsupported RPC methods These JSON-RPC methods are not available on Sei or return errors: ### Blob / EIP-4844 | Method | Reason | | - | - | | `eth_blobBaseFee` | Sei runs Pectra without blob transaction support. This method does not exist on Sei. | | `engine_getBlobsV1` | Sei does not support blob data availability endpoints. | ### Pending state | Method | Behavior on Sei | | - | - | | `eth_getBlockByNumber("pending")` | Returns the latest committed block. Sei does not maintain an Ethereum-style pending block. | | `eth_getTransactionCount(address, "pending")` | Returns the sender's next nonce, including the sender's transactions in the mempool. If the sender has no transactions in the mempool, it returns the same value as `"latest"`. | | `eth_newPendingTransactionFilter` | Not supported. The call always returns an error. Use `eth_newBlockFilter` or a `newHeads` subscription instead. | | `eth_subscribe("newPendingTransactions")` | Not supported. Sei supports only the `newHeads` and `logs` subscriptions. | ### Proof verification | Method | Behavior on Sei | | - | - | | `eth_getProof` | Not supported since v6.7.0. Sei registers the method, but every call returns JSON-RPC error `-32000` with the message `eth_getProof is not supported yet; please reach out to the Sei Labs if you need this endpoint`. | ### Deprecated / removed opcodes | Method | Reason | | - | - | | `eth_accounts` | Returns an empty array on Sei RPC nodes. To get accounts from the connected user's wallet, use a wallet library (`eth_requestAccounts`) instead. | This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/evm-parity/finality # Finality and Block Tags > How Sei instant finality affects block tag behavior and pending state # Finality and block tags Sei uses Twin Turbo Consensus, which gives instant finality. Every committed block is final immediately. There is no period in which a reorganization could remove it. Because of this, block tags behave differently on Sei than on Ethereum. ## Block tags On Ethereum, `latest`, `safe`, and `finalized` refer to different points in the chain: * `latest`: the most recent block, possibly not yet safe * `safe`: a block that is unlikely to be reorganized * `finalized`: a block that is permanently committed On Sei, all three tags resolve to the same block. After a block is committed, there is no reorg risk at any point, so the distinction does not exist. ```ts viem theme={"dark"} import { createPublicClient, http } from 'viem'; import { sei } from 'viem/chains'; const client = createPublicClient({ chain: sei, transport: http() }); // All three return the same block on Sei const latest = await client.getBlock({ blockTag: 'latest' }); const safe = await client.getBlock({ blockTag: 'safe' }); const finalized = await client.getBlock({ blockTag: 'finalized' }); ``` ```ts ethers theme={"dark"} import { ethers } from 'ethers'; const provider = new ethers.JsonRpcProvider('https://evm-rpc.sei-apis.com'); // All three return the same block on Sei const latest = await provider.getBlock('latest'); const safe = await provider.getBlock('safe'); const finalized = await provider.getBlock('finalized'); ``` ## Waiting for confirmation Because finality is instant, you do not need to wait for multiple confirmations. `waitForTransactionReceipt` resolves as soon as the transaction is included in a block. ```ts viem theme={"dark"} const receipt = await client.waitForTransactionReceipt({ hash }); // receipt is already final — no further confirmation needed ``` ```ts ethers theme={"dark"} const tx = await signer.sendTransaction({ /* ... */ }); const receipt = await tx.wait(1); // 1 confirmation is final on Sei ``` ## Pending state Sei does not expose Ethereum-style pending state. Do not rely on: * Reading pending transactions from the mempool * `eth_getBlockByNumber` with `'pending'` * A pending nonce that differs from the confirmed nonce If your application polls pending transactions or depends on pending state visibility, replace that pattern. Use confirmed-block polling or WebSocket subscriptions on committed blocks instead. ## Practical impact | Pattern | On Ethereum | On Sei | | - | - | - | | Wait for `finalized` tag | Waits \~13 minutes | Returns immediately | | Check `safe` vs `latest` | Different blocks | Same block | | Read pending mempool | Supported | Not reliable | | Confirmation count | Meaningful | 1 is sufficient | This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/evm-parity/gas-and-fees # Gas and Fees > Sei gas price floor, EIP-1559 fee model differences, and SSTORE cost # Gas and fees Sei supports both legacy and EIP-1559 transactions. However, the fee model differs from Ethereum in three ways that affect how you estimate and set gas. ## Legacy gas price floor Legacy transactions (type 0) on Sei must meet a minimum gas price set by on-chain governance. Governance proposals can change this floor, so do not hard-code a specific value. To read the current minimum, use `eth_gasPrice`: ```ts viem theme={"dark"} import { createPublicClient, http } from 'viem'; import { sei } from 'viem/chains'; const client = createPublicClient({ chain: sei, transport: http() }); const gasPrice = await client.getGasPrice(); ``` ```ts ethers theme={"dark"} import { ethers } from 'ethers'; const provider = new ethers.JsonRpcProvider('https://evm-rpc.sei-apis.com'); const feeData = await provider.getFeeData(); const gasPrice = feeData.gasPrice; ``` ## EIP-1559 fee model Sei supports EIP-1559 transactions (type 2), but it does not burn the base fee. All fees go to validators. On Ethereum, part of the fee is burned. This does not affect how you construct or send transactions. `maxFeePerGas` and `maxPriorityFeePerGas` work as expected. It matters only if your application models token supply or shows fee-burn information to users. ```ts viem theme={"dark"} const fees = await client.estimateFeesPerGas(); // fees.maxFeePerGas and fees.maxPriorityFeePerGas are usable as-is ``` ```ts ethers theme={"dark"} const feeData = await provider.getFeeData(); // feeData.maxFeePerGas and feeData.maxPriorityFeePerGas are usable as-is ``` ### Effective gas price on receipts For dynamic-fee (type 2) transactions, the `effectiveGasPrice` field of the transaction receipt reports the **actual price charged**, not the fee cap. That price is `min(baseFee + maxPriorityFeePerGas, maxFeePerGas)`. This matches standard EIP-1559 semantics. Clients such as ethers and Hardhat therefore see the same `effectiveGasPrice` behavior that they expect from Ethereum. In practice, when your priority tip plus the base fee stays below `maxFeePerGas`, the receipt reports `baseFee + maxPriorityFeePerGas`, not `maxFeePerGas`. To compute what a transaction paid, use the receipt's `effectiveGasPrice`, not `maxFeePerGas`. ## SSTORE cost On Sei, governance can adjust the gas cost of `SSTORE` (a write to contract storage). The current cost is **72,000 gas** on both Sei Mainnet and Sei Testnet. For details, see [Differences with Ethereum](https://docs.sei.io/evm/differences-with-ethereum.md#sstore-gas-cost). Treat this number as the current value, not a constant. Do not hard-code storage write estimates in your application. Always use `eth_estimateGas` for any transaction that writes to storage: ```ts viem theme={"dark"} const gas = await client.estimateGas({ account, to: contractAddress, data: encodedCalldata, }); // Add a buffer for governance changes during high-activity periods const gasWithBuffer = (gas * 120n) / 100n; // 20% buffer ``` ```ts ethers theme={"dark"} const gas = await provider.estimateGas({ from: signer.address, to: contractAddress, data: encodedCalldata, }); ``` > [!WARNING] > > Estimate the absolute storage-write cost with a live `eth_estimateGas` call against a Sei RPC. A Foundry `forge test --gas-report --fork-url ` report forks the chain *state*, but it runs the standard EVM gas schedule of revm. It therefore shows `SSTORE` at the Ethereum cost (approximately 22,100) instead of the Sei cost (approximately 72,000). Use the report for relative profiling of your own logic. ## Gas for precompile calls Sei precompiles charge gas based on the work that each call does: * Before a precompile decodes its arguments, it charges gas for the calldata. The charge grows with the calldata length and with the size of any `string` arguments. A call that cannot pay this charge reverts before the precompile runs. * The JSON precompile also charges 100 gas per byte of JSON input. * The pointer view precompile also charges for the state that each lookup reads. * The P256 precompile also charges a fixed 3,450 gas per verification, the same as RIP-7212 `P256VERIFY`. If the call cannot pay it, the call fails with an out-of-gas error. Because the cost depends on your calldata, do not hard-code gas limits for precompile calls. Use `eth_estimateGas`, as shown in the example above. ## Summary | Behavior | Ethereum | Sei | | - | - | - | | Legacy gas floor | Protocol minimum | Governance-set, can change | | Base fee | Burned | Paid to validators | | SSTORE cost | Fixed by EIP | Governance-adjustable | | `estimateGas` | Always correct to use | Required. Do not hard-code storage costs. | This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/evm-parity/transaction-types # Transaction Types > Which Ethereum transaction types are supported on Sei # Transaction types Sei supports most Ethereum transaction types. The one notable exception is blob transactions. ## Supported types | Type | EIP | Name | Sei support | | - | - | - | - | | 0 | N/A | Legacy | Supported. A governance-set minimum gas price applies. | | 1 | EIP-2930 | Access list | Supported | | 2 | EIP-1559 | Fee market | Supported. Sei does not burn the base fee. | | 4 | EIP-7702 | Set code | Supported | ### Set code (EIP-7702) auth list requirement Type 4 (EIP-7702) SetCode transactions must include a non-empty authorization list. If the auth list is empty or nil, validation rejects the transaction with the error `auth list cannot be empty`. Each authorization entry must also carry a valid (non-nil) chain ID. If you construct SetCode transactions directly, make sure that at least one authorization is present before you submit the transaction. ### Access list and auth list entry validation Since v6.5.0, `ValidateBasic` applies stricter semantic validation to EVM transactions. It rejects malformed transactions that older node versions accepted. **Access list entries (type 1 and type 2):** Validation checks each access list tuple for well-formed hex encoding. Every address must be a canonical hex address of the correct length. Every storage key must be a canonical hex hash of the correct length. Validation rejects entries with wrong-length or non-hex values. **Auth list entries (type 4):** Validation checks each authorization entry for a canonical hex address and well-formed signature values. This check is in addition to the non-empty auth list and non-nil chain ID requirements above. **Signature values:** The transaction-level `v`, `r`, and `s` values must each fit in 32 bytes. In auth list entries (type 4), `v` is limited to 1 byte, and `r` and `s` are limited to 32 bytes. In both cases, values must not be zero-padded: a multi-byte value must not have leading zero bytes. Validation rejects zero-padded signature encodings. This section is the canonical reference for field-level EVM transaction validation on Sei. [Differences with Ethereum](https://docs.sei.io/evm/differences-with-ethereum.md#evm-transaction-envelope-restrictions) covers the envelope-level restrictions: Cosmos wrapper fields, canonical protobuf encoding, and whole-block rejection on decode failure. ## Not supported | Type | EIP | Name | Notes | | - | - | - | - | | 3 | EIP-4844 | Blob | Not supported. Sei runs Pectra without blob transactions. | ## Blob transactions Sei runs the Pectra hardfork without blob transaction support. If you try to send a type 3 transaction, Sei rejects it at the RPC level. If you port code from Ethereum that uses blob transactions (for example, for rollup data availability), that code path does not apply to Sei. ## Sending transactions Standard library defaults work correctly. viem, wagmi, and ethers all default to type 2 (EIP-1559) transactions on chains that support EIP-1559, and Sei does. ```ts viem theme={"dark"} import { createWalletClient, http, parseEther } from 'viem'; import { privateKeyToAccount } from 'viem/accounts'; import { sei } from 'viem/chains'; const account = privateKeyToAccount('0xYourPrivateKey'); const client = createWalletClient({ account, chain: sei, transport: http() }); // Sends a type 2 transaction — correct default for Sei const hash = await client.sendTransaction({ to: '0xRecipient', value: parseEther('1'), }); ``` ```ts ethers theme={"dark"} import { ethers } from 'ethers'; const provider = new ethers.JsonRpcProvider('https://evm-rpc.sei-apis.com'); const wallet = new ethers.Wallet('0xYourPrivateKey', provider); // ethers defaults to EIP-1559 where supported — correct for Sei const tx = await wallet.sendTransaction({ to: '0xRecipient', value: ethers.parseEther('1'), }); ``` This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/evm-parity/websocket # WebSocket Connections > Connecting to Sei via WebSocket for real-time block and event subscriptions # WebSocket connections Sei supports `eth_subscribe` over WebSocket. With the WebSocket transports in standard libraries, you can subscribe to new blocks, event logs, and pending transactions. ## Endpoints | Network | WebSocket endpoint | | - | - | | Sei Mainnet | `wss://evm-ws.sei-apis.com` | | Sei Testnet | `wss://evm-ws-testnet.sei-apis.com` | ## Connecting ```ts viem theme={"dark"} import { createPublicClient, webSocket } from 'viem'; import { sei } from 'viem/chains'; const client = createPublicClient({ chain: sei, transport: webSocket('wss://evm-ws.sei-apis.com'), }); ``` ```ts ethers theme={"dark"} import { ethers } from 'ethers'; const provider = new ethers.WebSocketProvider('wss://evm-ws.sei-apis.com'); ``` ## Watching new blocks ```ts viem theme={"dark"} const unwatch = client.watchBlocks({ onBlock: (block) => { console.log('New block:', block.number); }, }); // Call unwatch() to stop watching ``` ```ts ethers theme={"dark"} provider.on('block', (blockNumber) => { console.log('New block:', blockNumber); }); // To stop: await provider.off('block'); await provider.destroy(); ``` ## Watching contract events ```ts viem theme={"dark"} import { parseAbiItem } from 'viem'; const unwatch = client.watchEvent({ address: '0xContractAddress', event: parseAbiItem('event Transfer(address indexed from, address indexed to, uint256 value)'), onLogs: (logs) => { console.log('Transfer events:', logs); }, }); ``` ```ts ethers theme={"dark"} import { ethers } from 'ethers'; const ERC20_ABI = ['event Transfer(address indexed from, address indexed to, uint256 value)']; const contract = new ethers.Contract('0xContractAddress', ERC20_ABI, provider); contract.on('Transfer', (from, to, value, event) => { console.log('Transfer:', { from, to, value }); }); // To stop: await contract.off('Transfer'); await provider.destroy(); ``` ## Watching ERC-20 transfers across all contracts ```ts viem theme={"dark"} import { parseAbiItem } from 'viem'; const unwatch = client.watchEvent({ event: parseAbiItem('event Transfer(address indexed from, address indexed to, uint256 value)'), onLogs: (logs) => { logs.forEach((log) => { console.log(`Transfer on ${log.address}:`, log.args); }); }, }); ``` ## Notes * Sei has instant finality, so every block emitted over WebSocket is already final. You do not need to wait for more confirmations before you act on an event. * Sei does not support `newPendingTransactions` subscriptions. You can subscribe only to `newHeads` and `logs`. ## Frame size and concurrency limits WebSocket connections use the same request limits as HTTP JSON-RPC. Operators set them in the `[evm]` section of `app.toml`: * `max_request_body_bytes` (default 5 MiB) caps each WebSocket frame and each HTTP request body. If a frame is larger, the node closes the connection with WebSocket close code `1009` and does not send a JSON-RPC error. * `max_concurrent_request_bytes` (default 128 MiB) caps the request bytes that the node processes at the same time. WebSocket and HTTP each have their own budget. * `ws_admission_timeout` (default `30s`) sets how long a WebSocket request waits for budget. When the wait expires, the client gets JSON-RPC error `-32005` and the node closes the connection, which ends its subscriptions. > [!WARNING] > > Before v6.7.0, the WebSocket frame limit was 10 MiB. If your clients send frames between 5 MiB and 10 MiB, set `max_request_body_bytes = 10485760` in `app.toml` before you upgrade. This setting also raises the HTTP body limit to 10 MiB. ## `newHeads` under Autobahn consensus When a node runs under Autobahn consensus, `eth_subscribe("newHeads")` notifications come from an in-process notifier, not from the legacy consensus event bus. The notifier publishes committed-block headers directly. Subscribers still observe headers only for fully committed blocks. However, the header payload differs from the legacy path in a few ways: * **`parentHash`, `receiptsRoot`, and `transactionsRoot` are returned as zero hashes** (`0x0000…0000`). The Autobahn block-execution path does not build a Tendermint-style hash chain, so there is no meaningful value to return in these fields. * **`stateRoot`** comes from the finalized block's `AppHash` (the post-execution application hash), not from a pre-execution header field. * **`hash`** is the Autobahn block-header hash. It is the same value that `eth_getBlockByNumber` and the receipt APIs report as `blockHash`. This keeps `newHeads` consistent with the rest of the EVM RPC surface. * **`gasUsed`** is an approximation (summed from per-transaction results) that keeps the notification cheap. Because of these differences: * Subscribers that chain-validate the head stream by linking `parentHash` values cannot rely on `newHeads` under Autobahn. They need a different mechanism. * If you need the exact `gasUsed` or the omitted hash fields, fetch the block explicitly with `eth_getBlockByNumber`. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/evm-parity/signing # Signing > Wallet signing method support and EIP-712 typed data on Sei # Signing Signing on Sei works through standard EVM libraries and wallet standards. The available methods depend on which wallet the user has connected. ## Wallet signing support | Method | Standard | Sei Global Wallet | MetaMask | WalletConnect wallets | | - | - | - | - | - | | `personal_sign` | EIP-191 | Supported | Supported | Wallet-dependent | | `eth_signTypedData_v4` | EIP-712 | Supported | Supported | Wallet-dependent | | `eth_sign` | Legacy | Not recommended | Supported | Wallet-dependent | | Transaction signing | N/A | Supported | Supported | Supported | Do not assume that every wallet supports every method. Always handle a rejection gracefully. ## Personal sign ```ts viem theme={"dark"} import { createWalletClient, custom } from 'viem'; import { sei } from 'viem/chains'; const client = createWalletClient({ chain: sei, transport: custom(window.ethereum), }); const [account] = await client.getAddresses(); const signature = await client.signMessage({ account, message: 'Hello Sei', }); ``` ```ts ethers theme={"dark"} import { ethers } from 'ethers'; const provider = new ethers.BrowserProvider(window.ethereum); const signer = await provider.getSigner(); const signature = await signer.signMessage('Hello Sei'); ``` ## EIP-712 typed data ```ts viem theme={"dark"} const [account] = await client.getAddresses(); const signature = await client.signTypedData({ account, domain: { name: 'My App', version: '1', chainId: 1329, // Sei Mainnet verifyingContract: '0xContractAddress', }, types: { Order: [ { name: 'maker', type: 'address' }, { name: 'amount', type: 'uint256' }, { name: 'expiry', type: 'uint256' }, ], }, primaryType: 'Order', message: { maker: account, amount: 1000000n, expiry: BigInt(Math.floor(Date.now() / 1000) + 3600), }, }); ``` ```ts ethers theme={"dark"} import { ethers } from 'ethers'; const provider = new ethers.BrowserProvider(window.ethereum); const signer = await provider.getSigner(); const domain = { name: 'My App', version: '1', chainId: 1329, verifyingContract: '0xContractAddress', }; const types = { Order: [ { name: 'maker', type: 'address' }, { name: 'amount', type: 'uint256' }, { name: 'expiry', type: 'uint256' }, ], }; const value = { maker: await signer.getAddress(), amount: 1000000n, expiry: BigInt(Math.floor(Date.now() / 1000) + 3600), }; const signature = await signer.signTypedData(domain, types, value); ``` ## Verifying signatures ```ts viem theme={"dark"} import { verifyMessage, verifyTypedData } from 'viem'; // Verify personal sign const valid = await verifyMessage({ address: '0xSignerAddress', message: 'Hello Sei', signature, }); // Verify EIP-712 const validTyped = await verifyTypedData({ address: '0xSignerAddress', domain, types, primaryType: 'Order', message: value, signature, }); ``` ## EIP-1271 contract signatures Smart contract wallets on Sei can validate signatures with EIP-1271 (`isValidSignature`). Use viem's `verifyMessage` with a contract address. When the address is a contract, `verifyMessage` uses EIP-1271 automatically. ```ts viem theme={"dark"} const valid = await verifyMessage({ address: '0xSmartContractWallet', message: 'Hello Sei', signature, }); // viem calls isValidSignature if the address is a contract ``` This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/migrate-from-other-evms # Migrate Your EVM dApp to Sei > Step-by-step checklist for teams that already run on another EVM chain and want to redeploy on Sei, including environment prep, contract migration, liquidity planning, and chain-specific guidance for Ethereum, Arbitrum, Base, Polygon, and Avalanche. Sei has full EVM bytecode compatibility, instant finality, and sub-second blocks. This guide is for product teams that already run on Polygon, Base, Ethereum, Arbitrum, Avalanche, or another EVM chain. It shows what you need to do to bring your dApp stack to Sei. > [!NOTE] > > **Why migrate to Sei?** > > * Block times are 400 ms, which is 30× faster than Ethereum and 2 to 5× faster than most L2s. > * Throughput is approximately 100 MGas/s, which is 20× higher than Ethereum mainnet. > * Finality is instant (approximately 400 ms). You do not wait for confirmations or for safe or finalized states. > * Parallelized execution gives higher throughput without code changes. > * Full EVM compatibility lets you deploy your existing Solidity contracts unchanged. ## Chain comparison overview Before you start the migration steps, see how Sei compares with your source chain: | Feature | Sei | Ethereum | Arbitrum | Base | Polygon PoS | Avalanche C-Chain | | - | - | - | - | - | - | - | | Chain ID | 1329 | 1 | 42161 | 8453 | 137 | 43114 | | Block time | 400 ms | \~12 s | \~250 ms | \~2 s | \~2 s | \~2 s | | Finality | Instant (\~400 ms) | \~15 min (finalized) | \~7 days (L1 settlement) | \~7 days (L1 settlement) | \~5 s (Heimdall v2) | \~1 s | | Gas limit | 12.5 M | 60M | 32M | 375M | 45M | Dynamic | | Per-tx gas cap | 12.5 M | \~16.7 M | 32 M | \~25 M | 45 M | Dynamic | | Native token | SEI | ETH | ETH | ETH | POL (MATIC) | AVAX | | Parallel execution | Yes | No | No | No | No | No | | Base fee burn | No (100% to validators) | Yes (EIP-1559) | Yes | Yes | Yes | Yes | | EVM version | Pectra (without blobs) | Fusaka | Fusaka | Pectra | Pectra | Cancun | ## Chain-specific migration guides Select your source chain to see the migration considerations for that chain: > [tab] Ethereum > > ### Migrating from Ethereum Mainnet > > **Key differences:** > > | Aspect | Ethereum | Sei | Migration impact | > | - | - | - | - | > | Block time | \~12 seconds | 400 ms | Reduce `deadline` buffers in DEX swaps by 30× | > | Finality | \~15 min for finalized | Instant (\~400 ms) | Remove confirmation polling logic | > | Gas limit | \~16.7M per TX (EIP-7825) | 12.5 M per block/TX | Split large batch deployments | > | Fee model | EIP-1559 with burn | EIP-1559 with different parameters | Update fee estimation UIs | > | Pending state | Yes | No | Remove pending transaction logic | > > **What to update:** > > 1. **Time-based logic:** If your contracts use block timestamps for deadlines, reduce the timeouts proportionally. A 30-minute deadline on Ethereum is approximately 150 blocks. On Sei, the deadline should be approximately 45 seconds (approximately 112 blocks). > > 2. **Confirmation requirements:** Remove any logic that waits for multiple confirmations or checks "safe" versus "finalized" states. Sei has instant finality. > > 3. **Gas estimation:** Sei's parallelized execution can make gas estimates vary slightly. Add a modest buffer (10 to 15%) to your `gasLimit` calculations. > > 4. **Fee UI:** Simplify your frontend. You can use a single `gasPrice` input instead of `maxFeePerGas` and `maxPriorityFeePerGas`. > > ```ts theme={"dark"} > // Before (Ethereum EIP-1559) > const tx = await contract.method({ > maxFeePerGas: ethers.parseUnits('50', 'gwei'), > maxPriorityFeePerGas: ethers.parseUnits('2', 'gwei') > }); > > // After (Sei - simplified) > const tx = await contract.method({ > gasPrice: ethers.parseUnits('50', 'gwei') // Sei minimum gas price is 50 gwei (live on mainnet — query with eth_gasPrice) > }); > ``` > > > [!NOTE] > > > > Sei enforces a minimum gas price of 50 gwei. The mempool rejects transactions below this price. Query the live value with `eth_gasPrice`, which returns the base fee plus a suggested tip. > > 5. **PREVRANDAO and DIFFICULTY:** If you use these opcodes for any randomness, integrate a VRF oracle instead. On Sei, their values are derived from block time, not from true randomness. > [tab] Arbitrum > > ### Migrating from Arbitrum > > **Key differences:** > > | Aspect | Arbitrum | Sei | Migration impact | > | - | - | - | - | > | Architecture | Optimistic Rollup (L2) | L1 | No L1 data availability concerns | > | Finality | \~7 days for L1 settlement | Instant (\~400 ms) | Simplify withdrawal flows | > | Sequencer | Centralized sequencer | Decentralized validators | No sequencer downtime risk | > | Block time | \~250 ms | 400 ms | Slightly slower, but with true finality | > | L1 gas | Pays L1 data costs | No L1 dependency | Simpler fee structure | > > **What to update:** > > 1. **Remove L1 interactions:** Find any logic that posts data to Ethereum L1 or reads data from it. Remove that logic, or replace it with a Sei-native alternative. > > 2. **Sequencer assumptions:** Remove any sequencer uptime checks or fallback logic. Sei uses decentralized consensus. > > 3. **Withdrawal delays:** If your protocol has 7-day withdrawal windows for "L1 finality," you can remove them. Sei settles instantly. > > 4. **ArbOS precompiles:** Replace any Arbitrum-specific precompiles: > > ```solidity theme={"dark"} > // Arbitrum-specific (remove) > // import { ArbSys } from "@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol"; > // uint256 blockNum = ArbSys(0x64).arbBlockNumber(); > > // Sei equivalent > uint256 blockNum = block.number; // Standard EVM > ``` > > 5. **Cross-chain messaging:** Replace Arbitrum's native bridge with [LayerZero V2](https://docs.sei.io/evm/bridging/layerzero.md) for omnichain connectivity. > [tab] Base > > ### Migrating from Base > > **Key differences:** > > | Aspect | Base | Sei | Migration impact | > | - | - | - | - | > | Architecture | OP Stack Rollup (L2) | L1 | No L1 data availability concerns | > | Finality | \~7 days for L1 settlement | Instant (\~400 ms) | Simplify withdrawal flows | > | Block time | \~2 seconds | 400 ms | 5× faster block production | > | Sequencer | Coinbase-operated | Decentralized validators | No single point of failure | > | EIP-4844 blobs | Supported | Not supported | Remove blob transaction logic | > > **What to update:** > > 1. **Remove blob transactions:** Sei does not support EIP-4844 blob transactions. If you use them for data availability, store the data differently or use Sei's native mechanisms. > > 2. **OP Stack precompiles:** Remove any precompile calls that are specific to Optimism or Base: > > ```solidity theme={"dark"} > // Base-specific (remove) > // L1Block(0x4200000000000000000000000000000000000015).number(); > > // Use standard EVM on Sei > uint256 blockNum = block.number; > ``` > > 3. **Fault proof assumptions:** Remove any logic that accounts for the 7-day challenge period. Sei has instant finality. > > 4. **Sequencer fee logic:** Base has a separate L1 data fee component. On Sei, fees are simpler: `Gas Used × Gas Price`. > > 5. **Coinbase Wallet integrations:** Update your wallet connection logic to use the Sei network parameters: > > ```ts theme={"dark"} > // Update network config > const seiMainnet = { > chainId: '0x531', // 1329 in hex > chainName: 'Sei', > nativeCurrency: { name: 'Sei', symbol: 'SEI', decimals: 18 }, > rpcUrls: ['https://evm-rpc.sei-apis.com'], > blockExplorerUrls: ['https://seiscan.io'] > }; > ``` > [tab] Polygon > > ### Migrating from Polygon PoS > > **Key differences:** > > | Aspect | Polygon PoS | Sei | Migration impact | > | - | - | - | - | > | Native token | POL (MATIC) | SEI | Update all token references | > | Block time | \~2 seconds | 400 ms | 5× faster blocks | > | Finality | \~5 s (Heimdall v2) | Instant (\~400 ms) | Remove finality delay handling | > | Checkpoints | Periodic to Ethereum | None | Simpler architecture | > | Reorgs | Possible (rare) | Never | Remove reorg handling | > > **What to update:** > > 1. **Token references:** Replace all MATIC and POL references with SEI: > > ```solidity theme={"dark"} > // Before (Polygon) > // IERC20(0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270).transfer(...); // WMATIC > > // After (Sei) - use native SEI or wrapped version > // Check ecosystem contracts for canonical WSEI address > ``` > > 2. **Checkpoint logic:** Remove any logic that waits for Polygon checkpoints to Ethereum. Sei has instant finality. > > 3. **Heimdall and Bor assumptions:** Remove any Polygon-specific validator or sidechain logic. > > 4. **Reorg handling:** You can safely remove the code that handles block reorganizations. Sei's consensus prevents reorgs. > > 5. **Gas price oracles:** Polygon's gas prices can spike significantly. Sei's fees are more stable because of higher throughput: > > ```ts theme={"dark"} > // Polygon - needed aggressive gas price management > const gasPrice = await provider.getGasPrice(); > const boostedPrice = gasPrice.mul(120).div(100); // 20% buffer > > // Sei - simpler approach works > const gasPrice = await provider.getGasPrice(); // Usually sufficient as-is > ``` > > 6. **Bridge integrations:** Replace the Polygon Bridge with [LayerZero](https://docs.sei.io/evm/bridging/layerzero.md) or other Sei-supported bridges. > [tab] Avalanche > > ### Migrating from Avalanche C-Chain > > **Key differences:** > > | Aspect | Avalanche C-Chain | Sei | Migration impact | > | - | - | - | - | > | Native token | AVAX | SEI | Update all token references | > | Block time | \~2 seconds | 400 ms | 5× faster blocks | > | Finality | \~1 second | Instant (\~400 ms) | Similar, slightly faster | > | Subnets | Supported | N/A | Remove subnet logic | > | Gas limit | Dynamic (post-Octane) | 12.5 M | Large tx headroom varies, so benchmark deployments | > > **What to update:** > > 1. **Token references:** Replace AVAX with SEI: > > ```solidity theme={"dark"} > // Before (Avalanche) > // IERC20(0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7).transfer(...); // WAVAX > > // After (Sei) > // Use native SEI or check ecosystem contracts for WSEI > ``` > > 2. **Subnet interactions:** If your dApp uses Avalanche Subnets, redesign that architecture for Sei's single-chain model, or use cross-chain messaging. > > 3. **Avalanche-specific precompiles:** Remove C-Chain precompile calls: > > ```solidity theme={"dark"} > // Avalanche-specific (remove) > // INativeMinter(0x0200000000000000000000000000000000000001).mintNativeCoin(...) > > // Use standard EVM patterns on Sei > ``` > > 4. **Gas limit adjustments:** Avalanche now uses a dynamic gas model after Octane. Sei has a fixed `12.5M` cap per block and per transaction. If you have large transactions, benchmark them on Sei and split them when needed: > > ```ts theme={"dark"} > // If deploying large contracts, batch by gas > const MAX_GAS_PER_BATCH = 11_500_000; // Leave buffer under 12.5M > ``` > > 5. **TWAP calculations:** Both chains have fast blocks. If you migrate oracle logic, adjust your observation windows: > > ```solidity theme={"dark"} > // Avalanche: 1 hour = ~1800 blocks > // Sei: 1 hour = ~9000 blocks > uint32 constant TWAP_PERIOD = 9000; // Adjust for Sei's block time > ``` ## Step 1: Evaluate compatibility Review the [Divergence from Ethereum](https://docs.sei.io/evm/differences-with-ethereum.md) page. Confirm that every assumption your contracts and frontends make still holds. | Dimension | Sei EVM | Practical effect | | - | - | - | | Block time | 400 ms | Faster TX inclusion means smaller `deadline` buffers and quicker price oracles | | Finality | Instant (\~400 ms) | No separate "safe/latest" commitment levels to poll | | Gas limit | 12.5M gas + 21 MB byte limit | Batch contract deployments by 12.5M gas blocks | | Base fee | Dynamic but never burned | Validators receive 100% of fees | | Execution | Parallelized EVM | No changes to your Solidity code are necessary | | Address format | Dual (0x + sei1...) | Same private key derives both addresses | > [!WARNING] > > **Features that need attention:** > > * **Pending state:** Sei does not have a pending state. A transaction is either included or not. > * **Blob opcodes:** Sei does not support EIP-4844 blob transactions. > * **PREVRANDAO entropy:** Use VRF oracles for randomness. PREVRANDAO returns a value derived from block time, not true randomness. > * **SELFDESTRUCT:** Refactor to "soft close" patterns. This opcode is deprecated. ## Step 2: Prepare your development environment ### Add Sei network configuration **Hardhat configuration:** ```ts title="hardhat.config.ts" theme={"dark"} import { defineConfig, configVariable } from 'hardhat/config'; import hardhatToolboxMochaEthers from '@nomicfoundation/hardhat-toolbox-mocha-ethers'; export default defineConfig({ networks: { seimainnet: { type: 'http', chainId: 1329, url: 'https://evm-rpc.sei-apis.com', accounts: [configVariable('SEI_PRIVATE_KEY')] }, seitestnet: { type: 'http', chainId: 1328, url: 'https://evm-rpc-testnet.sei-apis.com', accounts: [configVariable('SEI_PRIVATE_KEY')] } }, plugins: [hardhatToolboxMochaEthers] }); ``` Store your deployer key in Hardhat's encrypted keystore with `npx hardhat keystore set SEI_PRIVATE_KEY`. In Hardhat 3, `hardhat-verify` (bundled with the toolbox) enables contract verification through Sourcify by default. **Foundry configuration:** ```toml title="foundry.toml" theme={"dark"} [profile.default] src = "src" out = "out" libs = ["lib"] [rpc_endpoints] sei_mainnet = "https://evm-rpc.sei-apis.com" sei_testnet = "https://evm-rpc-testnet.sei-apis.com" # Verification uses Sourcify (no API key needed) # Run: forge verify-contract --verifier sourcify --chain-id
``` For complete setup instructions, see the [Hardhat tutorial](https://docs.sei.io/evm/evm-hardhat.md) and the [Foundry guide](https://docs.sei.io/evm/evm-foundry.md). ### Wallet configuration Preconfigure MetaMask or other wallets with the Sei chain parameters: ```ts theme={"dark"} const seiMainnet = { chainId: '0x531', // 1329 chainName: 'Sei', nativeCurrency: { name: 'Sei', symbol: 'SEI', decimals: 18 }, rpcUrls: ['https://evm-rpc.sei-apis.com'], blockExplorerUrls: ['https://seiscan.io'] }; await window.ethereum.request({ method: 'wallet_addEthereumChain', params: [seiMainnet] }); ``` ## Step 3: Bootstrap common infrastructure Sei already exposes canonical helper contracts. Reference them instead of redeploying them: | Component | Address | Notes | | - | - | - | | Permit2 | `0xB952578f3520EE8Ea45b7914994dcf4702cEe578` | Shared allowance manager for DEX and wallet flows | | Multicall3 | `0xcA11bde05977b3631167028862bE2a173976CA11` | Enables batching and view aggregation | | ImmutableCreate2Factory | `0x0000000000FFe8B47B3e2130213B802212439497` | Deterministic deployments with `CREATE2` | | SingletonFactory | `0xce0042B868300000d44A59004Da54A005ffdcf9f` | EIP-2470 singleton factory | For LayerZero, Safe, and other third-party contracts, see the full [Ecosystem Contracts page](https://docs.sei.io/evm/ecosystem-contracts.md). ## Step 4: Port contracts and configuration ### Parameterize chain-specific constants ```solidity theme={"dark"} // Example: Chain-aware deadline calculation function getDeadline(uint256 secondsFromNow) internal view returns (uint256) { if (block.chainid == 1329) { // Sei Mainnet // ~2.5 blocks per second on Sei return block.timestamp + secondsFromNow; } else if (block.chainid == 1) { // Ethereum // ~1 block per 12 seconds on Ethereum return block.timestamp + secondsFromNow; } return block.timestamp + secondsFromNow; } ``` ### Adjust gas and size assumptions * Keep `gasLimit` buffers modest, but make sure that calldata stays under 21 MB. * Sei's gas limit is 12.5M per block, so large deployments may need batching. ### Refactor deprecated patterns ```solidity theme={"dark"} // Before: SELFDESTRUCT (deprecated) function destroy() external onlyOwner { selfdestruct(payable(owner)); } // After: Soft close pattern bool public closed; function close() external onlyOwner { closed = true; // Transfer remaining funds payable(owner).transfer(address(this).balance); } modifier notClosed() { require(!closed, "Contract is closed"); _; } ``` ## Step 5: Plan bridging and cross-chain connectivity ### LayerZero V2 Sei's LayerZero Endpoint ID is `30280`. See the complete [LayerZero integration guide](https://docs.sei.io/evm/bridging/layerzero.md). ```ts title="layerzero.config.ts" theme={"dark"} import { EndpointId } from '@layerzerolabs/lz-definitions'; const seiContract = { eid: EndpointId.SEI_V2_MAINNET, // 30280 contractName: 'MyOFT' }; ``` ### Other bridge options * **Circle CCTP:** For USDC bridging (check availability) ## Step 6: Handle assets and oracles ### Oracle integration Sei supports these oracles: | Provider | Use case | Documentation | | - | - | - | | Pyth Network | High-frequency price feeds | [Pyth Network](https://docs.pyth.network/) | | Chainlink | Industry-standard data feeds | [Chainlink on Sei](https://docs.sei.io/evm/oracles/chainlink.md) | | RedStone | Modular oracle with push model | [RedStone on Sei](https://docs.sei.io/evm/oracles/redstone.md) | | API3 | First-party oracle data | [API3 on Sei](https://docs.sei.io/evm/oracles/api3.md) | > [!NOTE] > > **TWAP adjustments:** Sei blocks arrive approximately 30× faster than Ethereum blocks. Shorten your TWAP observation windows to keep your time-weighted calculations comparable. ## Step 7: Launch checklist ### Sei Testnet deployment * [ ] Deploy all contracts to Sei Testnet (chain ID: `1328`) * [ ] Run the full integration test suite * [ ] Verify the contracts with [Sourcify](https://docs.sei.io/evm/evm-verify-contracts.md) * [ ] Test wallet connections and transaction flows * [ ] Validate your oracle integrations * [ ] If applicable, test cross-chain messaging ### Sei Mainnet deployment * [ ] Deploy the contracts to Sei Mainnet (chain ID: `1329`) * [ ] Run the smoke tests again * [ ] Verify all contracts on Sourcify * [ ] Update the frontend configurations * [ ] Prepare migration documentation for your users > [!WARNING] > > **Fee redistribution:** If your protocol redistributes "burn rebates" to users, redesign that logic so it does not expect a base-fee burn component. Sei does not burn fees. ## Step 8: Operational readiness ### Contract verification Automate verification in CI with [Sourcify](https://docs.sei.io/evm/evm-verify-contracts.md): ```bash theme={"dark"} # Foundry verification forge verify-contract --watch \ --verifier sourcify \ --chain-id 1329 \ \ ``` ### RPC and indexer health * **Primary RPC:** `https://evm-rpc.sei-apis.com` * **Testnet RPC:** `https://evm-rpc-testnet.sei-apis.com` * For mission-critical paths, consider self-hosted nodes or [premium RPC providers](https://docs.sei.io/learn/rpc-providers.md). ### Monitoring gas parameters Query fee data periodically to keep your dashboards up to date: ```ts theme={"dark"} // Monitor current gas prices const feeHistory = await provider.send('eth_feeHistory', ['0x5', 'latest', []]); const gasPrice = await provider.getGasPrice(); ``` ## Example: Uniswap V3-style deployment Use these steps to reproduce a Uniswap V3 experience on Sei: 1. **Routers and factories:** Deploy your own, or fork the existing DragonSwap stack: * Router: `0xdD489C75be1039ec7d843A6aC2Fd658350B067Cf` * V3 Factory: `0x75FC67473A91335B5b8F8821277262a13B38c9b3` * Position Manager: `0x8B3c541c30f9b29560f56B9E44b59718916B69EF` 2. **Permit and Multicall:** Point your frontend SDK to the shared `Permit2` and `Multicall3` addresses above. 3. **Liquidity migration script:** Build a helper that: * Withdraws LP on the source chain * Bridges the underlying tokens to Sei * Mints new Sei LP positions * Includes gas estimates tuned for Sei's 12.5M block cap 4. **Price oracles:** Reuse your TWAP or Chainlink logic, but shorten the observation windows for Sei's faster blocks. 5. **Verification:** Submit your contracts to [Sourcify](https://docs.sei.io/evm/evm-verify-contracts.md) and the [Ecosystem Contracts registry](https://docs.sei.io/evm/ecosystem-contracts.md). ## Helpful references * [Divergence from Ethereum](https://docs.sei.io/evm/differences-with-ethereum.md): opcode, gas, and state differences * [EVM Networks](https://docs.sei.io/evm/networks.md): RPCs, explorers, and MetaMask payloads * [Precompiles](https://docs.sei.io/evm/precompiles/example-usage.md): interoperability patterns * [Ecosystem Contracts](https://docs.sei.io/evm/ecosystem-contracts.md): canonical addresses * [LayerZero Integration](https://docs.sei.io/evm/bridging/layerzero.md): cross-chain messaging * [Contract Verification](https://docs.sei.io/evm/evm-verify-contracts.md): contract verification guide This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/migrate-from-solana # Migrate from Solana to Sei EVM > A comprehensive guide for Solana developers transitioning to Sei EVM, covering architectural differences, concept mapping, code translation patterns, and step-by-step migration strategies. Sei combines parallelized execution, which you know from Solana, with full EVM compatibility and the extensive Ethereum tooling ecosystem. This guide helps Rust and Anchor developers translate their mental models and codebases to Solidity on Sei. > [!NOTE] > > **Why Solana developers choose Sei** > > * Sei uses optimistic parallel execution, similar to Solana's Sealevel. > * Block times of 400 ms are comparable to Solana's speed, and finality is instant. > * Throughput is approximately 100 MGas/s, with full EVM compatibility. > * You can use Ethereum's mature tooling, audited contracts, and developer resources. > * You do not declare dependencies. Unlike Solana, Sei handles parallelization automatically. ## Understanding the paradigm shift Before you write code, understand the architectural differences between Solana and EVM-based chains such as Sei. ### Execution model comparison | Aspect | Solana | Sei EVM | | - | - | - | | Language | Rust (with Anchor framework) | Solidity | | Account model | Programs + Accounts (separated code and data) | Contracts (code and storage unified) | | State storage | Flat account data with owner programs | Contract storage slots (key-value) | | Parallelization | Explicit (declare accounts upfront) | Optimistic (automatic conflict detection) | | Block time | \~400ms | 400ms | | Finality | \~2.5-4.5 seconds (32 confirmations) | Instant (single block) | | Fee model | Compute units + priority fees + rent | Gas × Gas Price (no rent) | | Cross-contract calls | CPI (Cross-Program Invocation) | Internal/External function calls | | Deterministic addresses | PDAs (Program Derived Addresses) | CREATE2 / ImmutableCreate2Factory | | Token standard | SPL Token | ERC-20 / ERC-721 / ERC-1155 | | Dev tooling | Anchor, Solana CLI, solana-web3.js | Hardhat, Foundry, ethers.js, viem | ## Core concept mapping ### Programs → smart contracts On Solana, you write **programs** that are stateless executables. Data lives in separate **accounts** that programs can read and modify. On Sei EVM, **smart contracts** combine code and state in a single entity. > [tab] Solana (Anchor) > > ```rust theme={"dark"} > // Solana: Program is stateless, data in accounts > #[program] > pub mod counter { > use super::*; > > pub fn initialize(ctx: Context) -> Result<()> { > let counter = &mut ctx.accounts.counter; > counter.count = 0; > counter.authority = ctx.accounts.authority.key(); > Ok(()) > } > > pub fn increment(ctx: Context) -> Result<()> { > let counter = &mut ctx.accounts.counter; > counter.count += 1; > Ok(()) > } > } > > #[account] > pub struct Counter { > pub count: u64, > pub authority: Pubkey, > } > > #[derive(Accounts)] > pub struct Initialize<'info> { > #[account(init, payer = authority, space = 8 + 8 + 32)] > pub counter: Account<'info, Counter>, > #[account(mut)] > pub authority: Signer<'info>, > pub system_program: Program<'info, System>, > } > ``` > [tab] Sei EVM (Solidity) > > ```solidity theme={"dark"} > // Sei EVM: Contract holds both code and state > // SPDX-License-Identifier: MIT > pragma solidity ^0.8.22; > > contract Counter { > uint256 public count; > address public authority; > > constructor() { > count = 0; > authority = msg.sender; > } > > function increment() external { > count += 1; > } > } > ``` **Key differences:** * You do not allocate account space. Storage grows dynamically. * You do not validate a `Signer` explicitly. `msg.sender` is always authenticated. * You do not import a system program. Native operations are built into the EVM. ### PDAs → CREATE2 deterministic addresses Solana's **Program Derived Addresses (PDAs)** let you create deterministic addresses from seeds. On the EVM, you get similar functionality with `CREATE2`. > [tab] Solana PDA > > ```rust theme={"dark"} > // Solana: PDA derivation > let (pda, bump) = Pubkey::find_program_address( > &[ > b"vault", > user.key().as_ref(), > ], > &program_id, > ); > > // In Anchor account validation > #[account( > seeds = [b"vault", user.key().as_ref()], > bump, > )] > pub vault: Account<'info, Vault>, > ``` > [tab] Sei EVM CREATE2 > > ```solidity theme={"dark"} > // Sei EVM: CREATE2 for deterministic addresses > // Using ImmutableCreate2Factory at 0x0000000000FFe8B47B3e2130213B802212439497 > > function computeAddress( > bytes32 salt, > bytes32 bytecodeHash > ) public view returns (address) { > return address(uint160(uint256(keccak256(abi.encodePacked( > bytes1(0xff), > address(this), > salt, > bytecodeHash > ))))); > } > > // Or use a mapping pattern for user-specific data > mapping(address => Vault) public vaults; > ``` ### CPI → contract calls Solana's **Cross-Program Invocation (CPI)** becomes a simple function call in Solidity: > [tab] Solana CPI > > ```rust theme={"dark"} > // Solana: CPI to token program > use anchor_spl::token::{self, Transfer}; > > let cpi_accounts = Transfer { > from: ctx.accounts.from_token_account.to_account_info(), > to: ctx.accounts.to_token_account.to_account_info(), > authority: ctx.accounts.authority.to_account_info(), > }; > let cpi_program = ctx.accounts.token_program.to_account_info(); > let cpi_ctx = CpiContext::new(cpi_program, cpi_accounts); > > token::transfer(cpi_ctx, amount)?; > ``` > [tab] Sei EVM Contract Call > > ```solidity theme={"dark"} > // Sei EVM: Direct contract call > import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; > > function transferTokens( > address token, > address to, > uint256 amount > ) external { > // Direct interface call - no account setup needed > IERC20(token).transferFrom(msg.sender, to, amount); > } > ``` ### SPL Token → ERC-20 > [tab] SPL Token (Rust) > > ```rust theme={"dark"} > // Solana SPL Token - requires token accounts > #[derive(Accounts)] > pub struct TransferTokens<'info> { > #[account(mut)] > pub from: Account<'info, TokenAccount>, > #[account(mut)] > pub to: Account<'info, TokenAccount>, > pub authority: Signer<'info>, > pub token_program: Program<'info, Token>, > } > ``` > [tab] ERC-20 (Solidity) > > ```solidity theme={"dark"} > // Sei EVM ERC-20 - balances stored in contract > // SPDX-License-Identifier: MIT > pragma solidity ^0.8.22; > > import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; > > contract MyToken is ERC20 { > constructor() ERC20("MyToken", "MTK") { > _mint(msg.sender, 1000000 * 10**18); > } > } > ``` **Key ERC-20 differences from SPL:** * ERC-20 has no Associated Token Accounts (ATAs). Balances are stored directly in the contract. * Approvals use the `approve()` and `transferFrom()` pattern. * The basic implementation has no mint or freeze authorities. To add them, use `Ownable`. ## Fee model translation To estimate costs accurately, learn how the fee models differ: | Solana concept | Sei EVM equivalent | Notes | | - | - | - | | Compute units (CU) | Gas | Both measure computational work | | Priority fee | Gas price | Higher price = faster inclusion | | Rent | None | Sei has no rent. Storage is permanent. | | Rent exemption | N/A | No minimum balance requirements | | Base fee | Dynamic base fee | Sei does not burn the base fee | ```ts theme={"dark"} // Solana fee estimation const computeUnits = 200_000; const priorityFee = 1_000; // microlamports per CU const rentExempt = await connection.getMinimumBalanceForRentExemption(accountSize); // Sei EVM fee estimation const gasLimit = 200_000n; const gasPrice = await provider.getGasPrice(); // ~50–55 gwei on Sei (mainnet floor is 50 gwei) const fee = gasLimit * gasPrice; // No rent to consider ``` > [!NOTE] > > **No rent on Sei** > > On Solana, accounts can be garbage collected if rent is not paid. On Sei EVM, storage is permanent. This simplifies your application logic: you do not need to track rent-exempt minimums or worry about account closure. ## Parallelization: automatic vs explicit On Sei, parallelization is **automatic**. ### Solana: explicit account declaration On Solana, you must declare upfront every account that a transaction will touch: ```rust theme={"dark"} // Solana: Must declare all accounts for parallelization #[derive(Accounts)] pub struct Swap<'info> { #[account(mut)] pub user_token_a: Account<'info, TokenAccount>, #[account(mut)] pub user_token_b: Account<'info, TokenAccount>, #[account(mut)] pub pool_token_a: Account<'info, TokenAccount>, #[account(mut)] pub pool_token_b: Account<'info, TokenAccount>, #[account(mut)] pub pool_state: Account<'info, PoolState>, // ... more accounts } ``` ### Sei: optimistic parallelization On Sei, you write normal Solidity, and the runtime handles parallelization: ```solidity theme={"dark"} // Sei EVM: Just write normal code function swap( address tokenIn, address tokenOut, uint256 amountIn ) external returns (uint256 amountOut) { // Sei's parallelization engine automatically: // 1. Estimates which storage slots will be accessed // 2. Runs non-conflicting transactions in parallel // 3. Re-executes conflicts sequentially IERC20(tokenIn).transferFrom(msg.sender, address(this), amountIn); amountOut = calculateOutput(amountIn); IERC20(tokenOut).transfer(msg.sender, amountOut); } ``` > [!WARNING] > > **Optimizing for parallelization** > > Avoid global counters that every transaction updates. Use user-partitioned storage instead. Sei handles parallelization automatically, but you can still optimize your contracts for better parallel performance. For detailed patterns, see [Optimizing for Parallelization](https://docs.sei.io/evm/best-practices/optimizing-for-parallelization.md). ## Step 1: Set up your development environment ### Install required tools ```bash theme={"dark"} # Install Node.js (if not already installed) # https://nodejs.org/ # Install Hardhat (recommended for Solana devs transitioning) npm install --save-dev hardhat @nomicfoundation/hardhat-toolbox-mocha-ethers # Or install Foundry (Rust-based, may feel more familiar) curl -L https://foundry.paradigm.xyz | bash foundryup ``` ### Configure for Sei > [tab] Hardhat > > ```ts title="hardhat.config.ts" theme={"dark"} > import { defineConfig, configVariable } from 'hardhat/config'; > import hardhatToolboxMochaEthers from '@nomicfoundation/hardhat-toolbox-mocha-ethers'; > > export default defineConfig({ > solidity: '0.8.22', > networks: { > seimainnet: { > type: 'http', > chainId: 1329, > url: 'https://evm-rpc.sei-apis.com', > accounts: [configVariable('SEI_PRIVATE_KEY')] > }, > seitestnet: { > type: 'http', > chainId: 1328, > url: 'https://evm-rpc-testnet.sei-apis.com', > accounts: [configVariable('SEI_PRIVATE_KEY')] > } > }, > plugins: [hardhatToolboxMochaEthers] > }); > ``` > > Store your deployer key in Hardhat's encrypted keystore instead of a plaintext `.env` file: > > ```bash theme={"dark"} > npx hardhat keystore set SEI_PRIVATE_KEY > ``` > [tab] Foundry > > ```toml title="foundry.toml" theme={"dark"} > [profile.default] > src = "src" > out = "out" > libs = ["lib"] > solc_version = "0.8.22" > > [rpc_endpoints] > sei_mainnet = "https://evm-rpc.sei-apis.com" > sei_testnet = "https://evm-rpc-testnet.sei-apis.com" > > # Verification uses Sourcify (no API key needed) > # Run: forge verify-contract --verifier sourcify --chain-id
> ``` ### Wallet setup Configure MetaMask or any EVM wallet for Sei: ```ts theme={"dark"} const seiMainnet = { chainId: '0x531', // 1329 in hex chainName: 'Sei', nativeCurrency: { name: 'Sei', symbol: 'SEI', decimals: 18 }, rpcUrls: ['https://evm-rpc.sei-apis.com'], blockExplorerUrls: ['https://seiscan.io'] }; ``` ## Step 2: Translate your Solana program ### Common pattern translations #### Initializing state > [tab] Solana > > ```rust theme={"dark"} > pub fn initialize(ctx: Context, initial_value: u64) -> Result<()> { > let state = &mut ctx.accounts.state; > state.value = initial_value; > state.authority = ctx.accounts.authority.key(); > state.bump = ctx.bumps.state; > Ok(()) > } > > #[account] > pub struct State { > pub value: u64, > pub authority: Pubkey, > pub bump: u8, > } > ``` > [tab] Sei EVM > > ```solidity theme={"dark"} > contract MyContract { > uint256 public value; > address public authority; > > constructor(uint256 initialValue) { > value = initialValue; > authority = msg.sender; > } > } > ``` #### Access control > [tab] Solana > > ```rust theme={"dark"} > // Solana: Check signer matches authority > pub fn restricted_action(ctx: Context) -> Result<()> { > require!( > ctx.accounts.authority.key() == ctx.accounts.state.authority, > ErrorCode::Unauthorized > ); > // ... action > Ok(()) > } > > #[derive(Accounts)] > pub struct RestrictedAction<'info> { > #[account(mut)] > pub state: Account<'info, State>, > pub authority: Signer<'info>, > } > ``` > [tab] Sei EVM > > ```solidity theme={"dark"} > // Sei EVM: Use modifier pattern > import "@openzeppelin/contracts/access/Ownable.sol"; > > contract MyContract is Ownable { > constructor() Ownable(msg.sender) {} > > function restrictedAction() external onlyOwner { > // ... action > } > } > > // Or manual check > contract MyContract { > address public authority; > > modifier onlyAuthority() { > require(msg.sender == authority, "Unauthorized"); > _; > } > > function restrictedAction() external onlyAuthority { > // ... action > } > } > ``` #### Error handling > [tab] Solana > > ```rust theme={"dark"} > // Solana: Custom error enum > #[error_code] > pub enum ErrorCode { > #[msg("Insufficient balance")] > InsufficientBalance, > #[msg("Invalid amount")] > InvalidAmount, > #[msg("Unauthorized")] > Unauthorized, > } > > // Usage > require!(amount > 0, ErrorCode::InvalidAmount); > ``` > [tab] Sei EVM > > ```solidity theme={"dark"} > // Sei EVM: Custom errors (gas efficient) > error InsufficientBalance(uint256 available, uint256 required); > error InvalidAmount(); > error Unauthorized(); > > // Usage > if (amount == 0) revert InvalidAmount(); > if (balance < required) revert InsufficientBalance(balance, required); > ``` #### Events/logs > [tab] Solana > > ```rust theme={"dark"} > // Solana: Emit event macro > use anchor_lang::prelude::*; > > #[event] > pub struct TransferEvent { > pub from: Pubkey, > pub to: Pubkey, > pub amount: u64, > } > > // Emit > emit!(TransferEvent { > from: ctx.accounts.from.key(), > to: ctx.accounts.to.key(), > amount, > }); > ``` > [tab] Sei EVM > > ```solidity theme={"dark"} > // Sei EVM: Event declaration and emission > event Transfer( > address indexed from, > address indexed to, > uint256 amount > ); > > // Emit > emit Transfer(from, to, amount); > ``` ## Step 3: Frontend migration ### SDK comparison | Solana | Sei EVM | Notes | | - | - | - | | `@solana/web3.js` | `ethers.js` / `viem` | Core blockchain interaction | | `@coral-xyz/anchor` | `typechain` | Type-safe contract interaction | | `@solana/wallet-adapter` | `wagmi` / `RainbowKit` | Wallet connection | | Phantom, Solflare | MetaMask, Rabby, Backpack | Popular wallets | ### Code translation > [tab] Solana (web3.js) > > ```ts theme={"dark"} > import { Connection, PublicKey } from '@solana/web3.js'; > import { Program, AnchorProvider } from '@coral-xyz/anchor'; > > // Connect > const connection = new Connection('https://api.mainnet-beta.solana.com'); > const provider = new AnchorProvider(connection, wallet, {}); > const program = new Program(idl, programId, provider); > > // Read state > const state = await program.account.state.fetch(stateAddress); > > // Send transaction > const tx = await program.methods > .increment() > .accounts({ > state: stateAddress, > authority: wallet.publicKey > }) > .rpc(); > ``` > [tab] Sei EVM (ethers.js) > > ```ts theme={"dark"} > import { ethers } from 'ethers'; > > // Connect > const provider = new ethers.JsonRpcProvider('https://evm-rpc.sei-apis.com'); > const signer = new ethers.Wallet(privateKey, provider); > const contract = new ethers.Contract(contractAddress, abi, signer); > > // Read state > const value = await contract.value(); > > // Send transaction > const tx = await contract.increment(); > await tx.wait(); > ``` ## Step 4: Testing your migrated code ### Test framework comparison > [tab] Anchor Tests > > ```ts theme={"dark"} > import * as anchor from '@coral-xyz/anchor'; > import { Program } from '@coral-xyz/anchor'; > import { Counter } from '../target/types/counter'; > > describe('counter', () => { > const provider = anchor.AnchorProvider.env(); > anchor.setProvider(provider); > const program = anchor.workspace.Counter as Program; > > it('Initializes', async () => { > const counter = anchor.web3.Keypair.generate(); > await program.methods.initialize().accounts({ counter: counter.publicKey }).signers([counter]).rpc(); > > const account = await program.account.counter.fetch(counter.publicKey); > expect(account.count.toNumber()).to.equal(0); > }); > }); > ``` > [tab] Hardhat Tests > > ```ts theme={"dark"} > import { expect } from 'chai'; > import { network } from 'hardhat'; > > // Hardhat 3 exposes ethers through a network connection rather than a global import > const { ethers } = await network.create(); > > describe('Counter', function () { > it('Initializes', async function () { > const Counter = await ethers.getContractFactory('Counter'); > const counter = await Counter.deploy(); > > expect(await counter.count()).to.equal(0); > }); > > it('Increments', async function () { > const Counter = await ethers.getContractFactory('Counter'); > const counter = await Counter.deploy(); > > await counter.increment(); > expect(await counter.count()).to.equal(1); > }); > }); > ``` ## Step 5: Deploy and verify ### Deploy to testnet ```bash theme={"dark"} # Hardhat npx hardhat run scripts/deploy.ts --network seitestnet # Foundry forge create --rpc-url https://evm-rpc-testnet.sei-apis.com \ --private-key $PRIVATE_KEY \ --broadcast \ src/Counter.sol:Counter ``` ### Verify contract ```bash theme={"dark"} # Hardhat npx hardhat verify --network seitestnet # Foundry forge verify-contract \ --chain-id 1328 \ --verifier sourcify \ \ src/Counter.sol:Counter ``` ## Common migration pitfalls ### 1. Expecting rent ```solidity theme={"dark"} // ❌ Wrong: No need to check rent exemption require(address(this).balance >= rentExempt, "Not rent exempt"); // ✅ Correct: Just use the contract normally // Storage persists without rent payments ``` ### 2. Manual account validation ```solidity theme={"dark"} // ❌ Wrong: Over-engineering account checks (Solana habit) require(accountOwner == expectedOwner, "Invalid account owner"); // ✅ Correct: EVM handles this via contract addresses // msg.sender is already authenticated ``` ### 3. Expecting explicit parallelization ```solidity theme={"dark"} // ❌ Wrong: Trying to declare "accounts" for parallelization function swap(address[] memory accounts) external { ... } // ✅ Correct: Write normal code, Sei handles parallelization function swap(address tokenIn, address tokenOut, uint256 amount) external { ... } ``` ### 4. Using lamports mental model ```solidity theme={"dark"} // ❌ Wrong: Solana-style lamports uint256 amount = 1_000_000_000; // 1 SOL in lamports // ✅ Correct: Use wei (18 decimals for SEI) uint256 amount = 1 ether; // 1 SEI = 1e18 wei uint256 amount = 1e18; // Same thing ``` ## Ecosystem infrastructure ### Available on Sei | Component | Solana equivalent | Sei address/info | | - | - | - | | Multicall3 | N/A | `0xcA11bde05977b3631167028862bE2a173976CA11` | | Permit2 | N/A | `0xB952578f3520EE8Ea45b7914994dcf4702cEe578` | | CREATE2 Factory | N/A | `0x0000000000FFe8B47B3e2130213B802212439497` | | Oracle | Pyth Network, Switchboard | [Pyth](https://docs.sei.io/evm/oracles/pyth-network.md), [RedStone](https://docs.sei.io/evm/oracles/redstone.md), [Chainlink](https://docs.sei.io/evm/oracles/chainlink.md) | | Bridge | Wormhole | [LayerZero](https://docs.sei.io/evm/bridging/layerzero.md), Wormhole, and many others | ## Helpful resources ### Learning Solidity * [EVM with Foundry](https://docs.sei.io/evm/evm-foundry.md): Foundry setup guide and starter tutorial * [EVM with Hardhat](https://docs.sei.io/evm/evm-hardhat.md): Hardhat setup guide and starter tutorial * [Solidity Resources](https://docs.sei.io/evm/solidity-resources.md): curated Solidity learning resources * [CryptoZombies](https://cryptozombies.io): interactive Solidity tutorial * [Solidity by Example](https://solidity-by-example.org): pattern reference ### Sei-specific * [Divergence from Ethereum](https://docs.sei.io/evm/differences-with-ethereum.md): technical differences * [Optimizing for Parallelization](https://docs.sei.io/evm/best-practices/optimizing-for-parallelization.md): performance patterns * [Ecosystem Contracts](https://docs.sei.io/evm/ecosystem-contracts.md): canonical addresses > [!NOTE] > > **Need help?** > > For developer support, join the [Sei Tech Chat](https://t.me/+KZdhZ1eE-G01NmZk) on Telegram. The community is active and helps with migration questions. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/installing-seid-cli # Installing seid CLI > Complete guide to installing and setting up the Sei CLI (seid) tool, including wallet creation, EVM imports, and troubleshooting common installation issues. ## What is seid CLI?The `seid` CLI is the command-line tool to interact with Sei. It lets you manage wallets, send transactions, query network data, and perform validator operations.## Prerequisites- [Go 1.25.6 or later](https://go.dev/doc/install) is required only when you build from source. For the exact requirement, read the `go.mod` file at the release tag that you check out below, for example [`v6.6.1`](https://github.com/sei-protocol/sei-chain/blob/v6.6.1/go.mod). Prebuilt binaries have no prerequisites.## InstallationTo install `seid`, find the version that you want on the [sei-chain releases page](https://github.com/sei-protocol/sei-chain/releases). The table below lists the versions currently in use on Sei Mainnet and Sei Testnet. \ \ \ \
NetworkVersionChain IDEVM Chain ID
> [tab] Prebuilt binary (recommended) > > Each release attaches a statically linked `seid` build for `linux/amd64` with no > runtime dependencies: > > ```bash theme={"dark"} > VERSION= # e.g. v6.6.1 — see the version table above > FILE=sei-chain_${VERSION#v}_linux_x86_64.tar.gz # asset filenames omit the leading v > > curl -fLO https://github.com/sei-protocol/sei-chain/releases/download/${VERSION}/${FILE} > curl -fLO https://github.com/sei-protocol/sei-chain/releases/download/${VERSION}/checksums.txt > > # Verify integrity before trusting the binary; extract and install only if it passes > sha256sum -c checksums.txt --ignore-missing \ > && tar -xzf ${FILE} seid \ > && sudo install -m 0755 seid /usr/local/bin/seid > ``` > > > [!NOTE] > > > > Prebuilt binaries are attached from `v6.6.1` onward. For earlier versions, build > > from source. The binaries are `linux/amd64` only and omit hardware Ledger support. > > On other architectures, or if you sign with a Ledger device, build from source. > > > [!NOTE] > > > > If you previously installed `seid` with `make install`, an older copy in > > `$(go env GOPATH)/bin` can shadow `/usr/local/bin/seid`, depending on your `PATH` > > order. `which -a seid` lists every copy.> [tab] Build from source > > ```bash theme={"dark"} > git clone https://github.com/sei-protocol/sei-chain > cd sei-chain > git checkout > make install > ```To verify that `seid` is installed correctly, run this command:```bash theme={"dark"} seid version ```## Troubleshooting installation> [!WARNING] > > If you built from source and get an error such as `command not found: seid`, you may need to set your GOPATH environment variable.* To find your GOPATH, run `go env GOPATH`. * Add these lines to your `~/.bashrc` or `~/.zshrc` file:```bash theme={"dark"} export GOPATH=[your GOPATH from step 1] export PATH=$PATH:$GOPATH/bin ```For more information, see [GOPATH environment variable](https://pkg.go.dev/cmd/go#hdr-GOPATH_environment_variable) in the Go documentation.## Command overview`seid` supports all the commands that you need to interact with the chain. To list the available commands with a short description of each, run `seid`:```bash theme={"dark"} seid Start sei app Usage: seid [command] Available Commands: add-genesis-account Add a genesis account to genesis.json add-wasm-genesis-message Wasm genesis subcommands blocktest run EF blocktest collect-gentxs Collect genesis txs and output a genesis.json file config Create or query an application CLI configuration file debug Tool for helping with debugging your application ethreplay replay EVM transactions export Export state to JSON gentx Generate a genesis tx carrying a self delegation help Help about any command init Initialize private validator, p2p, genesis, and application configuration files keys Manage your application's keys log Runtime log management migrate Migrate genesis to a specified target version query Querying subcommands rollback rollback cosmos-sdk and tendermint state by one height snapshot Create a snapshot using the snapshot manager start Run the full node status Query remote node for status tendermint Tendermint subcommands tools A set of useful tools for sei chain tx Transactions subcommands validate-genesis validates the genesis file at the default location or at the location passed as an arg version Print the application binary version information Flags: -h, --help help for seid --home string directory for config and data (default "~/.sei") --log_format string The logging format (json|plain) --log_level string The logging level (trace|debug|info|warn|error|fatal|panic) --trace print out full stack trace on errors Use "seid [command] --help" for more information about a command. ```> [!NOTE] > > The `compact`, `latest_version`, and `prune` maintenance commands were removed in v6.6.0. To read the latest memIAVL version (the former `latest_version`), use `seidb memiavl-latest-version`. `min-retain-blocks` in the base `app.toml` and `ss-keep-recent` under `[state-store]` control historical-data retention.## Adding a walletTo create a new wallet, use the `seid keys` command:```bash theme={"dark"} seid keys add $NAME ```Output:```bash theme={"dark"} - name: [YOUR_KEY_NAME] type: local address: sei1[GENERATED_ADDRESS] evm_address: "" pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"[PUBLIC_KEY]"}' mnemonic: "" **Important** write this mnemonic phrase in a safe place. It is the only way to recover your account if you ever forget your password. [YOUR_24_WORD_MNEMONIC_PHRASE] ```> [!NOTE] > > Replace `$NAME` with the name that you want for this key. The command generates a seed phrase and stores the account in the CLI.> [!CAUTION] > > Write down this seed phrase and store it in a safe place. Never share your seed phrase with anyone.To import an existing seed phrase instead, add the `--recover` flag:```bash theme={"dark"} seid keys add $NAME --recover ```Output:The command prompts you to enter your seed phrase. It then imports the existing wallet into the CLI.```bash theme={"dark"} > Enter your bip39 mnemonic [ENTER_YOUR_EXISTING_MNEMONIC_PHRASE_HERE] - name: [YOUR_WALLET_NAME] type: local address: sei1[RECOVERED_ADDRESS] evm_address: "" pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"[PUBLIC_KEY]"}' mnemonic: "" ```## EVM wallet compatibility### Understanding coin typesSei supports two coin types:- Coin type 118 (default): Standard Cosmos address format - Coin type 60: Ethereum-compatible address format for EVM wallets### Creating an EVM-compatible walletTo create a new wallet that is compatible with EVM wallets such as MetaMask, run this command:```bash theme={"dark"} seid keys add $NAME --coin-type=60 ```Output:```bash theme={"dark"} - name: [YOUR_KEY_NAME] type: local address: sei1[GENERATED_ADDRESS] evm_address: "" pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"[PUBLIC_KEY]"}' mnemonic: "" **Important** write this mnemonic phrase in a safe place. It is the only way to recover your account if you ever forget your password. [YOUR_24_WORD_MNEMONIC_PHRASE] ```> [!NOTE] > > `evm_address` is empty here because the CLI shows it only after the key first broadcasts a transaction or is associated on-chain. The `0x` address is derived deterministically from the secp256k1 public key.### Importing an existing EVM walletTo import an existing wallet from MetaMask or another EVM wallet, run this command:```bash theme={"dark"} seid keys add $NAME --coin-type=60 --recover ```Output:```bash theme={"dark"} > Enter your bip39 mnemonic > [ENTER_YOUR_EXISTING_MNEMONIC_PHRASE_HERE] - name: [YOUR_WALLET_NAME] type: local address: sei1[RECOVERED_ADDRESS] evm_address: "" pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"[PUBLIC_KEY]"}' mnemonic: "" ```The command prompts you to enter your existing 12-word or 24-word seed phrase.> [!NOTE] > > To use the same address across EVM-compatible chains or to import from MetaMask, use coin type 60. For standard Cosmos operations, use the default coin type 118.## Managing walletsTo list all the wallets that you added to your local keyring, run this command:```bash theme={"dark"} seid keys list ```Output:```bash theme={"dark"} - name: [YOUR_WALLET_NAME] type: local address: sei1[WALLET_ADDRESS] evm_address: [EVM_ADDRESS] pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"[PUBLIC_KEY]"}' mnemonic: "" ... ```To see details about a specific wallet, run this command:```bash theme={"dark"} seid keys show $NAME ```Output:```bash theme={"dark"} - name: [YOUR_WALLET_NAME] type: local address: sei1[WALLET_ADDRESS] evm_address: [EVM_ADDRESS] pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"[PUBLIC_KEY]"}' mnemonic: "" ```## Deleting walletsTo delete a wallet or key, run this command:```bash theme={"dark"} seid keys delete $NAME ```Output:```bash theme={"dark"} Key reference will be deleted. Continue? [y/N]: y Key deleted forever (uh oh!) ```This command removes the specified wallet from your local keyring. Be careful, because you cannot undo this action.## Uninstalling seidTo remove `seid` from your system, delete the binary from the location where you installed it:```bash theme={"dark"} # Prebuilt binary install sudo rm /usr/local/bin/seid # Build-from-source install rm $(go env GOPATH)/bin/seid ``` This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/querying-the-evm # Querying the EVM > Read EVM state from the seid CLI: address associations, ERC20 reads, ABI-encoded payloads, and transaction details. The `seid q evm` subcommands let you read EVM state (token data, address associations, and transactions). You do not need to send a transaction or run your own node. ## Prerequisites If your machine does not run a Sei node, append the `--node` flag to every `seid q evm` command. Point it at a Sei Cosmos RPC endpoint, the same kind that `seid status` uses: ```bash theme={"dark"} --node https:// ``` The one exception is `seid q evm tx`, which uses `--evm-rpc` to point at an EVM JSON-RPC endpoint (port 8545 by convention). See [Transaction lookup](#transaction-lookup) below. > [!NOTE] > > For a list of available RPC endpoints, see [RPC endpoints](https://docs.sei.io/evm/networks.md). > [!NOTE] > > **Output format.** Most commands print YAML by default. To get JSON, pass `-o json`. ERC20 read methods (such as `name` and `balanceOf`) return a bare value with no formatting. The output shown below is the raw stdout. ## Address mapping Sei addresses (`sei1…`) and EVM addresses (`0x…`) are linked through an on-chain association. The association is set the first time an account signs an EVM transaction or calls the address-association precompile. Until then, the two address spaces are independent. ### Get Sei address from EVM address ```bash theme={"dark"} seid q evm sei-addr [evm address] ``` **Example:** ```bash theme={"dark"} seid q evm sei-addr 0xDa52B9E673d1f48FcD9916b3F606A136a8eA5e55 ``` **Output:** ```yaml theme={"dark"} associated: true sei_address: sei13ytysxs88z0fp9cssagg77ekpecrrlrwce9pwl ``` ### Get EVM address from Sei address ```bash theme={"dark"} seid q evm evm-addr [sei address] ``` **Example:** ```bash theme={"dark"} seid q evm evm-addr sei13ytysxs88z0fp9cssagg77ekpecrrlrwce9pwl ``` **Output:** ```yaml theme={"dark"} associated: true evm_address: 0xDa52B9E673d1f48FcD9916b3F606A136a8eA5e55 ``` > [!NOTE] > > If the account is not associated yet, `associated` is `false`, and the other field is empty. This is normal for accounts that have transacted on only one side of the chain. ## ERC20 contract queries Call standard view methods on any ERC20 contract: ```bash theme={"dark"} seid q evm erc20 [contract address] [method] [arguments...] ``` **Example query for Wrapped Sei (`WSEI`):** ```bash theme={"dark"} seid q evm erc20 0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7 symbol ``` **Output:** ``` WSEI ``` **Example balance query:** ```bash theme={"dark"} seid q evm erc20 0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7 balanceOf 0xDa52B9E673d1f48FcD9916b3F606A136a8eA5e55 ``` **Output (raw integer, in the smallest unit):** ``` 0 ``` > [!NOTE] > > **Supported methods:** > > * `name`: token name > * `symbol`: token symbol > * `decimals`: token decimals > * `totalSupply`: total supply > * `balanceOf [address]`: balance of an address > * `allowance [owner] [spender]`: current allowance > > For arbitrary methods or non-standard contracts, use [`payload`](#custom-abi) with the contract ABI. ## Payload generation These commands generate ABI-encoded calldata without sending a transaction. They are useful when you build `seid tx evm call-contract` calls or inspect expected calldata. > [tab] ERC20 > > ### ERC20 payload generation > > ```bash theme={"dark"} > seid q evm erc20-payload [method] [arguments...] > ``` > > **Transfer tokens (1 token, 18 decimals):** > > ```bash theme={"dark"} > seid q evm erc20-payload transfer 0xDa52B9E673d1f48FcD9916b3F606A136a8eA5e55 1000000000000000000 > ``` > > **Output:** > > ``` > a9059cbb000000000000000000000000da52b9e673d1f48fcd9916b3f606a136a8ea5e550000000000000000000000000000000000000000000000000de0b6b3a7640000 > ``` > > **Approve a spender:** > > ```bash theme={"dark"} > seid q evm erc20-payload approve 0xDa52B9E673d1f48FcD9916b3F606A136a8eA5e55 2000000000000000000 > ``` > > **Output:** > > ``` > 095ea7b3000000000000000000000000da52b9e673d1f48fcd9916b3f606a136a8ea5e550000000000000000000000000000000000000000000000001bc16d674ec80000 > ``` > > **Transfer from (pulls tokens from `from` to `to`, based on an earlier `approve`):** > > ```bash theme={"dark"} > seid q evm erc20-payload transferFrom 0xDa52B9E673d1f48FcD9916b3F606A136a8eA5e55 0xdEAD000000000000000042069420694206942069 1500000000000000000 > ``` > > **Output:** > > ``` > 23b872dd000000000000000000000000da52b9e673d1f48fcd9916b3f606a136a8ea5e55000000000000000000000000dead00000000000000004206942069420694206900000000000000000000000000000000000000000000000014d1120d7b160000 > ``` > > > [!NOTE] > > > > **Supported methods:** > > > > * `transfer [to] [amount]` > > * `approve [spender] [amount]` > > * `transferFrom [from] [to] [amount]` > > > > Amounts are in the token's smallest unit: for example, wei for an 18-decimal token, or `1000000` for 1 USDC with 6 decimals. > [tab] ERC721 > > ### ERC721 payload generation > > ```bash theme={"dark"} > seid q evm erc721-payload [method] [arguments...] > ``` > > **Approve a token ID:** > > ```bash theme={"dark"} > seid q evm erc721-payload approve 0xDa52B9E673d1f48FcD9916b3F606A136a8eA5e55 123 > ``` > > **Output:** > > ``` > 095ea7b3000000000000000000000000da52b9e673d1f48fcd9916b3f606a136a8ea5e55000000000000000000000000000000000000000000000000000000000000007b > ``` > > **Transfer a token:** > > ```bash theme={"dark"} > seid q evm erc721-payload transferFrom 0xDa52B9E673d1f48FcD9916b3F606A136a8eA5e55 0xdEAD000000000000000042069420694206942069 123 > ``` > > **Output:** > > ``` > 23b872dd000000000000000000000000da52b9e673d1f48fcd9916b3f606a136a8ea5e55000000000000000000000000dead000000000000000042069420694206942069000000000000000000000000000000000000000000000000000000000000007b > ``` > > **Set operator approval:** > > ```bash theme={"dark"} > seid q evm erc721-payload setApprovalForAll 0xdEAD000000000000000042069420694206942069 true > ``` > > **Output:** > > ``` > a22cb465000000000000000000000000dead0000000000000000420694206942069420690000000000000000000000000000000000000000000000000000000000000001 > ``` > > > [!NOTE] > > > > **Supported methods:** > > > > * `approve [spender] [tokenId]` > > * `transferFrom [from] [to] [tokenId]` > > * `setApprovalForAll [operator] [true|false]` > [tab] ERC1155 > > ### ERC1155 payload generation > > ```bash theme={"dark"} > seid q evm erc1155-payload [method] [arguments...] > ``` > > **Safe transfer:** > > ```bash theme={"dark"} > seid q evm erc1155-payload safeTransferFrom 0xDa52B9E673d1f48FcD9916b3F606A136a8eA5e55 0xdEAD000000000000000042069420694206942069 123 5 0x > ``` > > **Output:** > > ``` > f242432a000000000000000000000000da52b9e673d1f48fcd9916b3f606a136a8ea5e55000000000000000000000000dead000000000000000042069420694206942069000000000000000000000000000000000000000000000000000000000000007b000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000023078000000000000000000000000000000000000000000000000000000000000 > ``` > > **Safe batch transfer:** > > ```bash theme={"dark"} > seid q evm erc1155-payload safeBatchTransferFrom 0xDa52B9E673d1f48FcD9916b3F606A136a8eA5e55 0xdEAD000000000000000042069420694206942069 "[123,456]" "[5,10]" 0x > ``` > > **Set operator approval:** > > ```bash theme={"dark"} > seid q evm erc1155-payload setApprovalForAll 0xdEAD000000000000000042069420694206942069 true > ``` > > > [!NOTE] > > > > **Supported methods:** > > > > * `safeTransferFrom [from] [to] [tokenId] [amount] [data]` > > * `safeBatchTransferFrom [from] [to] [tokenIds] [amounts] [data]` > > * `setApprovalForAll [operator] [true|false]` > > > > For batch operations, pass arrays as quoted bracketed strings: `"[123,456]"`. The trailing `data` field is a hex string (use `0x` for empty data). > [tab] Custom ABI > > ### Custom ABI payload generation > > To encode a call against any contract, supply its ABI: > > ```bash theme={"dark"} > seid q evm payload [abi-filepath] [method] [arguments...] > ``` > > **Example:** > > ```bash theme={"dark"} > seid q evm payload ./MyContract.json myMethod arg1 arg2 > ``` > > > [!NOTE] > > > > The ABI file must be a JSON array of function definitions. It must have the same shape that Hardhat and Foundry emit: the `abi` field of an artifact, not the whole artifact. ## Pointer system Pointers bridge the EVM and CosmWasm sides of Sei. A CW20 can be exposed as an ERC20 through an EVM pointer at a `0x` address. An ERC20 can be exposed as a CW20 through a CW pointer at a `sei1…` address. The same applies to NFTs (CW721 and ERC721) and multi-token contracts (CW1155 and ERC1155). ## Transaction lookup ### Query transaction by hash This command is equivalent to `eth_getTransactionByHash`: ```bash theme={"dark"} seid q evm tx [hash] --evm-rpc [EVM RPC endpoint] ``` **Example:** ```bash theme={"dark"} seid q evm tx 0x828c91592453fe7c5bf743204495a35bf02b67b579b8f59ee7eea8af031d7c14 \ --evm-rpc https://evm-rpc.sei-apis.com ``` **Output:** ```json theme={"dark"} { "blockHash": "0x5620c15afd9a1d0ab19d7560043df6e038d731c6205974dca7a55900071e3864", "blockNumber": "0xc5e1386", "from": "0xda52b9e673d1f48fcd9916b3f606a136a8ea5e55", "gas": "0x493e0", "gasPrice": "0xe1614bd00", "maxFeePerGas": "0xe1614bd00", "maxPriorityFeePerGas": "0xe1614bd00", "hash": "0x828c91592453fe7c5bf743204495a35bf02b67b579b8f59ee7eea8af031d7c14", "input": "0x9cab5684...", "nonce": "0x0", "to": "0x7507454444fa193d39f1392076bc784b77a7a8ff", "transactionIndex": "0x0", "value": "0x0", "type": "0x2", "accessList": [], "chainId": "0x531", "v": "0x0", "r": "0x468ac709b74e666834bcc740e5156e019fd0ba40cff7f8a59a46f08bff56eb2b", "s": "0x3496458ec06b57315721cf5e6be810b9548744a5dafab1739b8fdcff23939939", "yParity": "0x0" } ``` > [!NOTE] > > This is the only `seid q evm` command that takes `--evm-rpc` (an EVM JSON-RPC endpoint, typically port 8545) instead of `--node` (a Cosmos RPC). If you omit the flag, the default is `http://0.0.0.0:8545`, which works only if you run a local node. For hosted EVM RPC endpoints, see [RPC endpoints](https://docs.sei.io/evm/networks.md). ## Common use cases ### Check token balance and info ```bash theme={"dark"} # Token metadata seid q evm erc20 0xtoken... symbol seid q evm erc20 0xtoken... decimals # Balance (raw integer, in smallest unit) seid q evm erc20 0xtoken... balanceOf 0xuser... ``` ### Prepare and send a transaction ```bash theme={"dark"} # 1. Encode the calldata PAYLOAD=$(seid q evm erc20-payload transfer 0xrecipient... 1000000000000000000) # 2. Send via seid seid tx evm call-contract 0xtoken... $PAYLOAD --from mykey ``` This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/transactions-with-seid # Transactions with seid > Complete guide to executing EVM transactions using the Sei CLI (seid). Learn how to send tokens, deploy contracts, and interact with smart contracts. ## Overview EVM transactions on Sei let you interact with smart contracts, transfer tokens, deploy contracts, and manage other blockchain operations from the command line. This guide covers all available transaction types in the `seid` CLI, from basic token transfers to complex contract interactions and precompile calls. ## Prerequisites To send transactions with the CLI, you must have keys configured in your local keyring. To select the key for a command, append `--from=[key name]` to it. If you do not have keys configured yet, generate a new key or import an existing one into your local keyring. For details, see [how to create a key](https://docs.sei.io/evm/installing-seid-cli.md). ## Network configuration If you run these commands from a machine that is not a network node, append this flag to each command: ```bash theme={"dark"} --evm-rpc http:// ``` For a list of available RPC endpoints, see [RPC endpoints](https://docs.sei.io/evm/networks.md). > [!NOTE] > > Most commands support the `--evm-rpc` flag, which sets a custom RPC endpoint. The default is `http://localhost:8545`. ## Common transaction flags All transaction commands support these common flags: * `--from=`: Specifies the key name to use for signing * `--gas-fee-cap=`: Maximum fee per unit of gas for the transaction (default varies by command) * `--gas-limit=`: Gas limit for the transaction (default varies by command) * `--evm-rpc=`: EVM RPC endpoint URL (default: `http://localhost:8545`) * `--nonce=`: Nonce override for the transaction (-1 means auto-calculate) ## Address management commands ### Associate an address This command associates the Sei address and the EVM address of the sending key on-chain. Cross-layer interactions require this association. ```bash theme={"dark"} seid tx evm native-associate [custom-message] --from= ``` The custom message identifies the association request. This command submits a native transaction, so use standard `seid` transaction flags such as `--node` and `--chain-id` instead of `--evm-rpc`. **Example:** ```bash theme={"dark"} seid tx evm native-associate "associate" \ --from=mykey \ --chain-id pacific-1 \ --node https://rpc.sei-apis.com ``` > [!NOTE] > > The legacy `seid tx evm associate-address` command and its `sei_associate` JSON-RPC method were removed. ## Token transfer commands ### Send native tokens This command sends native tokens (usei) to the target EVM address. ```bash theme={"dark"} seid tx evm send [to EVM address] [amount in wei] --from= --gas-fee-cap= --gas-limit= --evm-rpc= ``` **Parameters:** * `[to EVM address]`: Destination EVM address (0x format) * `[amount in wei]`: Amount to send in wei (smallest unit) **Default flags:** * `--gas-fee-cap=1000000000000` (1000 Gwei) * `--gas-limit=21000` **Example:** ```bash theme={"dark"} seid tx evm send 0x1234567890abcdef1234567890abcdef12345678 1000000000000000000 --from=mykey ``` **Output:** ``` Transaction hash: 0x... ``` ### Send ERC20 tokens This command sends ERC20 tokens from a specific contract to a recipient. ```bash theme={"dark"} seid tx evm erc20-send [contract addr] [recipient] [amount] --from= --gas-fee-cap= --gas-limit= --evm-rpc= ``` **Parameters:** * `[contract addr]`: ERC20 contract address * `[recipient]`: Recipient EVM address * `[amount]`: Amount in the smallest unit of the token **Default flags:** * `--gas-fee-cap=1000000000000` (1000 Gwei) * `--gas-limit=7000000` **Example:** ```bash theme={"dark"} seid tx evm erc20-send 0xTokenContract123... 0xRecipient456... 1000000 --from=mykey ``` **Output:** ``` Transaction hash: 0x... ``` ## Contract deployment commands ### Deploy contract This command deploys an EVM contract from a binary file. ```bash theme={"dark"} seid tx evm deploy [path to binary] --from= --gas-fee-cap= --gas-limit= --evm-rpc= ``` **Parameters:** * `[path to binary]`: Path to the contract binary file **Default flags:** * `--gas-fee-cap=1000000000000` (1000 Gwei) * `--gas-limit=5000000` **Example:** ```bash theme={"dark"} seid tx evm deploy ./MyContract.bin --from=mykey --gas-limit=8000000 ``` **Output:** ``` Deployer: 0x... Deployed to: 0x... Transaction hash: 0x... ``` ## Contract interaction commands ### Call contract This command calls an EVM contract with a specific payload. To generate the payload, see [Payload generation](https://docs.sei.io/evm/querying-the-evm.md#payload-generation). ```bash theme={"dark"} seid tx evm call-contract [addr] [payload hex] --value= --from= --gas-fee-cap= --gas-limit= --evm-rpc= ``` **Parameters:** * `[addr]`: Contract address * `[payload hex]`: Function call data in hex format **Default flags:** * `--gas-fee-cap=1000000000000` (1000 Gwei) * `--gas-limit=7000000` * `--value=0`: SEI value to send with the call **Example:** ```bash theme={"dark"} seid tx evm call-contract 0xContract123... 0xa9059cbb000000... --value=1000000000000000000 --from=mykey ``` **Output:** ``` Transaction hash: 0x... ``` ### Call precompile This command calls a method on a precompiled contract. Precompiles give EVM access to Cosmos SDK functionality. ```bash theme={"dark"} seid tx evm call-precompile [precompile name] [method] [args...] --value= --from= --gas-fee-cap= --gas-limit= --evm-rpc= ``` **Parameters:** * `[precompile name]`: Name of the precompiled contract * `[method]`: Method name to call * `[args...]`: Method arguments **Default flags:** * `--gas-fee-cap=1000000000000` (1000 Gwei) * `--gas-limit=7000000` * `--value=""`: SEI value to send (required for payable methods) **Examples:** *Delegate to a validator (payable, so it uses `--value`):* ```bash theme={"dark"} seid tx evm call-precompile staking delegate seivaloper1... --value=1000000000000000000 --from=mykey ``` **Available precompiles:** * `distribution`: Staking rewards management * `json`: JSON parsing utilities * `p256`: P256 cryptographic operations * `staking`: Validator delegation and staking > [!NOTE] > > For each precompile's methods, parameters, and usage patterns, see the [EVM precompiles documentation](https://docs.sei.io/evm/precompiles/example-usage.md). **Output:** ``` Transaction hash: 0x... ``` ## Advanced usage ### Custom gas settings You can customize gas settings for any transaction: ```bash theme={"dark"} seid tx evm send 0x... 1000000000000000000 \ --gas-fee-cap=2000000000000 \ --gas-limit=100000 \ --from=mykey ``` ### Nonce management Override the automatic nonce calculation: ```bash theme={"dark"} seid tx evm send 0x... 1000000000000000000 \ --nonce=42 \ --from=mykey ``` ## Error handling > [!WARNING] > > **Common issues:** > > * Insufficient balance for the transaction amount and gas > * Incorrect address formats (use the 0x prefix for EVM addresses) > * Gas limit too low for complex operations > * Nonce conflicts when you send transactions in rapid succession ## Best practices 1. Start with the default gas limits, and adjust them for transaction complexity. 2. Always verify addresses before you send transactions. 3. Use secure key storage, and never expose private keys. 4. Confirm that you are connected to the correct network. 5. Save transaction hashes so that you can track the transactions. ## Transaction requirements * The local keyring must contain the signing key. * The account must have enough tokens for the transaction amount and gas. * Use the correct address formats: 0x... for EVM addresses and seivaloper... for validators. * Make sure that you can connect to the specified RPC endpoint. * Set gas limits that suit the transaction complexity. For details about a specific command, use the help flag: ```bash theme={"dark"} seid tx evm [command] --help ``` This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/changelog # Changelog > Track the latest updates, improvements, and changes to Sei Chain. Stay informed about new features, bug fixes, and protocol upgrades. Stay up to date with the latest changes, improvements, and new features in Sei. > [!NOTE] > > This changelog is automatically synced from the [sei-chain repository](https://github.com/sei-protocol/sei-chain/blob/main/CHANGELOG.md). For the most up-to-date information, you can also view the changelog directly on GitHub. > [!NOTE] > > **Stay updated** > > To get notifications about new releases, **Watch** the [sei-protocol/sei-chain](https://github.com/sei-protocol/sei-chain) repository on GitHub. You can also follow the release announcements in the [Sei Tech Chat](https://t.me/+KZdhZ1eE-G01NmZk). ## Latest changes This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/sei-global-wallet # Sei Global Wallet Integration Guide > Learn how to integrate and use Sei Global Wallet, a cross-application embedded crypto wallet that provides persistent wallet experience across Sei ecosystem applications. > [!CAUTION] > > By logging in with Sei Global Wallet, you agree to our [Terms of Use](https://dashboard.sei.io/terms). Sei Global Wallet is a cross-application embedded crypto wallet powered by [Dynamic Global Wallets](https://www.dynamic.xyz/docs/react/global-wallets/overview). It gives users a persistent wallet experience across any integrated dApp in the Sei ecosystem. Users can authenticate and interact with familiar login methods, such as Google, Twitter, or Telegram. They do not need a browser extension or prior crypto knowledge. > [!NOTE] > > Other authentication methods are possible through Dynamic, such as existing wallet apps (for example, MetaMask). However, these methods are not currently enabled. ## What is Sei Global Wallet? Unlike traditional browser extension wallets, Sei Global Wallet is built directly into web applications. Users can authenticate with familiar methods, such as Google, Twitter, Telegram, or email. They do not need to download anything or know about crypto. ## Why use Sei Global Wallet? **For users:** * The wallet works directly in the browser, without extensions. * Users log in with Google, Twitter, Telegram, or email. * The same wallet works across all Sei ecosystem dApps. * The wallet is self-custodial: users keep full control of their keys. **For developers:** * Integration takes one line: a single EIP-6963 import works with RainbowKit, ConnectKit, Web3-React, and other compatible libraries. * `@sei-js/sei-global-wallet@2` is ESM-only and has no `require()` entry. Add the [required consumer overrides](https://github.com/sei-protocol/sei-js/tree/main/packages/sei-global-wallet#required-consumer-overrides) before you install it. ## How to create a Sei Global Wallet account 1. Go to [dashboard.sei.io](https://dashboard.sei.io) or any Sei ecosystem dApp. 2. Click **Connect Wallet**. Then select **Sei Global Wallet**. 3. Choose your preferred login method (Google, X, Telegram, or Email). 4. Complete the authentication flow. 5. Your wallet is created automatically. You can use it across all integrated Sei dApps. ## How to integrate Sei Global Wallet ### Prerequisites **EIP-6963:** A standard that lets multiple wallets coexist without conflicts. Instead of competing for `window.ethereum`, wallets announce themselves through events. Users can then choose which wallet to use. **Dynamic:** The infrastructure that powers Sei Global Wallet. It handles authentication, key management, and cross-app wallet persistence, and it keeps wallets non-custodial. ## Installation > [!WARNING] > > Add the [required consumer overrides](https://github.com/sei-protocol/sei-js/tree/main/packages/sei-global-wallet#required-consumer-overrides) to your root manifest **before** you install. Dynamic Global Wallet Client pulls `axios` and `uuid` versions with known vulnerabilities. This package cannot push overrides into your app. The npm block pins `axios` to 1.18.0, `uuid` to 11.1.1, and `ws` to 8.21.0 under `viem`. The Bun block pins only `axios` and `uuid`. When Dynamic ships a release that fixes those pins, remove the overrides. Install the Sei Global Wallet package: ```bash theme={"dark"} npm install @sei-js/sei-global-wallet ``` or ```bash theme={"dark"} yarn add @sei-js/sei-global-wallet ``` Import the package to register the wallet: ```js theme={"dark"} import '@sei-js/sei-global-wallet/eip6963'; ``` > [!NOTE] > > `@sei-js/sei-global-wallet@2` is ESM-only. The `/eip6963` import still registers the provider. It also exports `registerEIP6963Provider`, `unregisterEIP6963Provider`, and `eip6963ProviderInfo`. Other entrypoints are `/ethereum`, `/solana`, and `/zerodev`. > [!WARNING] > > Make sure that the provider stack of your dApp is configured correctly to interact with the wallet. Importing the package only registers the wallet for discovery. Most wallet connection libraries that support EIP-6963 detect the wallet automatically after the import. *** ## Integration examples These examples show how to integrate the preconfigured Sei Global Wallet package with different frameworks and wallet provider libraries. > [accordion] RainbowKit integration > > **Create a new Vite app:** > > ```bash theme={"dark"} > npm create vite@latest my-sei-dapp -- --template react-ts > cd my-sei-dapp > ``` > > **Install dependencies:** > > ```bash theme={"dark"} > npm install @rainbow-me/rainbowkit wagmi viem @tanstack/react-query @sei-js/sei-global-wallet > ``` > > **Update `App.tsx`:** > > ```tsx theme={"dark"} > import '@rainbow-me/rainbowkit/styles.css'; > import '@sei-js/sei-global-wallet/eip6963'; > > import { ConnectButton, getDefaultConfig, RainbowKitProvider } from '@rainbow-me/rainbowkit'; > import { WagmiProvider } from 'wagmi'; > import { sei, seiTestnet } from 'wagmi/chains'; > import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; > import { useAccount, useBalance } from 'wagmi'; > > const config = getDefaultConfig({ > appName: 'My Sei dApp', > projectId: 'YOUR_WALLETCONNECT_PROJECT_ID', > chains: [sei, seiTestnet], > ssr: false > }); > > const queryClient = new QueryClient(); > > function AccountInfo() { > const { address, isConnected, chain } = useAccount(); > const { data: balance } = useBalance({ address }); > > if (!isConnected) { > return

Connect your wallet to see account details

; > } > > return ( >
>

Account Information

>

> Address: {address} >

>

> Network: {chain?.name} >

>

> Balance: {balance?.formatted} {balance?.symbol} >

>
> ); > } > > export default function App() { > return ( > > > >
>

My Sei dApp

> > >
>
>
>
> ); > } > ``` > > **Run your app:** > > ```bash theme={"dark"} > npm run dev > ``` > [accordion] ConnectKit integration > > **Create a new Vite app:** > > ```bash theme={"dark"} > npm create vite@latest my-sei-dapp -- --template react-ts > cd my-sei-dapp > ``` > > **Install dependencies:** > > ```bash theme={"dark"} > npm install connectkit wagmi viem @tanstack/react-query @sei-js/sei-global-wallet > ``` > > **Update `App.tsx`:** > > ```tsx theme={"dark"} > import '@sei-js/sei-global-wallet/eip6963'; > > import { ConnectKitButton, ConnectKitProvider, getDefaultConfig } from 'connectkit'; > import { WagmiProvider, createConfig, http } from 'wagmi'; > import { sei, seiTestnet } from 'wagmi/chains'; > import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; > import { useAccount, useBalance } from 'wagmi'; > > const config = createConfig( > getDefaultConfig({ > chains: [sei, seiTestnet], > transports: { > [sei.id]: http(), > [seiTestnet.id]: http() > }, > walletConnectProjectId: 'YOUR_WALLETCONNECT_PROJECT_ID', > appName: 'My Sei dApp' > }) > ); > > const queryClient = new QueryClient(); > > function AccountInfo() { > const { address, isConnected, chain } = useAccount(); > const { data: balance } = useBalance({ address }); > > if (!isConnected) { > return

Connect your wallet to see account details

; > } > > return ( >
>

Account Information

>

> Address: {address} >

>

> Network: {chain?.name} >

>

> Balance: {balance?.formatted} {balance?.symbol} >

>
> ); > } > > export default function App() { > return ( > > > >
>

My Sei dApp

> > >
>
>
>
> ); > } > ``` > > **Run your app:** > > ```bash theme={"dark"} > npm run dev > ``` > [accordion] Web3-React v8 integration > > **Create a new Vite app:** > > ```bash theme={"dark"} > npm create vite@latest my-sei-dapp -- --template react-ts > cd my-sei-dapp > ``` > > **Install dependencies:** > > ```bash theme={"dark"} > npm install @web3-react/core @web3-react/eip1193 @web3-react/types @sei-js/sei-global-wallet > ``` > > **Update `App.tsx`:** > > ```tsx theme={"dark"} > import '@sei-js/sei-global-wallet/eip6963'; > > import React, { useEffect, useState } from 'react'; > import { Web3ReactProvider, initializeConnector } from '@web3-react/core'; > import { EIP1193 } from '@web3-react/eip1193'; > > interface EIP6963ProviderInfo { > uuid: string; > name: string; > icon: string; > rdns: string; > } > > interface EIP6963ProviderDetail { > info: EIP6963ProviderInfo; > provider: any; > } > > function findSeiGlobalWallet(): any { > if (typeof window === 'undefined') return null; > > const providers = new Map(); > > const handleProviderAnnouncement = (event: Event) => { > const customEvent = event as CustomEvent; > providers.set(customEvent.detail.info.uuid, customEvent.detail); > }; > > window.addEventListener('eip6963:announceProvider', handleProviderAnnouncement as EventListener); > > window.dispatchEvent(new Event('eip6963:requestProvider')); > window.removeEventListener('eip6963:announceProvider', handleProviderAnnouncement); > > for (const [uuid, provider] of providers) { > if (provider.info.name.toLowerCase().includes('sei') || provider.info.rdns.includes('sei')) { > return provider.provider; > } > } > } > > export const [eip6963Connector, eip6963Hooks] = initializeConnector((actions) => { > const seiProvider = findSeiGlobalWallet(); > return new EIP1193({ actions, provider: seiProvider }); > }); > > const connectors: [EIP1193, typeof eip6963Hooks][] = [[eip6963Connector, eip6963Hooks]]; > > function InnerApp() { > const { useAccount, useChainId, useIsActive } = eip6963Hooks; > const account = useAccount(); > const chainId = useChainId(); > const isActive = useIsActive(); > const [isConnecting, setIsConnecting] = useState(false); > > useEffect(() => { > const autoConnect = async () => { > try { > setIsConnecting(true); > await eip6963Connector.activate(); > } catch (err) { > console.error('Failed to connect Sei Global Wallet', err); > } finally { > setIsConnecting(false); > } > }; > autoConnect(); > }, []); > > if (!isActive) { > return ( >
>

{isConnecting ? 'Connecting to Sei Global Wallet…' : 'Not Connected'}

> {!isConnecting && ( > > )} >
> ); > } > > return ( >
>

✅ Connected to Sei Global Wallet!

>

> Account: {account} >

>

> Chain ID: {chainId} >

> > >
> ); > } > > export default function App() { > return ( > >
>

Sei Global Wallet via EIP-6963 Discovery

>

This app targets the Sei Global Wallet using EIP-6963 discovery

> >
>
> ); > } > ``` > > **Run your app:** > > ```bash theme={"dark"} > npm run dev > ``` > [accordion] wagmi + Dynamic integration > > **Create a new Vite app:** > > ```bash theme={"dark"} > npm create vite@latest my-sei-dapp -- --template react-ts > cd my-sei-dapp > ``` > > **Install dependencies:** > > ```bash theme={"dark"} > npm install @dynamic-labs/sdk-react-core \ > @dynamic-labs/wagmi-connector @dynamic-labs/ethereum \ > wagmi viem @tanstack/react-query @sei-js/sei-global-wallet > ``` > > **Update `App.tsx`:** > > ```tsx theme={"dark"} > import React from 'react'; > import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; > import { createConfig, WagmiProvider, useAccount } from 'wagmi'; > import { http } from 'viem'; > import { sei, seiTestnet } from 'viem/chains'; > > // Dynamic imports > import { DynamicContextProvider, DynamicWidget } from '@dynamic-labs/sdk-react-core'; > import { DynamicWagmiConnector } from '@dynamic-labs/wagmi-connector'; > import { EthereumWalletConnectors } from '@dynamic-labs/ethereum'; > > // Import Sei Global Wallet for EIP-6963 discovery > import '@sei-js/sei-global-wallet/eip6963'; > > const queryClient = new QueryClient(); > > const wagmiConfig = createConfig({ > chains: [sei, seiTestnet], > transports: { > [sei.id]: http('https://evm-rpc.sei-apis.com'), > [seiTestnet.id]: http('https://evm-rpc-testnet.sei-apis.com') > } > }); > > export default function App() { > return ( > settings={{ > environmentId: 'REPLACE-WITH-YOUR-ENVIRONMENT-ID', // <- Replace > walletConnectors: [EthereumWalletConnectors], > overrides: { > evmNetworks: (networks) => [ > ...networks, > { > blockExplorerUrls: ['https://seiscan.io'], > chainId: 1329, > chainName: 'Sei Network', > iconUrls: ['https://app.dynamic.xyz/assets/networks/sei.svg'], > name: 'Sei', > nativeCurrency: { > decimals: 18, > name: 'Sei', > symbol: 'SEI' > }, > networkId: 1329, > rpcUrls: ['https://evm-rpc.sei-apis.com'], > vanityName: 'Sei Mainnet' > }, > { > blockExplorerUrls: ['https://testnet.seiscan.io'], > chainId: 1328, > chainName: 'Sei Testnet', > iconUrls: ['https://app.dynamic.xyz/assets/networks/sei.svg'], > name: 'Sei Testnet', > nativeCurrency: { > decimals: 18, > name: 'Sei', > symbol: 'SEI' > }, > networkId: 1328, > rpcUrls: ['https://evm-rpc-testnet.sei-apis.com'], > vanityName: 'Sei Testnet' > } > ] > } > }}> > > > >
>

Dynamic + Wagmi + Sei Global Wallet

> > >
>
>
>
>
> ); > } > > function AccountInfo() { > const { address, isConnected, chain } = useAccount(); > > if (!isConnected) { > return

Connect your wallet to see account info

; > } > > return ( >
>

Account Information

>

> Address: {address} >

>

> Chain: {chain?.name} (ID: {chain?.id}) >

>

> Connected: {isConnected ? 'Yes' : 'No'} >

>
> ); > } > ``` > > **Run your app:** > > ```bash theme={"dark"} > npm run dev > ``` > > **Note:** Replace `"REPLACE-WITH-YOUR-ENVIRONMENT-ID"` with your Dynamic environment ID from your [Dynamic dashboard](https://app.dynamic.xyz/dashboard/overview). > [accordion] Dynamic (Next.js) integration > > **Create a new Next.js app:** > > ```bash theme={"dark"} > npx create-next-app@latest my-sei-dapp --typescript --tailwind --eslint > cd my-sei-dapp > ``` > > **Install dependencies:** > > ```bash theme={"dark"} > npm install @dynamic-labs/sdk-react-core \ > @dynamic-labs/wagmi-connector wagmi viem \ > @tanstack/react-query @sei-js/sei-global-wallet \ > @dynamic-labs/ethereum > ``` > > **`layout.tsx`:** > > ```tsx theme={"dark"} > 'use client'; > > import './globals.css'; > import { Inter } from 'next/font/google'; > import Providers from './lib/providers'; > const inter = Inter({ subsets: ['latin'] }); > > // Import the global wallet implementation > import '@sei-js/sei-global-wallet/eip6963'; > > export default function RootLayout({ children }: { children: React.ReactNode }) { > return ( > > > {children} > > > ); > } > ``` > > **`lib/providers.tsx`:** > > ```tsx theme={"dark"} > 'use client'; > > import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; > import { createConfig, WagmiProvider } from 'wagmi'; > import { http } from 'viem'; > import { sei, seiTestnet } from 'viem/chains'; > > // Dynamic imports > import { DynamicContextProvider, DynamicWidget } from '@dynamic-labs/sdk-react-core'; > import { DynamicWagmiConnector } from '@dynamic-labs/wagmi-connector'; > import { EthereumWalletConnectors } from '@dynamic-labs/ethereum'; > > // Import Sei Global Wallet for EIP-6963 discovery > import '@sei-js/sei-global-wallet/eip6963'; > > const queryClient = new QueryClient(); > > const wagmiConfig = createConfig({ > chains: [sei, seiTestnet], > transports: { > [sei.id]: http('https://evm-rpc.sei-apis.com'), > [seiTestnet.id]: http('https://evm-rpc-testnet.sei-apis.com') > } > }); > > export default function Providers({ children }: { children: React.ReactNode }) { > return ( > settings={{ > environmentId: 'REPLACE-WITH-YOUR-ENVIRONMENT-ID', // Replace with your environmentId > walletConnectors: [EthereumWalletConnectors], > overrides: { > evmNetworks: (networks) => [ > ...networks, > { > blockExplorerUrls: ['https://seiscan.io'], > chainId: 1329, > chainName: 'Sei Network', > iconUrls: ['https://app.dynamic.xyz/assets/networks/sei.svg'], > name: 'Sei', > nativeCurrency: { > decimals: 18, > name: 'Sei', > symbol: 'SEI' > }, > networkId: 1329, > rpcUrls: ['https://evm-rpc.sei-apis.com'], > vanityName: 'Sei Mainnet' > }, > { > blockExplorerUrls: ['https://testnet.seiscan.io'], > chainId: 1328, > chainName: 'Sei Testnet', > iconUrls: ['https://app.dynamic.xyz/assets/networks/sei.svg'], > name: 'Sei Testnet', > nativeCurrency: { > decimals: 18, > name: 'Sei', > symbol: 'SEI' > }, > networkId: 1328, > rpcUrls: ['https://evm-rpc-testnet.sei-apis.com'], > vanityName: 'Sei Testnet' > } > ] > } > }}> > > > {children} > > > > ); > } > ``` > > **Note:** Replace `"REPLACE-WITH-YOUR-ENVIRONMENT-ID"` with your Dynamic environment ID from your [Dynamic dashboard](https://app.dynamic.xyz/dashboard/overview). > > **`page.tsx`:** > > ```tsx theme={"dark"} > 'use client'; > > import { DynamicWidget } from '@dynamic-labs/sdk-react-core'; > import { useAccount, useBalance } from 'wagmi'; > > export default function Home() { > return ( >
>
>

Dynamic with Next.js

> >
> >
>
>
> ); > } > ``` > > **Run your app:** > > ```bash theme={"dark"} > npm run dev > ``` > [accordion] HTML bundle integration > > If your project uses plain HTML and JavaScript without a build system, you can create a bundled version of Sei Global Wallet. You can then include it directly in your HTML pages. > > **Create a bundle directory** > > ```bash theme={"dark"} > mkdir sei-global-wallet-bundle > cd sei-global-wallet-bundle > ``` > > **Initialize an npm project** > > ```bash theme={"dark"} > npm init -y > ``` > > **Install dependencies** > > ```bash theme={"dark"} > npm install @sei-js/sei-global-wallet > ``` > > ```bash theme={"dark"} > npm install --save-dev esbuild > ``` > > **Create a bundle source file** > Create `bundle.js`: > > ```js theme={"dark"} > // bundle.js > import '@sei-js/sei-global-wallet/eip6963'; > ``` > > **Update `package.json`** > Add this build script to your `package.json` file: > > ```json theme={"dark"} > { > "scripts": { > "build": "esbuild bundle.js --bundle --format=iife --outfile=sei-wallet-bundled.js" > } > } > ``` > > **Build the bundle** > > ```bash theme={"dark"} > npm run build > ``` > > This command creates `sei-wallet-bundled.js`. > > **Use the bundle in your HTML project** > > Copy `sei-wallet-bundled.js` to your web project. Then load it in your HTML, as in this example: > > ```html theme={"dark"} > > > > > > Sei Global Wallet HTML Integration > > >

Sei Global Wallet HTML Integration

>

Connect your Sei Global Wallet using plain HTML and JavaScript.

> > > > >
>
> > > > > > > > ``` > [accordion] Web3Auth integration > > **Create a new Vite app:** > > ```bash theme={"dark"} > npm create vite@latest my-sei-dapp -- --template react-ts > cd my-sei-dapp > ``` > > **Install dependencies:** > > ```bash theme={"dark"} > npm install @web3auth/modal \ > wagmi viem @tanstack/react-query \ > @sei-js/sei-global-wallet > ``` > > **Create a Web3Auth context (`src/web3authContext.ts`):** > > ```ts theme={"dark"} > import '@sei-js/sei-global-wallet/eip6963'; > import { WEB3AUTH_NETWORK } from '@web3auth/modal'; > import { type Web3AuthContextConfig } from '@web3auth/modal/react'; > > const clientId = 'YOUR_CLIENT_ID'; // get from https://dashboard.web3auth.io > > const web3AuthContextConfig: Web3AuthContextConfig = { > web3AuthOptions: { > clientId, > web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET > } > }; > > export default web3AuthContextConfig; > ``` > > **Update `App.tsx`:** > > ```tsx theme={"dark"} > import './App.css'; > import '@sei-js/sei-global-wallet/eip6963'; > import { useWeb3AuthConnect, useWeb3AuthUser } from '@web3auth/modal/react'; > import { useWeb3AuthDisconnect } from '@web3auth/modal/react'; > import { useAccount } from 'wagmi'; > > function App() { > const { connect, isConnected, connectorName } = useWeb3AuthConnect(); > > const { loading: connectLoading, error: connectError } = useWeb3AuthConnect(); > > const { disconnect, loading: disconnectLoading } = useWeb3AuthDisconnect(); > > const { error: disconnectError } = useWeb3AuthDisconnect(); > > const { userInfo } = useWeb3AuthUser(); > const { address } = useAccount(); > > function uiConsole(...args: any[]): void { > const el = document.querySelector('#console>p'); > if (el) { > el.innerHTML = JSON.stringify(args || {}, null, 2); > console.log(...args); > } > } > const loggedInView = ( >
>

Connected to {connectorName}

>
>

> Address: {address} >

>
> >
> > > >
> > {disconnectLoading &&
Disconnecting...
} > {disconnectError &&
{disconnectError.message}
} >
> ); > > const unloggedInView = ( >
> > {connectLoading &&
Connecting...
} > {connectError &&
{connectError.message}
} >
> ); > > return ( >
>

> > Web3Auth > {' '} > + Sei Global Wallet Integration >

> > {isConnected ? loggedInView : unloggedInView} > >
>

>
>
> ); > } > > export default App; > ``` > > **Set up `main.tsx` with the Web3Auth provider:** > > ```tsx theme={"dark"} > import { StrictMode } from 'react'; > import { createRoot } from 'react-dom/client'; > import { Web3AuthProvider } from '@web3auth/modal/react'; > import { WagmiProvider } from 'wagmi'; > import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; > import { createConfig, http } from 'wagmi'; > import { sei, seiTestnet } from 'wagmi/chains'; > import web3AuthContextConfig from './web3authContext'; > import App from './App'; > > const queryClient = new QueryClient(); > > const wagmiConfig = createConfig({ > chains: [sei, seiTestnet], > transports: { > [sei.id]: http('https://evm-rpc.sei-apis.com'), > [seiTestnet.id]: http('https://evm-rpc-testnet.sei-apis.com') > } > }); > > createRoot(document.getElementById('root')!).render( > > > > > > > > > > ); > ``` > > **Run your app:** > > ```bash theme={"dark"} > npm run dev > ``` > > **Note:** Replace the `clientId` in `web3authContext.ts` with your Web3Auth client ID from your [Web3Auth dashboard](https://dashboard.web3auth.io). ## Troubleshooting & FAQ > [tab] Troubleshooting > > ### Troubleshooting & debugging tips > > #### Common issues > > **Issue:** Sei Global Wallet does not appear in the wallet list > > ```bash theme={"dark"} > # Ensure the import is at the top of your App.tsx > import '@sei-js/sei-global-wallet/eip6963'; > ``` > > **Issue:** TypeScript errors about `window.ethereum` > > ```typescript theme={"dark"} > // Add this to your App.tsx or create types/global.d.ts > declare global { > interface Window { > ethereum?: any; > } > } > ``` > > **Issue:** WalletConnect connection fails > > ```bash theme={"dark"} > # Get a proper project ID from cloud.walletconnect.com > # Replace 'YOUR_WALLETCONNECT_PROJECT_ID' with your actual ID > ``` > > **Issue:** Network not found in MetaMask > > ```javascript theme={"dark"} > // Use the exact chainId in hex format > chainId: '0x531'; // for Sei Mainnet (1329) > chainId: '0x530'; // for Sei Testnet (1328) > ``` > > ### Debugging commands > > ```javascript theme={"dark"} > window.addEventListener('eip6963:announceProvider', (event) => { > console.log('Wallet announced:', event.detail); > }); > > window.dispatchEvent(new Event('eip6963:requestProvider')); > ``` > > ### Testing tips > > 1. Test with multiple browsers to check cross-browser compatibility. > 2. If wallets do not appear, clear the browser cache. > 3. Check the browser console for EIP-6963 events and errors. > 4. Test connections to both Sei Testnet and Sei Mainnet. > 5. Verify that social login methods work across different authentication providers. > > ### Security considerations > > * Sei Global Wallet is self-custodial: users control their private keys. > * All communications between the dApp and the wallet are encrypted. > * Multi-factor authentication is available for extra security. > * Users can export their keys to other wallets, such as MetaMask. > * Cure53 has audited the platform for security compliance. > [tab] FAQ > > ### FAQ > > #### Q: What is Sei Global Wallet? > > Sei Global Wallet is an embedded wallet for the Sei network. Users create a wallet and authenticate through social logins. Unlike traditional embedded wallets, Sei Global Wallet gives users more flexibility: they can carry their wallets across different dApps in the Sei ecosystem. > > #### Q: What are the key benefits of Sei Global Wallet for developers and users? > > **For developers:** > > * You can add Sei as a login method to your dApp ("Log in with Sei"). > * Integration is simple. The wallet is compatible with tools such as RainbowKit, ConnectKit, and Web3-React. > * Multi-factor authentication (MFA) and secure key management improve security. > > **For users:** > > * Users create wallets with familiar social logins, which simplifies onboarding. > * Users can move between Sei ecosystem dApps with the same wallet. > * Transaction simulation helps users understand the effects of a transaction before they confirm it. > > #### Q: What login methods are currently supported? > > Sei Global Wallet supports email, Google, X (Twitter), and Telegram authentication. > > #### Q: How do the security considerations differ from traditional wallets? > > Security differences include: > > * **Secure encrypted communication:** All communication between the dApp and the wallet popup is encrypted. > * **Protection against replay attacks:** Encrypted messaging prevents malicious reuse of data. > * **Trusted Execution Environments (TEEs):** Operations occur in secure environments. > * **Verified origins:** Only verified origins can interact with Sei Global Wallet. > > #### Q: Is Sei Global Wallet self-custodial or custodial? > > Sei Global Wallet is self-custodial, so users have full control. Users can export their keys at any time and import them into other wallets, such as MetaMask. > > #### Q: Do Sei Global Wallet require browser extensions? > > No. They are embedded wallets that work directly in the browser, without extensions. > > #### Q: Can I link my existing external wallet to my Sei Global Wallet? > > No, not currently. In the future, you will be able to link external wallets to a Sei global account. > > #### Q: What extra protections can I add to my Sei Global Wallet? > > Although Global Wallets are non-custodial, good security practices include: > > * Enable multi-factor authentication (MFA) for sensitive actions. > * Be careful of phishing attempts. Verify sources before you share information. > * Always have backup methods. Link more email or social login methods. > * Never store authentication keys digitally. Keep private keys secure and offline. > > #### Q: Have Sei Global Wallet been audited? > > Yes. Cure53 has audited the Dynamic Global Wallets product. > > #### Q: How should bugs be reported? > > Include this information: > > * Device details > * Browser information > * A clear description of the issue > * If possible, a Loom video or screen recording ## References and links * [Dynamic Global Wallet documentation](https://www.dynamic.xyz/docs/react/global-wallets/overview) * [EIP-6963 standard](https://eips.ethereum.org/EIPS/eip-6963) * [RainbowKit documentation](https://www.rainbowkit.com/docs/introduction) * [ConnectKit documentation](https://docs.family.co/connectkit) * [Web3-React documentation](https://github.com/Uniswap/web3-react) * [wagmi documentation](https://wagmi.sh) * [WalletConnect Cloud](https://cloud.walletconnect.com) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/building-a-frontend # Building a Frontend for Sei EVM: A Comprehensive Guide > Comprehensive guide on Building a Frontend for Sei EVM. Learn key concepts, commands, and best practices. To build the frontend of a dApp on Sei EVM, you connect to wallets and interact with the blockchain through RPC endpoints. You also sign and broadcast transactions. This tutorial shows how to build a simple ERC20 token interface with three popular libraries: 1. [**ethers.js**](https://docs.ethers.org/v6/): A complete and compact library for interacting with EVM blockchains. It is known for its simplicity and extensive functionality. 2. [**viem**](https://viem.sh/docs/getting-started): A lightweight and modular TypeScript interface for Ethereum. 3. [**wagmi**](https://wagmi.sh/): A React hooks library, built on top of viem, that simplifies wallet connection and interaction. It has hooks that modern frontend libraries and frameworks can use to interact with Ethereum wallets and contracts. The tutorial implements the same functionality with each library. You can then compare their approaches and choose the one that best fits your development style. > [!TIP] > > **Deploy to Sei Testnet first** > > It is **highly recommended** that you deploy to *Sei Testnet* first. Verify that everything works as expected before you commit to Sei Mainnet. This helps you catch bugs early, avoid unnecessary gas costs, and keep your users safe. ## When to use each library ### ethers.js ethers.js is ideal for developers who want a complete, battle-tested library with a straightforward API design. It works well for both simple and complex dApps, especially when you do not use React or you need custom state management. * **Pros**: * Complete and easy-to-use API * Well documented, with a large community * Works well with both TypeScript and JavaScript * All-in-one solution for wallet connection and contract interaction * **Cons**: * Larger bundle size than viem * Not designed specifically for integration with React hooks ### viem viem suits developers who want fine-grained control over their blockchain interactions and prefer a modular, lightweight approach. It is a good choice when bundle size matters and when you have specific requirements for how contract interactions should work. * **Pros**: * Lightweight and modular * Excellent TypeScript support with better type safety * Lower-level API that gives more control * Smaller bundle size * **Cons**: * Steeper learning curve * Requires more boilerplate code for some operations * Requires separate handling for wallet connection and contract interactions ### wagmi wagmi is the best choice for React developers who build dApps and want to use React's state management capabilities. Its hooks hide much of the complexity of blockchain interactions. This makes it easy to build reactive UIs that respond to chain state. * **Pros**: * React-specific hooks * Handles complex state management for you * Built on top of viem, so it shares the benefits of viem * Convenient caching and automatic refreshing of contract data * **Cons**: * Only works with React * Adds another dependency layer * Opinionated about how you should manage data in your app ## Requirements Before you start, make sure that you have: * Node.js and npm installed * A wallet from the [list of Sei wallets](https://docs.sei.io/learn/wallets.md) ## Creating a React project Create a new React project with Vite's TypeScript template: ```bash theme={"dark"} npm create vite@latest sei-token-interface -- --template react-ts ``` This command creates a new folder with a TypeScript React project. Open `sei-token-interface` in your preferred IDE. > [!NOTE] > > This tutorial uses TypeScript. If you do not use TypeScript, you can adjust the code by removing the types. ## Project structure For clarity, each library implementation has its own component. First, set up the project structure: ```bash theme={"dark"} cd sei-token-interface mkdir src/components touch src/components/EthersInterface.tsx touch src/components/ViemInterface.tsx touch src/components/WagmiInterface.tsx mkdir src/shared touch src/shared/constants.ts touch src/wagmi.ts ``` ## Defining the ERC20 contract details > [!NOTE] > > First, deploy your ERC20 token contract. For example, use [Hardhat](https://docs.sei.io/evm/evm-hardhat.md) or [Foundry](https://docs.sei.io/evm/evm-foundry.md), or generate a contract with the [contract wizard](https://docs.sei.io/evm/evm-wizard.md) (see also [deploy and verify](https://docs.sei.io/evm/evm-parity/examples/deploy-verify.md)). Then replace `TOKEN_CONTRACT_ADDRESS` in the constants file with the address of your deployed contract. Also update the RPC URL in the Sei chain configuration. For a list of existing ERC20 contracts on Sei Mainnet, see [Sei Assets](https://seiscan.io/tokens). Create a shared constants file for the project: ```tsx title="src/shared/constants.ts" theme={"dark"} // Constants used across different implementations export const ERC20_ABI = [ { inputs: [], name: 'name', outputs: [ { internalType: 'string', name: '', type: 'string' } ], stateMutability: 'view', type: 'function' }, { inputs: [], name: 'symbol', outputs: [ { internalType: 'string', name: '', type: 'string' } ], stateMutability: 'view', type: 'function' }, { inputs: [], name: 'decimals', outputs: [ { internalType: 'uint8', name: '', type: 'uint8' } ], stateMutability: 'view', type: 'function' }, { inputs: [ { internalType: 'address', name: 'account', type: 'address' } ], name: 'balanceOf', outputs: [ { internalType: 'uint256', name: '', type: 'uint256' } ], stateMutability: 'view', type: 'function' }, { inputs: [ { internalType: 'address', name: 'to', type: 'address' }, { internalType: 'uint256', name: 'amount', type: 'uint256' } ], name: 'transfer', outputs: [ { internalType: 'bool', name: '', type: 'bool' } ], stateMutability: 'nonpayable', type: 'function' }, { anonymous: false, inputs: [ { indexed: true, internalType: 'address', name: 'from', type: 'address' }, { indexed: true, internalType: 'address', name: 'to', type: 'address' }, { indexed: false, internalType: 'uint256', name: 'value', type: 'uint256' } ], name: 'Transfer', type: 'event' } ]; // TODO: Deploy an ERC-20 (see /evm/evm-hardhat or /evm/evm-foundry) and paste its address here export const TOKEN_CONTRACT_ADDRESS = '0xYourTokenContractAddress'; ``` ## Option 1: ethers.js implementation Install ethers.js first: ```bash theme={"dark"} npm install ethers ``` Start with the ethers.js implementation. The component does these things: * Checks for any EVM-compatible wallet extension. * Connects to Sei Mainnet through the connected wallet, with the ethers.js `BrowserProvider`. * Creates an ethers.js contract instance with the signer from the wallet. It stores the instance in the contract state for later use. ```tsx title="src/components/EthersInterface.tsx" theme={"dark"} import { useState, useEffect } from 'react'; import { BrowserProvider, Contract, formatEther, parseEther } from 'ethers'; import { ERC20_ABI, TOKEN_CONTRACT_ADDRESS } from '../shared/constants'; export function EthersInterface() { const [balance, setBalance] = useState(); const [contract, setContract] = useState(); const [recipientAddress, setRecipientAddress] = useState(''); const [amount, setAmount] = useState(''); const [isTransferring, setIsTransferring] = useState(false); const [tokenInfo, setTokenInfo] = useState<{ name: string; symbol: string }>(); const [address, setAddress] = useState(); // Sei EVM network configuration const SEI_NETWORK_PARAMS = { chainId: '0x531', // 1329 in hexadecimal chainName: 'Sei Network', nativeCurrency: { name: 'Sei', symbol: 'SEI', decimals: 18 }, rpcUrls: ['https://evm-rpc.sei-apis.com'], blockExplorerUrls: ['https://seiscan.io'] }; const fetchBalance = async () => { if (!contract || !address) return; try { const balance = await contract.balanceOf(address); setBalance(formatEther(balance)); } catch (error) { console.error('Failed to fetch balance:', error); } }; const fetchTokenInfo = async () => { if (!contract) return; try { const name = await contract.name(); const symbol = await contract.symbol(); setTokenInfo({ name, symbol }); } catch (error) { console.error('Failed to fetch token info:', error); } }; useEffect(() => { if (contract) { fetchTokenInfo(); fetchBalance(); } }, [contract, address]); const connectWallet = async () => { if (window.ethereum) { try { const provider = new BrowserProvider(window.ethereum); // Attempt to switch to the Sei network try { await provider.send('wallet_switchEthereumChain', [{ chainId: SEI_NETWORK_PARAMS.chainId }]); } catch (switchError: any) { // Error code 4902 indicates the chain is not added in MetaMask if (switchError.code === 4902) { await provider.send('wallet_addEthereumChain', [SEI_NETWORK_PARAMS]); } else { throw switchError; } } // Request account access await provider.send('eth_requestAccounts', []); const signer = await provider.getSigner(); const userAddress = await signer.getAddress(); setAddress(userAddress); const tokenContract = new Contract(TOKEN_CONTRACT_ADDRESS, ERC20_ABI, signer); setContract(tokenContract); } catch (error) { console.error('Failed to connect wallet:', error); alert('Failed to connect wallet. See console for details.'); } } else { alert('No EVM compatible wallet installed'); } }; const transferTokens = async () => { if (!contract || !recipientAddress || !amount) return; try { setIsTransferring(true); const tx = await contract.transfer(recipientAddress, parseEther(amount)); console.log('Transaction sent:', tx.hash); const receipt = await tx.wait(); console.log('Transaction confirmed:', receipt); await fetchBalance(); setRecipientAddress(''); setAmount(''); } catch (error) { console.error('Transfer failed:', error); alert('Transfer failed. Check console for details.'); } finally { setIsTransferring(false); } }; return (

Ethers.js v6 Implementation

{contract ? (

{tokenInfo?.name} ({tokenInfo?.symbol})

Connected Address: {address?.slice(0, 6)}...{address?.slice(-4)}

Balance: {balance} {tokenInfo?.symbol}

setRecipientAddress(e.target.value)} style={{ marginBottom: '10px', width: '300px' }} />
setAmount(e.target.value)} style={{ marginBottom: '10px', width: '300px' }} />
) : ( )}
); } ``` ## Option 2: viem implementation Install viem first: ```bash theme={"dark"} npm install viem ``` Now implement the viem interface: ```tsx title="src/components/ViemInterface.tsx" theme={"dark"} import { useState, useEffect } from 'react'; import { createWalletClient, custom, parseEther, formatEther } from 'viem'; import { createPublicClient, http } from 'viem'; import { sei } from 'viem/chains'; import { ERC20_ABI, TOKEN_CONTRACT_ADDRESS } from '../shared/constants'; export function ViemInterface() { const [balance, setBalance] = useState(); const [address, setAddress] = useState(); const [walletClient, setWalletClient] = useState(null); const [publicClient, setPublicClient] = useState(null); const [recipientAddress, setRecipientAddress] = useState(''); const [amount, setAmount] = useState(''); const [isTransferring, setIsTransferring] = useState(false); const [tokenInfo, setTokenInfo] = useState<{ name: string; symbol: string }>(); useEffect(() => { // Initialize the public client const newPublicClient = createPublicClient({ chain: sei, transport: http() }); setPublicClient(newPublicClient); }, []); useEffect(() => { if (walletClient && publicClient && address) { fetchTokenInfo(); fetchBalance(); } }, [walletClient, publicClient, address]); const fetchBalance = async () => { if (!publicClient || !address) return; try { const balance = await publicClient.readContract({ address: TOKEN_CONTRACT_ADDRESS as `0x${string}`, abi: ERC20_ABI, functionName: 'balanceOf', args: [address] }); setBalance(formatEther(balance as bigint)); } catch (error) { console.error('Error fetching balance:', error); } }; const fetchTokenInfo = async () => { if (!publicClient) return; try { const [name, symbol] = await Promise.all([ publicClient.readContract({ address: TOKEN_CONTRACT_ADDRESS, abi: ERC20_ABI, functionName: 'name' }), publicClient.readContract({ address: TOKEN_CONTRACT_ADDRESS, abi: ERC20_ABI, functionName: 'symbol' }) ]); setTokenInfo({ name: name as string, symbol: symbol as string }); } catch (error) { console.error('Error fetching token info:', error); } }; const connectWallet = async () => { if (!window.ethereum) { alert('No EVM compatible wallet installed'); return; } try { const [userAddress] = await window.ethereum.request({ method: 'eth_requestAccounts' }); setAddress(userAddress); const newWalletClient = createWalletClient({ chain: sei, transport: custom(window.ethereum) }); setWalletClient(newWalletClient); } catch (error) { console.error('Failed to connect wallet:', error); alert('Failed to connect wallet. See console for details.'); } }; const transferTokens = async () => { if (!walletClient || !address || !recipientAddress || !amount) return; try { setIsTransferring(true); // Prepare the contract call parameters const abi = ERC20_ABI; const functionName = 'transfer'; const args = [recipientAddress, parseEther(amount)]; // Execute the transaction const hash = await walletClient.writeContract({ address: TOKEN_CONTRACT_ADDRESS as `0x${string}`, abi, functionName, args }); console.log('Transaction sent:', hash); // Wait for the transaction to be mined const receipt = await publicClient.waitForTransactionReceipt({ hash }); console.log('Transaction confirmed:', receipt); // Refresh the balance await fetchBalance(); // Reset form setRecipientAddress(''); setAmount(''); } catch (error) { console.error('Transfer failed:', error); alert('Transfer failed. Check console for details.'); } finally { setIsTransferring(false); } }; return (

Viem Implementation

{address ? (

{tokenInfo?.name} ({tokenInfo?.symbol})

Connected Address: {address.slice(0, 6)}...{address.slice(-4)}

Balance: {balance} {tokenInfo?.symbol}

setRecipientAddress(e.target.value)} style={{ marginBottom: '10px', width: '300px' }} />
setAmount(e.target.value)} style={{ marginBottom: '10px', width: '300px' }} />
) : ( )}
); } ``` ## Option 3: wagmi implementation Install wagmi and configure it: ```bash theme={"dark"} npm install wagmi viem @tanstack/react-query ``` First, create a wagmi configuration file: ```tsx title="src/wagmi.ts" theme={"dark"} import { http, createConfig } from 'wagmi'; import { sei, seiTestnet } from 'wagmi/chains'; import { injected } from 'wagmi/connectors'; export const config = createConfig({ chains: [sei, seiTestnet], connectors: [injected()], transports: { [sei.id]: http(), [seiTestnet.id]: http() } }); ``` Now implement the wagmi interface: ```tsx title="src/components/WagmiInterface.tsx" theme={"dark"} import { useState, useEffect } from 'react'; import { useAccount, useConnect, useReadContract, useWriteContract, useWaitForTransactionReceipt } from 'wagmi'; import { injected } from 'wagmi/connectors'; import { parseEther, formatEther } from 'viem'; import { ERC20_ABI, TOKEN_CONTRACT_ADDRESS } from '../shared/constants'; export function WagmiInterface() { const [recipientAddress, setRecipientAddress] = useState(''); const [amount, setAmount] = useState(''); // Wagmi hooks const { address, isConnected } = useAccount(); const { connect } = useConnect(); // For debugging console.log('Connection status:', { address, isConnected }); // Read from contract const { data: name } = useReadContract({ address: TOKEN_CONTRACT_ADDRESS as `0x${string}`, abi: ERC20_ABI, functionName: 'name' }); const { data: symbol } = useReadContract({ address: TOKEN_CONTRACT_ADDRESS as `0x${string}`, abi: ERC20_ABI, functionName: 'symbol' }); const { data: balance, refetch: refetchBalance } = useReadContract({ address: TOKEN_CONTRACT_ADDRESS as `0x${string}`, abi: ERC20_ABI, functionName: 'balanceOf', args: address ? [address] : undefined, query: { enabled: !!address } }); // Write to contract const { writeContract, data: hash, isPending: isTransferring, error } = useWriteContract(); // Wait for transaction const { isLoading: isConfirming, isSuccess: isConfirmed } = useWaitForTransactionReceipt({ hash }); // Connect wallet const connectWallet = async () => { try { connect({ connector: injected() }); } catch (err) { console.error('Failed to connect:', err); } }; // Transfer tokens const transferTokens = async () => { if (!recipientAddress || !amount) return; try { writeContract({ address: TOKEN_CONTRACT_ADDRESS as `0x${string}`, abi: ERC20_ABI, functionName: 'transfer', args: [recipientAddress, parseEther(amount)] }); } catch (err) { console.error('Transfer failed:', err); } }; // Handle successful transfer useEffect(() => { if (isConfirmed) { refetchBalance(); setRecipientAddress(''); setAmount(''); } }, [isConfirmed, refetchBalance]); return (

Wagmi Implementation

{isConnected ? (

{(name as string) || 'Loading...'} ({(symbol as string) || '...'})

Connected Address: {address?.slice(0, 6)}...{address?.slice(-4)}

Balance: {balance ? formatEther(balance as bigint) : '0'} {(symbol as string) || ''}

setRecipientAddress(e.target.value)} style={{ marginBottom: '10px', width: '300px' }} />
setAmount(e.target.value)} style={{ marginBottom: '10px', width: '300px' }} />
{error &&

Error: {(error as Error).message}

}
) : ( )}
); } ``` ## Updating the main app to display all implementations Now update your `App.tsx` to include all three interface options: ```tsx title="src/App.tsx" theme={"dark"} import { useState } from 'react'; import { WagmiProvider } from 'wagmi'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { EthersInterface } from './components/EthersInterface'; import { ViemInterface } from './components/ViemInterface'; import { WagmiInterface } from './components/WagmiInterface'; import { config } from './wagmi'; function App() { const [selectedLib, setSelectedLib] = useState(null); const queryClient = new QueryClient(); return (

Sei ERC20 Token Interface

Choose a library implementation:

{selectedLib === 'ethers' && } {selectedLib === 'viem' && } {selectedLib === 'wagmi' && ( )} {!selectedLib && (

Select a library to see its implementation

)}
); } export default App; ``` ## Polyfills for browser environment When you develop frontend applications for the blockchain, you might need polyfills for Node.js-specific features, such as `Buffer`. Add these polyfills to your project: ```tsx title="src/main.tsx" theme={"dark"} import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App.tsx'; import './index.css'; import { Buffer } from 'buffer'; // Polyfill self for browser and global for Node.js const globalObject = typeof self !== 'undefined' ? self : global; Object.assign(globalObject, { Buffer: Buffer }); ReactDOM.createRoot(document.getElementById('root')!).render( ); ``` ## Running the application To start your app, run this command: ```bash theme={"dark"} npm run dev ``` This command starts a local development server at `http://localhost:5173`. You can switch between the library implementations to see how each one works. To build your application, run this command: ```bash theme={"dark"} npm run build ``` Then preview the production build locally: ```bash theme={"dark"} npm run preview ``` This command serves the built app at `http://localhost:4173`, so you can verify it before you deploy. To go live, deploy the contents of the `dist` directory to any static hosting provider. This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform. --- URL: https://docs.sei.io/evm/in-app-swaps # In-App Swaps - Symphony Integration Guide > Guide to integrating the Symphony swap widget into your Sei application for seamless token exchanges. In-app swaps let users exchange tokens directly in your Sei dApp. ## Overview Swap widgets are embeddable UI components that hide the complexity of interacting with decentralized exchanges (DEXs) and liquidity aggregators. They have these benefits: * Users can swap tokens without leaving your dApp. * You do not need to redirect users to external DEX interfaces. * Many providers offer fee-sharing mechanisms, which can give you revenue. * Some widgets let users bridge assets from other chains. ## Symphony swap widget [Symphony](https://symph.ag) is a native DEX aggregator on Sei. It offers the simplest integration: an embedded iframe. ### Quick start ```html theme={"dark"} ``` ### Live demo **Symphony Swap Widget Demo** ### Size requirements * **Minimum width**: `377px` * **Minimum height**: `650px` (recommended to prevent scrolling in the wallet modal) * **Optimal height**: `680-685px` ### URL parameters To customize the widget, append query parameters to the URL: #### Token selection | Parameter | Description | Example | | - | - | - | | `tokenIn` | Input token contract address | `tokenIn=0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392` | | `tokenOut` | Output token contract address | `tokenOut=0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7` | > [!NOTE] > > Users can change the tokens after the widget loads. #### Appearance | Parameter | Description | Supported Formats | | - | - | - | | `bgColor` | Background color | Hex (`%23FFFFFF`), Named (`white`), RGB (`rgb(255,255,255)`), RGBA (`rgba(255,255,255,0.9)`) | | `theme` | Color theme of the widget | `light` or `dark` (defaults to `dark` if not specified) | > [!WARNING] > > For hex colors, use `%23` instead of `#` in the URL. For example, use `%23FFFFFF` for white. #### Features | Parameter | Description | Values | | - | - | - | | `notifications` | Show/hide notification cards | `true` (default) or `false` | ### Complete example > [tab] HTML > > ```html theme={"dark"} > > ``` > [tab] React > > ```jsx theme={"dark"} > function SwapWidget() { > const tokenIn = "0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392"; > const tokenOut = "0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7"; > > return ( >