debug_traceCall
Returns the number of possible tracing results by executing an eth call within the context of the given block execution.
This method will use 40 Compute Units.
Parameters
object - Object - The transaction call object with the following fields:
from- String - The address the transaction is sent fromto- String - Required - The address the transaction is directed togas- Integer - The integer of the gas provided for the transaction executiongasPrice- Integer - The integer of the gasPrice used for paid gasvalue- Integer - The integer of the value sent with this transactiondata- String - The has of the method signature and encoded parameters
blockReference - String - Required - The block number in hexadecimal format, the block hash, or tags: "earliest", "latest" or "pending".
object - Object (Optional) - The tracer object with the following fields:
tracer- String - The type of tracer, options are:callTracerorprestateTracer.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 trackers 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.
Returns
result - An object with the result of the trace, containing:
gas- The integer of the total consumed gas in the transaction.failed- A boolean to indicate whether the transaction was successful or not.returnValue- The return value of the executed contract call.structLogs- An array of the trace result of each step with the following fields:pc- The current index in bytecode.op- The name of the current executing operation.gas- The available gas in the execution.gasCost- The gas cost of the operation.depth- The number of levels of calling functions.error- The error of the execution.stack- An array of values in the current stack.memory- An array of values in the current memory.storage- The mapping of the current storage.refund- Total total value of the current refund value.
// Result
{
"jsonrpc": "2.0",
"result": {
"from": "0x0000000000000000000000000000000000000000",
"gas": "0x2faf080",
"gasUsed": "0x53b8",
"to": "0x6b175474e89094c44da98b954eedeac495271d0f",
"input": "0x70a082310000000000000000000000006e0d01a76c3cf4288372a29124a26d4353ee51be",
"value": "0x0",
"type": "CALL"
},
"id": 1
}curl https://mainnet.berachain.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"debug_traceCall","params":[{"from":null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest"],"id":1}'
curl https://bepolia.berachain.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"debug_traceCall","params":[{"from":null,"to":"0x6b175474e89094c44da98b954eedeac495271d0f","data":"0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"}, "latest"],"id":1}'
Last updated
Was this helpful?