DrawCalculator
Last updated
Last updated
The DrawCalculator calculates the amount of user picks based on the user average weighted balance (during each draw period).
Allows to initialize the contract during the deployment.
Parameters:
Name | Type | Description |
---|---|---|
Calculates the picks amount for a user for multiple draws. Typically called by a PrizeDistributor.
Parameters:
Name | Type | Description |
---|---|---|
Return:
Address of the DrawBuffer connected to the DrawCalculator.
Address of the DrawBuffer connected to the DrawCalculator.
Returns a user's balances expressed as a fraction of the total supply over time.
Parameters:
Return:
Read global prizeDistributionBuffer variable.
Read global prizeDistributionBuffer variable.
Address of the Ticket associated with DrawCalculator.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_ticket
address
Address of the ticket.
_drawBuffer
address
Address of the DrawBuffer.
_prizeDistributionBuffer
address
Address of the PrizeDistributionBuffer.
_user
address
User for which to calculate picks amount.
_drawIds
uint32[]
drawId
array for which to calculate picks amount for.
_picks
uint256[]
List of number of user picks ordered by drawId.
_user
address
The user's address.
_drawIds
uint32[]
The _drawIds
to consider.
_balances
uint256[]
Array of balances.