ParticipationReward
Functions:
Events:
Modifiers:
Graphs:
Function Definitions:
constructor()
isClaimable()
hasClaim()
Parameter Name | Type | Description |
---|---|---|
| bytes32 | Bytes32 |
| address | address of the beneficiary |
getVaultStatus()
Parameter Name | Type | Description |
---|---|---|
| bytes32 | Bytes32 |
getUserVaults()
Parameter Name | Type | Description |
---|---|---|
| address | address |
initializeVault()
There must be enough funds in this contract to support opening another vault
Parameter Name | Type | Description |
---|---|---|
| bytes32 | Name of contract that uses ParticipationRewards in bytes32 |
| bytes32 | Bytes32 |
| uint256 | Unix timestamp in seconds after which a vault can be closed |
openVault()
Vault must be in an initialized state
Parameter Name | Type | Description |
---|---|---|
| bytes32 | the controller contract |
| bytes32 | Vault ID in bytes32 |
addShares()
This will be called by contracts after an account has voted in order to add them to the vault of the specified election.
Parameter Name | Type | Description |
---|---|---|
| bytes32 | the controller contract |
| bytes32 | Bytes32 |
| address | address |
| uint256 | uint256 |
claimReward()
Uses the vaultId at the specified index of userVaults. This function is used when a user only wants to claim a specific vault or if they decide the gas cost of claimRewards are to high for now. (lower cost but also lower reward)
Parameter Name | Type | Description |
---|---|---|
| uint256 | uint256 |
claimRewards()
Uses the vaultIds at the specified indices of userVaults. This function is used when a user only wants to claim multiple vaults at once (probably most of the time) The array of indices is limited to 19 as we want to prevent gas overflow of looping through too many vaults
Parameter Name | Type | Description |
---|---|---|
| uint256[] | uint256[] |
setRewardsBudget()
When opening a vault this contract must have enough POP to fund the rewardBudgets of the new vault Every controller contract has their own rewardsBudget to set indivual rewards per controller contract
Parameter Name | Type | Description |
---|---|---|
| bytes32 | the name of the controller contract in bytes32 |
| uint256 | uint256 reward amount in POP per vault |
addControllerContract()
all critical functions to init/open vaults and add shares to them can only be called by controller contracts
Parameter Name | Type | Description |
---|---|---|
| bytes32 | the name of the controller contract in bytes32 |
| address | the address of the controller contract |
toggleRewards()
all critical functions to init/open vaults and add shares to them can only be called by controller contracts
Parameter Name | Type | Description |
---|---|---|
| bytes32 | the address of the controller contract |
contributeReward()
Sufficient RewardsBalance will be checked when opening a new vault to see if enough POP exist to support the new Vault
Parameter Name | Type | Description |
---|---|---|
| uint256 | uint256 amount in POP to be used for vault rewards |
Events
RewardBudgetChanged
VaultInitialized
VaultOpened
VaultClosed
RewardClaimed
RewardsClaimed
SharesAdded
RewardBalanceIncreased
ControllerContractAdded
RewardsToggled
Modifiers
vaultExists()
vaultExists()
Parameters:
_vaultId
: Bytes32
onlyControllerContract()
onlyControllerContract()
Parameters:
_contractName
: Bytes32
Graphs
Dependency Graph
Inheritance Graph
Last updated