R5 Network
WebsiteR5 LabsGitHub
  • Getting Started
    • Hello & Welcome!
  • About R5
    • Overview
    • R5 Components
    • Consensus Mechanism
    • zkNet (Privacy)
  • R5 Coin
  • R5 Tokenomics
  • Tutorials & Guides
    • Connect & Use R5
      • R5 Desktop Wallet
      • MetaMask
      • Rabby Wallet
      • Coinbase Wallet
    • zkNet Web Wallet
    • R5 Desktop Wallet
      • Interface Overview
      • Send a Transaction
      • Receive a Transaction
      • Backup Your Wallet
      • Retrieve Your Private Key
    • How To: Deploy a Node
    • How To: Mine R5
    • How To: GPU Mine R5
    • How To: Build R5 From Source
    • How To: Connect Local Nodes
  • For Developers
    • R5 SDK
      • R5 Relayer
      • R5 Console
      • JS Console
      • CLI Wallet
      • SCdev
      • SSL Proxy
    • Hardware Requirements
    • R5 Testnet
    • R5 Devnet
    • Local Networks
    • JSON-RPC API
      • admin
      • debug
      • ethash
      • miner
      • net
      • r5 (eth)
      • rpc
      • txpool
      • web3
    • Indexer API
    • zkNet API
    • Node Configuration
    • Ethash-R5
    • Smart Contracts
    • Wrapped R5 (Native)
    • Tokens & NFTs
  • Bug Bounty Program
  • Resources
    • Website
    • R5 Labs
    • R5 Labs GitHub
Powered by GitBook
On this page
  • txpool_content
  • txpool_inspect
  • txpool_status
  • txpool_contentFrom
  • txpool_getContent
  • txpool_getInspect
  • txpool_getStatus
  1. For Developers
  2. JSON-RPC API

txpool

The txpool namespace provides RPC endpoints for inspecting and managing the node's transaction pool. These endpoints enable you to view pending and queued transactions, as well as check the current status of the transaction pool, ensuring you have full visibility into the transaction processing state.


txpool_content

Description: Returns a detailed object containing all transactions in the pool, separated into two categories: "pending" (transactions that are ready to be included in a block) and "queued" (transactions waiting for a nonce gap to be filled).

Sample Request:

{
  "jsonrpc": "2.0",
  "method": "txpool_content",
  "params": [],
  "id": 1
}

Expected Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "pending": {
      "0xabc123...": {
        "0": {
          "hash": "0xdeadbeef...",
          "from": "0x1234567890abcdef1234567890abcdef12345678",
          "to": "0xabcdef1234567890abcdef1234567890abcdef12",
          "value": "0xde0b6b3a7640000",
          "nonce": "0x0"
        }
      }
    },
    "queued": {
      "0xabc123...": {
        "1": {
          "hash": "0xbeefdead...",
          "from": "0x1234567890abcdef1234567890abcdef12345678",
          "to": "0xabcdef1234567890abcdef1234567890abcdef12",
          "value": "0x29a2241af62c0000",
          "nonce": "0x1"
        }
      }
    }
  }
}

Parameters: None.


txpool_inspect

Description: Returns a human‑readable summary of the transaction pool, listing transactions under both "pending" and "queued" categories in a concise format.

Sample Request:

{
  "jsonrpc": "2.0",
  "method": "txpool_inspect",
  "params": [],
  "id": 1
}

Expected Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "pending": {
      "0xabc123...": {
        "0": "0xdeadbeef... (from: 0x1234567890abcdef1234567890abcdef12345678, to: 0xabcdef1234567890abcdef1234567890abcdef12, value: 1 ETH)"
      }
    },
    "queued": {
      "0xabc123...": {
        "1": "0xbeefdead... (from: 0x1234567890abcdef1234567890abcdef12345678, to: 0xabcdef1234567890abcdef1234567890abcdef12, value: 2.7 ETH)"
      }
    }
  }
}

Parameters: None.


txpool_status

Description: Returns a quick overview of the transaction pool, including the total count of pending and queued transactions.

Sample Request:

{
  "jsonrpc": "2.0",
  "method": "txpool_status",
  "params": [],
  "id": 1
}

Expected Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "pending": "0x0",
    "queued": "0x0"
  }
}

Parameters: None.


txpool_contentFrom

Description: Returns a filtered view of the transaction pool content, limited to transactions associated with a specific account or criteria.

Sample Request:

{
  "jsonrpc": "2.0",
  "method": "txpool_contentFrom",
  "params": ["0x1234567890abcdef1234567890abcdef12345678"],
  "id": 1
}

Expected Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "pending": {
      "0xabc123...": {
        "0": {
          "hash": "0xdeadbeef...",
          "from": "0x1234567890abcdef1234567890abcdef12345678",
          "to": "0xabcdef1234567890abcdef1234567890abcdef12",
          "value": "0xde0b6b3a7640000",
          "nonce": "0x0"
        }
      }
    },
    "queued": {}
  }
}

Parameters:

  • filterKey (string): The account address or key to filter transactions by.


txpool_getContent

Description: Retrieves the full content of the transaction pool (pending and queued transactions). This endpoint is equivalent to txpool_content.

Sample Request:

{
  "jsonrpc": "2.0",
  "method": "txpool_getContent",
  "params": [],
  "id": 1
}

Expected Response: Same as txpool_content.

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "pending": { /* detailed pending transactions */ },
    "queued": { /* detailed queued transactions */ }
  }
}

Parameters: None.


txpool_getInspect

Description: Retrieves the human‑readable inspection view of the transaction pool. This endpoint is equivalent to txpool_inspect.

Sample Request:

{
  "jsonrpc": "2.0",
  "method": "txpool_getInspect",
  "params": [],
  "id": 1
}

Expected Response: Same as txpool_inspect.

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "pending": { /* human‑readable summary of pending transactions */ },
    "queued": { /* human‑readable summary of queued transactions */ }
  }
}

Parameters: None.


txpool_getStatus

Description: Retrieves the status of the transaction pool, including the count of pending and queued transactions. This endpoint is equivalent to txpool_status.

Sample Request:

{
  "jsonrpc": "2.0",
  "method": "txpool_getStatus",
  "params": [],
  "id": 1
}

Expected Response: Same as txpool_status.

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "pending": "0x0",
    "queued": "0x0"
  }
}

Parameters: None.

PreviousrpcNextweb3

Last updated 2 months ago