Skip to content

Trace

Entity Version
Source 1.12.9-unstable/generated-at:2022-07-13T09:50:34-07:00
OpenRPC 1.2.6

trace_block

Block returns the structured logs created during the execution of EVM and returns them as a JSON object. The correct name will be TraceBlockByNumber, though we want to be compatible with Parity trace module.

Params (2)

Parameters must be given by position.

1: number rpc.BlockNumber

  • Required: ✓ Yes
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
- oneOf: 

        - description: `The block height description`
        - enum: earliest, latest, pending
        - title: `blockNumberTag`
        - type: string


        - description: `Hex representation of a uint64`
        - pattern: `^0x([a-fA-F\d])+$`
        - title: `uint64`
        - type: string


- title: `blockNumberIdentifier`
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
    "oneOf": [
        {
            "description": "The block height description",
            "enum": [
                "earliest",
                "latest",
                "pending"
            ],
            "title": "blockNumberTag",
            "type": [
                "string"
            ]
        },
        {
            "description": "Hex representation of a uint64",
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "uint64",
            "type": [
                "string"
            ]
        }
    ],
    "title": "blockNumberIdentifier"
}

2: config *TraceConfig

  • Required: ✓ Yes
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
- additionalProperties: `false`
- properties: 
    - Debug: 
        - type: `boolean`

    - DisableStack: 
        - type: `boolean`

    - DisableStorage: 
        - type: `boolean`

    - EnableMemory: 
        - type: `boolean`

    - EnableReturnData: 
        - type: `boolean`

    - Limit: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - NestedTraceOutput: 
        - type: `boolean`

    - Reexec: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - Timeout: 
        - type: `string`

    - Tracer: 
        - type: `string`

    - overrides: 
        - additionalProperties: `true`


- type: object
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
    "additionalProperties": false,
    "properties": {
        "Debug": {
            "type": "boolean"
        },
        "DisableStack": {
            "type": "boolean"
        },
        "DisableStorage": {
            "type": "boolean"
        },
        "EnableMemory": {
            "type": "boolean"
        },
        "EnableReturnData": {
            "type": "boolean"
        },
        "Limit": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "NestedTraceOutput": {
            "type": "boolean"
        },
        "Reexec": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "Timeout": {
            "type": "string"
        },
        "Tracer": {
            "type": "string"
        },
        "overrides": {
            "additionalProperties": true
        }
    },
    "type": [
        "object"
    ]
}

Result

interface []interface{}

  • Required: ✓ Yes
1
2
3
4
5
6
- items: 

        - additionalProperties: `true`


- type: array
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
    "items": [
        {
            "additionalProperties": true
        }
    ],
    "type": [
        "array"
    ]
}

Client Method Invocation Examples

1
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "trace_block", "params": [<number>, <config>]}'
1
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "trace_block", "params": [<number>, <config>]}'
1
trace.block(number,config);
Source code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
func (api *TraceAPI) Block(ctx context.Context, number rpc.BlockNumber, config *TraceConfig) ([ // Block returns the structured logs created during the execution of
// EVM and returns them as a JSON object.
// The correct name will be TraceBlockByNumber, though we want to be compatible with Parity trace module.
]interface{}, error) {
    config = setTraceConfigDefaultTracer(config)
    block, err := api.debugAPI.blockByNumber(ctx, number)
    if err != nil {
        return nil, err
    }
    traceResults, err := api.debugAPI.traceBlock(ctx, block, config)
    if err != nil {
        return nil, err
    }
    traceReward, err := api.traceBlockReward(ctx, block, config)
    if err != nil {
        return nil, err
    }
    traceUncleRewards, err := api.traceBlockUncleRewards(ctx, block, config)
    if err != nil {
        return nil, err
    }
    results := []interface{}{}
    for _, result := range traceResults {
        if result.Error != "" {
            return nil, errors.New(result.Error)
        }
        var tmp interface{}
        if err := json.Unmarshal(result.Result.(json.RawMessage), &tmp); err != nil {
            return nil, err
        }
        if *config.Tracer == "stateDiffTracer" {
            results = append(results, tmp)
        } else {
            results = append(results, tmp.([]interface{})...)
        }
    }
    results = append(results, traceReward)
    for _, uncleReward := range traceUncleRewards {
        results = append(results, uncleReward)
    }
    return results, nil
}
View on GitHub →


trace_call

Call lets you trace a given eth_call. It collects the structured logs created during the execution of EVM if the given transaction was added on top of the provided block and returns them as a JSON object. You can provide -2 as a block number to trace on top of the pending block.

Params (3)

Parameters must be given by position.

1: args ethapi.TransactionArgs

  • Required: ✓ Yes
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
- additionalProperties: `false`
- properties: 
    - accessList: 
        - items: 
            - additionalProperties: `false`
            - properties: 
                - address: 
                    - pattern: `^0x[a-fA-F\d]{64}$`
                    - title: `keccak`
                    - type: `string`

                - storageKeys: 
                    - items: 
                        - description: `Hex representation of a Keccak 256 hash`
                        - pattern: `^0x[a-fA-F\d]{64}$`
                        - title: `keccak`
                        - type: `string`

                    - type: `array`


            - type: `object`

        - type: `array`

    - chainId: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - data: 
        - pattern: `^0x([a-fA-F\d])+$`
        - title: `dataWord`
        - type: `string`

    - from: 
        - pattern: `^0x[a-fA-F\d]{64}$`
        - title: `keccak`
        - type: `string`

    - gas: 
        - pattern: `^0x([a-fA-F\d])+$`
        - title: `uint64`
        - type: `string`

    - gasPrice: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - input: 
        - pattern: `^0x([a-fA-F\d])+$`
        - title: `dataWord`
        - type: `string`

    - maxFeePerGas: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - maxPriorityFeePerGas: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - nonce: 
        - pattern: `^0x([a-fA-F\d])+$`
        - title: `uint64`
        - type: `string`

    - to: 
        - pattern: `^0x[a-fA-F\d]{64}$`
        - title: `keccak`
        - type: `string`

    - value: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`


- type: object
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
    "additionalProperties": false,
    "properties": {
        "accessList": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "address": {
                        "pattern": "^0x[a-fA-F\\d]{64}$",
                        "title": "keccak",
                        "type": "string"
                    },
                    "storageKeys": {
                        "items": {
                            "description": "Hex representation of a Keccak 256 hash",
                            "pattern": "^0x[a-fA-F\\d]{64}$",
                            "title": "keccak",
                            "type": "string"
                        },
                        "type": "array"
                    }
                },
                "type": "object"
            },
            "type": "array"
        },
        "chainId": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "data": {
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "dataWord",
            "type": "string"
        },
        "from": {
            "pattern": "^0x[a-fA-F\\d]{64}$",
            "title": "keccak",
            "type": "string"
        },
        "gas": {
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "uint64",
            "type": "string"
        },
        "gasPrice": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "input": {
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "dataWord",
            "type": "string"
        },
        "maxFeePerGas": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "maxPriorityFeePerGas": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "nonce": {
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "uint64",
            "type": "string"
        },
        "to": {
            "pattern": "^0x[a-fA-F\\d]{64}$",
            "title": "keccak",
            "type": "string"
        },
        "value": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        }
    },
    "type": [
        "object"
    ]
}

2: blockNrOrHash rpc.BlockNumberOrHash

  • Required: ✓ Yes

3: config *TraceCallConfig

  • Required: ✓ Yes
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
- additionalProperties: `false`
- properties: 
    - BlockOverrides: 
        - additionalProperties: `false`
        - properties: 
            - Coinbase: 
                - pattern: `^0x[a-fA-F\d]{64}$`
                - title: `keccak`
                - type: `string`

            - Difficulty: 
                - pattern: `^0x[a-fA-F0-9]+$`
                - title: `integer`
                - type: `string`

            - GasLimit: 
                - pattern: `^0x([a-fA-F\d])+$`
                - title: `uint64`
                - type: `string`

            - Number: 
                - pattern: `^0x[a-fA-F0-9]+$`
                - title: `integer`
                - type: `string`

            - Random: 
                - pattern: `^0x[a-fA-F\d]{64}$`
                - title: `keccak`
                - type: `string`

            - Time: 
                - pattern: `^0x[a-fA-F0-9]+$`
                - title: `integer`
                - type: `string`


        - type: `object`

    - Debug: 
        - type: `boolean`

    - DisableStack: 
        - type: `boolean`

    - DisableStorage: 
        - type: `boolean`

    - EnableMemory: 
        - type: `boolean`

    - EnableReturnData: 
        - type: `boolean`

    - Limit: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - NestedTraceOutput: 
        - type: `boolean`

    - Reexec: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - StateOverrides: 
        - patternProperties: 
            - .*: 
                - additionalProperties: `false`
                - properties: 
                    - balance: 
                        - pattern: `^0x[a-fA-F0-9]+$`
                        - title: `integer`
                        - type: `string`

                    - code: 
                        - pattern: `^0x([a-fA-F\d])+$`
                        - title: `dataWord`
                        - type: `string`

                    - nonce: 
                        - pattern: `^0x([a-fA-F\d])+$`
                        - title: `uint64`
                        - type: `string`

                    - state: 
                        - patternProperties: 
                            - .*: 
                                - description: `Hex representation of a Keccak 256 hash`
                                - pattern: `^0x[a-fA-F\d]{64}$`
                                - title: `keccak`
                                - type: `string`


                        - type: `object`

                    - stateDiff: 
                        - patternProperties: 
                            - .*: 
                                - description: `Hex representation of a Keccak 256 hash`
                                - pattern: `^0x[a-fA-F\d]{64}$`
                                - title: `keccak`
                                - type: `string`


                        - type: `object`


                - type: `object`


        - type: `object`

    - Timeout: 
        - type: `string`

    - Tracer: 
        - type: `string`

    - overrides: 
        - additionalProperties: `true`


- type: object
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
    "additionalProperties": false,
    "properties": {
        "BlockOverrides": {
            "additionalProperties": false,
            "properties": {
                "Coinbase": {
                    "pattern": "^0x[a-fA-F\\d]{64}$",
                    "title": "keccak",
                    "type": "string"
                },
                "Difficulty": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                },
                "GasLimit": {
                    "pattern": "^0x([a-fA-F\\d])+$",
                    "title": "uint64",
                    "type": "string"
                },
                "Number": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                },
                "Random": {
                    "pattern": "^0x[a-fA-F\\d]{64}$",
                    "title": "keccak",
                    "type": "string"
                },
                "Time": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                }
            },
            "type": "object"
        },
        "Debug": {
            "type": "boolean"
        },
        "DisableStack": {
            "type": "boolean"
        },
        "DisableStorage": {
            "type": "boolean"
        },
        "EnableMemory": {
            "type": "boolean"
        },
        "EnableReturnData": {
            "type": "boolean"
        },
        "Limit": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "NestedTraceOutput": {
            "type": "boolean"
        },
        "Reexec": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "StateOverrides": {
            "patternProperties": {
                ".*": {
                    "additionalProperties": false,
                    "properties": {
                        "balance": {
                            "pattern": "^0x[a-fA-F0-9]+$",
                            "title": "integer",
                            "type": "string"
                        },
                        "code": {
                            "pattern": "^0x([a-fA-F\\d])+$",
                            "title": "dataWord",
                            "type": "string"
                        },
                        "nonce": {
                            "pattern": "^0x([a-fA-F\\d])+$",
                            "title": "uint64",
                            "type": "string"
                        },
                        "state": {
                            "patternProperties": {
                                ".*": {
                                    "description": "Hex representation of a Keccak 256 hash",
                                    "pattern": "^0x[a-fA-F\\d]{64}$",
                                    "title": "keccak",
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        },
                        "stateDiff": {
                            "patternProperties": {
                                ".*": {
                                    "description": "Hex representation of a Keccak 256 hash",
                                    "pattern": "^0x[a-fA-F\\d]{64}$",
                                    "title": "keccak",
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        }
                    },
                    "type": "object"
                }
            },
            "type": "object"
        },
        "Timeout": {
            "type": "string"
        },
        "Tracer": {
            "type": "string"
        },
        "overrides": {
            "additionalProperties": true
        }
    },
    "type": [
        "object"
    ]
}

Result

interface interface{}

  • Required: ✓ Yes

Client Method Invocation Examples

1
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "trace_call", "params": [<args>, <blockNrOrHash>, <config>]}'
1
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "trace_call", "params": [<args>, <blockNrOrHash>, <config>]}'
1
trace.call(args,blockNrOrHash,config);
Source code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
func (api *TraceAPI) Call(ctx context.Context, args ethapi.TransactionArgs, blockNrOrHash rpc.BlockNumberOrHash, config *TraceCallConfig) (interface{}, error) {
    config = setTraceCallConfigDefaultTracer(config)
    res, err := api.debugAPI.TraceCall(ctx, args, blockNrOrHash, config)
    if err != nil {
        return nil, err
    }
    traceConfig := getTraceConfigFromTraceCallConfig(config)
    return decorateResponse(res, traceConfig)
}// Call lets you trace a given eth_call. It collects the structured logs created during the execution of EVM
// if the given transaction was added on top of the provided block and returns them as a JSON object.
// You can provide -2 as a block number to trace on top of the pending block.
View on GitHub →


trace_callMany

CallMany lets you trace a given eth_call. It collects the structured logs created during the execution of EVM if the given transaction was added on top of the provided block and returns them as a JSON object. You can provide -2 as a block number to trace on top of the pending block.

Params (3)

Parameters must be given by position.

1: txs []ethapi.TransactionArgs

  • Required: ✓ Yes
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
- items: 

        - additionalProperties: `false`
        - properties: 
            - accessList: 
                - items: 
                    - additionalProperties: `false`
                    - properties: 
                        - address: 
                            - pattern: `^0x[a-fA-F\d]{64}$`
                            - title: `keccak`
                            - type: `string`

                        - storageKeys: 
                            - items: 
                                - description: `Hex representation of a Keccak 256 hash`
                                - pattern: `^0x[a-fA-F\d]{64}$`
                                - title: `keccak`
                                - type: `string`

                            - type: `array`


                    - type: `object`

                - type: `array`

            - chainId: 
                - pattern: `^0x[a-fA-F0-9]+$`
                - title: `integer`
                - type: `string`

            - data: 
                - pattern: `^0x([a-fA-F\d])+$`
                - title: `dataWord`
                - type: `string`

            - from: 
                - pattern: `^0x[a-fA-F\d]{64}$`
                - title: `keccak`
                - type: `string`

            - gas: 
                - pattern: `^0x([a-fA-F\d])+$`
                - title: `uint64`
                - type: `string`

            - gasPrice: 
                - pattern: `^0x[a-fA-F0-9]+$`
                - title: `integer`
                - type: `string`

            - input: 
                - pattern: `^0x([a-fA-F\d])+$`
                - title: `dataWord`
                - type: `string`

            - maxFeePerGas: 
                - pattern: `^0x[a-fA-F0-9]+$`
                - title: `integer`
                - type: `string`

            - maxPriorityFeePerGas: 
                - pattern: `^0x[a-fA-F0-9]+$`
                - title: `integer`
                - type: `string`

            - nonce: 
                - pattern: `^0x([a-fA-F\d])+$`
                - title: `uint64`
                - type: `string`

            - to: 
                - pattern: `^0x[a-fA-F\d]{64}$`
                - title: `keccak`
                - type: `string`

            - value: 
                - pattern: `^0x[a-fA-F0-9]+$`
                - title: `integer`
                - type: `string`


        - type: object


- type: array
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
{
    "items": [
        {
            "additionalProperties": false,
            "properties": {
                "accessList": {
                    "items": {
                        "additionalProperties": false,
                        "properties": {
                            "address": {
                                "pattern": "^0x[a-fA-F\\d]{64}$",
                                "title": "keccak",
                                "type": "string"
                            },
                            "storageKeys": {
                                "items": {
                                    "description": "Hex representation of a Keccak 256 hash",
                                    "pattern": "^0x[a-fA-F\\d]{64}$",
                                    "title": "keccak",
                                    "type": "string"
                                },
                                "type": "array"
                            }
                        },
                        "type": "object"
                    },
                    "type": "array"
                },
                "chainId": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                },
                "data": {
                    "pattern": "^0x([a-fA-F\\d])+$",
                    "title": "dataWord",
                    "type": "string"
                },
                "from": {
                    "pattern": "^0x[a-fA-F\\d]{64}$",
                    "title": "keccak",
                    "type": "string"
                },
                "gas": {
                    "pattern": "^0x([a-fA-F\\d])+$",
                    "title": "uint64",
                    "type": "string"
                },
                "gasPrice": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                },
                "input": {
                    "pattern": "^0x([a-fA-F\\d])+$",
                    "title": "dataWord",
                    "type": "string"
                },
                "maxFeePerGas": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                },
                "maxPriorityFeePerGas": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                },
                "nonce": {
                    "pattern": "^0x([a-fA-F\\d])+$",
                    "title": "uint64",
                    "type": "string"
                },
                "to": {
                    "pattern": "^0x[a-fA-F\\d]{64}$",
                    "title": "keccak",
                    "type": "string"
                },
                "value": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                }
            },
            "type": [
                "object"
            ]
        }
    ],
    "type": [
        "array"
    ]
}

2: blockNrOrHash rpc.BlockNumberOrHash

  • Required: ✓ Yes

3: config *TraceCallConfig

  • Required: ✓ Yes
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
- additionalProperties: `false`
- properties: 
    - BlockOverrides: 
        - additionalProperties: `false`
        - properties: 
            - Coinbase: 
                - pattern: `^0x[a-fA-F\d]{64}$`
                - title: `keccak`
                - type: `string`

            - Difficulty: 
                - pattern: `^0x[a-fA-F0-9]+$`
                - title: `integer`
                - type: `string`

            - GasLimit: 
                - pattern: `^0x([a-fA-F\d])+$`
                - title: `uint64`
                - type: `string`

            - Number: 
                - pattern: `^0x[a-fA-F0-9]+$`
                - title: `integer`
                - type: `string`

            - Random: 
                - pattern: `^0x[a-fA-F\d]{64}$`
                - title: `keccak`
                - type: `string`

            - Time: 
                - pattern: `^0x[a-fA-F0-9]+$`
                - title: `integer`
                - type: `string`


        - type: `object`

    - Debug: 
        - type: `boolean`

    - DisableStack: 
        - type: `boolean`

    - DisableStorage: 
        - type: `boolean`

    - EnableMemory: 
        - type: `boolean`

    - EnableReturnData: 
        - type: `boolean`

    - Limit: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - NestedTraceOutput: 
        - type: `boolean`

    - Reexec: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - StateOverrides: 
        - patternProperties: 
            - .*: 
                - additionalProperties: `false`
                - properties: 
                    - balance: 
                        - pattern: `^0x[a-fA-F0-9]+$`
                        - title: `integer`
                        - type: `string`

                    - code: 
                        - pattern: `^0x([a-fA-F\d])+$`
                        - title: `dataWord`
                        - type: `string`

                    - nonce: 
                        - pattern: `^0x([a-fA-F\d])+$`
                        - title: `uint64`
                        - type: `string`

                    - state: 
                        - patternProperties: 
                            - .*: 
                                - description: `Hex representation of a Keccak 256 hash`
                                - pattern: `^0x[a-fA-F\d]{64}$`
                                - title: `keccak`
                                - type: `string`


                        - type: `object`

                    - stateDiff: 
                        - patternProperties: 
                            - .*: 
                                - description: `Hex representation of a Keccak 256 hash`
                                - pattern: `^0x[a-fA-F\d]{64}$`
                                - title: `keccak`
                                - type: `string`


                        - type: `object`


                - type: `object`


        - type: `object`

    - Timeout: 
        - type: `string`

    - Tracer: 
        - type: `string`

    - overrides: 
        - additionalProperties: `true`


- type: object
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{
    "additionalProperties": false,
    "properties": {
        "BlockOverrides": {
            "additionalProperties": false,
            "properties": {
                "Coinbase": {
                    "pattern": "^0x[a-fA-F\\d]{64}$",
                    "title": "keccak",
                    "type": "string"
                },
                "Difficulty": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                },
                "GasLimit": {
                    "pattern": "^0x([a-fA-F\\d])+$",
                    "title": "uint64",
                    "type": "string"
                },
                "Number": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                },
                "Random": {
                    "pattern": "^0x[a-fA-F\\d]{64}$",
                    "title": "keccak",
                    "type": "string"
                },
                "Time": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                }
            },
            "type": "object"
        },
        "Debug": {
            "type": "boolean"
        },
        "DisableStack": {
            "type": "boolean"
        },
        "DisableStorage": {
            "type": "boolean"
        },
        "EnableMemory": {
            "type": "boolean"
        },
        "EnableReturnData": {
            "type": "boolean"
        },
        "Limit": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "NestedTraceOutput": {
            "type": "boolean"
        },
        "Reexec": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "StateOverrides": {
            "patternProperties": {
                ".*": {
                    "additionalProperties": false,
                    "properties": {
                        "balance": {
                            "pattern": "^0x[a-fA-F0-9]+$",
                            "title": "integer",
                            "type": "string"
                        },
                        "code": {
                            "pattern": "^0x([a-fA-F\\d])+$",
                            "title": "dataWord",
                            "type": "string"
                        },
                        "nonce": {
                            "pattern": "^0x([a-fA-F\\d])+$",
                            "title": "uint64",
                            "type": "string"
                        },
                        "state": {
                            "patternProperties": {
                                ".*": {
                                    "description": "Hex representation of a Keccak 256 hash",
                                    "pattern": "^0x[a-fA-F\\d]{64}$",
                                    "title": "keccak",
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        },
                        "stateDiff": {
                            "patternProperties": {
                                ".*": {
                                    "description": "Hex representation of a Keccak 256 hash",
                                    "pattern": "^0x[a-fA-F\\d]{64}$",
                                    "title": "keccak",
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        }
                    },
                    "type": "object"
                }
            },
            "type": "object"
        },
        "Timeout": {
            "type": "string"
        },
        "Tracer": {
            "type": "string"
        },
        "overrides": {
            "additionalProperties": true
        }
    },
    "type": [
        "object"
    ]
}

Result

interface interface{}

  • Required: ✓ Yes

Client Method Invocation Examples

1
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "trace_callMany", "params": [<txs>, <blockNrOrHash>, <config>]}'
1
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "trace_callMany", "params": [<txs>, <blockNrOrHash>, <config>]}'
1
trace.callMany(txs,blockNrOrHash,config);
Source code

1
2
3
4
5
6
7
func (api *TraceAPI) CallMany(ctx context.Context, txs [ // CallMany lets you trace a given eth_call. It collects the structured logs created during the execution of EVM
// if the given transaction was added on top of the provided block and returns them as a JSON object.
// You can provide -2 as a block number to trace on top of the pending block.
]ethapi.TransactionArgs, blockNrOrHash rpc.BlockNumberOrHash, config *TraceCallConfig) (interface{}, error) {
    config = setTraceCallConfigDefaultTracer(config)
    return api.debugAPI.TraceCallMany(ctx, txs, blockNrOrHash, config)
}
View on GitHub →


trace_filter

Filter configures a new tracer according to the provided configuration, and executes all the transactions contained within. The return value will be one item per transaction, dependent on the requested tracer.

Params (2)

Parameters must be given by position.

1: args TraceFilterArgs

  • Required: ✓ Yes
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
- additionalProperties: `false`
- properties: 
    - after: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - count: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - fromAddress: 
        - pattern: `^0x[a-fA-F\d]{64}$`
        - title: `keccak`
        - type: `string`

    - fromBlock: 
        - pattern: `^0x([a-fA-F\d])+$`
        - title: `uint64`
        - type: `string`

    - toAddress: 
        - pattern: `^0x[a-fA-F\d]{64}$`
        - title: `keccak`
        - type: `string`

    - toBlock: 
        - pattern: `^0x([a-fA-F\d])+$`
        - title: `uint64`
        - type: `string`


- type: object
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
    "additionalProperties": false,
    "properties": {
        "after": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "count": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "fromAddress": {
            "pattern": "^0x[a-fA-F\\d]{64}$",
            "title": "keccak",
            "type": "string"
        },
        "fromBlock": {
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "uint64",
            "type": "string"
        },
        "toAddress": {
            "pattern": "^0x[a-fA-F\\d]{64}$",
            "title": "keccak",
            "type": "string"
        },
        "toBlock": {
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "uint64",
            "type": "string"
        }
    },
    "type": [
        "object"
    ]
}

2: config *TraceConfig

  • Required: ✓ Yes
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
- additionalProperties: `false`
- properties: 
    - Debug: 
        - type: `boolean`

    - DisableStack: 
        - type: `boolean`

    - DisableStorage: 
        - type: `boolean`

    - EnableMemory: 
        - type: `boolean`

    - EnableReturnData: 
        - type: `boolean`

    - Limit: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - NestedTraceOutput: 
        - type: `boolean`

    - Reexec: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - Timeout: 
        - type: `string`

    - Tracer: 
        - type: `string`

    - overrides: 
        - additionalProperties: `true`


- type: object
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
    "additionalProperties": false,
    "properties": {
        "Debug": {
            "type": "boolean"
        },
        "DisableStack": {
            "type": "boolean"
        },
        "DisableStorage": {
            "type": "boolean"
        },
        "EnableMemory": {
            "type": "boolean"
        },
        "EnableReturnData": {
            "type": "boolean"
        },
        "Limit": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "NestedTraceOutput": {
            "type": "boolean"
        },
        "Reexec": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "Timeout": {
            "type": "string"
        },
        "Tracer": {
            "type": "string"
        },
        "overrides": {
            "additionalProperties": true
        }
    },
    "type": [
        "object"
    ]
}

Result

*rpc.Subscription

  • Required: ✓ Yes
1
2
3
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
1
2
3
4
5
6
7
{
    "description": "Subscription identifier",
    "title": "subscriptionID",
    "type": [
        "string"
    ]
}

Client Method Invocation Examples

1
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "trace_subscribe", "params": ["filter", <args>, <config>]}'
Source code

1
2
3
4
5
6
7
8
func (api *TraceAPI) Filter(ctx context.Context, args TraceFilterArgs, config *TraceConfig) (*rpc.Subscription, error) {
    config = setTraceConfigDefaultTracer(config)
    start := rpc.BlockNumber(args.FromBlock)
    end := rpc.BlockNumber(args.ToBlock)
    return api.debugAPI.TraceChain(ctx, start, end, config)
}// Filter configures a new tracer according to the provided configuration, and
// executes all the transactions contained within. The return value will be one item
// per transaction, dependent on the requested tracer.
View on GitHub →


trace_subscribe

Subscribe creates a subscription to an event channel. Subscriptions are not available over HTTP; they are only available over WS, IPC, and Process connections.

Params (2)

Parameters must be given by position.

1: subscriptionName RPCTraceSubscriptionParamsName

  • Required: ✓ Yes
1
2
3
4
5
6
7
8
- oneOf: 

        - description: `Returns transaction traces for the filtered addresses within a range of blocks.`
        - enum: filter
        - type: string


- title: `subscriptionName`
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{
    "oneOf": [
        {
            "description": "Returns transaction traces for the filtered addresses within a range of blocks.",
            "enum": [
                "filter"
            ],
            "type": [
                "string"
            ]
        }
    ],
    "title": "subscriptionName"
}

2: subscriptionOptions interface{}

  • Required: No

Result

subscriptionID rpc.ID

  • Required: ✓ Yes
1
2
3
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
1
2
3
4
5
6
7
{
    "description": "Subscription identifier",
    "title": "subscriptionID",
    "type": [
        "string"
    ]
}

Client Method Invocation Examples

1
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "trace_subscribe", "params": [<subscriptionName>, <subscriptionOptions>]}'
Source code

1
2
3
4
func (sub *RPCTraceSubscription) Subscribe(subscriptionName RPCTraceSubscriptionParamsName, subscriptionOptions interface{}) (subscriptionID rpc.ID, err error) {
    return
}// Subscribe creates a subscription to an event channel.
// Subscriptions are not available over HTTP; they are only available over WS, IPC, and Process connections.
View on GitHub →


trace_transaction

Transaction returns the structured logs created during the execution of EVM and returns them as a JSON object.

Params (2)

Parameters must be given by position.

1: hash common.Hash

  • Required: ✓ Yes
1
2
3
4
- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string
1
2
3
4
5
6
7
8
{
    "description": "Hex representation of a Keccak 256 hash",
    "pattern": "^0x[a-fA-F\\d]{64}$",
    "title": "keccak",
    "type": [
        "string"
    ]
}

2: config *TraceConfig

  • Required: ✓ Yes
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
- additionalProperties: `false`
- properties: 
    - Debug: 
        - type: `boolean`

    - DisableStack: 
        - type: `boolean`

    - DisableStorage: 
        - type: `boolean`

    - EnableMemory: 
        - type: `boolean`

    - EnableReturnData: 
        - type: `boolean`

    - Limit: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - NestedTraceOutput: 
        - type: `boolean`

    - Reexec: 
        - pattern: `^0x[a-fA-F0-9]+$`
        - title: `integer`
        - type: `string`

    - Timeout: 
        - type: `string`

    - Tracer: 
        - type: `string`

    - overrides: 
        - additionalProperties: `true`


- type: object
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
    "additionalProperties": false,
    "properties": {
        "Debug": {
            "type": "boolean"
        },
        "DisableStack": {
            "type": "boolean"
        },
        "DisableStorage": {
            "type": "boolean"
        },
        "EnableMemory": {
            "type": "boolean"
        },
        "EnableReturnData": {
            "type": "boolean"
        },
        "Limit": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "NestedTraceOutput": {
            "type": "boolean"
        },
        "Reexec": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "Timeout": {
            "type": "string"
        },
        "Tracer": {
            "type": "string"
        },
        "overrides": {
            "additionalProperties": true
        }
    },
    "type": [
        "object"
    ]
}

Result

interface interface{}

  • Required: ✓ Yes

Client Method Invocation Examples

1
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "trace_transaction", "params": [<hash>, <config>]}'
1
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "trace_transaction", "params": [<hash>, <config>]}'
1
trace.transaction(hash,config);
Source code

1
2
3
4
5
func (api *TraceAPI) Transaction(ctx context.Context, hash common.Hash, config *TraceConfig) (interface{}, error) {
    config = setTraceConfigDefaultTracer(config)
    return api.debugAPI.TraceTransaction(ctx, hash, config)
}// Transaction returns the structured logs created during the execution of EVM
// and returns them as a JSON object.
View on GitHub →


trace_unsubscribe

Unsubscribe terminates an existing subscription by ID.

Params (1)

Parameters must be given by position.

1: id rpc.ID

  • Required: ✓ Yes
1
2
3
- description: `Subscription identifier`
- title: `subscriptionID`
- type: string
1
2
3
4
5
6
7
{
    "description": "Subscription identifier",
    "title": "subscriptionID",
    "type": [
        "string"
    ]
}

Result

None

Client Method Invocation Examples

1
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "trace_unsubscribe", "params": [<id>]}'
1
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "trace_unsubscribe", "params": [<id>]}'
1
trace.unsubscribe(id);
Source code

1
2
3
func (sub *RPCTraceSubscription) Unsubscribe(id rpc.ID) error {
    return nil
}// Unsubscribe terminates an existing subscription by ID.
View on GitHub →



Last update: 2022-10-05