IMaverickV2RewardFactory
Functions
createRewardsContract
This function creates a new MaverickV2Reward contract associated with a specific stake token contract and set of reward and voting escrow tokens.
function createRewardsContract(
IERC20 stakeToken,
IERC20[] memory rewardTokens,
IMaverickV2VotingEscrow[] memory veTokens
) external returns (IMaverickV2Reward rewardsContract);
Parameters
stakeToken
IERC20
Token to be staked in reward contract; e.g. a boosted position contract.
rewardTokens
IERC20[]
An array of IERC20 token addresses representing the available reward tokens.
veTokens
IMaverickV2VotingEscrow[]
An array of IMaverickV2VotingEscrow contract addresses representing the associated veTokens for boosting.
Returns
rewardsContract
IMaverickV2Reward
The newly created IMaverickV2Reward contract.
boostedPositionFactory
This function retrieves the address of the MaverickV2BoostedPositionFactory contract.
function boostedPositionFactory() external returns (IMaverickV2BoostedPositionFactory);
Returns
<none>
IMaverickV2BoostedPositionFactory
factory The address of the IMaverickV2BoostedPositionFactory contract.
votingEscrowFactory
This function retrieves the address of the MaverickV2VotingEscrowFactory contract.
function votingEscrowFactory() external returns (IMaverickV2VotingEscrowFactory);
Returns
<none>
IMaverickV2VotingEscrowFactory
factory The address of the IMaverickV2VotingEscrowFactory contract.
isFactoryContract
This function checks if a provided IMaverickV2Reward contract is a valid contract created by this factory.
function isFactoryContract(IMaverickV2Reward reward) external returns (bool);
Parameters
reward
IMaverickV2Reward
The IMaverickV2Reward contract to check.
Returns
<none>
bool
isFactoryContract True if the contract is a valid factory-created reward contract, False otherwise.
rewardsForStakeToken
This function retrieves a list of all MaverickV2Reward contracts associated with a specific staking token contract within a specified range.
function rewardsForStakeToken(IERC20 stakeToken, uint256 startIndex, uint256 endIndex)
external
view
returns (IMaverickV2Reward[] memory rewardsContract);
Parameters
stakeToken
IERC20
Lookup token.
startIndex
uint256
The starting index of the list to retrieve.
endIndex
uint256
The ending index of the list to retrieve.
Returns
rewardsContract
IMaverickV2Reward[]
An array of IMaverickV2Reward contracts associated with the BoostedPosition within the specified range.
rewards
This function retrieves a list of all MaverickV2Reward contracts within a specified range.
function rewards(uint256 startIndex, uint256 endIndex)
external
view
returns (IMaverickV2Reward[] memory rewardsContract);
Parameters
startIndex
uint256
The starting index of the list to retrieve.
endIndex
uint256
The ending index of the list to retrieve.
Returns
rewardsContract
IMaverickV2Reward[]
An array of IMaverickV2Reward contracts within the specified range.
boostedPositionRewards
This function retrieves a list of all MaverickV2Reward contracts within a specified range that have a staking token that is a boosted position from the maverick boosted position contract.
function boostedPositionRewards(uint256 startIndex, uint256 endIndex)
external
view
returns (IMaverickV2Reward[] memory);
Parameters
startIndex
uint256
The starting index of the list to retrieve.
endIndex
uint256
The ending index of the list to retrieve.
Returns
<none>
IMaverickV2Reward[]
rewardsContract An array of IMaverickV2Reward contracts within the specified range.
nonBoostedPositionRewards
This function retrieves a list of all MaverickV2Reward contracts within a specified range that have a staking token that is not a boosted position from the maverick boosted position contract.
function nonBoostedPositionRewards(uint256 startIndex, uint256 endIndex)
external
view
returns (IMaverickV2Reward[] memory);
Parameters
startIndex
uint256
The starting index of the list to retrieve.
endIndex
uint256
The ending index of the list to retrieve.
Returns
<none>
IMaverickV2Reward[]
rewardsContract An array of IMaverickV2Reward contracts within the specified range.
Errors
RewardFactoryNotFactoryBoostedPosition
error RewardFactoryNotFactoryBoostedPosition();
RewardFactoryTooManyRewardTokens
error RewardFactoryTooManyRewardTokens();
RewardFactoryRewardAndVeLengthsAreNotEqual
error RewardFactoryRewardAndVeLengthsAreNotEqual();
RewardFactoryInvalidVeBaseTokenPair
error RewardFactoryInvalidVeBaseTokenPair();
Last updated