Skip to main content
Tempo API method that returns the sync status of the node. Returns false if the node is fully synced, or a sync status object if syncing.

Parameters

  • none

Response

  • resultfalse if not syncing, or a sync status object:
    • startingBlock — block at which sync started
    • currentBlock — current block being synced
    • highestBlock — estimated highest block

eth_syncing code examples

const Web3 = require("web3");
const NODE_URL = "CHAINSTACK_NODE_URL";
const web3 = new Web3(NODE_URL);

async function checkSyncStatus() {
  const syncing = await web3.eth.isSyncing();
  if (syncing === false) {
    console.log("Node is fully synced");
  } else {
    console.log(`Syncing: ${syncing.currentBlock}/${syncing.highestBlock}`);
  }
}

checkSyncStatus()