Skip to main content

EpochCapture

Git Source

EpochCapture

A middleware extension that captures timestamps based on epochs

Epochs are fixed time periods starting from a base timestamp

Methods

getEpochStart

function getEpochStart(
uint48 epoch
) public view returns (uint48)

Returns the start timestamp for a given epoch

Parameters

NameTypeDescription
epochuint48The epoch number

Returns

NameTypeDescription
uint48The start timestamp

getCurrentEpoch

function getCurrentEpoch() public view returns (uint48) 

Returns the current epoch number

Returns

NameTypeDescription
uint48The current epoch

getEpochDuration

function getEpochDuration() public view returns (uint48) 

Returns the duration of each epoch

Returns

NameTypeDescription
uint48The duration of each epoch