# debug_traceBlockByNumber # Parameters 1. `blockNumber` - `string` The block number will be traced, hex with prefix`0x`. 2. `tracer`-`object`(optional) see [tracer](tracer) # Returns * `Object` - trace object * `type` - The type of the call * `from` - The address the transaction is sent from * `to` - The address the transaction is directed to * `value` - The integer of the value sent with this transaction * `gas` - The integer of the gas provided for the transaction execution * `gasUsed` - The integer of the gas used * `input` - The data given at the time of input * `output` - The data which is returned as an output * `calls` - A list of sub-calls # Example ## Request ```Text cURL curl --location 'https://scroll-alpha.unifra.io/v1/{your-api-key}' \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc": "2.0", "method": "debug_traceBlockByNumber", "params": [ "0x112", { "tracer": "callTracer", "tracerConfig": { "onlyTopCall": false, "withLog": true } } ], "id": 0 }' ``` ## Response ```json { "jsonrpc": "2.0", "id": 0, "result": [ { "result": { "type": "CALL", "from": "0x89e31727c42646b88d5f2d576bc2859434e01144", "to": "0x5300000000000000000000000000000000000002", "value": "0x0", "gas": "0x48c7", "gasUsed": "0x3671", "input": "0xbede39b50000000000000000000000000000000000000000000000000000003135ab26b9", "output": "0x", "calls": [ { "type": "STATICCALL", "from": "0x5300000000000000000000000000000000000002", "to": "0x5300000000000000000000000000000000000003", "gas": "0x3437", "gasUsed": "0xa21", "input": "0xefc7840100000000000000000000000089e31727c42646b88d5f2d576bc2859434e01144", "output": "0x0000000000000000000000000000000000000000000000000000000000000001" } ] } } ] } ``` # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "scroll-api", "version": "1.0" }, "servers": [ { "url": "https://scroll-testnet.unifra.io/v1" } ], "security": [ {} ], "paths": { "/{your-api-key}": { "post": { "summary": "debug_traceCall", "description": "", "operationId": "debug_tracecall", "parameters": [ { "name": "your-api-key", "in": "path", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "RAW_BODY": { "type": "string", "default": "{ \"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\" }" } } } } } }, "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"result\": {\n \"type\": \"CALL\",\n \"from\": \"0xe84118e2b5c74f9610377e86c840ac70f8ca925d\",\n \"to\": \"0xd9880690bd717189cc3fbe7b9020f27fae7ac76f\",\n \"value\": \"0xb1a2bc2ec50000\",\n \"gas\": \"0x1c9f4\",\n \"gasUsed\": \"0x19bf2\",\n \"input\": \"0x5ae401dc00000000000000000000000000000000000000000000000000000000643925d800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000a1ea0b2354f5a344110af2b6ad68e75545009a03000000000000000000000000a0d71b9877f44c744546d649147e3f1e70a9376000000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000008b76dd55b0c2f4f5113000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\n \"output\": \"0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000008b8f5c75c950af49bb3\",\n \"calls\": [\n {\n \"type\": \"DELEGATECALL\",\n \"from\": \"0xd9880690bd717189cc3fbe7b9020f27fae7ac76f\",\n \"to\": \"0xd9880690bd717189cc3fbe7b9020f27fae7ac76f\",\n \"gas\": \"0x1bdc5\",\n \"gasUsed\": \"0x19370\",\n \"input\": \"0x04e45aaf000000000000000000000000a1ea0b2354f5a344110af2b6ad68e75545009a03000000000000000000000000a0d71b9877f44c744546d649147e3f1e70a9376000000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000008b76dd55b0c2f4f51130000000000000000000000000000000000000000000000000000000000000000\",\n \"output\": \"0x0000000000000000000000000000000000000000000008b8f5c75c950af49bb3\",\n \"calls\": [\n {\n \"type\": \"CALL\",\n \"from\": \"0xd9880690bd717189cc3fbe7b9020f27fae7ac76f\",\n \"to\": \"0xad19c095040bcc41c965d85cc066779eb48ce9ad\",\n \"value\": \"0x0\",\n \"gas\": \"0x19bd0\",\n \"gasUsed\": \"0x1766f\",\n \"input\": \"0x128acb08000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000fffd8963efd1fc6a506488495d951d5263988d2500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d000000000000000000000000000000000000000000000000000000000000002ba1ea0b2354f5a344110af2b6ad68e75545009a030001f4a0d71b9877f44c744546d649147e3f1e70a93760000000000000000000000000000000000000000000\",\n \"output\": \"0xfffffffffffffffffffffffffffffffffffffffffffff7470a38a36af50b644d00000000000000000000000000000000000000000000000000b1a2bc2ec50000\",\n \"calls\": [\n {\n \"type\": \"CALL\",\n \"from\": \"0xad19c095040bcc41c965d85cc066779eb48ce9ad\",\n \"to\": \"0xa0d71b9877f44c744546d649147e3f1e70a93760\",\n \"value\": \"0x0\",\n \"gas\": \"0x11d42\",\n \"gasUsed\": \"0x3171\",\n \"input\": \"0xa9059cbb000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d0000000000000000000000000000000000000000000008b8f5c75c950af49bb3\",\n \"output\": \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n },\n {\n \"type\": \"STATICCALL\",\n \"from\": \"0xad19c095040bcc41c965d85cc066779eb48ce9ad\",\n \"to\": \"0xa1ea0b2354f5a344110af2b6ad68e75545009a03\",\n \"gas\": \"0xdf95\",\n \"gasUsed\": \"0x9ed\",\n \"input\": \"0x70a08231000000000000000000000000ad19c095040bcc41c965d85cc066779eb48ce9ad\",\n \"output\": \"0x000000000000000000000000000000000000000000000022d0c21687ab478937\"\n },\n {\n \"type\": \"CALL\",\n \"from\": \"0xad19c095040bcc41c965d85cc066779eb48ce9ad\",\n \"to\": \"0xd9880690bd717189cc3fbe7b9020f27fae7ac76f\",\n \"value\": \"0x0\",\n \"gas\": \"0xd2b9\",\n \"gasUsed\": \"0x9da3\",\n \"input\": \"0xfa461e33fffffffffffffffffffffffffffffffffffffffffffff7470a38a36af50b644d00000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d000000000000000000000000000000000000000000000000000000000000002ba1ea0b2354f5a344110af2b6ad68e75545009a030001f4a0d71b9877f44c744546d649147e3f1e70a93760000000000000000000000000000000000000000000\",\n \"output\": \"0x\",\n \"calls\": [\n {\n \"type\": \"CALL\",\n \"from\": \"0xd9880690bd717189cc3fbe7b9020f27fae7ac76f\",\n \"to\": \"0xa1ea0b2354f5a344110af2b6ad68e75545009a03\",\n \"value\": \"0xb1a2bc2ec50000\",\n \"gas\": \"0xa937\",\n \"gasUsed\": \"0x5d20\",\n \"input\": \"0xd0e30db0\",\n \"output\": \"0x\"\n },\n {\n \"type\": \"CALL\",\n \"from\": \"0xd9880690bd717189cc3fbe7b9020f27fae7ac76f\",\n \"to\": \"0xa1ea0b2354f5a344110af2b6ad68e75545009a03\",\n \"value\": \"0x0\",\n \"gas\": \"0x4be6\",\n \"gasUsed\": \"0x1776\",\n \"input\": \"0xa9059cbb000000000000000000000000ad19c095040bcc41c965d85cc066779eb48ce9ad00000000000000000000000000000000000000000000000000b1a2bc2ec50000\",\n \"output\": \"0x0000000000000000000000000000000000000000000000000000000000000001\"\n }\n ]\n },\n {\n \"type\": \"STATICCALL\",\n \"from\": \"0xad19c095040bcc41c965d85cc066779eb48ce9ad\",\n \"to\": \"0xa1ea0b2354f5a344110af2b6ad68e75545009a03\",\n \"gas\": \"0x3515\",\n \"gasUsed\": \"0x21d\",\n \"input\": \"0x70a08231000000000000000000000000ad19c095040bcc41c965d85cc066779eb48ce9ad\",\n \"output\": \"0x000000000000000000000000000000000000000000000022d173b943da0c8937\"\n }\n ]\n }\n ]\n }\n ]\n }\n}" } }, "schema": { "type": "object", "properties": { "jsonrpc": { "type": "string", "example": "2.0" }, "id": { "type": "integer", "example": 1, "default": 0 }, "result": { "type": "object", "properties": { "type": { "type": "string", "example": "CALL" }, "from": { "type": "string", "example": "0xe84118e2b5c74f9610377e86c840ac70f8ca925d" }, "to": { "type": "string", "example": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f" }, "value": { "type": "string", "example": "0xb1a2bc2ec50000" }, "gas": { "type": "string", "example": "0x1c9f4" }, "gasUsed": { "type": "string", "example": "0x19bf2" }, "input": { "type": "string", "example": "0x5ae401dc00000000000000000000000000000000000000000000000000000000643925d800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e404e45aaf000000000000000000000000a1ea0b2354f5a344110af2b6ad68e75545009a03000000000000000000000000a0d71b9877f44c744546d649147e3f1e70a9376000000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000008b76dd55b0c2f4f5113000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, "output": { "type": "string", "example": "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000008b8f5c75c950af49bb3" }, "calls": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "example": "DELEGATECALL" }, "from": { "type": "string", "example": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f" }, "to": { "type": "string", "example": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f" }, "gas": { "type": "string", "example": "0x1bdc5" }, "gasUsed": { "type": "string", "example": "0x19370" }, "input": { "type": "string", "example": "0x04e45aaf000000000000000000000000a1ea0b2354f5a344110af2b6ad68e75545009a03000000000000000000000000a0d71b9877f44c744546d649147e3f1e70a9376000000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d00000000000000000000000000000000000000000000000000b1a2bc2ec500000000000000000000000000000000000000000000000008b76dd55b0c2f4f51130000000000000000000000000000000000000000000000000000000000000000" }, "output": { "type": "string", "example": "0x0000000000000000000000000000000000000000000008b8f5c75c950af49bb3" }, "calls": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "example": "CALL" }, "from": { "type": "string", "example": "0xd9880690bd717189cc3fbe7b9020f27fae7ac76f" }, "to": { "type": "string", "example": "0xad19c095040bcc41c965d85cc066779eb48ce9ad" }, "value": { "type": "string", "example": "0x0" }, "gas": { "type": "string", "example": "0x19bd0" }, "gasUsed": { "type": "string", "example": "0x1766f" }, "input": { "type": "string", "example": "0x128acb08000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000fffd8963efd1fc6a506488495d951d5263988d2500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d000000000000000000000000000000000000000000000000000000000000002ba1ea0b2354f5a344110af2b6ad68e75545009a030001f4a0d71b9877f44c744546d649147e3f1e70a93760000000000000000000000000000000000000000000" }, "output": { "type": "string", "example": "0xfffffffffffffffffffffffffffffffffffffffffffff7470a38a36af50b644d00000000000000000000000000000000000000000000000000b1a2bc2ec50000" }, "calls": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "example": "CALL" }, "from": { "type": "string", "example": "0xad19c095040bcc41c965d85cc066779eb48ce9ad" }, "to": { "type": "string", "example": "0xa0d71b9877f44c744546d649147e3f1e70a93760" }, "value": { "type": "string", "example": "0x0" }, "gas": { "type": "string", "example": "0x11d42" }, "gasUsed": { "type": "string", "example": "0x3171" }, "input": { "type": "string", "example": "0xa9059cbb000000000000000000000000e84118e2b5c74f9610377e86c840ac70f8ca925d0000000000000000000000000000000000000000000008b8f5c75c950af49bb3" }, "output": { "type": "string", "example": "0x0000000000000000000000000000000000000000000000000000000000000001" } } } } } } } } } } } } } } } } }, "400": { "description": "400", "content": { "application/json": { "examples": { "Result": { "value": "{}" } }, "schema": { "type": "object", "properties": {} } } } } }, "deprecated": false } } }, "x-readme": { "headers": [], "explorer-enabled": true, "proxy-enabled": true }, "x-readme-fauxas": true } ```