Debug (debug_) endpoints in Frietor Chains
debug_traceBlockByNumber
Executes all transactions in the block specified by number with a tracer and returns the tracing result.
Parameters
QUANTITY|TAG
- integer of a block number, or the string "latest"- Object - The tracer options:
enableMemory
: Boolean - (optional, default: false) The flag indicating enabling memory capture.disableStack
: Boolean - (optional, default: false) The flag indicating disabling stack capture.disableStorage
: Boolean - (optional, default: false) The flag indicating disabling storage capture.enableReturnData
: Boolean - (optional, default: false) The flag indicating enabling return data capture.timeOut
: String - (optional, default: "5s") The timeout for cancellation of execution.tracer
: String - (default: "structTracer") Defines the debug tracer used for given call. Supported values: structTracer, callTracer.
Returns
Array - Array of trace objects with the following fields:
failed
: Boolean - Indication if the call failed.gas
: QUANTITY - The amount of gas that was left when the trace ended.returnValue
: Data - the return value of the executed contract callreturnValue
is null if the call did not return anything.structLogs
: Array - The array of structured logs.pc
: Integer - The program counter.op
: String - The opcode.gas
: Integer - The amount of gas left.gasCost
: Integer - The cost of gas for this operation.depth
: Integer - The current stack depth.error
: String - The error message.memory
: Array - The memory.storage
: Object - The storage.storageDiff
: Object - The storage diff.stack
: Array - The stack.address
: String - The address.
Example
curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceBlockByNumber","params":["0x1", {"tracer": "structTracer"}],"id":1}' https://rpc-saar.frietor.network/rpc
This example is tracing the block with number 1.
debug_traceBlockByHash
Executes all transactions in the block specified by hash with a tracer and returns the tracing result.
Parameters
DATA, 32 Bytes
- hash of a block- Object - The tracer options:
enableMemory
: Boolean - (optional, default: false) The flag indicating enabling memory capture.disableStack
: Boolean - (optional, default: false) The flag indicating disabling stack capture.disableStorage
: Boolean - (optional, default: false) The flag indicating disabling storage capture.enableReturnData
: Boolean - (optional, default: false) The flag indicating enabling return data capture.timeOut
: String - (optional, default: "5s") The timeout for cancellation of execution.tracer
: String - (default: "structTracer") Defines the debug tracer used for given call. Supported values: structTracer, callTracer.
Returns
Array - Array of trace objects with the following fields:
failed
: Boolean - Indication if the call failed.gas
: QUANTITY - The amount of gas that was left when the trace ended.returnValue
: Data - the return value of the executed contract callreturnValue
is null if the call did not return anything.structLogs
: Array - The array of structured logs.pc
: Integer - The program counter.op
: String - The opcode.gas
: Integer - The amount of gas left.gasCost
: Integer - The cost of gas for this operation.depth
: Integer - The current stack depth.error
: String - The error message.memory
: Array - The memory.storage
: Object - The storage.storageDiff
: Object - The storage diff.stack
: Array - The stack.address
: String - The address.
Example
curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceBlockByHash","params":["0x1", {"tracer": "structTracer"}],"id":1}' https://rpc-saar.frietor.network/rpc
This example is tracing the block with hash 0x1.
debug_traceBlock
Executes all transactions in the block specified by number with a tracer and returns the tracing result.
Parameters
QUANTITY|TAG
- integer of a block number, or the string "latest"- Object - The tracer options:
enableMemory
: Boolean - (optional, default: false) The flag indicating enabling memory capture.disableStack
: Boolean - (optional, default: false) The flag indicating disabling stack capture.disableStorage
: Boolean - (optional, default: false) The flag indicating disabling storage capture.enableReturnData
: Boolean - (optional, default: false) The flag indicating enabling return data capture.timeOut
: String - (optional, default: "5s") The timeout for cancellation of execution.tracer
: String - (default: "structTracer") Defines the debug tracer used for given call. Supported values: structTracer, callTracer.
Returns
Array - Array of trace objects with the following fields:
failed
: Boolean - Indication if the call failed.gas
: QUANTITY - The amount of gas that was left when the trace ended.returnValue
: Data - the return value of the executed contract callreturnValue
is null if the call did not return anything.structLogs
: Array - The array of structured logs.pc
: Integer - The program counter.op
: String - The opcode.gas
: Integer - The amount of gas left.gasCost
: Integer - The cost of gas for this operation.depth
: Integer - The current stack depth.error
: String - The error message.memory
: Array - The memory.storage
: Object - The storage.storageDiff
: Object - The storage diff.stack
: Array - The stack.address
: String - The address.
Example
curl -X POST --data '{"jsonrpc":"2.0","method":"debug_traceBlock","params":["0x1", {"tracer": "structTracer"}],"id":1}' https://rpc-saar.frietor.network/rpc
This example is tracing the block with number 1.
debug_traceTransaction
Executes a transaction with a tracer and returns the tracing result.
Parameters
Object - The transaction call object
from
: DATA, 20 Bytes - The address the transaction is sent from.to
: DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.gas
: QUANTITY - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.gasPrice
: QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas.value
: QUANTITY - (optional) Integer of the value sent with this transaction.data
: DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI in the Solidity documentation.nonce
: QUANTITY - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
Returns
Array - Array of trace objects with the following fields:
failed
: Boolean - Indication if the call failed.gas
: QUANTITY - The amount of gas that was left when the trace ended.returnValue
: Data - the return value of the executed contract callreturnValue
is null if the call did not return anything.structLogs
: Array - The array of structured logs.pc
: Integer - The program counter.op
: String - The opcode.gas
: Integer - The amount of gas left.gasCost
: Integer - The cost of gas for this operation.depth
: Integer - The current stack depth.error
: String - The error message.memory
: Array - The memory.storage
: Object - The storage.storageDiff
: Object - The storage diff.stack
: Array - The stack.address
: String - The address.
Example
curl POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae"],"id":1}' https://rpc-saar.frietor.network/rpc
This example is tracing the transaction with hash 0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae.
debug_traceCall
Executes a message call transaction, which is directly executed in the VM of the node, but never mined into the blockchain.
Parameters
Object - The transaction call object
from
: DATA, 20 Bytes - The address the transaction is sent from.to
: DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.gas
: QUANTITY - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.gasPrice
: QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas.value
: QUANTITY - (optional) Integer of the value sent with this transaction.data
: DATA - The compiled code of a contract OR the hash of the invoked method signature and encoded parameters. For details see Ethereum Contract ABI in the Solidity documentation.nonce
: QUANTITY - (optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
Returns
Array - Array of trace objects with the following fields:
failed
: Boolean - Indication if the call failed.gas
: QUANTITY - The amount of gas that was left when the trace ended.returnValue
: Data - the return value of the executed contract callreturnValue
is null if the call did not return anything.structLogs
: Array - The array of structured logs.pc
: Integer - The program counter.op
: String - The opcode.gas
: Integer - The amount of gas left.gasCost
: Integer - The cost of gas for this operation.depth
: Integer - The current stack depth.error
: String - The error message.memory
: Array - The memory.storage
: Object - The storage.storageDiff
: Object - The storage diff.stack
: Array - The stack.address
: String - The address.
Example
curl POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceCall","params":[{"to": "0x1234", "data": "0x1234"}, "latest", {}],"id":1}' https://rpc-saar.frietor.network/rpc
This example is tracing the call with data 0x1234 to address 0x1234.