ERCs

ERC-6372 — Contract Clock

eips.ethereum.org/EIPS/eip-6372

Lets a contract declare whether its time-sensitive logic uses block numbers or unix timestamps. Voting contracts (ERC-5805), vesting schedules, and time-locked governance all consume this.

import { clock, CLOCK_MODE } from "@ethernauta/erc/6372";

const now = await clock()(contract({ ... }));
const mode = await CLOCK_MODE()(contract({ ... }));
// e.g. "mode=blocknumber&from=default" or "mode=timestamp&from=default"

Surface

MethodShapePurpose
clock()Callable<Uint48>Current timepoint (block or timestamp).
CLOCK_MODE()Callable<string>Declaration string.

See also