Comment on page
DrawCalculator
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 |
---|---|---|
_ticket | address | Address of the ticket. |
_drawBuffer | address | Address of the DrawBuffer. |
_prizeDistributionBuffer | address | Address of the PrizeDistributionBuffer. |
Calculates the picks amount for a user for multiple draws. Typically called by a PrizeDistributor.
Parameters:
Name | Type | Description |
---|---|---|
_user | address | User for which to calculate picks amount. |
_drawIds | uint32[] | drawId array for which to calculate picks amount for. |
Return:
Name | Type | Description |
---|---|---|
_picks | uint256[] | List of number of user picks ordered by drawId. |
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:
Name | Type | Description |
---|---|---|
_user | address | The user's address. |
_drawIds | uint32[] | The _drawIds to consider. |
Return:
Name | Type | Description |
---|---|---|
_balances | uint256[] | Array of balances. |
Read global prizeDistributionBuffer variable.
Read global prizeDistributionBuffer variable.
Address of the Ticket associated with DrawCalculator.
Last modified 6mo ago