BeaconTimelockTrigger

The BeaconTimelockTrigger smart contract passes the information about the current draw to the prizeDistributionFactory for the creation of a prizeDistribution.

Write methods description

initialize()

Allows to initialize the contract during the deployment.

Parameters:

NameTypeDescription

_owner

address

An account that will become a new owner of a contract.

_prizeDistributionFactory

address

PrizeDistributionFactory address.

_timelock

address

DrawCalculatorTimelock address.

push()

Locks next Draw, logs the totalNetworkTicketSupply to PrizeDistributionFactory and triggers the prize distribution push. Restricts new draws for N seconds by forcing time lock on the next target draw ID.

Parameters:

NameTypeDescription

_draw

IDrawBeacon.Draw

Draw including values like: drawId, timestamp, beaconPeriodStartedAt, beaconPeriodSeconds, paid.

_totalNetworkTicketSupply

uint256

Total network ticket supply calculated off chain.

transferOwnership()

Transfers ownership of the contract to a _pendingOwner. Can only be called by the current owner.

Parameters:

NameTypeDescription

_newOwner

address

An account that will become the _pendingOwner.

claimOwnership()

Allows the pendingOwner address to claim the owner role. This function is only callable by the pendingOwner.

renounceOwnership()

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.

setManager()

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:

NameTypeDescription

_newManager

address

An account that will become the new manager.

Read methods description

prizeDistributionFactory()

Address of the PrizeDistributionFactory contract.

timelock()

Address of the DrawCalculatorTimelock contract.

owner()

Wwner role that can be granted exclusive access to specific functions with the modifier onlyOwner.

manager()

Manager role that can be granted exclusive access to specific functions with the modifier onlyManager or onlyManagerOrOwner.

pendingOwner()

The address that can claim the owner role. It is used to transfer the owner.

Last updated