Skip to content
EVMKit Docs EVMKit Docs
Back to site
EVMKit Docs EVMKit Docs
Site

Docs RPC API

RPC API

Public EVMKit and supported `eth_*` JSON-RPC methods on the shared `POST /v1` endpoint.

All current public methods are sent through the same regional JSON-RPC endpoint:

https://rpc-<endpoint>.evmkit.app/v1

Replace <endpoint> with your chosen regional endpoint. See Regions for hostname patterns and the current regional layout.

Use the same headers for every method:

Content-Type: application/json
X-Api-Key: evk_your_live_key

Methods that execute against a chosen block use hex block numbers in the request body.

For pricing, use the single table on the Billing & CU pricing page.

Materialize a reusable prepared state under a deterministic hash.

Use evmkit_prepare once to build the state you want to simulate, then reuse that hash from evmkit_call. evmkit_trace can also continue from an existing prepared hash and writes the traced post-state back under that same hash.

Exactly one of request or raw must be set. Prepared hashes are evicted after 10 minutes of inactivity on that hash.

Example request using request:

{
"jsonrpc": "2.0",
"id": 1,
"method": "evmkit_prepare",
"params": [
{
"hash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"blockNumber": "0x16e3600",
"request": {
"from": "0x1111111111111111111111111111111111111111",
"to": "0x2222222222222222222222222222222222222222",
"input": "0x1234",
"value": "0x0",
"gas": 250000
}
}
]
}

Example request using raw:

{
"jsonrpc": "2.0",
"id": 1,
"method": "evmkit_prepare",
"params": [
{
"hash": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"blockNumber": "0x16e3600",
"raw": "0x02f86c01808506fc23ac0082520894aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa80c0"
}
]
}

Example response:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"gas": 184221
}
}

result.gas returns the gas used while preparing the state snapshot.

Run a prepared or one-shot simulation request and return success status, gas used, optional output bytes, and an optional touched access list.

Use state to reference a prepared hash from evmkit_prepare. If state is omitted, evmkit_call runs as a one-shot request against the derived base state for blockNumber - 1. evmkit_call is the low-overhead, high-throughput simulation endpoint; use evmkit_trace only when you need full execution trace output.

Example request:

{
"jsonrpc": "2.0",
"id": 1,
"method": "evmkit_call",
"params": [
{
"state": "0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"request": {
"from": "0x1111111111111111111111111111111111111111",
"to": "0x2222222222222222222222222222222222222222",
"value": "0x0",
"input": "0x1234",
"gas": 250000
},
"blockNumber": "0x16e3600",
"createOutput": true,
"createAccessList": true
}
]
}

Example response:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"success": true,
"gas": 184221,
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"accessList": {
"gas": 123456,
"touched": [
{
"address": "0xabc",
"storageKeys": [
"0x1",
"0x2"
]
},
{
"address": "0xdef",
"storageKeys": []
}
]
}
}
}

If createAccessList is true, result.accessList.gas returns the access-list gas estimate and result.accessList.touched returns the generated touched access list.

Run a structured trace for a state transition and write the traced post-state back under hash.

options.tracer must be one of callTracer, flatCallTracer, prestateTracer, or 4byteTracer. If hash already exists from evmkit_prepare or a prior evmkit_trace, execution starts from that prepared state. Otherwise the base state is derived automatically from blockNumber - 1, and the traced post-state is registered under hash for follow-up evmkit_call or evmkit_trace requests.

Example request:

{
"jsonrpc": "2.0",
"id": 1,
"method": "evmkit_trace",
"params": [
{
"options": {
"disableStorage": false,
"disableStack": true,
"disableReturnData": true,
"disableMemory": true,
"tracer": "callTracer",
"tracerConfig": {
"withLog": true
}
},
"hash": "0xcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
"request": {
"from": "0x1111111111111111111111111111111111111111",
"to": "0x2222222222222222222222222222222222222222",
"value": "0x0",
"input": "0x1234",
"gas": 250000
},
"blockNumber": "0x16e3600"
}
]
}

Example response:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"existed": false,
"success": true,
"gas": 184221,
"result": {
"from": "0x1111111111111111111111111111111111111111",
"to": "0x2222222222222222222222222222222222222222",
"gas": "0x3d090",
"gasUsed": "0x2cf9d",
"input": "0x1234",
"output": "0x",
"type": "CALL",
"logs": [
{
"address": "0x2222222222222222222222222222222222222222",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
],
"data": "0x0000000000000000000000001111111111111111111111111111111111111111",
"index": "0x0",
"position": "0x0"
}
]
}
}
}

result.gas returns the gas used by the traced transaction. result.result matches the selected tracer output shape. result.existed is true when no prepared state exists for hash and a transaction with that same hash already exists on chain.

Returns the latest pending block context: number, basefee, timestamp.

Example request:

{
"jsonrpc": "2.0",
"id": 1,
"method": "evmkit_pendingBlock",
"params": []
}

Example response:

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"number": "0x14d99a2",
"basefee": "0x5e57394a",
"timestamp": "0x67d1a25a"
}
}

Only the methods listed in the table below are enabled on the public RPC API. Stateful historical queries are generally available only for the latest 10,064 blocks. Block and transaction lookup methods that do not depend on retained historical state remain available outside that window.

MethodNotes
eth_getBlockByHashBlock by hash, with optional full transactions.
eth_getBlockByNumberBlock by tag or number, with optional full transactions.
eth_getBlockReceiptsFull receipt list for a block; generally limited to the latest 10,064 blocks.
eth_getRawTransactionByHashRaw signed transaction bytes by hash.
eth_getTransactionByHashDecoded transaction by hash.
eth_getRawTransactionByBlockHashAndIndexRaw transaction by block hash and index.
eth_getTransactionByBlockHashAndIndexTransaction by block hash and index.
eth_getRawTransactionByBlockNumberAndIndexRaw transaction by block number and index.
eth_getTransactionByBlockNumberAndIndexTransaction by block number and index.
eth_getTransactionBySenderAndNonceReth extension for sender plus nonce lookup.
eth_getTransactionReceiptReceipt by transaction hash; generally limited to the latest 10,064 blocks.
eth_getBalanceAccount balance at a block tag or number within the latest 10,064 blocks.
eth_getStorageAtStorage slot value at a block tag or number within the latest 10,064 blocks.
eth_getTransactionCountNonce at a block tag or number within the latest 10,064 blocks.
eth_getCodeBytecode at a block tag or number.
eth_gasPriceSuggested legacy gas price.
eth_maxPriorityFeePerGasSuggested priority fee.
eth_blobBaseFeeCurrent blob base fee.
eth_getLogsLog query with upstream range and result limits; historical access is generally limited to the latest 10,064 blocks.