trace namespace
trace_block
- Parameters
- Request
- Response
-
numberOrTag: string (block number or hash or either ofearliest,finalized,latest,pending, orsafe) -
fork: string
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "trace_block",
"params": [numberOrTag, fork]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result: array of object
action: objectaddress: string (address)author: string (address)balance: string (hex integer)callType: stringcreationMethod: stringfrom: string (address)gas: string (hex integer)init: string (hex data)input: string (hex data)refundAddress: string (address)rewardType: stringto: string (address)value: string (hex integer)
blockHash: string (hash)blockNumber: integererror: stringresult: objectaddress: string (address)code: string (hex data)gasUsed: string (hex integer)output: string (hex data)
subtraces: integertraceAddress: array of integertransactionHash: string (hash)transactionPosition: integertype: string
trace_call
- Parameters
- Request
- Response
-
call: objectblockHash: string (hash)blockNumber: string (hex integer)blockTimestamp: string (hex integer)gas: string (hex integer)hash: string (hash)transactionIndex: string (hex integer)type: string (transaction type)
-
traceTypes: array of string -
blockParameter: string (block number or hash or either ofearliest,finalized,latest,pending, orsafe) -
stateOverride: map of object
balance: string (hex integer)code: string (hex data)hasStateChanges: booleanmovePrecompileToAddress: string (address)nonce: string (hex integer)state: map of string (hash)stateDiff: map of string (hash)
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "trace_call",
"params": [call, traceTypes, blockParameter, stateOverride]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result: object
output: string (hex data)stateDiff: map of objectbalance: objectafter: string (hex integer)before: string (hex integer)
code: objectafter: string (hex data)before: string (hex data)
nonce: objectafter: string (hex integer)before: string (hex integer)
storage: map of objectafter: string (hex data)before: string (hex data)
trace: array of objectaction: objectaddress: string (address)author: string (address)balance: string (hex integer)callType: stringcreationMethod: stringfrom: string (address)gas: string (hex integer)init: string (hex data)input: string (hex data)refundAddress: string (address)rewardType: stringto: string (address)value: string (hex integer)
error: stringresult: objectaddress: string (address)code: string (hex data)gasUsed: string (hex integer)output: string (hex data)
subtraces: integertraceAddress: array of integertype: string
transactionHash: string (hash)vmTrace: objectcode: string (hex data)operations: array of objectcost: string (hex integer)halted: booleanmemory: objectdata: string (hex data)offset: string (hex integer)
pc: integerpush: array of string (hex data)store: objectkey: string (hex data)value: string (hex data)
sub: objectused: string (hex integer)
trace_callMany
Performs multiple traces on top of a block
- Parameters
- Request
- Response
-
calls: objectcalls: array of objecttraceTypes: array of stringtransaction: objectblockHash: string (hash)blockNumber: string (hex integer)blockTimestamp: string (hex integer)gas: string (hex integer)hash: string (hash)transactionIndex: string (hex integer)type: string (transaction type)
-
blockParameter: string (block number or hash or either ofearliest,finalized,latest,pending, orsafe)
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "trace_callMany",
"params": [calls, blockParameter]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result: array of object
output: string (hex data)stateDiff: map of objectbalance: objectafter: string (hex integer)before: string (hex integer)
code: objectafter: string (hex data)before: string (hex data)
nonce: objectafter: string (hex integer)before: string (hex integer)
storage: map of objectafter: string (hex data)before: string (hex data)
trace: array of objectaction: objectaddress: string (address)author: string (address)balance: string (hex integer)callType: stringcreationMethod: stringfrom: string (address)gas: string (hex integer)init: string (hex data)input: string (hex data)refundAddress: string (address)rewardType: stringto: string (address)value: string (hex integer)
error: stringresult: objectaddress: string (address)code: string (hex data)gasUsed: string (hex integer)output: string (hex data)
subtraces: integertraceAddress: array of integertype: string
transactionHash: string (hash)vmTrace: objectcode: string (hex data)operations: array of objectcost: string (hex integer)halted: booleanmemory: objectdata: string (hex data)offset: string (hex integer)
pc: integerpush: array of string (hex data)store: objectkey: string (hex data)value: string (hex data)
sub: objectused: string (hex integer)
trace_filter
Returns traces matching the filter, in the range fromBlock to toBlock (block numbers or tags, each defaulting to latest), or in the single canonical block named by blockHash, which excludes the range. Any address in fromAddress or toAddress matches that list; an omitted, null or empty list does not restrict. mode "intersection" (default) requires a match in every list that is set; "union" requires a match in any of them.
- Parameters
- Request
- Response
traceFilterForRpc: objectafter: string (hex integer)blockHash: string (hash)count: string (hex integer)fromAddress: array of string (address)fromBlock: string (block number or hash or either ofearliest,finalized,latest,pending, orsafe)mode: stringtoAddress: array of string (address)toBlock: string (block number or hash or either ofearliest,finalized,latest,pending, orsafe)
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "trace_filter",
"params": [traceFilterForRpc]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result: array of object
action: objectaddress: string (address)author: string (address)balance: string (hex integer)callType: stringcreationMethod: stringfrom: string (address)gas: string (hex integer)init: string (hex data)input: string (hex data)refundAddress: string (address)rewardType: stringto: string (address)value: string (hex integer)
blockHash: string (hash)blockNumber: integererror: stringresult: objectaddress: string (address)code: string (hex data)gasUsed: string (hex integer)output: string (hex data)
subtraces: integertraceAddress: array of integertransactionHash: string (hash)transactionPosition: integertype: string
trace_get
Returns the trace at the given traceAddress path: [] selects the root, ["0x0"] its first child. Returns null if the transaction is not found or has no trace at that path.
- Parameters
- Request
- Response
-
txHash: string (hash) -
traceAddress: array of string (hex integer)
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "trace_get",
"params": [txHash, traceAddress]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result: object
action: objectaddress: string (address)author: string (address)balance: string (hex integer)callType: stringcreationMethod: stringfrom: string (address)gas: string (hex integer)init: string (hex data)input: string (hex data)refundAddress: string (address)rewardType: stringto: string (address)value: string (hex integer)
blockHash: string (hash)blockNumber: integererror: stringresult: objectaddress: string (address)code: string (hex data)gasUsed: string (hex integer)output: string (hex data)
subtraces: integertraceAddress: array of integertransactionHash: string (hash)transactionPosition: integertype: string
result may be null in a successful response.
trace_rawTransaction
Traces a call to eth_sendRawTransaction without making the call, returning the traces
- Parameters
- Request
- Response
-
data: string (hex data) -
traceTypes: array of string
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "trace_rawTransaction",
"params": [data, traceTypes]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result: object
output: string (hex data)stateDiff: map of objectbalance: objectafter: string (hex integer)before: string (hex integer)
code: objectafter: string (hex data)before: string (hex data)
nonce: objectafter: string (hex integer)before: string (hex integer)
storage: map of objectafter: string (hex data)before: string (hex data)
trace: array of objectaction: objectaddress: string (address)author: string (address)balance: string (hex integer)callType: stringcreationMethod: stringfrom: string (address)gas: string (hex integer)init: string (hex data)input: string (hex data)refundAddress: string (address)rewardType: stringto: string (address)value: string (hex integer)
error: stringresult: objectaddress: string (address)code: string (hex data)gasUsed: string (hex integer)output: string (hex data)
subtraces: integertraceAddress: array of integertype: string
transactionHash: string (hash)vmTrace: objectcode: string (hex data)operations: array of objectcost: string (hex integer)halted: booleanmemory: objectdata: string (hex data)offset: string (hex integer)
pc: integerpush: array of string (hex data)store: objectkey: string (hex data)value: string (hex data)
sub: objectused: string (hex integer)
trace_replayBlockTransactions
- Parameters
- Request
- Response
-
blockParameter: string (block number or hash or either ofearliest,finalized,latest,pending, orsafe) -
traceTypes: array of string
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "trace_replayBlockTransactions",
"params": [blockParameter, traceTypes]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result: array of object
output: string (hex data)stateDiff: map of objectbalance: objectafter: string (hex integer)before: string (hex integer)
code: objectafter: string (hex data)before: string (hex data)
nonce: objectafter: string (hex integer)before: string (hex integer)
storage: map of objectafter: string (hex data)before: string (hex data)
trace: array of objectaction: objectaddress: string (address)author: string (address)balance: string (hex integer)callType: stringcreationMethod: stringfrom: string (address)gas: string (hex integer)init: string (hex data)input: string (hex data)refundAddress: string (address)rewardType: stringto: string (address)value: string (hex integer)
error: stringresult: objectaddress: string (address)code: string (hex data)gasUsed: string (hex integer)output: string (hex data)
subtraces: integertraceAddress: array of integertype: string
transactionHash: string (hash)vmTrace: objectcode: string (hex data)operations: array of objectcost: string (hex integer)halted: booleanmemory: objectdata: string (hex data)offset: string (hex integer)
pc: integerpush: array of string (hex data)store: objectkey: string (hex data)value: string (hex data)
sub: objectused: string (hex integer)
trace_replayTransaction
Replays a transaction and returns the requested traces. Returns null if the transaction is not found.
- Parameters
- Request
- Response
-
txHash: string (hash) -
traceTypes: array of string -
traceNonCanonical: boolean
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "trace_replayTransaction",
"params": [txHash, traceTypes, traceNonCanonical]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result: object
output: string (hex data)stateDiff: map of objectbalance: objectafter: string (hex integer)before: string (hex integer)
code: objectafter: string (hex data)before: string (hex data)
nonce: objectafter: string (hex integer)before: string (hex integer)
storage: map of objectafter: string (hex data)before: string (hex data)
trace: array of objectaction: objectaddress: string (address)author: string (address)balance: string (hex integer)callType: stringcreationMethod: stringfrom: string (address)gas: string (hex integer)init: string (hex data)input: string (hex data)refundAddress: string (address)rewardType: stringto: string (address)value: string (hex integer)
error: stringresult: objectaddress: string (address)code: string (hex data)gasUsed: string (hex integer)output: string (hex data)
subtraces: integertraceAddress: array of integertype: string
transactionHash: string (hash)vmTrace: objectcode: string (hex data)operations: array of objectcost: string (hex integer)halted: booleanmemory: objectdata: string (hex data)offset: string (hex integer)
pc: integerpush: array of string (hex data)store: objectkey: string (hex data)value: string (hex data)
sub: objectused: string (hex integer)
result may be null in a successful response.
trace_simulateV1
Returns parity like traces for simulated blocks
- Parameters
- Request
- Response
-
payload: objectblockStateCalls: array of objectblockOverrides: objectbaseFeePerGas: string (hex integer)blobBaseFee: string (hex integer)feeRecipient: string (address)gasLimit: string (hex integer)number: string (hex integer)prevRandao: string (hash)time: string (hex integer)
calls: array of objectblockHash: string (hash)blockNumber: string (hex integer)blockTimestamp: string (hex integer)gas: string (hex integer)hash: string (hash)transactionIndex: string (hex integer)type: string (transaction type)
stateOverrides: map of objectbalance: string (hex integer)code: string (hex data)hasStateChanges: booleanmovePrecompileToAddress: string (address)nonce: string (hex integer)state: map of string (hash)stateDiff: map of string (hash)
returnFullTransactionObjects: booleanreturnFullTransactions: booleantraceTransfers: booleanvalidation: boolean
-
blockParameter: string (block number or hash or either ofearliest,finalized,latest,pending, orsafe) -
traceTypes: array of string
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "trace_simulateV1",
"params": [payload, blockParameter, traceTypes]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result: array of object
author: string (address)baseFeePerGas: string (hex integer)blobGasUsed: string (hex integer)blockAccessListHash: string (hash)difficulty: string (hex integer)excessBlobGas: string (hex integer)extraData: string (hex data)gasLimit: string (hex integer)gasUsed: string (hex integer)hash: string (hash)logsBloom: string (hex data)miner: string (address)mixHash: string (hash)nonce: string (8-byte hex data)number: string (hex integer)parentBeaconBlockRoot: string (hash)parentHash: string (hash)receiptsRoot: string (hash)requestsHash: string (hash)sha3Uncles: string (hash)signature: string (hex data)size: string (hex integer)slotNumber: string (hex integer)stateRoot: string (hash)step: integertimestamp: string (hex integer)totalDifficulty: string (hex integer)traces: array of objectaction: objectauthor: string (address)callType: stringcreationMethod: stringerror: stringfrom: string (address)gas: string (hex integer)includeInTrace: booleaninput: string (hex data)isPrecompiled: booleanresult: objectaddress: string (address)code: string (hex data)gasUsed: string (hex integer)output: string (hex data)
rewardType: stringsubtraces: array of objectto: string (address)traceAddress: array of integertype: stringvalue: string (hex integer)
blockHash: string (hash)blockNumber: integeroutput: string (hex data)stateDiff: map of objectbalance: objectafter: string (hex integer)before: string (hex integer)
code: objectafter: string (hex data)before: string (hex data)
nonce: objectafter: string (hex integer)before: string (hex integer)
storage: map of objectafter: string (hex data)before: string (hex data)
transactionHash: string (hash)transactionPosition: integervmTrace: objectcode: string (hex data)operations: array of objectcost: string (hex integer)halted: booleanmemory: objectdata: string (hex data)offset: string (hex integer)
pc: integerpush: array of string (hex data)store: objectkey: string (hex data)value: string (hex data)
sub: objectused: string (hex integer)
transactions: objectfull: array of objectblockHash: string (hash)blockNumber: string (hex integer)blockTimestamp: string (hex integer)gas: string (hex integer)hash: string (hash)transactionIndex: string (hex integer)type: string (transaction type)
hashes: array of string (hash)
transactionsRoot: string (hash)uncles: array of string (hash)withdrawals: array of objectaddress: string (address)amount: string (hex integer)index: string (hex integer)validatorIndex: string (hex integer)
withdrawalsRoot: string (hash)
trace_transaction
Returns the traces of a transaction. Returns null if the transaction is not found.
- Parameters
- Request
- Response
-
txHash: string (hash) -
traceNonCanonical: boolean
curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "trace_transaction",
"params": [txHash, traceNonCanonical]
}'
{
"jsonrpc": "2.0",
"id": 0,
"result": result
}
result: array of object
action: objectaddress: string (address)author: string (address)balance: string (hex integer)callType: stringcreationMethod: stringfrom: string (address)gas: string (hex integer)init: string (hex data)input: string (hex data)refundAddress: string (address)rewardType: stringto: string (address)value: string (hex integer)
blockHash: string (hash)blockNumber: integererror: stringresult: objectaddress: string (address)code: string (hex data)gasUsed: string (hex integer)output: string (hex data)
subtraces: integertraceAddress: array of integertransactionHash: string (hash)transactionPosition: integertype: string
result may be null in a successful response.