pyk / milapy

Simple Python 3 interface designed for Ethereum and various EVM-based chains

Home Page:https://milapy.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: implement get_block_number

pyk opened this issue · comments

commented

Viem https://viem.sh/docs/actions/public/getBlockNumber.html

const block = await publicClient.getBlockNumber({
  cacheTime: 4_000 
})

web3.py https://web3py.readthedocs.io/en/stable/examples.html#getting-the-latest-block

web3.eth.get_block('latest')

ethers https://docs.ethers.org/v5/api/providers/provider/#Provider-getBlockNumber

await provider.getBlockNumber()