From 47198525fdaec5fe1d9fdd34481186eca182b8b9 Mon Sep 17 00:00:00 2001 From: m4sterbunny Date: Fri, 14 Nov 2025 13:47:27 +0000 Subject: [PATCH 1/2] starts updates for trace methods Signed-off-by: m4sterbunny --- .../_trace_filter-description.mdx | 2 +- .../json-rpc-methods/trace-methods/index.md | 39 +++++++++---------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/services/reference/_partials/trace-methods/_trace_filter-description.mdx b/services/reference/_partials/trace-methods/_trace_filter-description.mdx index 84ebdbc95e5..e3983969214 100644 --- a/services/reference/_partials/trace-methods/_trace_filter-description.mdx +++ b/services/reference/_partials/trace-methods/_trace_filter-description.mdx @@ -1,3 +1,3 @@ import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js'; -Returns traces matching the specified filter. The response is limited to 10000 traces per response. +Returns traces matching the specified filter. The block range is limited to 100 blocks per query (the difference between `fromBlock` and `toBlock`). diff --git a/services/reference/ethereum/json-rpc-methods/trace-methods/index.md b/services/reference/ethereum/json-rpc-methods/trace-methods/index.md index 36f56cd18c6..433912cb39e 100644 --- a/services/reference/ethereum/json-rpc-methods/trace-methods/index.md +++ b/services/reference/ethereum/json-rpc-methods/trace-methods/index.md @@ -7,27 +7,24 @@ description: Ethereum trace methods # Ethereum trace methods -Infura provides access to the following trace API methods to allow users to gain insights into the execution of smart contracts and transactions: - -- [`trace_block`](trace_block.mdx) -- [`trace_call`](trace_call.mdx) -- [`trace_callMany`](trace_callmany.mdx) -- [`trace_transaction`](trace_transaction.mdx) -- [`trace_filter`](trace_filter.mdx) - :::info -Trace API is currently an open beta feature, available to paying Infura customers. - +Trace API is an open beta feature, available to paying Infura customers. ::: -When tracing transactions, the trace diagnostic options are [`trace`](#trace) and [`stateDiff`](#statediff). - -:::info +Infura provides access to trace API methods that provide insights into the execution of smart contracts and transactions. -`trace_block, trace_filter`, and `trace_transaction` returns `trace` information, whereas `trace_call` and `trace_callMany` -allow you to use the `trace` or `stateDiff` diagnostic options when tracing calls or transactions. +| Method | Diagnostic options | +|-----------------------|-------------------------------------------| +|[`trace_block`](trace_block.mdx)|[`trace`](#trace)| +|[`trace_call`](trace_call.mdx)|[`trace`](#trace), [`stateDiff`](#statediff)| +|[`trace_callMany`](trace_callmany.mdx)|[`trace`](#trace), [`stateDiff`](#statediff)| +|[`trace_transaction`](trace_transaction.mdx)|[`trace`](#trace)| +|[`trace_filter`](trace_filter.mdx)|[`trace`](#trace)| +:::caution +Trace responses are handled generically to enable support of additional fields beyond +those documented here. This requires graceful handling. ::: ## `trace` @@ -72,19 +69,21 @@ smart contract transaction. Excludes precompiled contracts. | `output` | Return value of the contract call. Contains only the actual value sent by a `RETURN` operation. If a `RETURN` was not executed, the output is empty bytes. | | `subTraces` | Traces of contract calls made by the transaction. | | `traceAddress` | Tree list address of where the call occurred, address of the parents, and order of the current sub call. | -| `transactionHash` | Hash of the transaction. | +| `transactionHash` | Hash of the tansaction. | | `transactionPosition` | Transaction position. | -| `type` | Whether the transaction is a `CALL` or `CREATE` series operation. | +| `type` | Whether the transaction is a `call` or `create` series operation. | +| `creationMethod` | Opcode used during contract creation `create` or `create2`. | + ## `stateDiff` Displays state changes in the requested block for each transaction, represented as a map of accounts to an object. Lists the balance, code, nonce, and storage changes from immediately before the transaction to after the transaction. For the `key:value` pairs: -- `+` indicates the field didn’t exist before and now has the specified value. -- `-` indicates a deleted value. -- `*` has a `from` and a `to` value. +- `+` indicates the field didn’t exist before and now has the specified value +- `-` indicates a deleted value +- `*` has a `from` and a `to` value An absent value is distinct from zero when creating accounts or clearing storage. For example, when clearing storage, an absent value means that a particular storage slot has not yet been assigned a value, while a zero value means that the storage slot has been assigned and set to zero. From 88572df168ff692e2c52da29939047c10282b58f Mon Sep 17 00:00:00 2001 From: m4sterbunny Date: Tue, 18 Nov 2025 15:18:08 +0000 Subject: [PATCH 2/2] createMethod confirmed with test, table hierachy improved to reflect response object Signed-off-by: m4sterbunny --- services/reference/ethereum/index.md | 2 +- .../json-rpc-methods/trace-methods/index.md | 33 ++++++++++--------- .../json-rpc-methods/trace-methods/index.md | 2 +- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/services/reference/ethereum/index.md b/services/reference/ethereum/index.md index a4db7badebe..3b2a8029072 100644 --- a/services/reference/ethereum/index.md +++ b/services/reference/ethereum/index.md @@ -29,7 +29,7 @@ The [official Ethereum documentation](https://ethereum.org/en/) for more informa description: "Learn how to quickly connect and make calls to the Ethereum network." }, { - href: "./json-rpc-methods", + href: "./json-rpc-methods/", title: "JSON-RPC APIs", description: "View the APIs available for communicating with the Ethereum network." }, diff --git a/services/reference/ethereum/json-rpc-methods/trace-methods/index.md b/services/reference/ethereum/json-rpc-methods/trace-methods/index.md index 433912cb39e..ad279c5e9d7 100644 --- a/services/reference/ethereum/json-rpc-methods/trace-methods/index.md +++ b/services/reference/ethereum/json-rpc-methods/trace-methods/index.md @@ -58,23 +58,26 @@ smart contract transaction. Excludes precompiled contracts. | Key | Value | |-----------------------|-----------------------------------------------------------------------------------------------------------------| | `action` | Transaction details. | -| `callType` | Whether the transaction is `call` or `create`. | -| `from` | Address of the transaction sender. | -| `gas` | Gas provided by sender. | -| `input` | Transaction data. | -| `to` | Target of the transaction. | -| `value` | Value transferred in the transaction. | +|   - `creationMethod` | Opcode used during contract creation: `create` or `create2`. Returned for `create` operations. | +|   - `callType` | Whether the transaction is `call`, `staticcall`, `delegatecall`. Returned for `call` operations. | +|   - `from` | Address of the transaction sender. | +|   - `gas` | Gas provided by sender. | +|   - `input` | Transaction data. Returned for `call` operations. | +|   - `init` | Contract initialization code. Returned for `create` operations. | +|   - `to` | Target of the transaction. Returned for `call` operations. | +|   - `value` | Value transferred in the transaction. | +| `blockHash` | Hash of the block containing this trace. | +| `blockNumber` | Block number containing this trace. | | `result` | Transaction result. | -| `gasUsed` | Gas used by the transaction. Includes any refunds of unused gas. | -| `output` | Return value of the contract call. Contains only the actual value sent by a `RETURN` operation. If a `RETURN` was not executed, the output is empty bytes. | -| `subTraces` | Traces of contract calls made by the transaction. | +|   - `address` | Address of the newly created contract. Returned for `create` operations. | +|   - `code` | Bytecode of the newly created contract. Returned for `create` operations. | +|   - `gasUsed` | Gas used by the transaction. Includes any refunds of unused gas. | +|   - `output` | Return value of the contract call. Contains only the actual value sent by a `RETURN` operation. If a `RETURN` was not executed, the output is empty bytes. Returned for `call` operations. | +| `subtraces` | Number of sub-traces (nested contract calls) made by the transaction. | | `traceAddress` | Tree list address of where the call occurred, address of the parents, and order of the current sub call. | -| `transactionHash` | Hash of the tansaction. | -| `transactionPosition` | Transaction position. | -| `type` | Whether the transaction is a `call` or `create` series operation. | -| `creationMethod` | Opcode used during contract creation `create` or `create2`. | - - +| `transactionHash` | Hash of the transaction. | +| `transactionPosition` | Transaction position within the block. | +| `type` | Whether the transaction is a `call` or `create` operation. | ## `stateDiff` diff --git a/services/reference/linea/json-rpc-methods/trace-methods/index.md b/services/reference/linea/json-rpc-methods/trace-methods/index.md index 818881ba983..7badf182021 100644 --- a/services/reference/linea/json-rpc-methods/trace-methods/index.md +++ b/services/reference/linea/json-rpc-methods/trace-methods/index.md @@ -58,7 +58,7 @@ smart contract transaction. Excludes precompiled contracts. | `result` | Transaction result. | | `gasUsed` | Gas used by the transaction. Includes any refunds of unused gas. | | `output` | Return value of the contract call. Contains only the actual value sent by a `RETURN` operation. If a `RETURN` was not executed, the output is empty bytes. | -| `subTraces` | Traces of contract calls made by the transaction. | +| `subtraces` | Traces of contract calls made by the transaction. | | `traceAddress` | Tree list address of where the call occurred, address of the parents, and order of the current sub call. | | `transactionHash` | Hash of the transaction. | | `transactionPosition`| Transaction position. |