Parameters
none
Response
result— an object with:pending— number of pending transactions (hex)queued— number of queued transactions (hex)
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?