Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

RPC

L2 Output RPC method

The Rollup node has its own RPC method, optimism_outputAtBlock which returns a 32 byte hash corresponding to the L2 output root.

Structures

These define the types used by rollup node API methods. The types defined here are extended from the engine API specs.

BlockID

  • hash: DATA, 32 Bytes
  • number: QUANTITY, 64 Bits

L1BlockRef

  • hash: DATA, 32 Bytes
  • number: QUANTITY, 64 Bits
  • parentHash: DATA, 32 Bytes
  • timestamp: QUANTITY, 64 Bits

L2BlockRef

  • hash: DATA, 32 Bytes
  • number: QUANTITY, 64 Bits
  • parentHash: DATA, 32 Bytes
  • timestamp: QUANTITY, 64 Bits
  • l1origin: BlockID
  • sequenceNumber: QUANTITY, 64 Bits - distance to first block of epoch

SyncStatus

Represents a snapshot of the rollup driver.

Output Method API

The input and return types here are as defined by the engine API specs.

  • method: optimism_outputAtBlock
  • params:
    1. blockNumber: QUANTITY, 64 bits - L2 integer block number.
  • returns:
    1. version: DATA, 32 Bytes - the output root version number, beginning with 0.
    2. outputRoot: DATA, 32 Bytes - the output root.
    3. blockRef: Object - instance of L2BlockRef.
    4. withdrawalStorageRoot: 32 bytes - storage root of the L2toL1MessagePasser contract.
    5. stateRoot: DATA: 32 bytes - the state root.
    6. syncStatus: Object - instance of SyncStatus.