Skip to main content
Plasma API method that returns the number of the most recent block.

Parameters

None

Response

  • quantity — the current block number the client is on

eth_blockNumber code examples

const { JsonRpcProvider } = require("ethers");

const provider = new JsonRpcProvider("CHAINSTACK_NODE_URL");

async function call() {
  const result = await provider.send("eth_blockNumber", []);
  console.log(result);
}

call();