repeat it again and again until no one win 6 digit^^^
Let's what is going on?
Starting a lottery is by OperatorAdress via startLottery(uint256 _endTime, uint256 _priceTicketInCake, uint256 _discountDivisor, uint256[6] _rewardsBreakdown, uint256 _treasuryFee)
https://bscscan.com/tx/0xeb3331dc29d9b2ff05ce688c248d4517893750b85ef66f047dcc2bb007190553
We set endTime, price ticket, discound x, fee and started lottery
Then operator address calls closeLottery(uint256 _lotteryId) to stop buying tickets, then call drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId, bool _autoInjection).
When operators calls this, its closing the lottery round and calls to chainlink (https://bscscan.com/address/0x747973a5a2a4ae1d3a8fdf5479f1514f65db9c31) with RandomnessRequest (Proof is here, events: https://bscscan.com/tx/0x4bda6e4ac1e9b367f4bdd64a38816d137fb819a59d8ee27bbd65bb35a40d46dc#eventlog)
It's giving a hash to generate winner numbers
And this function checks is still open round, so no way to close 2 time and call 2 time chainlink. One txn stops and decides who win.
Then operator address calling drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId, bool _autoInjection), to generate winning numbers with hash generated by chainlink, and enabling claim.
End of story.
It's waits 5 minute to 'hash' txn confirms at blockchain 100 block, it's for security.
It's can't call 2 time close
Operator address is a (not sure) AWS bot by PCS bunnies, it's address can't rekt CAKEs in contract, it can start stop draw.
@wonderfulJack
Thank you very much
Обсуждают сегодня