MultiMerkleDistributorV2
questRewardToken
Mapping listing the reward token associated to each Quest ID
rewardTokens
Mapping of tokens this contract is or was distributing
questClosedPeriods
List of Closed QuestPeriods by Quest ID
questMerkleRootPerPeriod
Merkle Root for each period of a Quest (indexed by Quest ID)
questRewardsPerPeriod
Amount of rewards for each period of a Quest (indexed by Quest ID)
questBoard
Address of the QuestBoard contract
lootCreator
Address of the Loot Creator contract
Claimed
Event emitted when a user Claims
NewQuest
Event emitted when a New Quest is added
QuestPeriodUpdated
Event emitted when a Period of a Quest is updated (when the Merkle Root is added)
LootCreatorUpdated
Event emitted when the Loot Creator address is updated
isClaimed
Checks if the rewards were claimed for a user on a given period
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
period | uint256 | Amount of underlying to borrow |
index | uint256 | Index of the claim |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | bool : true if already claimed |
claim
Claims the reward for a user for a given period of a Quest
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
period | uint256 | Timestamp of the period |
index | uint256 | Index in the Merkle Tree |
account | address | Address of the user claiming the rewards |
amount | uint256 | Amount of rewards to claim |
merkleProof | bytes32[] | Proof to claim the rewards |
ClaimParams
multiClaim
Claims multiple rewards for a given list
Parameters
Name | Type | Description |
---|---|---|
account | address | Address of the user claiming the rewards |
claims | struct MultiMerkleDistributorV2.ClaimParams[] | List of ClaimParams struct data to claim |
claimQuest
Claims the reward for all the given periods of a Quest, and transfer all the rewards at once
Parameters
Name | Type | Description |
---|---|---|
account | address | Address of the user claiming the rewards |
questID | uint256 | ID of the Quest |
claims | struct MultiMerkleDistributorV2.ClaimParams[] | List of ClaimParams struct data to claim |
getClosedPeriodsByQuests
Returns all current Closed periods for the given Quest ID
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256[] | uint256[] : List of closed periods |
addQuest
Adds a new Quest to the listing
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
token | address | Address of the ERC20 reward token |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | bool : success |
addQuestPeriod
Adds a new period & the rewards of this period for a Quest
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
period | uint256 | Timestamp of the period |
totalRewardAmount | uint256 | Total amount of rewards to distribute for the period |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | bool : success |
fixQuestPeriod
updateQuestPeriod
Updates the period of a Quest by adding the Merkle Root
Parameters
Name | Type | Description |
---|---|---|
questID | uint256 | ID of the Quest |
period | uint256 | timestamp of the period |
totalAmount | uint256 | sum of all rewards for the Merkle Tree |
merkleRoot | bytes32 | MerkleRoot to add |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | bool: success |
Last updated