mirror of
https://github.com/hanzoai/viem.git
synced 2026-10-30 19:36:39 +00:00
12 lines
259 B
TypeScript
12 lines
259 B
TypeScript
import { createPublicClient, http } from 'viem'
|
|
import { mainnet } from 'viem/chains'
|
|
|
|
const client = createPublicClient({
|
|
chain: mainnet,
|
|
transport: http(),
|
|
})
|
|
|
|
const blockNumber = client.getBlockNumber()
|
|
|
|
export default [`Block number: ${blockNumber}`]
|