FluidMerkleDistributorRewards ​
Inherits:FluidMerkleDistributorCore
Functions ​
onlyRewardsDistributor ​
Modifier to check if the sender is a rewards distributor
solidity
modifier onlyRewardsDistributor();
updateDistributionConfig ​
Updates the distribution configuration
solidity
function updateDistributionConfig(
bool pullFromDistributor_,
uint40 blocksPerDistribution_,
uint40 cyclesPerDistribution_
) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
pullFromDistributor_ | bool | - whether to pull rewards from distributor or not |
blocksPerDistribution_ | uint40 | - duration of distribution in blocks |
cyclesPerDistribution_ | uint40 | - number of cycles to distribute rewards, if 0 then means paused |
toggleRewardsDistributor ​
Toggles a rewards distributor
solidity
function toggleRewardsDistributor(address distributor_) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
distributor_ | address | - address of the rewards distributor |
setStartBlockOfNextCycle ​
Sets the start block of the next cycle
solidity
function setStartBlockOfNextCycle(uint40 startBlockOfNextCycle_) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
startBlockOfNextCycle_ | uint40 | The start block of the next cycle |
getCycleRewards ​
Returns the cycle rewards
solidity
function getCycleRewards() external view returns (Reward[] memory);
Returns
Name | Type | Description |
---|---|---|
<none> | Reward[] | rewards_ - rewards |
getCycleReward ​
Returns the cycle reward for a given cycle
solidity
function getCycleReward(uint256 cycle_) external view returns (Reward memory);
Parameters
Name | Type | Description |
---|---|---|
cycle_ | uint256 | - cycle of the reward |
Returns
Name | Type | Description |
---|---|---|
<none> | Reward | reward_ - reward |
totalCycleRewards ​
Returns the total number of cycles
solidity
function totalCycleRewards() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | totalCycles_ - total number of cycles |
totalDistributions ​
Returns the total number of distributions
solidity
function totalDistributions() external view returns (uint256);
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | totalDistributions_ - total number of distributions |
getDistributionForEpoch ​
Returns the distribution for a given epoch
solidity
function getDistributionForEpoch(uint256 epoch_) external view returns (Distribution memory);
Parameters
Name | Type | Description |
---|---|---|
epoch_ | uint256 | - epoch of the distribution |
Returns
Name | Type | Description |
---|---|---|
<none> | Distribution | distribution_ - distribution |
getDistributions ​
Returns all distributions
solidity
function getDistributions() external view returns (Distribution[] memory);
Returns
Name | Type | Description |
---|---|---|
<none> | Distribution[] | distributions_ - all distributions |
distributeRewards ​
Distributes rewards for a given token
solidity
function distributeRewards(uint256 amount_) public onlyRewardsDistributor;
Parameters
Name | Type | Description |
---|---|---|
amount_ | uint256 | - amount of tokens to distribute rewards for |