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

Contents

eth_syncing RPC method

Parameters:

  1. None

Returns:

  1. Result - Boolean (false) when not syncing or a JSON Object when syncing:

    startingBlock - The block at which the import started encoded as a hexadecimal.

    currentBlock - The current block, same as eth_blockNumber encoded as a hexadecimal.

    highestBlock - The estimated highest block encoded as a hexadecimal.

Code Examples:

const ethers = require("ethers");
(async () => {
  const provider = new ethers.providers.JsonRpcProvider("http://sample-endpoint-name.network.quiknode.pro/token-goes-here/");
  const isSyncing = await provider.send("eth_syncing");
  console.log(isSyncing);
})();
Ready to try QuickNode? Start your 7-day free trial