{
  "openrpc": "1.2.6",
  "info": {
    "title": "Ritual Debug API",
    "description": "Quicknode Ritual Debug API reference",
    "version": "1.0.0"
  },
  "methods": [
    {
      "name": "debug_traceBlock",
      "summary": "Returns a full stack trace of all invoked opcodes of all transactions that were included in a block.",
      "description": "Returns a full stack trace of all invoked opcodes of all transactions that were included in a block.",
      "params": [
        {
          "name": "block",
          "description": "The RLP encoded block",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "object",
          "description": "The tracer object with the following fields:",
          "required": true,
          "schema": {
            "type": "object",
            "properties": {
              "tracer": {
                "enum": [
                  "callTracer",
                  "prestateTracer"
                ],
                "description": "The type of tracer. It could be callTracer or prestateTracer"
              },
              "tracerConfig": {
                "type": "object",
                "properties": {
                  "onlyTopCall": {
                    "type": "boolean",
                    "description": "When set to true, this will only trace the primary (top-level) call and not any sub-calls. It eliminates the additional processing for each call frame"
                  }
                },
                "description": "The object to specify the configurations of the tracer"
              }
            },
            "description": "The tracer object with the following fields:"
          }
        }
      ],
      "result": {
        "name": "result",
        "description": "The result object which contains the following fields:",
        "schema": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "txHash": {
                "type": "string",
                "description": "The hash of the transaction being traced"
              },
              "result": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "description": "The address the transaction is sent from"
                  },
                  "gas": {
                    "type": "string",
                    "description": "The integer of the gas provided for the transaction execution"
                  },
                  "gasUsed": {
                    "type": "string",
                    "description": "The integer of the gas used"
                  },
                  "to": {
                    "type": "string",
                    "description": "The address the transaction is directed to"
                  },
                  "input": {
                    "type": "string",
                    "description": "The data given at the time of input"
                  },
                  "calls": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string",
                          "description": "The address making the call"
                        },
                        "gas": {
                          "type": "string",
                          "description": "The gas limit specified for the call"
                        },
                        "gasUsed": {
                          "type": "string",
                          "description": "The amount of gas used during the call"
                        },
                        "to": {
                          "type": "string",
                          "description": "The address being called"
                        },
                        "input": {
                          "type": "string",
                          "description": "The input data for the call"
                        },
                        "output": {
                          "type": "string",
                          "description": "(Optional) The output data of the call"
                        },
                        "value": {
                          "type": "string",
                          "description": "The value (in Wei) sent with the call"
                        },
                        "type": {
                          "type": "string",
                          "description": "The type of call (e.g., CALL or STATICCALL)"
                        }
                      }
                    },
                    "description": "(Conditional) An array containing information about internal calls made during the transaction"
                  },
                  "value": {
                    "type": "string",
                    "description": "The integer of the value sent with this transaction"
                  },
                  "type": {
                    "type": "string",
                    "description": "The type of the call"
                  },
                  "error": {
                    "type": "string",
                    "description": "error returned by the Ritual node."
                  }
                },
                "description": "An object containing detailed information about the traced transaction"
              }
            }
          }
        }
      },
      "tags": [
        {
          "name": "debug"
        }
      ],
      "externalDocs": {
        "description": "Quicknode docs",
        "url": "https://www.quicknode.com/docs/ritual/debug_traceBlock"
      },
      "examples": [
        {
          "name": "debug_traceBlock example",
          "params": [
            {
              "name": "block",
              "value": "0xf902cff90274a04377b6cc02b83b768faa0d36371b6f6c9a42c300ba50446bf8727b0927b9bf1aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794514708beda3441cc4e141f8546c096eaab7c8a05a0b513f1d1427a1748379fdc054cf8a7b74ca8e70189014c1ce17f34eee1bed9f9a0be4350d9ffa7f82ad7af33d2b8b7279a5b7167b728107b61487f1ac7f0929c45a0558eef27308bc0ae1df25e3c9fa7358206c6eca7591f1990bd6c273aa56fc4cbb901000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000001000000000000040000000000000080000000000800100000000000000000080008000000000000000000000002000000000000000004080000000000000000000200001000000000000400000000000040000000020000000002000000000000000000200000200000000000000000000000000000000000000000000000000000000000000000000100000200000000000000000000000000000000000000000000000000802000000000000000000000000000000000000000000000000020000000000000000080830500008402faf080830350cb8601a03b08f0ff91726574682f76322e322e302f6c696e7578a0000000000000000000000000000000000000000000000000000000000000000088000000000000000008a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4218080a00101010101010101010101010101010101010101010101010101010101010101a0e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855f854b85213f84f8401c9c3808304ffff940000000000000000000000000000000000002002883782dace9d900000a4092193ab000000000000000000000000514708beda3441cc4e141f8546c096eaab7c8a05800102c0c0"
            }
          ],
          "result": {
            "name": "debug_traceBlock result",
            "value": [
              {
                "result": {
                  "from": "0xfffffffffffffffffffffffffffffffffffffffe",
                  "gas": "0x1c9c380",
                  "gasUsed": "0x5640",
                  "to": "0x0000000000000000000000000000000000002002",
                  "input": "0x092193ab000000000000000000000000514708beda3441cc4e141f8546c096eaab7c8a05",
                  "error": "insufficient balance for transfer",
                  "value": "0x3782dace9d900000",
                  "type": "CALL"
                },
                "txHash": "0x5d005403489e1bc301344d2b51fa7f403372cf4e7941c2861aa320f1605c9dd4"
              }
            ]
          }
        }
      ]
    },
    {
      "name": "debug_traceBlockByHash",
      "summary": "Returns the possible tracing result number by executing all transactions in the block specified by the block hash with a",
      "description": "Returns the possible tracing result number by executing all transactions in the block specified by the block hash with a tracer.",
      "params": [
        {
          "name": "blockHash",
          "description": "The hash of the block to be traced",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "object",
          "description": "The tracer object with the following fields:",
          "required": true,
          "schema": {
            "type": "object",
            "properties": {
              "tracer": {
                "enum": [
                  "callTracer",
                  "prestateTracer"
                ],
                "description": "The type of tracer. It could be callTracer or prestateTracer"
              },
              "tracerConfig": {
                "type": "object",
                "properties": {
                  "onlyTopCall": {
                    "type": "boolean",
                    "description": "When set to true, this will only trace the primary (top-level) call and not any sub-calls. It eliminates the additional processing for each call frame"
                  }
                },
                "description": "The object to specify the configurations of the tracer"
              }
            },
            "description": "The tracer object with the following fields:"
          }
        }
      ],
      "result": {
        "name": "result",
        "description": "The result object which contains the following fields:",
        "schema": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "txHash": {
                "type": "string",
                "description": "The hash of the transaction being traced"
              },
              "result": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "description": "The address the transaction is sent from"
                  },
                  "gas": {
                    "type": "string",
                    "description": "The integer of the gas provided for the transaction execution"
                  },
                  "gasUsed": {
                    "type": "string",
                    "description": "The integer of the gas used"
                  },
                  "to": {
                    "type": "string",
                    "description": "The address the transaction is directed to"
                  },
                  "input": {
                    "type": "string",
                    "description": "The data given at the time of input"
                  },
                  "calls": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string",
                          "description": "The address making the call"
                        },
                        "gas": {
                          "type": "string",
                          "description": "The gas limit specified for the call"
                        },
                        "gasUsed": {
                          "type": "string",
                          "description": "The amount of gas used during the call"
                        },
                        "to": {
                          "type": "string",
                          "description": "The address being called"
                        },
                        "input": {
                          "type": "string",
                          "description": "The input data for the call"
                        },
                        "output": {
                          "type": "string",
                          "description": "(Optional) The output data of the call"
                        },
                        "value": {
                          "type": "string",
                          "description": "The value (in Wei) sent with the call"
                        },
                        "type": {
                          "type": "string",
                          "description": "The type of call (e.g., CALL or STATICCALL)"
                        }
                      }
                    },
                    "description": "(Conditional) An array containing information about internal calls made during the transaction"
                  },
                  "value": {
                    "type": "string",
                    "description": "The integer of the value sent with this transaction"
                  },
                  "type": {
                    "type": "string",
                    "description": "The type of the call"
                  },
                  "error": {
                    "type": "string",
                    "description": "(Conditional) Error message when execution fails."
                  }
                },
                "description": "An object containing detailed information about the traced transaction"
              }
            }
          }
        }
      },
      "tags": [
        {
          "name": "debug"
        }
      ],
      "externalDocs": {
        "description": "Quicknode docs",
        "url": "https://www.quicknode.com/docs/ritual/debug_traceBlockByHash"
      },
      "examples": [
        {
          "name": "debug_traceBlockByHash example",
          "params": [
            {
              "name": "blockHash",
              "value": "0x464dc0fc78ef448e18597261ac67ecfdf3c5a6ba0a86d30947ca4d379f0fc46b"
            }
          ],
          "result": {
            "name": "debug_traceBlockByHash result",
            "value": [
              {
                "result": {
                  "from": "0xfffffffffffffffffffffffffffffffffffffffe",
                  "gas": "0x1c9c380",
                  "gasUsed": "0x5640",
                  "to": "0x0000000000000000000000000000000000002002",
                  "input": "0x092193ab000000000000000000000000514708beda3441cc4e141f8546c096eaab7c8a05",
                  "error": "insufficient balance for transfer",
                  "value": "0x3782dace9d900000",
                  "type": "CALL"
                },
                "txHash": "0x5d005403489e1bc301344d2b51fa7f403372cf4e7941c2861aa320f1605c9dd4"
              }
            ]
          }
        }
      ]
    },
    {
      "name": "debug_traceBlockByNumber",
      "summary": "Returns the tracing result by executing all transactions in the block specified by number with a tracer.",
      "description": "Returns the tracing result by executing all transactions in the block specified by number with a tracer.",
      "params": [
        {
          "name": "blockNumber",
          "description": "The block number as a string in hexadecimal format or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "object",
          "description": "The tracer object with the following fields:",
          "schema": {
            "type": "object",
            "properties": {
              "tracer": {
                "enum": [
                  "callTracer",
                  "prestateTracer"
                ],
                "description": "The type of tracer. It could be callTracer or prestateTracer"
              },
              "tracerConfig": {
                "type": "object",
                "properties": {
                  "onlyTopCall": {
                    "type": "boolean",
                    "description": "When set to true, this will only trace the primary (top-level) call and not any sub-calls. It eliminates the additional processing for each call frame"
                  }
                },
                "description": "The object to specify the configurations of the tracer"
              }
            },
            "description": "The tracer object with the following fields:"
          }
        }
      ],
      "result": {
        "name": "result",
        "description": "The result object which contains the following fields:",
        "schema": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "txHash": {
                "type": "string",
                "description": "The hash of the transaction being traced"
              },
              "result": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "description": "The address the transaction is sent from"
                  },
                  "gas": {
                    "type": "string",
                    "description": "The integer of the gas provided for the transaction execution"
                  },
                  "gasUsed": {
                    "type": "string",
                    "description": "The integer of the gas used"
                  },
                  "to": {
                    "type": "string",
                    "description": "The address the transaction is directed to"
                  },
                  "input": {
                    "type": "string",
                    "description": "The data given at the time of input"
                  },
                  "calls": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "from": {
                          "type": "string",
                          "description": "The address making the call"
                        },
                        "gas": {
                          "type": "string",
                          "description": "The gas limit specified for the call"
                        },
                        "gasUsed": {
                          "type": "string",
                          "description": "The amount of gas used during the call"
                        },
                        "to": {
                          "type": "string",
                          "description": "The address being called"
                        },
                        "input": {
                          "type": "string",
                          "description": "The input data for the call"
                        },
                        "output": {
                          "type": "string",
                          "description": "(Optional) The output data of the call"
                        },
                        "value": {
                          "type": "string",
                          "description": "The value (in Wei) sent with the call"
                        },
                        "type": {
                          "type": "string",
                          "description": "The type of call (e.g., CALL or STATICCALL)"
                        }
                      }
                    },
                    "description": "(Conditional) An array containing information about internal calls made during the transaction"
                  },
                  "value": {
                    "type": "string",
                    "description": "The integer of the value sent with this transaction"
                  },
                  "type": {
                    "type": "string",
                    "description": "The type of the call"
                  },
                  "error": {
                    "type": "string",
                    "description": "(Conditional) Error message when execution fails."
                  }
                },
                "description": "An object containing detailed information about the traced transaction"
              }
            }
          }
        }
      },
      "tags": [
        {
          "name": "debug"
        }
      ],
      "externalDocs": {
        "description": "Quicknode docs",
        "url": "https://www.quicknode.com/docs/ritual/debug_traceBlockByNumber"
      },
      "examples": [
        {
          "name": "debug_traceBlockByNumber example",
          "params": [
            {
              "name": "blockNumber",
              "value": "0x50000"
            }
          ],
          "result": {
            "name": "debug_traceBlockByNumber result",
            "value": [
              {
                "result": {
                  "from": "0xfffffffffffffffffffffffffffffffffffffffe",
                  "gas": "0x1c9c380",
                  "gasUsed": "0x5640",
                  "to": "0x0000000000000000000000000000000000002002",
                  "input": "0x092193ab000000000000000000000000514708beda3441cc4e141f8546c096eaab7c8a05",
                  "error": "insufficient balance for transfer",
                  "value": "0x3782dace9d900000",
                  "type": "CALL"
                },
                "txHash": "0x5d005403489e1bc301344d2b51fa7f403372cf4e7941c2861aa320f1605c9dd4"
              }
            ]
          }
        }
      ]
    },
    {
      "name": "debug_traceCall",
      "summary": "Returns the number of possible tracing result by executing an eth call within the context of the given block execution.",
      "description": "Returns the number of possible tracing result by executing an eth call within the context of the given block execution.",
      "params": [
        {
          "name": "object",
          "description": "The transaction call object with the following fields:",
          "required": true,
          "schema": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "description": "The address the transaction is sent from"
              },
              "to": {
                "type": "string",
                "description": "The address the transaction is directed to"
              },
              "gas": {
                "type": "integer",
                "description": "The integer of the gas provided for the transaction execution"
              },
              "gasPrice": {
                "type": "integer",
                "description": "The integer of the gasPrice used for each paid gas"
              },
              "value": {
                "type": "integer",
                "description": "The integer of the value sent with this transaction"
              },
              "data": {
                "type": "string",
                "description": "The hash of the method signature and encoded parameters"
              }
            },
            "description": "The transaction call object with the following fields:"
          }
        },
        {
          "name": "blockReference",
          "description": "The block number in hexadecimal format, the block hash, or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "object",
          "description": "The tracer object with the following fields:",
          "required": true,
          "schema": {
            "type": "object",
            "properties": {
              "tracer": {
                "enum": [
                  "callTracer",
                  "prestateTracer"
                ],
                "description": "The type of tracer. It could be callTracer or prestateTracer"
              },
              "tracerConfig": {
                "type": "object",
                "properties": {
                  "onlyTopCall": {
                    "type": "boolean",
                    "description": "When set to true, this will only trace the primary (top-level) call and not any sub-calls. It eliminates the additional processing for each call frame"
                  },
                  "diffMode": {
                    "type": "boolean",
                    "description": "When set to true, diff mode returns the differences between the transaction's pre and post-state. The result object will contain a pre and a post object."
                  }
                },
                "description": "The object to specify the configurations of the tracer"
              }
            },
            "description": "The tracer object with the following fields:"
          }
        }
      ],
      "result": {
        "name": "result",
        "description": "Call frame returned by callTracer (the default). Other tracers return their own response formats.",
        "schema": {
          "type": "object",
          "properties": {
            "from": {
              "type": "string",
              "description": "The address the transaction is sent from"
            },
            "gas": {
              "type": "string",
              "description": "The integer of the gas provided for the transaction execution"
            },
            "gasUsed": {
              "type": "string",
              "description": "The integer of the gas used"
            },
            "to": {
              "type": "string",
              "description": "The address the transaction is directed to"
            },
            "input": {
              "type": "string",
              "description": "The data given at the time of input"
            },
            "calls": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "description": "The address making the call"
                  },
                  "gas": {
                    "type": "string",
                    "description": "The gas limit specified for the call"
                  },
                  "gasUsed": {
                    "type": "string",
                    "description": "The amount of gas used during the call"
                  },
                  "to": {
                    "type": "string",
                    "description": "The address being called"
                  },
                  "input": {
                    "type": "string",
                    "description": "The input data for the call"
                  },
                  "output": {
                    "type": "string",
                    "description": "(Optional) The output data of the call"
                  },
                  "value": {
                    "type": "string",
                    "description": "The value (in Wei) sent with the call"
                  },
                  "type": {
                    "type": "string",
                    "description": "The type of call (e.g., CALL or STATICCALL)"
                  },
                  "calls": {
                    "type": "array",
                    "items": {},
                    "description": "The sub-calls associated with the call"
                  }
                }
              },
              "description": "(Conditional) An array containing information about internal calls made during the transaction"
            },
            "value": {
              "type": "string",
              "description": "The integer of the value sent with this transaction"
            },
            "type": {
              "type": "string",
              "description": "The type of the call"
            },
            "error": {
              "type": "string",
              "description": "error returned by the Ritual node."
            }
          },
          "description": "Call frame returned by callTracer (the default). Other tracers return their own response formats."
        }
      },
      "tags": [
        {
          "name": "debug"
        }
      ],
      "externalDocs": {
        "description": "Quicknode docs",
        "url": "https://www.quicknode.com/docs/ritual/debug_traceCall"
      },
      "examples": [
        {
          "name": "debug_traceCall example",
          "params": [
            {
              "name": "blockReference",
              "value": "latest"
            }
          ],
          "result": {
            "name": "debug_traceCall result",
            "value": {
              "from": "0x3f91da51aa4a5c42f3882c5b5a81ed308413e7f0",
              "gas": "0x2faf080",
              "gasUsed": "0x5640",
              "to": "0xcc5495df16633c0d0c189a71ed3a723c2687dae1",
              "input": "0x70a082310000000000000000000000006e0d01a76c3cf4288372a29124a26d4353ee51be",
              "value": "0x0",
              "type": "CALL"
            }
          }
        }
      ]
    },
    {
      "name": "debug_traceTransaction",
      "summary": "Returns all traces of a given transaction.",
      "description": "Returns all traces of a given transaction.",
      "params": [
        {
          "name": "transactionHash",
          "description": "The transaction hash that needs to be traced, encoded in hexadecimal format",
          "required": true,
          "schema": {
            "type": "string"
          }
        },
        {
          "name": "object",
          "description": "The tracer object with the following fields:",
          "schema": {
            "type": "object",
            "properties": {
              "tracer": {
                "enum": [
                  "callTracer",
                  "prestateTracer"
                ],
                "description": "The type of tracer. It could be callTracer or prestateTracer"
              },
              "tracerConfig": {
                "type": "object",
                "properties": {
                  "onlyTopCall": {
                    "type": "boolean",
                    "description": "When set to true, this will only trace the primary (top-level) call and not any sub-calls. It eliminates the additional processing for each call frame"
                  }
                },
                "description": "The object to specify the configurations of the tracer"
              },
              "timeout": {
                "type": "string",
                "description": "A string of decimal integers that overrides the JavaScript-based tracing calls default timeout of 5 seconds"
              }
            },
            "description": "The tracer object with the following fields:"
          }
        }
      ],
      "result": {
        "name": "result",
        "description": "An object containing detailed information about the traced transaction",
        "schema": {
          "type": "object",
          "properties": {
            "from": {
              "type": "string",
              "description": "The address the transaction is sent from"
            },
            "gas": {
              "type": "string",
              "description": "The integer of the gas provided for the transaction execution"
            },
            "gasUsed": {
              "type": "string",
              "description": "The integer of the gas used"
            },
            "to": {
              "type": "string",
              "description": "The address the transaction is directed to"
            },
            "input": {
              "type": "string",
              "description": "The data given at the time of input"
            },
            "calls": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "description": "The address making the call"
                  },
                  "gas": {
                    "type": "string",
                    "description": "The gas limit specified for the call"
                  },
                  "gasUsed": {
                    "type": "string",
                    "description": "The amount of gas used during the call"
                  },
                  "to": {
                    "type": "string",
                    "description": "The address being called"
                  },
                  "input": {
                    "type": "string",
                    "description": "The input data for the call"
                  },
                  "output": {
                    "type": "string",
                    "description": "(Optional) The output data of the call"
                  },
                  "value": {
                    "type": "string",
                    "description": "The value (in Wei) sent with the call"
                  },
                  "type": {
                    "type": "string",
                    "description": "The type of call (e.g., CALL or STATICCALL)"
                  },
                  "calls": {
                    "type": "array",
                    "items": {},
                    "description": "The sub-calls associated with the call"
                  }
                }
              },
              "description": "(Conditional) An array containing information about internal calls made during the transaction"
            },
            "value": {
              "type": "string",
              "description": "The integer of the value sent with this transaction"
            },
            "type": {
              "type": "string",
              "description": "The type of the call"
            },
            "error": {
              "type": "string",
              "description": "(Conditional) Error message when execution fails."
            }
          },
          "description": "An object containing detailed information about the traced transaction"
        }
      },
      "tags": [
        {
          "name": "debug"
        }
      ],
      "externalDocs": {
        "description": "Quicknode docs",
        "url": "https://www.quicknode.com/docs/ritual/debug_traceTransaction"
      },
      "examples": [
        {
          "name": "debug_traceTransaction example",
          "params": [
            {
              "name": "transactionHash",
              "value": "0x5d005403489e1bc301344d2b51fa7f403372cf4e7941c2861aa320f1605c9dd4"
            }
          ],
          "result": {
            "name": "debug_traceTransaction result",
            "value": {
              "from": "0xfffffffffffffffffffffffffffffffffffffffe",
              "gas": "0x1c9c380",
              "gasUsed": "0x5640",
              "to": "0x0000000000000000000000000000000000002002",
              "input": "0x092193ab000000000000000000000000514708beda3441cc4e141f8546c096eaab7c8a05",
              "error": "insufficient balance for transfer",
              "value": "0x3782dace9d900000",
              "type": "CALL"
            }
          }
        }
      ]
    }
  ],
  "servers": [
    {
      "name": "Debug API",
      "url": "https://docs-demo.ritual-mainnet.quiknode.pro"
    }
  ]
}