Question · Blockchain and Web3 course · Module 4: ethers.js & viem

Provider Methods

Which provider method lets you read the current block number?

Answer options

  • provider.getCurrentBlock()
  • provider.getBlockNumber()
  • provider.getLatestBlock()
  • provider.blockNumber()

You can check the correct answer by solving this task in the CodeWorlds game.