Skip to content

Solidity API

IPropsAccessSchedule

Interface for managing access schedules for different stages in a minting process

This interface provides functions to manage and query stage timings

StageTimingChanged

solidity
event StageTimingChanged(string stage, uint256 startTime, uint256 endTime)

Event emitted when a stage timing is changed

Parameters

NameTypeDescription
stagestringThe name of the stage that was modified
startTimeuint256The new start time for the stage (in Unix timestamp)
endTimeuint256The new end time for the stage (in Unix timestamp)

upsertStageTimings

solidity
function upsertStageTimings(string _stage, uint256 _startTime, uint256 _endTime) external

Upserts (inserts or updates) the timing for a specific stage

If the stage doesn't exist, it will be created. If it exists, its timing will be updated.

Parameters

NameTypeDescription
_stagestringThe name of the stage to upsert
_startTimeuint256The start time for the stage (in Unix timestamp)
_endTimeuint256The end time for the stage (in Unix timestamp)

revertStageTiming

solidity
function revertStageTiming(string _stage) external view

Reverts the timing for a specific stage

This function should revert the stage timing to a previous state or remove it

Parameters

NameTypeDescription
_stagestringThe name of the stage to revert

removeStageTiming

solidity
function removeStageTiming(string _stage) external

Removes the timing for a specific stage by setting start and end times to 0

This effectively disables the stage without removing it from storage

Parameters

NameTypeDescription
_stagestringThe name of the stage to remove

getAllNonZeroStageTimings

solidity
function getAllNonZeroStageTimings() external view returns (string[] stages, uint256[] startTimes, uint256[] endTimes)

Retrieves all non-zero stage timings

This function returns all stages that have been set and not removed

Return Values

NameTypeDescription
stagesstring[]Array of stage names
startTimesuint256[]Array of start times corresponding to the stages (in Unix timestamp)
endTimesuint256[]Array of end times corresponding to the stages (in Unix timestamp)

getActiveStageTimings

solidity
function getActiveStageTimings() external view returns (string[] stages, uint256[] startTimes, uint256[] endTimes)

Retrieves all currently active stage timings

An active stage is one where the current time is between its start and end time

Return Values

NameTypeDescription
stagesstring[]Array of active stage names
startTimesuint256[]Array of start times corresponding to the active stages (in Unix timestamp)
endTimesuint256[]Array of end times corresponding to the active stages (in Unix timestamp)