debug_*
methods available for newer blocks.Use the arbtrace_get
method for calling blocks prior to 22,207,815.hash
— the transaction hash for which you want to retrieve the trace. It is a unique identifier for the transaction.array
— an array of index positions representing the traces within the transaction that you want to retrieve. The index positions indicate the specific steps or actions within the transaction.result
— an object containing the traces of all of the transaction:
action
— an object that describes the action taken by the transaction:
calltype
— the type of call, call
or delegatecall
, two ways to invoke a function in a smart contract. call
creates a new environment for the function to work in, so changes made in that function won’t affect the environment where the function was called. delegatecall
doesn’t create a new environment. Instead, it runs the function within the environment of the caller, so changes made in that function will affect the caller’s environment.from
— the address that initiated the action.gas
— the amount of gas allocated for the action.input
— the input data provided for the action.to
— the address of the contract or account receiving the action.value
— the value in Wei sent along with the action.blockhash
— the hash of the block where the action was included.blocknumber
— the number of the block where the action was included.result
— an object that contains additional data about the execution of the transaction:
gasused
— the amount of gas used during the action.output
— the output data returned by the action.subtraces
— the number of sub-traces created during execution. When a transaction is executed on the EVM, it may trigger additional sub-executions, such as when a smart contract calls another smart contract or when an external account is accessed.traceaddress
— an array representing the path to the current action within the trace.transactionhash
— the hash of the transaction associated with the trace.transactionposition
— the position of the transaction within the block.type
— the type of action taken by the transaction, call
or create
. call
is the most common type of trace and occurs when a smart contract invokes another contract’s function. create
represents the creation of a new smart contract. This type of trace occurs when a smart contract is deployed to the blockchain.arbtrace_get
code examplesarbtrace_get
method is valuable for transaction analysis and debugging on the Arbitrum blockchain. By retrieving a detailed trace of a specific transaction, you can gain insights into the sequence of actions and their outcomes. Practical use cases include:
gasUsed
field in the trace’s result, you can identify gas-intensive operations and optimize gas usage in your smart contract code.arbtrace_get
method enables thorough audits of smart contract transactions. Analyzing the trace ensures that the transaction aligns with expected behavior, state changes, and security requirements.The transaction's trace.
The response is of type object
.