ERCs
ERC-6372 — Contract Clock
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
| Method | Shape | Purpose |
|---|---|---|
clock() | Callable<Uint48> | Current timepoint (block or timestamp). |
CLOCK_MODE() | Callable<string> | Declaration string. |
See also
- ERC-5805 — the primary consumer.