PureEpochs

Git Source

Author: M^0 Labs

Defines epochs as periods away from STARTING_TIMESTAMP timestamp.

Provides a uint16 epoch clock value.

State Variables

STARTING_TIMESTAMP

The timestamp of the start of Epoch 1.

uint40 internal constant STARTING_TIMESTAMP = 1_663_224_162;

EPOCH_PERIOD

The approximate target of seconds an epoch should endure.

uint40 internal constant EPOCH_PERIOD = 15 days;

Functions

currentEpoch

Returns the current epoch number.

function currentEpoch() internal view returns (uint16);

timeRemainingInCurrentEpoch

Returns the remaining time in the current epoch.

function timeRemainingInCurrentEpoch() internal view returns (uint40);

clockMode

function clockMode() internal pure returns (string memory);

Copyright 2024 M^0 Foundation