Validium Docs
  • Overview
  • Connect to Validium
  • Start Coding 🚀
    • Quickstart
      • Overview
      • Deploy using Validium CLI
      • Deploy using Quickstart Repository
      • Deploy your first contract
      • Create an ERC20 token
  • Tooling
    • Block Explorers
    • Hardhat-Validium
      • Overview
      • Installation
      • Guides
        • Getting started
        • Migrating Hardhat project to Validium
        • Compiling non-inlinable libraries
      • Plugins
        • hardhat-zksync
        • hardhat-zksync-solc
        • hardhat-zksync-vyper
        • hardhat-zksync-deploy
        • hardhat-zksync-upgradable
        • hardhat-zksync-verify
        • hardhat-zksync-verify-vyper
        • hardhat-zksync-ethers
        • hardhat-zksync-node
        • Hardhat Community Plugins
    • Foundary
      • Overview
      • Installation
      • Getting Started
      • Migration Guide
        • Overview
        • Compilation
        • Deployment
        • Testing
  • Test and Debug
    • Getting Started
    • Docker L1 - L2 Nodes
    • In-Memory Node
    • Continuous Integration
    • Hardhat
    • Foundry
  • API Reference
    • Overview
    • Conventions
    • ZKs JSON-RPC API
    • Debug JSON-RPC API
    • Ethereum JSON-RPC API
    • PubSub JSON-RPC API
  • Concepts
    • Transaction Lifecycle
    • Blocks and Batches
    • Validium Network Fee Mechanism
    • Finality
    • System Upgrades
    • ZK Chains
    • Data Availability
      • Overview
      • Recreating L2 state from L1 pubdata
      • Validiums
    • Account Abstraction
    • L1 <-> L2 Communication
  • Components
    • Overview
    • Smart & System Contracts
      • Smart Contracts
      • System Contracts
    • Shared Bridges
    • Sequencer / Server
    • Validium Network EVM
      • Overview
      • Bootloader
      • Precompiles
      • Virtual Machine Specification
        • ZKsync Virtual Machine primer
        • VM Formal Specification
    • Prover
      • Overview
      • ZK Terminology
      • Running the Prover
      • Circuits
        • Overview
        • Circuit Testing
        • CodeDecommitter
        • DemuxLogQueue
        • ECRecover
        • KeccakRoundFunction
        • L1MessagesHasher
        • LogSorter
        • Main VM
        • RAMPermutation
        • Sha256RoundFunction
        • StorageApplication
        • Sorting and Deduplicating
          • Overview
          • SortDecommitments
          • StorageSorter
          • LogSorter
      • Boojum Gadgets
      • Boojum Function - `check_if_satisfied`
    • Compiler
      • Compiler Toolchain Overview
        • Compiler Toolchain Overview
        • Solidity Compiler
        • Vyper Compiler
        • LLVM Framework
      • Specification
        • Overview
        • Code Separation
        • System Contracts
        • Exception Handling
        • EVM Legacy Assembly Translator
        • Instructions
          • Instruction Reference
          • EVM
            • Native EVM Instructions
            • Arithmetic
            • Bitwise
            • Block
            • Call
            • Create
            • Environment
            • Logging
            • Logical
            • Memory
            • Return
            • Sha3
            • Stack
          • Extensions
            • Overview
            • Validium Network Extension Simulation (call)
            • Validium Network Extension Simulation (verbatim)
          • EVM Legacy Assembly
          • Yul
        • EraVM Binary Layout
    • Fee Withdrawer
    • Portal - Wallet + Bridge
    • Block Explorer
    • Transaction filtering
Powered by GitBook
On this page
  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction
  1. API Reference

Debug JSON-RPC API

Methods useful for debugging purposes with Valdium Network.

PreviousZKs JSON-RPC APINextEthereum JSON-RPC API

Last updated 7 months ago


debug_traceBlockByHash

Traces all calls made from a specific block by its L2 hash.

Parameters

  1. DATA, 32 bytes - hash defining the L2 block.

  2. TracerConfig - Optional configuration for tracing. Refer to the for more details.

Returns

Array of objects, each representing a traced call made from the specified block.

Trace Object

Show properties

Example Request

curl --request POST \
  --url http://devnet.l2.rpc.validium.network/ \
  --header 'Content-Type: application/json' \
  --data '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "debug_traceBlockByHash",
      "params": ["0x4bd0bd4547d8f8a4fc86a024e54558e156c1acf43d82e24733c6dac2fe5c5fc7"]
    }'

Example Response

{
  "jsonrpc": "2.0",
  "result": [
    {
      "type": "Call",
      "from": "0x0000000000000000000000000000000000000000",
      "to": "0x0000000000000000000000000000000000008001",
      "gas": "0x18be25",
      "gasUsed": "0x7603b",
      "value": "0xa1e94fc0fe6043",
      "output": "0x",
      "input": "0x",
      "error": null,
      "revertReason": null,
      "calls": [...]
    },
    ...
  ]
}

debug_traceBlockByNumber

Traces all calls made from a specific block by its L2 block number.

Parameters

  1. QUANTITY, 8 bytes | TAG - The number of the block to trace. This can be a hex-encoded number or one of the strings "earliest", "latest", or "pending".

Returns

Array of objects, each representing a traced call made from the specified block.

Trace Object

Show properties

Example Request

curl --request POST \
  --url http://devnet.l2.rpc.validium.network/ \
  --header 'Content-Type: application/json' \
  --data '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "debug_traceBlockByNumber",
      "params": ["0x24b258"]
    }'

Example Response

{
  "jsonrpc": "2.0",
  "result": [
    {
      "result": {
      "type": "Call",
      "from": "0x0000000000000000000000000000000000000000",
      "to": "0x0000000000000000000000000000000000008001",
      "gas": "0x18be25",
      "gasUsed": "0x7603b",
      "value": "0xa1e94fc0fe6043",
      "output": "0x",
      "input": "0x",
      "error": null,
      "revertReason": null,
      "calls": [...]
    },
    ...
  ]
}

debug_traceCall

Traces a call made at a specific block, by block number or hash.

Parameters

  1. CallRequest - The call request to trace, containing fields like from, to, data, and optionally gas, gasPrice, and value.

  2. DATA, 32 bytes | QUANTITY, 8 bytes - Optional. The block identifier, which can be a block number as a hex-encoded number or a block hash. If not specified, the latest block is used.

Returns

Array of objects, each representing a traced call made from the specified block.

Trace Object

Show properties

Example Request

curl --request POST \
  --url http://devnet.l2.rpc.validium.network/ \
  --header 'Content-Type: application/json' \
  --data '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "debug_traceCall",
      "params": [
        {
          "from": "0x1111111111111111111111111111111111111111",
          "to": "0x2222222222222222222222222222222222222222",
          "data": "0xffffffff"
        },
        "0x24b258"
      ]
    }'

Example Response

{
  "jsonrpc": "2.0",
  "result": {
    "type": "Call",
    "from": "0x0000000000000000000000000000000000000000",
    "to": "0x0000000000000000000000000000000000008001",
    "gas": "0x0",
    "gasUsed": "0x6b4b",
    "value": "0x0",
    "output": "0x",
    "input": "0xffffffff",
    "error": null,
    "revertReason": null,
    "calls": []
  },
  "id": 1
}

debug_traceTransaction

Parameters

  1. DATA, 32 bytes - The 32-byte hash of the transaction to trace.

Returns

Array of objects, each representing a traced call made from the specified block.

Trace Object

Show properties

Example Request

curl --request POST \
  --url http://devnet.l2.rpc.validium.network/ \
  --header 'Content-Type: application/json' \
  --data '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "debug_traceTransaction",
      "params": ["0x4b228f90e796de5a18227072745b0f28e0c4a4661a339f70d3bdde591d3b7f3a"]
    }'

Example Response

{
  "jsonrpc": "2.0",
  "result": [
    {
      "type": "Call",
      "from": "0x0000000000000000000000000000000000000000",
      "to": "0x0000000000000000000000000000000000008001",
      "gas": "0x154800",
      "gasUsed": "0xc2419",
      "value": "0x0",
      "output": "0x",
      "input": "0x095ea7b30000000000000000000000002da10a1e27bf85cedd8ffb1abbe97e53391c0295ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
      "error": null,
      "revertReason": null,
      "calls": [...]
    },
    ...
  ]
}

TracerConfig - Optional configuration for tracing. Refer to the for more details.

TracerConfig - Optional. Configuration options for the trace. For more details, refer to the .

Uses the to return a debug trace of a specific transaction given by its transaction hash.

TracerConfig - Optional. Configuration options for the trace. For more details, refer to the .

TraceConfig documentation
TraceConfig documentation
TraceConfig documentation
EVM's callTracer
TraceConfig documentation