Skip to content

Commit 7e825d0

Browse files
Updates for trace methods (#2474)
* starts updates for trace methods Signed-off-by: m4sterbunny <[email protected]> * createMethod confirmed with test, table hierachy improved to reflect response object Signed-off-by: m4sterbunny <[email protected]> * Update services/reference/ethereum/json-rpc-methods/trace-methods/index.md Co-authored-by: Alexandra Carrillo <[email protected]> * Update services/reference/ethereum/json-rpc-methods/trace-methods/index.md Co-authored-by: Alexandra Carrillo <[email protected]> * responds to review * confused by feedback: attempting to respond * responds to review Signed-off-by: m4sterbunny <[email protected]> --------- Signed-off-by: m4sterbunny <[email protected]> Co-authored-by: Alexandra Carrillo <[email protected]>
1 parent 5445c45 commit 7e825d0

File tree

3 files changed

+33
-29
lines changed

3 files changed

+33
-29
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';
22

3-
Returns traces matching the specified filter. The response is limited to 10000 traces per response. <CreditCost network="evm_trace" method="trace_filter" />
3+
Returns traces matching the specified filter. The block range is limited to 100 blocks per query (the difference between `fromBlock` and `toBlock`). <CreditCost network="evm_trace" method="trace_filter" />

services/reference/ethereum/json-rpc-methods/trace-methods/index.md

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,26 @@ description: Ethereum trace methods
77

88
# Ethereum trace methods
99

10-
Infura provides access to the following trace API methods to allow users to gain insights into the execution of smart contracts and transactions:
10+
:::info
11+
12+
Trace API is an open beta feature, available to paying Infura customers.
13+
:::
14+
15+
Infura provides access to the following trace API methods that provide insights into the execution of smart contracts and transactions.
1116

1217
- [`trace_block`](trace_block.mdx)
1318
- [`trace_call`](trace_call.mdx)
1419
- [`trace_callMany`](trace_callmany.mdx)
1520
- [`trace_transaction`](trace_transaction.mdx)
1621
- [`trace_filter`](trace_filter.mdx)
1722

18-
:::info
19-
20-
Trace API is currently an open beta feature, available to paying Infura customers.
21-
22-
:::
23-
24-
When tracing transactions, the trace diagnostic options are [`trace`](#trace) and [`stateDiff`](#statediff).
25-
26-
:::info
27-
28-
`trace_block, trace_filter`, and `trace_transaction` returns `trace` information, whereas `trace_call` and `trace_callMany`
29-
allow you to use the `trace` or `stateDiff` diagnostic options when tracing calls or transactions.
23+
`trace_block`, `trace_filter`, and `trace_transaction` return [`trace`](#trace) information, while
24+
`trace_call` and `trace_callMany`
25+
allow you to use the [`trace`](#trace) or [`stateDiff`](#statediff) diagnostic options when tracing calls or transactions.
3026

27+
:::caution
28+
Trace responses are handled generically to enable support of additional fields beyond
29+
those documented here. This requires graceful handling.
3130
:::
3231

3332
## `trace`
@@ -61,28 +60,33 @@ smart contract transaction. Excludes precompiled contracts.
6160
| Key | Value |
6261
|-----------------------|-----------------------------------------------------------------------------------------------------------------|
6362
| `action` | Transaction details. |
64-
| `callType` | Whether the transaction is `call` or `create`. |
65-
| `from` | Address of the transaction sender. |
66-
| `gas` | Gas provided by sender. |
67-
| `input` | Transaction data. |
68-
| `to` | Target of the transaction. |
69-
| `value` | Value transferred in the transaction. |
63+
| &nbsp;&nbsp;- `creationMethod` | Opcode used during contract creation: `create` or `create2`. Returned for `create` operations. |
64+
| &nbsp;&nbsp;- `callType` | Whether the transaction is `call`, `staticcall`, or `delegatecall`. Returned for `call` operations. |
65+
| &nbsp;&nbsp;- `from` | Address of the transaction sender. |
66+
| &nbsp;&nbsp;- `gas` | Gas provided by sender. |
67+
| &nbsp;&nbsp;- `input` | Transaction data. Returned for `call` operations. |
68+
| &nbsp;&nbsp;- `init` | Contract initialization code. Returned for `create` operations. |
69+
| &nbsp;&nbsp;- `to` | Target of the transaction. Returned for `call` operations. |
70+
| &nbsp;&nbsp;- `value` | Value transferred in the transaction. |
71+
| `blockHash` | Hash of the block containing this trace. |
72+
| `blockNumber` | Block number containing this trace. |
7073
| `result` | Transaction result. |
71-
| `gasUsed` | Gas used by the transaction. Includes any refunds of unused gas. |
72-
| `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. |
73-
| `subTraces` | Traces of contract calls made by the transaction. |
74+
| &nbsp;&nbsp;- `address` | Address of the newly created contract. Returned for `create` operations. |
75+
| &nbsp;&nbsp;- `code` | Bytecode of the newly created contract. Returned for `create` operations. |
76+
| &nbsp;&nbsp;- `gasUsed` | Gas used by the transaction. Includes any refunds of unused gas. |
77+
| &nbsp;&nbsp;- `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. |
78+
| `subtraces` | Number of sub-traces (nested contract calls) made by the transaction. |
7479
| `traceAddress` | Tree list address of where the call occurred, address of the parents, and order of the current sub call. |
75-
| `transactionHash` | Hash of the transaction. |
76-
| `transactionPosition` | Transaction position. |
77-
| `type` | Whether the transaction is a `CALL` or `CREATE` series operation. |
78-
80+
| `transactionHash` | Hash of the transaction. |
81+
| `transactionPosition` | Transaction position within the block. |
82+
| `type` | Whether the transaction is a `call` or `create` operation. |
7983

8084
## `stateDiff`
8185

8286
Displays state changes in the requested block for each transaction, represented as a map of accounts to an object. Lists
8387
the balance, code, nonce, and storage changes from immediately before the transaction to after the transaction. For the `key:value` pairs:
8488

85-
- `+` indicates the field didnt exist before and now has the specified value.
89+
- `+` indicates the field didn't exist before and now has the specified value.
8690
- `-` indicates a deleted value.
8791
- `*` has a `from` and a `to` value.
8892

services/reference/linea/json-rpc-methods/trace-methods/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ smart contract transaction. Excludes precompiled contracts.
5858
| `result` | Transaction result. |
5959
| `gasUsed` | Gas used by the transaction. Includes any refunds of unused gas. |
6060
| `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. |
61-
| `subTraces` | Traces of contract calls made by the transaction. |
61+
| `subtraces` | Traces of contract calls made by the transaction. |
6262
| `traceAddress` | Tree list address of where the call occurred, address of the parents, and order of the current sub call. |
6363
| `transactionHash` | Hash of the transaction. |
6464
| `transactionPosition`| Transaction position. |

0 commit comments

Comments
 (0)