Skip to Content

Sei’s EVM RPC

Sei supports the standard Ethereum JSON-RPC API endpoints, along with a few which are specific to Sei.

see sei endpoints for details

Standard endpoints

Below is a list of EVM-RPC endpoints provided by default on a Sei RPC node. Your RPC provider may offer slightly different/extended specifications.

All endpoints are in the form of JSON-RPC and share the following request/response structure:

  • Request
    • HTTP method: always “GET”.
    • 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
    • body (JSON):
    • id: the same identifier in request.
    • jsonrpc: always “2.0”.
    • result: an object that differs from endpoint to endpoint.

Send Transactions

eth_sendRawTransaction

Sends a signed transaction.

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

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. }

Transaction Lookup

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

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

Gets the IAVL proof (note: not a MPT 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

eth_getBlockTransactionCountByNumber

Gets the count of EVM transactions (i.e. excluding native Cosmos transactions) in a block by its number.

  • Parameters:
TypeDescription
stringThe block number, 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 count.

eth_getBlockTransactionCountByHash

Gets the count of EVM transactions (i.e. excluding native Cosmos transactions) in a block by its hash.

  • Parameters:
TypeDescription
stringThe block hash.
  • Result:
TypeDescription
stringThe hexadecimal form of the count.

eth_getBlockByHash

Gets the block metadata and/or its EVM transactions by block hash

  • Parameters:
TypeDescription
stringThe block hash.
boolWhether to include transactions in the response.
  • Result:
TypeDescription
stringThe block info.

eth_getBlockByNumber

Gets the block metadata and/or its EVM transactions by block number.

  • Parameters:
TypeDescription
stringThe block number, 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.
boolWhether to include transactions in the response.
  • Result:
TypeDescription
stringThe block info.

eth_getBlockReceipts

Gets an array of EVM transaction receipt in a block by block number

  • Parameters:
TypeDescription
stringThe block number, 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[]An array of receipt objects.

Blockchain Information

eth_blockNumber

Gets the latest committed block number.

  • Parameters:

None

  • Result:
TypeDescription
stringThe hexadecimal form of the block number.

eth_chainId

Gets the chain ID.

  • Parameters:

None

  • Result:
TypeDescription
stringThe hexadecimal form of the chain ID.

eth_coinbase

Gets the fee collector address.

  • Parameters:

None

  • Result:
TypeDescription
stringThe address of the fee collector.

eth_feeHistory

Gets fee history over the requested block range.

  • Parameters:
TypeDescription
stringThe number of blocks to look at, in either decimal or hexadecimal form.
stringThe block number, which can either be a hexadecimal number, or one of “safe”, “finalized”, or “latest”. Note that “safe”, “finalized”, and “latest” mean the same thing on Sei due to its instant finality.
float[]The reward percentiles.
  • Result:
TypeDescription
objectThe fee history over the requested block range.

eth_gasPrice

Gets the 50% percentile of gas prices in the most recent block.

  • Parameters:

None

  • Result:
TypeDescription
stringThe hexadecimal form of the gas price.

net_version

Gets the version (equal to Chain ID).

  • Parameters:

None

  • Result:
TypeDescription
stringThe hexadecimal form of the chainID.

web3_clientVersion

  • Parameters:

None

  • Result:
TypeDescription
stringThe RPC node’s runtime version.

Filter Endpoints

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

  • 10000 logs in one response if block range is open-ended
  • 2000 blocks to query over if block range is close-ended

Your RPC provider may tweak these limits.

eth_newFilter

Creates a new log filter for later queries.

  • Parameters:
TypeDescription
objectThe filter criteria.
  • Result:
TypeDescription
stringThe newly created filter’s ID.

eth_newBlockFilter

Creates a new block filter for later queries.

  • Parameters:

None

  • Result:
TypeDescription
stringThe newly created filter’s ID.

eth_getFilterChanges

Gets all the updates since the filter was last queried.

  • Parameters:
TypeDescription
stringThe filter ID.
  • Result:
TypeDescription
string[] OR object[]For block filters, the result would be an array of block hashes; for log filters, the result would be an array of log objects.

eth_getFilterLogs

Get all logs for a given log filter, including the logs that have been returned before.

  • Parameters:
TypeDescription
stringThe filter ID.
  • Result:
TypeDescription
object[]An array of log objects.

eth_getLogs

Get all logs for the given filter criteria.

  • Parameters:
TypeDescription
objectThe filter criteria.
  • Result:
TypeDescription
object[]An array of log objects.

When using this query, the logIndex is not unique. These queries are also limited to 2000 blocks or 10,000 logs (whichever comes first). If 10,000 logs are returned, it’s recommended to split and re-run the query in smaller chunks to ensure all logs are captured. There are no warnings when these limits are exceeded.

To address these issues, consider using the wrapper function described in our Developer Hub.

eth_uninstallFilter

Removes a created filter.

  • Parameters:
TypeDescription
stringThe filter ID.
  • Result:
TypeDescription
boolWhether the filter existed.

Simulation Endpoints

eth_estimateGas

Same as the official specification.

eth_call

Same as the official specification.

Debugging Endpoints

debug_traceTransaction

Same as Alchemy.

debug_traceBlockByNumber

Same as Alchemy.

debug_traceBlockByHash

Same as Alchemy.

sei endpoints

Additional custom endpoints exist for specific applications - typically to avoid application-side adjustments to the expected RPC responses.

Click to expand

Endpoints for Synthetic txs

The motivation for these endpoints is to expose CW20 and CW721 events on the EVM side through synthetic receipts and logs. This is useful for indexing pointer contracts.

  • sei_getFilterLogs
    • same as eth_getFilterLogs but includes synthetic logs
  • sei_getLogs
    • same as eth_getLogs but includes synthetic logs
  • sei_getBlockByNumber and sei_getBlockByHash
    • same as eth_getBlockByNumber and eth_getBlockByHash but includes synthetic txs
  • NOTE: for synthetic txs, eth_getTransactionReceipt can be used to get the receipt data for a synthetic tx hash.

Endpoints for excluding tracing failures

The motivation for these endpoints is to exclude tracing failures from the EVM side. Due to how our mempool works and our lack of tx simulation, we cannot rely on txs to pass all pre-state checks. Therefore, in the eth_ endpoints, we may see txs that fail tracing with errors like “nonce too low”, “nonce too high”, “insufficient funds”, or other types of panic failures. These transactions are not executed, yet are still included in the block. These endpoints are useful for filtering out these txs.

  • sei_traceBlockByNumberExcludeTraceFail
    • same as debug_traceBlockByNumber but excludes panic txs
  • sei_traceBlockByHashExcludeTraceFail
    • same as debug_traceBlockByHash but excludes panic txs
  • sei_getTransactionReceiptExcludeTraceFail
    • same as eth_getTransactionReceipt but excludes panic txs
  • sei_getBlockByNumberExcludeTraceFail and sei_getBlockByHashExcludeTraceFail
    • same as eth_getBlockByNumber and eth_getBlockByHash but excludes panic txs
Last updated on