Marketplace has launched, further enabling blockchain developers! Learn more

Contents

eth_newPendingTransactionFilter RPC method

The eth_newPendingTransactionFilter EVM method is only supported on the Avalanche C-Chain.

Parameters:

  1. None

Returns:

  1. Result - A filter id - to be used when calling eth_getFilterChanges.

Code Examples:

To use the eth_newPendingTransactionFilter EVM method on the Avalanche C-Chain, ensure that the end of your URL includes ext/bc/C/rpc.

const ethers = require("ethers");

(async () => {
  const provider = new ethers.providers.JsonRpcProvider("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/");
  const filterId = await provider.send("eth_newPendingTransactionFilter");
  console.log(filterId);
  const logs = await provider.send("eth_getFilterChanges", [filterId]);
  console.log(logs);
})();
Ready to get started? Create a free account