MAAL CHAIN DOCUMENTATION
  • MAAL Network Details
  • How to connect to MAAL Chain
    • ETH APIs
    • NET
    • Web3
    • Tx Pool
    • Debug
  • MAAL Contract Library
  • MaalChain Architecture
  • What is Proof of Stake?
  • Who is a validator?
  • Validator Nodes
  • Minimum system requirements
  • MAAL Validator DAO
Powered by GitBook
On this page
  • debug_traceBlockByNumber​
  • debug_traceBlockByHash​
  • debug_traceBlock​
  • debug_traceTransaction​
  • debug_traceCall​
  1. How to connect to MAAL Chain

Debug

Debug methods

PreviousTx PoolNextMAAL Contract Library

Last updated 1 year ago

To enable the debug route namespace, you need to modify the configuration and add the "debug" parameter as shown below:

[jsonrpc.http]
    enabled = true
    port = 10001
    host = "0.0.0.0"
    api = ["eth", "net", "web3", "txpool", "bor", "debug"]

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.

Returns

Array - Array of trace objects with the following fields:

  • failed: Boolean - the tx is successful or not

  • gas: QUANTITY - the total consumed gas in the tx

  • returnValue: DATA - the return value of the executed contract call

  • structLogs: Array - the trace result of each step with the following fields:

    • pc: QUANTITY - the current index in bytecode

    • op: String - the name of current executing operation

    • gas: QUANTITY - the available gas ßin the execution

    • gasCost: QUANTITY - the gas cost of the operation

    • depth: QUANTITY - the number of levels of calling functions

    • error: String - the error of the execution

    • stack: Array - array of values in the current stack

    • memory: Array - array of values in the current memory

    • storage: Object - mapping of the current storage

    • refund: QUANTITY - the total of current refund value

curl  https://node1-mainnet.maalscan.io -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceBlockByNumber","params":["latest"],"id":1}'

Executes all transactions in the block specified by block hash with a tracer and returns the tracing result.

  • DATA , 32 Bytes - Hash of a block.

  • Object - The tracer options. See debug_traceBlockByNumber for more details.

Array - Array of trace objects. See debug_traceBlockByNumber for more details.

curl  https://node1-mainnet.maalscan.io -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceBlockByHash","params":["0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae"],"id":1}'

Executes all transactions in the block given from the first argument with a tracer and returns the tracing result.

  • DATA - RLP Encoded block bytes

  • Object - The tracer options. See debug_traceBlockByNumber for more details.

Array - Array of trace objects. See debug_traceBlockByNumber for more details.

curl  https://node1-mainnet.maalscan.io -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceBlock","params":["0xf9...."],"id":1}'

Executes the transaction specified by transaction hash with a tracer and returns the tracing result.

  • DATA , 32 Bytes - Hash of a transaction.

  • Object - The tracer options. See debug_traceBlockByNumber for more details.

Object - Trace object. See debug_traceBlockByNumber for more details.

curl  https://node1-mainnet.maalscan.io -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae"],"id":1}'

Executes a new message call with a tracer and returns the tracing result.

  • Object - The transaction call object

    • from: DATA, 20 Bytes - (optional) The address the transaction is sent from.

    • to: DATA, 20 Bytes - The address the transaction is directed to.

    • gas: QUANTITY - (optional) Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.

    • gasPrice: QUANTITY - (optional) Integer of the gasPrice used for each paid gas

    • value: QUANTITY - (optional) Integer of the value sent with this transaction

    • data: DATA - (optional) Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI in the Solidity documentation

  • QUANTITY|TAG - integer block number, or the string "latest"

  • Object - The tracer options. See debug_traceBlockByNumber for more details.

Object - Trace object. See debug_traceBlockByNumber for more details.

curl  https://node1-mainnet.maalscan.io -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"debug_traceCall","params":[{"to": "0x1234", "data": "0x1234"}, "latest", {}],"id":1}'

Example

debug_traceBlockByHash

Parameters

Returns

Example

debug_traceBlock

Parameters

Returns

Example

debug_traceTransaction

Parameters

Returns

Example

debug_traceCall

Parameters

Returns

Example

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​