Library to compute rounds and phases for an equal length commit-reveal voting cycle.

init(struct VoteTiming.Data data, uint256 phaseLength) internal

Initializes the data object. Sets the phase length based on the input.

computeCurrentRoundId(struct VoteTiming.Data data, uint256 currentTime) → uint256 roundId internal

Computes the roundID based off the current time as floor(timestamp/phaseLength).

computeCurrentPhase(struct VoteTiming.Data data, uint256 currentTime) → enum VoteTiming.Phase internal

Computes the current phase based only on the current time.

© UMA Project 2018-2019