Lottery Contract
Contract roles:
injectorAddress (onlyInjector)
Injector is the address used to fund the lottery with periodic injections
operatorAddress (onlyOperator)
The lottery scheduler account used to run regular operations.
treasuryAddress (onlyTreasury)
The address in which the burn is sent
Owner (onlyOwner)
The contract owner
Owner
0xad9d97fc7bf0ac6dc68d478dcb3709454519b358
Address controlled by gnosis multisignature contract with a threshold of 3/6
Operator Address
0x566a7e38b300E903dE71389C2b801AcDBA5268dB
Scheduler address - entirely automated and no human interaction. Not on multisig and doesn't have access to sensitive contract operations.
Treasury Address
0xe2086f890e7bd20e07fc0036a437dc4813e88b09
Address controlled by gnosis multisignature contract with a threshold of 3/6
Injector Address (Currently the same as Owner)
0xaD9d97fc7BF0ac6dC68d478dcB3709454519b358
Address controlled by gnosis multisignature contract with a threshold of 3/6
Functions
injectFunds - Injector and Owner
injectFunds - Injector and OwnerThe Injector or Owner can call this function to inject a specific lotteryId with a specified amount of CAKE.
startLottery - Operator
startLottery - OperatorThe startLottery function is only callable by the Operator in order to start a new lottery round.
closeLottery - Operator
closeLottery - OperatorCallable by the Operator to close a round of the lottery.
drawFinalNumberAndMakeLotteryClaimable - Operator
drawFinalNumberAndMakeLotteryClaimable - OperatorFor Operator to draw the final number using ChainLink VRF function.
recoverWrongTokens - Owner
recoverWrongTokens - OwnerIn the case of tokens other than CAKE mistakenly being sent to the lottery contract, this function is used to recover them and is only callable by the Owner
setMinAndMaxTicketPriceInCake - Owner
setMinAndMaxTicketPriceInCake - OwnerTo prevent the Operator setting the tickets to arbitrary prices during the event of a flash crash/pump.
setMaxNumberTicketsPerBuy - Owner
setMaxNumberTicketsPerBuy - OwnerThe Owner can modify the maximum number of tickets per transaction. This may be modified in the case of BSC block size increasing or decreasing.
setOperatorAndTreasuryAndInjectorAddresses - Owner
setOperatorAndTreasuryAndInjectorAddresses - OwnerFunction used to set the Operator, Treasury, and Injector addresses.
changeRandomGenerator - Owner
changeRandomGenerator - OwnerFor the Owner to update the RandomNumberGenerator contract in case we need to update the drawing logic, or release an update.
Last updated
Was this helpful?