Comment on page
The PrizeDistributor contract holds Tickets (captured interest) and distributes tickets to users with winning draw claims. A manager account can indicate the winners that will receive the payment of the prizes.
Allow anyone to cancel a randomness request if the RNG service timed out.
Allows to initialize the contract during the deployment. Initialize PrizeDistributor smart contract.
Pay prizes to winners using current prizes distribution. Only callable by contract manager.
Retrieves an array of random numbers that was requested for a draw and processes it. Only callable by contract manager.
Requests an array of random numbers for a draw according to the current prizes distribution length. Only callable by contract manager.
Set prizes distribution.
Set a DrawBuffer.
Set a PrizeDistributionBuffer.
Transfer ERC20 tokens out of contract to recipient address. Only callable by contract owner.
pendingOwneraddress to claim the owner role. This function is only callable by the
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.
Transfers ownership of the contract to a
_pendingOwner. Can only be called by the current owner.
Allows the owner to give the manager role to an address. The manager role has access to the functions with the modified
Allows to set a RNG service that the PrizeDistributor is connected to. Can only be called by the current owner.
Allows to set an RNG request timeout in seconds. This is the time that must elapse before an RNG request can be canceled. Can only be called by the current owner.
100% with 2 decimal points (i.s. 10000 == 100.00%).
Read global prizes distribution. Returns an array with the split percentages in which the prizes will be distributed.
Read global DrawBuffer address. The DrawBuffer contains information about the draw.
Read global info about the last RNG request (ID, lock block and timestamp).
Read global last unpaid draw ID. It increments when the draw is paid.
Read global prizes distribution length.
Read global PrizeDistributionBuffer address.
Read global RNGServiceChainlinkV2 address.
Read global RNG timeout. Timeout is presented in seconds.
Read global Ticket address.
Returns whether a random numbers request has been completed.
Returns whether a random numbers has been requested.
Returns whether a random numbers request has been timed out.
Owner role that can be granted exclusive access to specific functions with the modifier
Manager role that can be granted exclusive access to specific functions with the modifier
Address that can claim the owner role. It is used to transfer the owner.