#TIL 17 - Call eth_sync

Sep 7, 2021 · Dung Huynh

What

Call Ethereum JSON-RPC methods not directly exposed by ethers.js.

Why

Ethers.js doesn't wrap every RPC method. Some like eth_syncing need raw calls.

How

const provider = new ethers.providers.JsonRpcProvider(RPC_URL);
const syncing = await provider.send("eth_syncing", []);