Gateway Documentation
  • 🎓Documentation
  • Overview
    • 💡What is Presto?
    • ✨How-To Guides
      • How to Create a Rollup
      • How to Deploy a gasless rollup
      • How To Delete A Rollup
      • How To Deploy Mainnet
      • How To Add a Prover
      • Can I Change The Name of My Rollup?
      • How To Use Metamask with Presto
      • How to use a Faucet
      • How to Access the Block Explorer
      • How to Use a Bridge
      • Inactivity Period (for Trial)
    • 💻Features for Developers
      • What Is RPC
      • How To Deploy A Smart Contract
      • How to use HardHat with Presto
      • How To Use Presto with web3.js
      • How To Use Presto with ethers.js
      • How to use Presto with ethers.py
      • How To Use Presto with viem.sh
      • How to use Presto with web3.py
    • 📊Presto UI/Dashboards
      • Presto L2 Dashboard
      • Presto List Of Projects
    • ☎️Where To Get Support
    • 🛟FAQ Presto
    • 🛟FAQ CDK Erigon
    • 🛟CDK Erigon RPC Methods
    • 🛟FAQ Arbitrum
  • 🛟FAQ Optimism (OP)
  • Fundamentals
    • 🛠️Getting set up
Powered by GitBook
On this page
  • CDK-Erigon RPC Methods
  • Transaction Pool (txpool)
  • zkEVM Methods (zkevm)
  • Other zkEVM Methods
  • Notes on Usage
  1. Overview

CDK Erigon RPC Methods

CDK-Erigon RPC Methods

Transaction Pool (txpool)

txpool_content

Description:

Returns details of all pending and queued transactions in the transaction pool.

Parameters:

None

Response:

Returns an object containing:

  • pending – A list of transactions waiting to be included in a block.

  • queued – A list of transactions that are queued due to nonce gaps.

Example:

{
  "pending": { "0xSenderAddress": [ { "to": "0xReceiver", "value": "0x10" } ] },
  "queued": { "0xSenderAddress": [ { "to": "0xReceiver", "value": "0x20" } ] }
}
txpool_contentFrom

Description:

Fetches all pending and queued transactions from a specific sender.

Parameters:

  • address (string): The sender’s Ethereum address.

Response:

Returns the list of transactions originating from the specified sender.

Example:

{
  "pending": [{ "to": "0xReceiver", "value": "0x10" }],
  "queued": [{ "to": "0xReceiver", "value": "0x20" }]
}
txpool_limbo

Description:

Returns transactions that are stuck in limbo due to missing dependencies or nonce gaps.

Parameters:

None

Response:

Returns an array of transactions that are unprocessable.

Example:

{
  "limbo": [{ "from": "0xSender", "nonce": 5, "to": "0xReceiver" }]
}

zkEVM Methods (zkevm)

zkevm_batchNumber

Description:

Returns the latest batch number finalized on L1.

Parameters:

None

Response:

  • batchNumber (integer): The latest verified batch.

Example:

{
  "batchNumber": 10045
}
zkevm_batchNumberByBlockNumber

Description:

Fetches the batch number corresponding to a specific block number.

Parameters:

  • blockNumber (integer): The L2 block number.

Response:

  • batchNumber (integer): The batch associated with the block.

Example:

{
  "batchNumber": 9998
}
zkevm_consolidatedBlockNumber

Description:

Retrieves the latest L2 block that has been consolidated.

Parameters:

None

Response:

  • blockNumber (integer): The latest consolidated L2 block.

Example:

{
  "blockNumber": 105432
}
zkevm_estimateCounters

Description:

Estimates the counter usage for a given transaction, similar to estimateGas but for zkEVM.

Parameters:

  • transaction (object): The transaction object to analyze.

Response:

  • counterEstimate (integer): Estimated zk-counter usage.

Example:

{
  "counterEstimate": 25000
}
zkevm_getBatchByNumber

Description:

Returns details about a specific batch by its number.

Parameters:

  • batchNumber (integer): The batch ID to fetch.

Response:

Batch details, including block range, state root, and L1 commitment status.

Example:

{
  "batch": {
    "batchNumber": 10045,
    "blockRange": "100430-100450",
    "stateRoot": "0xabcdef"
  }
}
zkevm_getBatchCountersByNumber

Description:

Retrieves the counter usage details of a specific batch.

Parameters:

  • batchNumber (integer): The batch ID.

Response:

A list of counter values for that batch.

Example:

{
  "counters": {
    "zkCountersUsed": 14000,
    "gasUsed": 8000000
  }
}
zkevm_getBatchWitness

Description:

Returns the witness data used to generate a zk-proof for a batch.

Parameters:

  • batchNumber (integer): The batch ID.

Response:

A large witness dataset used in zk-proof computation.

Example:

{
  "witnessData": "0xabcdef12345..."
}
zkevm_getExitRootTable

Description:

Returns the global exit root table.

Parameters:

None

Response:

A mapping of all exit roots across different rollups.

Example:

{
  "exitRoots": {
    "rollup1": "0x123abc...",
    "rollup2": "0x456def..."
  }
}
zkevm_isBlockConsolidated

Description:

Checks if an L2 block has been consolidated into a batch.

Parameters:

  • blockNumber (integer): The L2 block ID.

Response:

  • boolean (true/false): Whether the block is consolidated.

Example:

{
  "isConsolidated": true
}
zkevm_verifiedBatchNumber

Description:

Returns the last verified batch number on L1.

Parameters:

None

Response:

  • batchNumber (integer): The latest verified batch.

Example:

{
  "batchNumber": 10432
}

Other zkEVM Methods

Method
Description

zkevm_getForkById

Fetches details of a specific fork by its ID.

zkevm_getForks

Lists all available forks in the zkEVM environment.

zkevm_getLatestDataStreamBlock

Retrieves the latest block in the data stream.

zkevm_getLatestGlobalExitRoot

Returns the latest exit root for rollup transactions.

zkevm_getRollupAddress

Fetches the rollup contract address.

zkevm_getRollupManagerAddress

Retrieves the address of the rollup manager contract.

zkevm_getVersionHistory

Returns a list of version upgrades and changes.

Notes on Usage

  • State Verification: Some calls return trusted vs. verified results, meaning finality may depend on L1 settlement.

  • Performance Considerations: Calls returning large datasets (e.g., getWitness) may take longer to execute.

  • Gas Considerations: zkevm_estimateCounters helps optimize transaction gas usage in zkEVM environments.

PreviousFAQ CDK ErigonNextFAQ Arbitrum

Last updated 3 months ago

For more details, refer to the Polygon zkEVM API Documentation: .

🛟
Polygon zkEVM Docs