For the complete documentation index, see llms.txt. This page is also available as Markdown.

debug_tracetransaction - Worldchain

Example code for the debug_traceTransaction JSON-RPC method. Complete guide on how to use debug_traceTransaction JSON-RPC in GetBlock Web3 documentation.

Returns all traces of a given transaction on the World Chain network for debugging purposes.

Parameters

Parameter
Type
Description

transactionHash

string

Hash of the transaction to trace

tracerConfig

object

(Optional) Tracer configuration options

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "debug_traceTransaction",
    "params": ["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b", {}],
    "id": "getblock.io"
}'
import axios from 'axios';

const data = JSON.stringify({
    "jsonrpc": "2.0",
    "method": "debug_traceTransaction",
    "params": ["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b", {}],
    "id": "getblock.io"
});

const config = {
    method: 'post',
    url: 'https://go.getblock.io/<ACCESS-TOKEN>/',
    headers: {
        'Content-Type': 'application/json'
    },
    data: data
};

axios(config)
    .then(response => console.log(JSON.stringify(response.data)))
    .catch(error => console.log(error));

Response

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "gas": 21000,
        "structLogs": [...]
    }
}

Response Parameters

Field
Type
Description

gas

number

Gas used by the transaction

structLogs

array

Array of structured logs from execution

Use Case

The debug_traceTransaction method on World Chain is typically used for:

  • Transaction debugging

  • Gas analysis

  • Execution tracing

  • Smart contract debugging

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS-TOKEN

Web3 Integration

Last updated

Was this helpful?