Skip to content

Solidity API

PropsAccessScheduleInternal

Internal contract for managing stage timings in a Props Access Schedule

This contract provides internal functions for managing and querying stage timings

_upsertStageTimings

solidity
function _upsertStageTimings(string _stage, uint256 _startTime, uint256 _endTime) internal

Upserts (inserts or updates) stage timings

If the stage doesn't exist and timings are non-zero, it adds the stage. If timings are zero and stage exists, it removes the stage.

Parameters

NameTypeDescription
_stagestringThe name of the stage
_startTimeuint256The start time of the stage
_endTimeuint256The end time of the stage

_getStageStartTime

solidity
function _getStageStartTime(string _stage) internal view returns (uint256)

Retrieves the start time of a given stage

Parameters

NameTypeDescription
_stagestringThe name of the stage

Return Values

NameTypeDescription
[0]uint256uint256 The start time of the stage

_getStageEndTime

solidity
function _getStageEndTime(string _stage) internal view returns (uint256)

Retrieves the end time of a given stage

Parameters

NameTypeDescription
_stagestringThe name of the stage

Return Values

NameTypeDescription
[0]uint256uint256 The end time of the stage

_revertStageTiming

solidity
function _revertStageTiming(string stage) internal view

Reverts if the current stage timing is invalid

Checks if the stage timings are set and if the current time is within the stage's time range

Parameters

NameTypeDescription
stagestringThe name of the stage to check

_getAllNonZeroStageTimings

solidity
function _getAllNonZeroStageTimings() internal view returns (string[] stages, uint256[] startTimes, uint256[] endTimes)

Retrieves all non-zero stage timings

Returns arrays of stage names, start times, and end times for all stages with non-zero timings

Return Values

NameTypeDescription
stagesstring[]Array of stage names
startTimesuint256[]Array of start times corresponding to the stages
endTimesuint256[]Array of end times corresponding to the stages

_getActiveStageTimings

solidity
function _getActiveStageTimings() internal view returns (string[] stages, uint256[] startTimes, uint256[] endTimes)

Retrieves all active stage timings

Returns arrays of stage names, start times, and end times for all stages that are currently active

Return Values

NameTypeDescription
stagesstring[]Array of active stage names
startTimesuint256[]Array of start times corresponding to the active stages
endTimesuint256[]Array of end times corresponding to the active stages