debug_*
methods available for newer blocks.Use the arbtrace_filter
method for calling blocks prior to 22,207,815.object
— the filter object used for specifying the following filter criteria:
fromBlock
— (optional) specifies the starting block from which to retrieve data.toBlock
— (optional) specifies the ending block until which data should be retrieved.fromaddress
— (optional) array of addresses of the senders from which the transactions should be filtered.toaddress
— (optional) array of addresses of the receivers to which the transactions should be filtered.after
— (optional) specifies the offset trace number to start retrieving traces.count
— (optional) specifies the number of traces to display in a batch.array
— represents the block traces, which consist of the following fields (note that all return types are hexadecimal representations unless otherwise stated):action
— represents the ParityTrace
object, which provides details on the following:
from
— indicates the address of the sender.callType
— specifies the type of method used, such as call
or delegatecall
.gas
— represents the gas provided by the sender, encoded in hexadecimal.input
— contains the data sent along with the transaction.to
— specifies the address of the receiver.value
— indicates the value sent with this transaction, encoded as an integer in hexadecimal.blockHash
— provides the hash of the block where this transaction was included.blockNumber
— represents the block number in which this transaction was included.result
— refers to the ParityTraceResult
object, which includes the following information:
gasUsed
— represents the amount of gas used by this specific transaction alone.output
— contains the value returned by the contract call. It includes the actual value sent by the RETURN
method. If the RETURN
method was not executed, the output is empty bytes.subtraces
— represents the traces of contract calls made by the transaction.traceAddress
— specifies the list of addresses where the call executed, including the address of the parents and the order of the current sub-call.transactionHash
— refers to the hash of the transaction.transactionPosition
— indicates the position of the transaction.type
— specifies the type of method used, such as call
or create
.arbtrace_filter
code examplesarbtrace_filter
method on the Arbitrum blockchain allows you to retrieve detailed traces of smart contract execution. Think of traces as a step-by-step account of what happens when a smart contract is called or interacts with other contracts.
With this method, you can specify filter criteria, such as the range of blocks you’re interested in. When you invoke the arbtrace_filter
method, it returns traces that match your criteria.
Traces are useful for various purposes. For example, you can debug smart contract transactions by analyzing the sequence of function calls, state changes, and events emitted during execution. This helps you identify and fix issues in your contract’s logic.
Traces also provide insights into gas consumption, allowing you to optimize gas usage in your contracts by identifying gas-intensive operations.The result of the arbtrace_filter method.
The response is of type object
.