🚀 We’re excited to announce our $35m Series A led by Tiger Global: Press Release, Coindesk, Bloomberg, Business Insider & RefreshMiami!

Contents

eth_newBlockFilter RPC method

Parameters:

  1. None

Returns:

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

Code Examples:

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_newBlockFilter");
  console.log(filterId);
  const logs = await provider.send("eth_getFilterChanges", [filterId]);
  console.log(logs);
})();
Ready to try QuickNode? Start your 7-day free trial