txpool_content

Ethereum RPC

Overview

txpool+content is specifically designed to return all pending and queued transactions currently in the transaction pool. It's important to note that this method is supported only on Geth, which is a popular Ethereum client.

Parameters

txpool_content method does not accept any parameters. This means you can call it without needing to provide any additional information to get the current state of the transaction pool.

Returns

The response from the txpool_content method is an array of transaction objects. Each transaction object contains several fields that provide detailed information about the pending transaction:

NameDescription
addressThe address initiating the transaction.
nonceThe nonce of the sending address.
blockHashThe hash of the block where the transaction was included.
blockNumberThe number of the block where the transaction was included.
fromThe address of the sender.
gasThe total amount of gas units used in the transaction.
gasPriceThe price of gas for the transaction.
maxFeePerGasThe maximum fee per gas unit that the sender is willing to pay.
maxPriorityFeePerGasThe maximum priority fee per gas unit that the sender is willing to pay.
hashThe hash of the transaction.
inputThe encoded transaction input data.
toThe address of the recipient.
transactionIndexThe index of the transaction within the block.
valueThe amount of Ether sent with the transaction.
typeThe type of the transaction.
accesslistThe access list for the transaction.
chainIdThe ID of the chain where the transaction is valid.
vThe ECDSA recovery id encoded as a hexadecimal format.
rThe ECDSA signature r.
sThe ECDSA signature s.
yParityAnother value used for transaction signing

Request Example

curl --location 'https://api.tatum.io/v3/blockchain/node/ethereum-mainnet/' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {API_KEY}' \
--data '{
    "method": "txpool_content",
    "params": [],
    "id": 1,
    "jsonrpc": "2.0"
}'
// yarn add @tatumio/tatum

import { TatumSDK, Ethereum, Network } from '@tatumio/tatum'

const tatum = await TatumSDK.init<Ethereum>({ network: Network.ETHEREUM })

const content = await tatum.rpc.txPoolContent()

await tatum.destroy() // Destroy Tatum SDK - needed for stopping background jobs