Comment on page
DrawCalculatorTimelock
The DrawCalculatorTimelock is responsible for pushing Draws to a DrawBuffer and routing claim requests from a PrizeDistributor to a DrawCalculator. The primary objective is to include a "cooldown" period for all new Draws. Allowing the correction of a maliciously set Draw in the unfortunate event an Owner is compromised.
Allows to initialize the contract during the deployment.
Parameters:
Name | Type | Description |
---|---|---|
_owner | address | Address of the DrawCalculator owner. |
Set the
Timelock
struct. Only callable by the contract owner.Parameters:
Name | Type | Description |
---|---|---|
_timelock | Timelock | Timelock struct to set. Includes values: timestamp, drawId. |
Lock passed draw ID for
timelockDuration
seconds. Restricts new draws by forcing a push timelock.Parameters:
Name | Type | Description |
---|---|---|
_drawId | uint32 | Draw ID to lock. |
_timestamp | uint64 | Epoch timestamp to unlock the draw. |
Return:
Name | Type | Description |
---|---|---|
_locked | bool | true if operation was successful. |
Transfers ownership of the contract to a
_pendingOwner
. Can only be called by the current owner.Parameters:
Name | Type | Description |
---|---|---|
_newOwner | address | An account that will become the _pendingOwner . |
Allows the
pendingOwner
address to claim the owner role. This function is only callable by the pendingOwner"
.Leaves the contract without owner. It will not be possible to call the owner's functions anymore. Can only be called by the current owner. The method does not take any parameters. Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
Allows the owner to give the manager role to an address. The manager role has access to the functions with the modified
onlyManager
or onlyManagerOrOwner
.Parameters:
Name | Type | Description |
---|---|---|
_newManager | address | An account that will become the new manager. |
Read internal Timelock struct. Includes values: timestamp, drawId.
Returns bool for
timelockDuration
elapsing.Return:
Name | Type | Description |
---|---|---|
_elapsed | bool | true if timelockDuration , since last time lock has elapsed, false otherwise. |
Owner role that can be granted exclusive access to specific functions with the modifier
onlyOwner
.Manager role that can be granted exclusive access to specific functions with the modifier
onlyManager
or onlyManagerOrOwner
.The address that can claim the owner role. It is used to transfer the owner.
Last modified 6mo ago