For AI agents: a documentation index is available at /llms.txt. Markdown versions of pages are available by appending .md to any documentation URL.
Skip to main content

TXPOOL methods

The TXPOOL API methods allow you to inspect the contents of the transaction pool.

note

The TXPOOL API is not enabled by default for JSON-RPC. Enable it using the --rpc-http-api or --rpc-ws-api option.

txpool_besuPendingTransactions

Lists pending transactions that match the supplied filter conditions.

Parameters

  • numResults: number - Integer representing the maximum number of results to return.

  • fields: object - Object of fields used to create the filter condition.

    Each field in the object corresponds to a field name containing an operator, and a value for the operator. A field name can only be specified once, and can only contain one operator. For example, you cannot query transactions with a gas price between 8 and 9 Gwei by using both the gt and lt operator in the same field name instance.

    All filters must be satisfied for a transaction to be returned.

    note

    The available operators are eq (equal to), lt (less than), gt (greater than), and action. The only supported action is "contract_creation".

    • from: data, 20 bytes - Address of the sender. Supported operator: eq.

    • to: data, 20 bytes - Address of the receiver, or "contract_creation". Supported operators: eq, action.

    • gas: quantity - Gas provided by the sender. Supported operators: eq, gt, lt.

    • gasPrice: quantity - Gas price, in wei, provided by the sender. Supported operators: eq, gt, lt.

    • value: quantity - Value transferred, in wei. Supported operators: eq, gt, lt.

    • nonce: quantity - Number of transactions made by the sender. Supported operators: eq, gt, lt.

Returns

  • List of objects with details of the pending transaction.

    • accessList: array - (Optional) List of addresses and storage keys the transaction plans to access. Used in ACCESS_LIST transactions and may be used in EIP1559 transactions.

    • from: data, 20 bytes - Address of the sender.

    • gas: quantity - Gas provided by the sender.

    • gasPrice: quantity - (Optional) Gas price, in wei, provided by the sender. Not used only in EIP1559 transactions.

    • maxPriorityFeePerGas: quantity, integer - (Optional) Maximum fee, in wei, the sender is willing to pay per gas above the base fee. Used only in EIP1559 transactions.

    • maxFeePerGas: quantity, integer - (Optional) Maximum total fee (base fee + priority fee), in wei, the sender is willing to pay per gas. Used only in EIP1559 transactions.

    • hash: data, 32 bytes - Hash of the transaction.

    • input: data - Data sent with the transaction to create or invoke a contract.

    • nonce: quantity - Number of transactions made by the sender before this one.

    • to: data, 20 bytes - Address of the receiver. null if a contract creation transaction.

    • transactionType: string - Transaction type.

    • value: quantity - Value transferred, in wei.

    • v: quantity - ECDSA Recovery ID.

    • r: data, 32 bytes - ECDSA signature r.

    • s: data, 32 bytes - ECDSA signature s.

Example

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "txpool_besuPendingTransactions",
"params": [
2,
{
"from": {
"eq": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"
},
"gas": {
"lt": "0x5209"
},
"nonce": {
"gt": "0x1"
}
}
],
"id": 1
}'

txpool_besuStatistics

Lists statistics about the node transaction pool.

Parameters

  • None

Returns

  • Transaction pool statistics object.

    • maxSize: number - Maximum number of transactions kept in the transaction pool; use the --tx-pool-max-size option to configure the maximum size.

    • localCount: number - Number of transactions submitted directly to this node.

    • remoteCount: number - Number of transactions received from remote nodes.

Example

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "txpool_besuStatistics",
"params": [],
"id": 1
}'

txpool_besuTransactions

Lists transactions in the node transaction pool.

Parameters

  • None

Returns

  • List of transactions.

Example

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "txpool_besuTransactions",
"params": [],
"id": 1
}'

txpool_content

Returns all pending and queued transactions in the pool, grouped by sender address and sorted by nonce.

Parameters

  • None

Returns

  • Transaction pool content object.

    • pending: object - Map of sender addresses to maps of nonces to transaction objects, for transactions pending inclusion in the next block.

      • accessList: array - (Optional) List of addresses and storage keys the transaction plans to access. Used in ACCESS_LIST transactions and may be used in EIP1559 transactions.

      • blockHash: data, 32 bytes - Hash of the block containing this transaction. null when transaction is pending.

      • blockNumber: quantity - Block number of the block containing this transaction. null when transaction is pending.

      • blockTimestamp: quantity - Hex-encoded Unix timestamp (in seconds) of the block containing this transaction. null when transaction is pending.

      • chainId: quantity - Chain ID.

      • from: data, 20 bytes - Address of the sender.

      • gas: quantity - Gas provided by the sender.

      • gasPrice: quantity - (Optional) Gas price, in Wei, provided by the sender. Used only in non-EIP1559 transactions.

      • maxPriorityFeePerGas: quantity, integer - (Optional) Maximum fee, in Wei, the sender is willing to pay per gas above the base fee. Used only in EIP1559 transactions.

      • maxFeePerGas: quantity, integer - (Optional) Maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. Used only in EIP1559 transactions.

      • hash: data, 32 bytes - Hash of the transaction.

      • input: data - Data sent with the transaction to create or invoke a contract.

      • nonce: quantity - Number of transactions made by the sender before this one.

      • to: data, 20 bytes - Address of the receiver. null if a contract creation transaction.

      • transactionIndex: quantity, integer - Index position of the transaction in the block. null when transaction is pending.

      • transactionType: string - Transaction type.

      • value: quantity - Value transferred, in Wei.

      • v: quantity - ECDSA Recovery ID.

      • r: data, 32 bytes - ECDSA signature r.

      • s: data, 32 bytes - ECDSA signature s.

    • queued: object - Map of sender addresses to maps of nonces to transaction objects, for transactions scheduled for future execution.

      • accessList: array - (Optional) List of addresses and storage keys the transaction plans to access. Used in ACCESS_LIST transactions and may be used in EIP1559 transactions.

      • blockHash: data, 32 bytes - Hash of the block containing this transaction. null when transaction is pending.

      • blockNumber: quantity - Block number of the block containing this transaction. null when transaction is pending.

      • blockTimestamp: quantity - Hex-encoded Unix timestamp (in seconds) of the block containing this transaction. null when transaction is pending.

      • chainId: quantity - Chain ID.

      • from: data, 20 bytes - Address of the sender.

      • gas: quantity - Gas provided by the sender.

      • gasPrice: quantity - (Optional) Gas price, in Wei, provided by the sender. Used only in non-EIP1559 transactions.

      • maxPriorityFeePerGas: quantity, integer - (Optional) Maximum fee, in Wei, the sender is willing to pay per gas above the base fee. Used only in EIP1559 transactions.

      • maxFeePerGas: quantity, integer - (Optional) Maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. Used only in EIP1559 transactions.

      • hash: data, 32 bytes - Hash of the transaction.

      • input: data - Data sent with the transaction to create or invoke a contract.

      • nonce: quantity - Number of transactions made by the sender before this one.

      • to: data, 20 bytes - Address of the receiver. null if a contract creation transaction.

      • transactionIndex: quantity, integer - Index position of the transaction in the block. null when transaction is pending.

      • transactionType: string - Transaction type.

      • value: quantity - Value transferred, in Wei.

      • v: quantity - ECDSA Recovery ID.

      • r: data, 32 bytes - ECDSA signature r.

      • s: data, 32 bytes - ECDSA signature s.

Example

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "txpool_content",
"params": [],
"id": 1
}'

txpool_contentFrom

Returns the pending and queued transactions for a given sender address.

Parameters

  • address: string - Sender address.

Returns

  • Transaction pool content for the given address.

    • pending: object - Map of nonces to transaction objects, for pending transactions from the given address.

      • accessList: array - (Optional) List of addresses and storage keys the transaction plans to access. Used in ACCESS_LIST transactions and may be used in EIP1559 transactions.

      • blockHash: data, 32 bytes - Hash of the block containing this transaction. null when transaction is pending.

      • blockNumber: quantity - Block number of the block containing this transaction. null when transaction is pending.

      • blockTimestamp: quantity - Hex-encoded Unix timestamp (in seconds) of the block containing this transaction. null when transaction is pending.

      • chainId: quantity - Chain ID.

      • from: data, 20 bytes - Address of the sender.

      • gas: quantity - Gas provided by the sender.

      • gasPrice: quantity - (Optional) Gas price, in Wei, provided by the sender. Used only in non-EIP1559 transactions.

      • maxPriorityFeePerGas: quantity, integer - (Optional) Maximum fee, in Wei, the sender is willing to pay per gas above the base fee. Used only in EIP1559 transactions.

      • maxFeePerGas: quantity, integer - (Optional) Maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. Used only in EIP1559 transactions.

      • hash: data, 32 bytes - Hash of the transaction.

      • input: data - Data sent with the transaction to create or invoke a contract.

      • nonce: quantity - Number of transactions made by the sender before this one.

      • to: data, 20 bytes - Address of the receiver. null if a contract creation transaction.

      • transactionIndex: quantity, integer - Index position of the transaction in the block. null when transaction is pending.

      • transactionType: string - Transaction type.

      • value: quantity - Value transferred, in Wei.

      • v: quantity - ECDSA Recovery ID.

      • r: data, 32 bytes - ECDSA signature r.

      • s: data, 32 bytes - ECDSA signature s.

    • queued: object - Map of nonces to transaction objects for queued transactions from the given address.

      • accessList: array - (Optional) List of addresses and storage keys the transaction plans to access. Used in ACCESS_LIST transactions and may be used in EIP1559 transactions.

      • blockHash: data, 32 bytes - Hash of the block containing this transaction. null when transaction is pending.

      • blockNumber: quantity - Block number of the block containing this transaction. null when transaction is pending.

      • blockTimestamp: quantity - Hex-encoded Unix timestamp (in seconds) of the block containing this transaction. null when transaction is pending.

      • chainId: quantity - Chain ID.

      • from: data, 20 bytes - Address of the sender.

      • gas: quantity - Gas provided by the sender.

      • gasPrice: quantity - (Optional) Gas price, in Wei, provided by the sender. Used only in non-EIP1559 transactions.

      • maxPriorityFeePerGas: quantity, integer - (Optional) Maximum fee, in Wei, the sender is willing to pay per gas above the base fee. Used only in EIP1559 transactions.

      • maxFeePerGas: quantity, integer - (Optional) Maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. Used only in EIP1559 transactions.

      • hash: data, 32 bytes - Hash of the transaction.

      • input: data - Data sent with the transaction to create or invoke a contract.

      • nonce: quantity - Number of transactions made by the sender before this one.

      • to: data, 20 bytes - Address of the receiver. null if a contract creation transaction.

      • transactionIndex: quantity, integer - Index position of the transaction in the block. null when transaction is pending.

      • transactionType: string - Transaction type.

      • value: quantity - Value transferred, in Wei.

      • v: quantity - ECDSA Recovery ID.

      • r: data, 32 bytes - ECDSA signature r.

      • s: data, 32 bytes - ECDSA signature s.

Example

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "txpool_contentFrom",
"params": [
"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"
],
"id": 1
}'

txpool_inspect

Returns a textual summary of all pending and queued transactions in the pool, grouped by sender address and sorted by nonce.

The summary is free form, implementation-dependent, and meant to be consumed by humans. For programmatic access to the transaction pool, use txpool_content.

Parameters

  • None

Returns

  • Transaction pool inspect object.

    • pending: object - Map of sender addresses to maps of nonces to human-readable transaction summary strings, for transactions pending inclusion in the next block.

    • queued: object - Map of sender addresses to maps of nonces to human-readable transaction summary strings, for transactions scheduled for future execution.

Example

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "txpool_inspect",
"params": [],
"id": 1
}'

txpool_status

Returns the number of pending and queued transactions in the pool.

Parameters

  • None

Returns

  • Transaction count details.

    • pending: string - Count of the transactions currently pending for inclusion in the next block or blocks.

    • queued: string - Count of the transactions that are scheduled for future execution (transactions with nonce gaps).

Example

curl -X POST http://127.0.0.1:8545/ \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"method": "txpool_status",
"params": [],
"id": 1
}'