LootCreator
Contract handling the Budget for gauges & Quests and the Loot creation. The budget allocated to each Quest for each period is based on the weight of a gauge received through votes on the LootVoteController, and the number of Quest on each gauge. All unallocated budget is pushed back to the pending budget for the next period. The rewards allocated to Quest voters are allocated by this contract (which creates the Loot), based on the Quest allocation, the user voting rewards and the user boosting power. All rewards not allocated to an user for its Loot (by lack of boosting power) are pushed back to the pending budget for the next period. Each period budget is pulled from the LootBudget or the LootGauge.
BASE_MULTIPLIER
Base Multiplier for Loot rewards
MAX_MULTIPLIER
Max Multiplier for Loot rewards
Budget
Budget struct
Allocation
Allocation strcut
CreateVars
Struct use in memory for Loot creation method
loot
Address of the Loot contract
lootVoteController
Address of the Loot Vote Controller contract
holyPower
Address of the HolyPalPower contract
lootGauge
Address of the Loot Gauge or Budget contract
allowedDistributors
Quest Distributors allowed to intract with this contract
distributorsBoards
QuestBoard for each Distributor
distributors
List of listed Quest Distributors
nextBudgetUpdatePeriod
Timestamp of the next Budget update
pendingBudget
Current pending budget to be used during next period
periodBudget
Budgets for each period
allocatedBudgetHistory
History of allocated amounts from the Budget of each period
gaugeBudgetPerPeriod
Budget allocated to a Gauge for each period
isGaugeAllocatedForPeriod
Was the gauge allocated a Budget for each period
totalQuestPeriodRewards
Total Rewards distributed for a period for a Quest
totalQuestPeriodSet
Was the total reward set for a Quest period
userQuestPeriodRewards
User claimed amount for a Quest period
userQuestPeriodCreated
User created Loot for a Quest period
Init
Event emitted when the contract is initialized
NewDistributorListed
Event emitted when a new Distributor is listed
DistributorUnlisted
Event emitted when Distributor is unlisted
GaugeUpdated
Event emitted when the budget Gauge is updated
LootCreated
Event emitted when a Loot is created
getBudgetForPeriod
Returns the global budget for a period
Parameters
Return Values
getGaugeBudgetForPeriod
Returns the gauge budget for a period
Parameters
Return Values
getQuestAllocationForPeriod
Returns the allocation for a Quest for a period
Parameters
Return Values
getListedDistributors
Returns all listed Distributors
Return Values
createLoot
Creates a Loot for a user
Parameters
createMultipleLoot
Creates multiple Loots for a user
Parameters
notifyQuestClaim
Notifies of a Quest claim
Parameters
notifyDistributedQuestPeriod
Notifies of a Quest period distribution
Parameters
notifyAddedRewardsQuestPeriod
Notifies of the amount added to a Quest period via emergency update in Distributors
Parameters
notifyUndistributedRewards
Notifies of undistributed rewards
Parameters
notifyNewBudget
Notifies of new budget
Parameters
updatePeriod
Updates the period
Last updated