curl --request POST \
--url https://rpc.testnet.tempo.xyz/ \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "txpool_status",
"params": [],
"id": 1
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {
"pending": "<string>",
"queued": "<string>"
}
}curl --request POST \
--url https://rpc.testnet.tempo.xyz/ \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "2.0",
"method": "txpool_status",
"params": [],
"id": 1
}
'{
"jsonrpc": "<string>",
"id": 123,
"result": {
"pending": "<string>",
"queued": "<string>"
}
}noneresult — an object with:
pending — number of pending transactions (hex)queued — number of queued transactions (hex)txpool_status code examplesconst ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);
const getTxpoolStatus = async () => {
const status = await provider.send("txpool_status", []);
console.log(`Pending: ${parseInt(status.pending, 16)}`);
console.log(`Queued: ${parseInt(status.queued, 16)}`);
};
getTxpoolStatus();
Was this page helpful?