Status
states, Pending
, Open
, Close
, and Claimable
, that determine which actions can and cannot be taken at a given time.9
.startTime
endTime
priceTicketInWtn
discountDivisor
rewardsBreakdown
treasuryFee
wtnPerBracket
countWinnersPerBracket
firstTicketId
firstTicketIdNextLottery
amountCollectedInWtn
finalNumber
randomResult
obtained from the number generator contract (RandomNumberGenerator.sol) using Chainlink VRF.ticketIds
array of tickets defined by their ticketId
.lotteryId
, ticketId
, and bracket
. Filling and querying will provide a link to detailed price information on BscScan.lotteryId
ticketId
bracket
ticketId
to verify the claim and calculate rewards.lotteryTicketIds
, ticketNumbers
, and ticketStatuses
of a user for a given Lottery (defined by lotteryID
).user
lotteryId
cursor
size
lotteryId
, ticketId
, and bracket
.lotteryId
ticketId
bracket
ticketId
to verify the claim and calculate rewards.discountDivisor
priceTickets
numberTickets
Open
Lottery round (between 1 and 100 per purchase). Calculates the price per ticket using calculateTotalPriceForBulkTickets
.lotteryId
ticketNumbers
Claimable
Lottery round. Checks lotteryId
to determine if round is claimable, ownership of ticketId
, eligibility of ticket (ticketId
falls between firstTicketId
and firstTicketIdNextLottery
), and whether ticketId
falls within eligible prize bracket
(between 0 and 5).lotteryId
ticketIds
ticketId
s.brackets
Open
Lottery to Close
state. Emits LotteryClose
event.lotteryId
Close
state. Draws the final Lottery number for results from randomResult
, calculates the rewards for brackets after accounting for treasury fee, makes Lottery state Claimable
, and transfers treasury fee to treasury address.lotteryId
autoInjection
Claimable
.randomGeneratorAddress
Open
.lotteryId
amount
Open
state. Status must be Claimable
.endTime
priceTicketInWtn
discountDivisor
rewardsBreakdown
trasuryFee
tokenAddress
tokenAmount
minPriceTicketInWtn
maxPriceTicketInWtn
maxNumberTicketsPerBuy
operatorAddress
treasuryAddress
injectorAddress
firstTicketIdNextLottery
is determined by currentTicketId
.firstTicketId
is set from currentTicketId
,setOperatorAndTreasuryAndInjectorAddresses
go to setOperatorAndTreasuryAndInjectorAddresses