MCPcopy Create free account
hub / github.com/wevm/viem / block

Function block

src/op-stack/utils/getL2BlockNumberAtTimestamp.test.ts:8–14  ·  view source on GitHub ↗
(number: bigint, timestamp: bigint)

Source from the content-addressed store, hash-verified

6import { getL2BlockNumberAtTimestamp } from './getL2BlockNumberAtTimestamp.js'
7
8function block(number: bigint, timestamp: bigint) {
9 return {
10 number: numberToHex(number),
11 timestamp: numberToHex(timestamp),
12 transactions: [],
13 } as unknown as RpcBlock
14}
15
16function client({
17 latest = block(100n, 200n),

Callers 2

clientFunction · 0.70

Calls 1

numberToHexFunction · 0.85

Tested by

no test coverage detected