Skip to Content
EVMRPC Reference

RPC Reference Guide

Sei fully supports the standard Ethereum JSON-RPC API, so existing EVM tooling (ethers.js, viem, Hardhat, Foundry, etc.) works out of the box. This page covers every supported eth_* and debug_* method, plus the legacy sei_*/sei2_* extensions (now deprecated) for cross-VM address resolution and synthetic transactions.

Table of Contents

Overview

Sei supports the Ethereum JSON-RPC API  with some Sei-specific extensions to support cross-VM operations, synthetic transactions, and other advanced features.

All endpoints follow the standard JSON-RPC format:

JSON-RPC Request/Response Format

Request Format

  • HTTP method: always “POST
  • Header: accept: application/json
  • Header: content-type: application/json
  • Body (JSON):
    • id: an arbitrary string identifier
    • jsonrpc: always “2.0”
    • method: endpoint name (e.g. “eth_sendRawTransaction”)
    • params: an array that differs from endpoint to endpoint

Response Format

  • Body (JSON):
    • id: the same identifier in request
    • jsonrpc: always “2.0”
    • result: an object that differs from endpoint to endpoint
    • error (if applicable): error details

Standard Ethereum Endpoints

Sei supports all standard Ethereum JSON-RPC endpoints, organized into the following categories. Click on each category to view the available endpoints and their documentation.

Send Transactions

These endpoints allow you to send transactions to the Sei network.

View Send Transaction Endpoints

eth_sendRawTransaction

Sends a signed transaction.

  • Parameters:
TypeDescription
stringThe hex-encoding of the signed transaction.
  • Result:
TypeDescription
stringThe transaction hash.

Transaction Lookup

These endpoints allow you to find transaction details.

View Transaction Lookup Endpoints

eth_getTransactionReceipt

Gets the receipt of a sent transaction

  • Parameters:
TypeDescription
stringThe transaction hash.
  • Result:
TypeDescription
objectThe receipt object .

eth_getTransactionByBlockNumberAndIndex

Gets transaction by the block number and the index of the transaction in the block

  • Parameters:
TypeDescription
stringThe block number, which can either be a hexadecimal number, or one of “safe”, “finalized”, “latest”, or “earliest”. Note that “safe”, “finalized”, and “latest” mean the same thing on Sei due to its instant finality.
stringThe transaction index as a hexadecimal number.
  • Result:
TypeDescription
objectThe transaction details .

eth_getTransactionByBlockHashAndIndex

Gets transaction by the block hash and the index of the transaction in the block.

  • Parameters:
TypeDescription
stringThe block hash.
stringThe transaction index as a hexadecimal number.
  • Result:
TypeDescription
objectThe transaction details .

eth_getTransactionByHash

Gets transaction by the transaction hash.

  • Parameters:
TypeDescription
stringThe transaction hash.
  • Result:
TypeDescription
objectThe transaction details .

Account Information

These endpoints allow you to query account-related information.

View Account Information Endpoints

eth_getTransactionCount

Gets the number of transactions sent by the account

  • Parameters:
TypeDescription
stringThe address to look up.
stringThe block number, which can either be a hexadecimal number, or one of “safe”, “finalized”, “latest”, or “earliest”. Note that “safe”, “finalized”, and “latest” mean the same thing on Sei due to its instant finality.
  • Result:
TypeDescription
stringThe hexadecimal form of the number of transactions.

eth_getBalance

Gets the balance in wei (i.e. 10^-12 usei) of the account

  • Parameters:
TypeDescription
stringThe address to look up.
stringThe block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of safe, finalized, latest, pending, or earliest. Note that safe, finalized, and latest mean the same thing on Sei due to its instant finality.
  • Result:
TypeDescription
stringThe hexadecimal form of the wei balance.

eth_getCode

Gets EVM code stored at the account address

  • Parameters:
TypeDescription
stringThe address to look up.
stringThe block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of safe, finalized, latest, pending, or earliest. Note that safe, finalized, and latest mean the same thing on Sei due to its instant finality.
  • Result:
TypeDescription
stringThe hexadecimal form of the code binary.

eth_getStorageAt

Gets value at given key of the account

  • Parameters:
TypeDescription
stringThe address to look up.
stringThe hexadecimal form of the key.
stringThe block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of safe, finalized, latest, pending, or earliest. Note that safe, finalized, and latest mean the same thing on Sei due to its instant finality.
  • Result:
TypeDescription
stringThe hexadecimal form of the storage value.

eth_getProof

Sei uses IAVL trees instead of Merkle Patricia Tries (MPT). The proof returned by this endpoint is an IAVL proof, not an MPT proof. Ethereum tooling that expects MPT proofs may not parse the response correctly.

Gets the IAVL proof of the given keys for an account.

  • Parameters:
TypeDescription
stringThe address to look up.
string[]The hexadecimal form of the keys.
stringThe block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of safe, finalized, latest, pending, or earliest. Note that safe, finalized, and latest mean the same thing on Sei due to its instant finality.
  • Result:
TypeDescription
objectAn object with data from the IAVL proof.

Object Schema:

{ address: // The requested address. hexValues: // An array of the hexdecimal form of the values at the given keys. storageProof: // An array of storage proofs. }

Note: The storage proofs in the return object follow this format .

Block Information

Endpoints for retrieving block data and related information.

View complete list of Block Information endpoints

eth_getBlockTransactionCountByNumber

Gets the count of EVM transactions in a block by its number.

  • Parameters:
TypeDescription
stringBlock number (hexadecimal or safe, finalized, latest, pending, or earliest). Note that safe, finalized, and latest are equivalent on Sei due to instant finality.
  • Result:
TypeDescription
stringCount of EVM transactions in the block (hex)

eth_getBlockTransactionCountByHash

Gets the count of EVM transactions in a block by its hash.

  • Parameters:
TypeDescription
stringBlock hash
  • Result:
TypeDescription
stringCount of EVM transactions in the block (hex)

eth_getBlockByHash

Gets block metadata and, optionally, its EVM transactions by block hash.

  • Parameters:
TypeDescription
stringBlock hash
booleanWhether to include full transaction objects (true) or only hashes (false)
  • Result:
TypeDescription
objectBlock object per Ethereum JSON-RPC

eth_getBlockByNumber

Gets block metadata and, optionally, its EVM transactions by block number.

  • Parameters:
TypeDescription
stringBlock number (hexadecimal or safe, finalized, latest, pending, or earliest)
booleanWhether to include full transaction objects (true) or only hashes (false)
  • Result:
TypeDescription
objectBlock object per Ethereum JSON-RPC

eth_getBlockReceipts

Gets an array of EVM transaction receipts in a block by its number.

  • Parameters:
TypeDescription
stringThe block number or hash, which can be one of 1. block hash, 2. hexadecimal block number, 3. one of safe, finalized, latest, pending, or earliest. Note that safe, finalized, and latest mean the same thing on Sei due to its instant finality.
  • Result:
TypeDescription
object[]Array of transaction receipts

Blockchain Information

Endpoints for querying general blockchain data.

View complete list of Blockchain Information endpoints

eth_blockNumber

Gets the latest committed block number.

  • Parameters:

None

  • Result:
TypeDescription
stringLatest block number (hex)

eth_chainId

Gets the chain ID.

  • Parameters:

None

  • Result:
TypeDescription
stringChain ID (hex)

eth_coinbase

Gets the fee-collector (coinbase) address.

  • Parameters:

None

  • Result:
TypeDescription
stringFee-collector address

eth_feeHistory

Gets fee history over a block range.

  • Parameters:
TypeDescription
stringNumber of blocks (decimal or hex)
stringBlock number reference (hex or safe, finalized, latest)
float[]Array of reward percentiles (e.g. [10, 50, 90])
  • Result:
TypeDescription
objectObject containing oldestBlock, baseFeePerGas, gasUsedRatio[], and reward[][]

eth_gasPrice

Gets the 50th-percentile gas price in the most recent block.

  • Parameters:

None

  • Result:
TypeDescription
stringGas price in wei (hexadecimal)

net_version

Gets the chain ID. Alias for eth_chainId, but returns the chain ID as a decimal instead of hex.

  • Parameters: None

  • Result:

TypeDescription
stringChain ID (decimal)

web3_clientVersion

Gets the RPC node’s client version.

  • Parameters:

None

  • Result:
TypeDescription
stringClient version string

Filter Endpoints

Endpoints for creating and managing event filters.

Note that log filters are subject to the following limits by default:

  • Open-ended block range: up to 10,000 logs in one response

  • Close-ended block range: up to 2,000 blocks to query over

View complete list of Filter endpoints

eth_newFilter

Creates a new log filter.

  • Parameters:
TypeDescription
objectFilter object with fields: address, topics, optional fromBlock/toBlock.
  • Result:
TypeDescription
stringFilter ID

eth_newBlockFilter

Creates a new block filter.

  • Parameters:

None

  • Result:
TypeDescription
stringFilter ID

eth_getFilterChanges

Fetches updates since the last poll for a filter.

  • Parameters:
TypeDescription
stringFilter ID from eth_newFilter or eth_newBlockFilter.
  • Result:
TypeDescription
string[]Array of block hashes (for block filters)
object[]Array of log objects (for log filters)

eth_getFilterLogs

Retrieves all logs matching a log filter, including historical logs.

  • Parameters:
TypeDescription
stringFilter ID
  • Result:
TypeDescription
object[]Array of log objects

eth_getLogs

Fetches logs matching given filter criteria.

  • Parameters:
TypeDescription
objectFilter object with fields: address, topics, fromBlock, toBlock, blockHash (optional).
  • Result:
TypeDescription
object[]Array of log objects

eth_uninstallFilter

Removes a previously created filter.

  • Parameters:
TypeDescription
stringFilter ID
  • Result:
TypeDescription
booltrue if the filter existed and was removed.

Simulation & Debugging

Simulation Endpoints

Endpoints for simulating contract execution.

eth_estimateGas

Estimates gas usage for a transaction without broadcasting it.

  • Parameters:
TypeDescription
objectTransaction call object (from, to, gas, gasPrice, value, data).
string(Optional) Block number or "latest", "pending", "earliest".
  • Result:
TypeDescription
stringEstimated gas (hexadecimal).

eth_call

Executes a message call immediately without creating a transaction.

  • Parameters:
TypeDescription
objectCall object (from, to, gas, gasPrice, value, data).
string(Optional) Block number or latest, pending, earliest.
  • Result:
TypeDescription
stringReturned data (hexadecimal).

Debugging Endpoints

Endpoints for debugging transactions and blocks.

debug_traceTransaction

Traces the execution of a transaction by its hash.

  • Parameters:
TypeDescription
stringTransaction hash.
object(Optional) Tracing options (tracer, timeout, enableMemory, etc.).
  • Result:
TypeDescription
objectTrace result object.

debug_traceBlockByNumber

Traces all transactions in a block specified by number.

  • Parameters:
TypeDescription
stringBlock number (hexadecimal or safe, finalized, latest, pending, or earliest).
object(Optional) Tracing options.
  • Result:
TypeDescription
object[]Array of trace result objects per tx.

debug_traceBlockByHash

Traces all transactions in a block specified by hash.

  • Parameters:
TypeDescription
stringBlock hash
  • Result:
TypeDescription
object[]Array of trace result objects per tx.

Sei Custom Endpoints

Sei extends the standard Ethereum JSON-RPC API with custom endpoints that enhance functionality for developers. These extensions enable better handling of cross-VM interactions, synthetic transactions, improved error reporting, and other Sei-specific features.

Deprecation Notice: All sei_* and sei2_* JSON-RPC methods are deprecated and scheduled for removal. Do not build new integrations on these endpoints. Use standard eth_* and debug_* methods instead.

Access is controlled by the enabled_legacy_sei_apis setting under [evm] in app.toml. Only methods explicitly listed in this allowlist are available. Disabled methods return a standard JSON-RPC error (code -32601, data "legacy_sei_deprecated"). Allowed methods pass through unchanged, with an optional Sei-Legacy-RPC-Deprecation HTTP response header signaling deprecation.

Legacy API Configuration

The enabled_legacy_sei_apis setting in app.toml controls which sei_* and sei2_* methods are accessible on the EVM HTTP endpoint.

Default allowlist (enabled on seid init):

[evm] enabled_legacy_sei_apis = [ "sei_getSeiAddress", "sei_getEVMAddress", "sei_getCosmosTx", ]

To enable additional legacy methods, add them to this array. All other sei_* and sei2_* methods (including all sei2_* block methods) are disabled by default and must be explicitly enabled.

View all available legacy methods

sei_* methods:

MethodDescription
sei_associateAssociate Sei and EVM addresses
sei_getSeiAddressGet Sei address for an EVM address
sei_getEVMAddressGet EVM address for a Sei address
sei_getCosmosTxGet Cosmos transaction by EVM tx hash
sei_getEvmTxGet EVM transaction by Cosmos tx hash
sei_getTransactionErrorByHashGet error message for a failed transaction
sei_getVMErrorGet VM error details for a transaction
sei_getBlockByHashGet block by hash (includes synthetic txs)
sei_getBlockByNumberGet block by number (includes synthetic txs)
sei_getBlockReceiptsGet block receipts (includes synthetic txs)
sei_getBlockTransactionCountByHashGet tx count by block hash (includes synthetic txs)
sei_getBlockTransactionCountByNumberGet tx count by block number (includes synthetic txs)
sei_getTransactionByBlockHashAndIndexGet tx by block hash and index (includes synthetic txs)
sei_getTransactionByBlockNumberAndIndexGet tx by block number and index (includes synthetic txs)
sei_getTransactionByHashGet transaction by hash (includes synthetic txs)
sei_getTransactionCountGet account transaction count
sei_getTransactionReceiptGet transaction receipt (includes synthetic txs)
sei_getFilterLogsGet filter logs (includes synthetic logs)
sei_getLogsGet logs (includes synthetic logs)
sei_getFilterChangesGet filter changes (includes synthetic events)
sei_newFilterCreate a new log filter
sei_newBlockFilterCreate a new block filter
sei_uninstallFilterRemove a filter
sei_getBlockByHashExcludeTraceFailGet block by hash excluding failed traces
sei_getBlockByNumberExcludeTraceFailGet block by number excluding failed traces
sei_getTransactionReceiptExcludeTraceFailGet receipt excluding failed traces
sei_traceBlockByHashExcludeTraceFailTrace block by hash excluding failed traces
sei_traceBlockByNumberExcludeTraceFailTrace block by number excluding failed traces

sei2_* methods (block queries with bank transfers included):

MethodDescription
sei2_getBlockByHashGet block by hash (includes bank transfers)
sei2_getBlockByNumberGet block by number (includes bank transfers)
sei2_getBlockReceiptsGet block receipts (includes bank transfers)
sei2_getBlockTransactionCountByHashGet tx count by block hash (includes bank transfers)
sei2_getBlockTransactionCountByNumberGet tx count by block number (includes bank transfers)
sei2_getBlockByHashExcludeTraceFailGet block by hash excluding failed traces (includes bank transfers)
sei2_getBlockByNumberExcludeTraceFailGet block by number excluding failed traces (includes bank transfers)

Address & Cross-VM Helpers

These endpoints provide cross-VM address resolution and transaction lookup between the EVM and Cosmos environments. sei_getSeiAddress, sei_getEVMAddress, and sei_getCosmosTx are enabled by default.

View Address & Cross-VM Helper Endpoints

sei_associate

Sends a transaction to establish association between the signer’s Sei address and EVM address on-chain.

  • Parameters:
TypeDescription
objectA custom object containing a string message and the v, r, s of the signed message.

Object Schema:

{ custom_message: // Any string message r: // The R-part of the signature over the Keccak256 hash of the custom message. s: // The S-part of the signature over the Keccak256 hash of the custom message. v: // The V-part of the signature over the Keccak256 hash of the custom message. }
  • Result:
TypeDescription
stringThe transaction hash of the association transaction.

sei_getSeiAddress

Returns the Sei (bech32) address associated with an EVM address.

  • Parameters:
TypeDescription
stringThe EVM address (0x-prefixed hex).
  • Result:
TypeDescription
stringThe associated Sei bech32 address.

Example Request

{ "jsonrpc": "2.0", "method": "sei_getSeiAddress", "params": ["0x1234567890abcdef1234567890abcdef12345678"], "id": 1 }

sei_getEVMAddress

Returns the EVM address associated with a Sei (bech32) address.

  • Parameters:
TypeDescription
stringThe Sei bech32 address.
  • Result:
TypeDescription
stringThe associated EVM address.

Example Request

{ "jsonrpc": "2.0", "method": "sei_getEVMAddress", "params": ["sei1..."], "id": 1 }

sei_getCosmosTx

Returns the Cosmos transaction details for a given EVM transaction hash.

  • Parameters:
TypeDescription
stringThe EVM transaction hash.
  • Result:
TypeDescription
objectThe Cosmos transaction object.

Example Request

{ "jsonrpc": "2.0", "method": "sei_getCosmosTx", "params": ["0xabc123..."], "id": 1 }

Legacy Deprecation Error

When a sei_* or sei2_* method is called but not listed in enabled_legacy_sei_apis, the node returns:

{ "jsonrpc": "2.0", "id": 1, "error": { "code": -32601, "message": "sei_getBlockByNumber is not enabled on this node. The sei_* and sei2_* JSON-RPC surfaces are deprecated, scheduled for removal, and should not be used for new integrations - prefer standard eth_* (and debug_*) methods and official migration guidance. To allow this legacy method, add it to enabled_legacy_sei_apis under [evm] in app.toml.", "data": "legacy_sei_deprecated" } }

Deprecation HTTP Header

When an allowlisted sei_* or sei2_* method is successfully called, the response includes an optional HTTP header signaling deprecation:

Sei-Legacy-RPC-Deprecation: All sei_* and sei2_* JSON-RPC methods are deprecated and scheduled for removal; migrate to eth_* and supported APIs.

Clients can use this header to detect legacy API usage and plan migration.

Last updated on