debug_traceCall

Parameters

1. Object - Transaction object with the following fields:

  • from - string, 20 Bytes - The address the transaction is sent from.
  • to - string, [required] 20 Bytes - The address the transaction is directed to.
  • gas - (optional) The gas provided for the transaction execution, as a hex string.
  • gasPrice - string, 20 Bytes - Integer formatted as a hex string representing the gas price used for each paid gas.
  • value - string, 20 Bytes - Integer formatted as a hex string representing the value sent with the given transaction.
  • data - string, 20 Bytes - Hash of the method signature and encoded parameters.

2. String - One of the following options:

  • block hash
  • block number (in hex)
  • block tag (one of the following):
    • pending - A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool. Intuitively, you can think of these as blocks that have not been mined yet.
    • latest - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions.
    • safe - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. Only available on Ethereum Goerli.
    • finalized - The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. Only available on Ethereum Goerli.
    • earliest - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created.

3.Object - tracer

  • tracer-object(optional) see tracer

Returns

The callTracer tracks all the call frames executed during a transaction, including depth 0. The result will be a nested list of call frames, resembling how EVM works. They form a tree with the top-level call at root and sub-calls as children of the higher levels. Each call frame has the following fields:

  • jsonrpc: The version of the JSON-RPC protocol being used. In this case, it's version 2.0.
  • id: The unique identifier for this particular request.
  • result: An object containing the result of the transaction.
    • type-string: The type of the transaction.
    • from-string: The Ethereum address that initiated the transaction.
    • to-string: The Ethereum address that received the transaction.
    • value-string: The amount of Ether sent with the transaction.
    • gas-string: The maximum amount of gas that can be used for the transaction.
    • gasUsed-string: The amount of gas actually used for the transaction.
    • input-string: The input data for the transaction.
    • output-string: The output data from the transaction.
    • calls-array: An array of calls made during the transaction.

Examples

Request

curl --location 'https://scroll-alpha.unifra.io/v1/{your-api-key}' \
--header 'Content-Type: application/json' \
--data '{
    "method": "debug_traceCall",
    "params": [
        {
        "from": "0xe84118e2b5c74f9610377e86c840ac70f8ca925d",
        "to": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f",
        "value": "0xb1a2bc2ec50000",
        "gas": "0x226dc",
        "gasUsed": "0x20b84",
        "data": "0x5ae401dc00000000000000000000000000000000000000000000000000000000643925d800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000a1ea0b2354f5a344110af2b6ad68e75545009a03000000000000000000000000a0d71b9877f44c744546d649147e3f1e70a9376000000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000008b76dd55b0c2f4f5113000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
        },
        "0x13d5d0",
        {
            "tracer": "callTracer",
            "tracerConfig": {
                "onlyTopCall": false,
                "withLog": true
            }
        }
    ],
    "id": 1,
    "jsonrpc": "2.0"
}'

Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "type": "CALL",
        "from": "0xe84118e2b5c74f9610377e86c840ac70f8ca925d",
        "to": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f",
        "value": "0xb1a2bc2ec50000",
        "gas": "0x1c9f4",
        "gasUsed": "0x19bf2",
        "input": "0x5ae401dc00000000000000000000000000000000000000000000000000000000643925d800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000a1ea0b2354f5a344110af2b6ad68e75545009a03000000000000000000000000a0d71b9877f44c744546d649147e3f1e70a9376000000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000008b76dd55b0c2f4f5113000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "output": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000008b8f5c75c950af49bb3",
        "calls": [
            {
                "type": "DELEGATECALL",
                "from": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f",
                "to": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f",
                "gas": "0x1bdc5",
                "gasUsed": "0x19370",
                "input": "0x04e45aaf000000000000000000000000a1ea0b2354f5a344110af2b6ad68e75545009a03000000000000000000000000a0d71b9877f44c744546d649147e3f1e70a9376000000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000008b76dd55b0c2f4f51130000000000000000000000000000000000000000000000000000000000000000",
                "output": "0x0000000000000000000000000000000000000000000008b8f5c75c950af49bb3",
                "calls": [
                    {
                        "type": "CALL",
                        "from": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f",
                        "to": "0xad19c095040bcc41c965d85cc066779eb48ce9ad",
                        "value": "0x0",
                        "gas": "0x19bd0",
                        "gasUsed": "0x1766f",
                        "input": "0x128acb08000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000fffd8963efd1fc6a506488495d951d5263988d2500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d000000000000000000000000000000000000000000000000000000000000002ba1ea0b2354f5a344110af2b6ad68e75545009a030001f4a0d71b9877f44c744546d649147e3f1e70a93760000000000000000000000000000000000000000000",
                        "output": "0xfffffffffffffffffffffffffffffffffffffffffffff7470a38a36af50b644d00000000000000000000000000000000000000000000000000b1a2bc2ec50000",
                        "calls": [
                            {
                                "type": "CALL",
                                "from": "0xad19c095040bcc41c965d85cc066779eb48ce9ad",
                                "to": "0xa0d71b9877f44c744546d649147e3f1e70a93760",
                                "value": "0x0",
                                "gas": "0x11d42",
                                "gasUsed": "0x3171",
                                "input": "0xa9059cbb000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d0000000000000000000000000000000000000000000008b8f5c75c950af49bb3",
                                "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
                            },
                            {
                                "type": "STATICCALL",
                                "from": "0xad19c095040bcc41c965d85cc066779eb48ce9ad",
                                "to": "0xa1ea0b2354f5a344110af2b6ad68e75545009a03",
                                "gas": "0xdf95",
                                "gasUsed": "0x9ed",
                                "input": "0x70a08231000000000000000000000000ad19c095040bcc41c965d85cc066779eb48ce9ad",
                                "output": "0x000000000000000000000000000000000000000000000022d0c21687ab478937"
                            },
                            {
                                "type": "CALL",
                                "from": "0xad19c095040bcc41c965d85cc066779eb48ce9ad",
                                "to": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f",
                                "value": "0x0",
                                "gas": "0xd2b9",
                                "gasUsed": "0x9da3",
                                "input": "0xfa461e33fffffffffffffffffffffffffffffffffffffffffffff7470a38a36af50b644d00000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d000000000000000000000000000000000000000000000000000000000000002ba1ea0b2354f5a344110af2b6ad68e75545009a030001f4a0d71b9877f44c744546d649147e3f1e70a93760000000000000000000000000000000000000000000",
                                "output": "0x",
                                "calls": [
                                    {
                                        "type": "CALL",
                                        "from": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f",
                                        "to": "0xa1ea0b2354f5a344110af2b6ad68e75545009a03",
                                        "value": "0xb1a2bc2ec50000",
                                        "gas": "0xa937",
                                        "gasUsed": "0x5d20",
                                        "input": "0xd0e30db0",
                                        "output": "0x"
                                    },
                                    {
                                        "type": "CALL",
                                        "from": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f",
                                        "to": "0xa1ea0b2354f5a344110af2b6ad68e75545009a03",
                                        "value": "0x0",
                                        "gas": "0x4be6",
                                        "gasUsed": "0x1776",
                                        "input": "0xa9059cbb000000000000000000000000ad19c095040bcc41c965d85cc066779eb48ce9ad00000000000000000000000000000000000000000000000000b1a2bc2ec50000",
                                        "output": "0x0000000000000000000000000000000000000000000000000000000000000001"
                                    }
                                ]
                            },
                            {
                                "type": "STATICCALL",
                                "from": "0xad19c095040bcc41c965d85cc066779eb48ce9ad",
                                "to": "0xa1ea0b2354f5a344110af2b6ad68e75545009a03",
                                "gas": "0x3515",
                                "gasUsed": "0x21d",
                                "input": "0x70a08231000000000000000000000000ad19c095040bcc41c965d85cc066779eb48ce9ad",
                                "output": "0x000000000000000000000000000000000000000000000022d173b943da0c8937"
                            }
                        ]
                    }
                ]
            }
        ]
    }
}
Language
Click Try It! to start a request and see the response here!