Appearance
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) internalUpserts (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
| Name | Type | Description |
|---|---|---|
| _stage | string | The name of the stage |
| _startTime | uint256 | The start time of the stage |
| _endTime | uint256 | The end time of the stage |
_getStageStartTime
solidity
function _getStageStartTime(string _stage) internal view returns (uint256)Retrieves the start time of a given stage
Parameters
| Name | Type | Description |
|---|---|---|
| _stage | string | The name of the stage |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | uint256 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
| Name | Type | Description |
|---|---|---|
| _stage | string | The name of the stage |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint256 | uint256 The end time of the stage |
_revertStageTiming
solidity
function _revertStageTiming(string stage) internal viewReverts 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
| Name | Type | Description |
|---|---|---|
| stage | string | The 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
| Name | Type | Description |
|---|---|---|
| stages | string[] | Array of stage names |
| startTimes | uint256[] | Array of start times corresponding to the stages |
| endTimes | uint256[] | 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
| Name | Type | Description |
|---|---|---|
| stages | string[] | Array of active stage names |
| startTimes | uint256[] | Array of start times corresponding to the active stages |
| endTimes | uint256[] | Array of end times corresponding to the active stages |