debug_traceTransaction
Returns all traces of a given transaction.
This method will use 80
Compute Units.
Parameters
transactionHash
- String - Required - The transaction hash to be traced.
object
- Object - Required - The tracer object with the following fields:
tracer
- String - The type of tracer, options are:callTracer
orprestateTracer
.callTracer
- String - The callTracer keeps track of all call frames, including depth - calls, that are made during a transaction.prestateTracer
- String - The prestateTracer replays the transaction and tracks every part of state that occurred during the transaction.
tracerConfig
- Object (Optional) - The object to specify the configurations of the tracer.onlyTopCall
- Boolean - When set to true, this will only trace the primary (top-level) call and not any sub-calls. It eliminates the additional processing for each call frame.
timeout
- String (Optional) - A string of decimal integers that overrides the JavaScript-based tracing calls default timeout of 5 seconds. Example:10s
for 10 seconds.
Returns
result
- An object with the result of the trace, containing:
from
- The address the transaction is sent from.gas
- The integer of the gas provided for the transaction execution.gasUsed
- The integer of the gas used.to
- The address the transaction is directed to.input
- The data given at the time of input.value
- The integer of the value sent with this transaction.type
- The type of call.
// Result
{
"jsonrpc": "2.0",
"result": {
"type": "CALL",
"from": "0x20577ef4c8895e3bc210c8c39620b335cdcfe7ee",
"to": "0xe0fa8195ae92b9c473c0c0c12c2d6bcbd245de47",
"value": "0x0",
"gas": "0x186a0",
"gasUsed": "0x186a0",
"input": "0x25c0996320577ef4c8895e3bc210c8c39620b335cdcfe7eef1b86bef4da0c53e498b994500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004070901030305030002010000000000",
"calls": [
{
"type": "DELEGATECALL",
"from": "0xe0fa8195ae92b9c473c0c0c12c2d6bcbd245de47",
"to": "0xa3fd3e8866875524e08fb158a7287c642da53fa8",
"value": "0x0",
"gas": "0x116ce",
"gasUsed": "0x3f5f",
"input": "0x0be27a04000000000000000000000000000000000407090102030503020001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004070901030305030002010000000000cce82b5229904f9e8909c532dea5bc836c38d2b680e5e923a5c6e1f0ab81e9bf",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001"
}
]
},
"id": 1
}
curl https://testnet.monad.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0x0a4726ca2599dddfa99d9c8a507a061a89c3ea10da19e487a3c15695c1d1affe", {"tracer": "callTracer"}],"id":1}'
Last updated
Was this helpful?