MaverickV2IncentiveMatcherFactory

Inherits: IMaverickV2IncentiveMatcherFactory

IncentiveMatcherFactory creates IncentiveMatcher contracts that can be used to facilitate voting on incentive directing and external protocol incentive matching for a given veToken.

IncentiveMatcher contracts are deployed with create2 to deterministic addresses can computed prior to deployment.

State Variables

incentiveMatcherParameters

IncentiveMatcherParameters public incentiveMatcherParameters;

incentiveMatcherForVe

This function retrieves the address of the IncentiveMatcher contract associated with the current veToken.

mapping(IMaverickV2VotingEscrow => IMaverickV2IncentiveMatcher) public override incentiveMatcherForVe;

isFactoryIncentiveMatcher

This function checks if the current contract is a factory contract for IncentiveMatchers.

mapping(IMaverickV2IncentiveMatcher => bool) public isFactoryIncentiveMatcher;

_allIncentiveMatcher

IMaverickV2IncentiveMatcher[] private _allIncentiveMatcher;

veFactory

This function retrieves the address of the MaverickV2VotingEscrowFactory contract.

rewardFactory

This function retrieves the address of the MaverickV2RewardFactory contract.

Functions

constructor

createIncentiveMatcher

This function creates a new IncentiveMatcher contract for a given base token. The basetoken is required to have a deployed ve token before incentive matcher can be created. If no ve token exists, this function will revert. A ve token can be created with the ve token factory: veFactory().

Parameters

Name
Type
Description

baseToken

IERC20

The base token for the new IncentiveMatcher.

Returns

Name
Type
Description

veToken

IMaverickV2VotingEscrow

The voting escrow token for the IncentiveMatcher.

incentiveMatcher

IMaverickV2IncentiveMatcher

The address of the newly created IncentiveMatcher contract.

incentiveMatchers

This function retrieves a list of existing IncentiveMatcher contracts.

Parameters

Name
Type
Description

startIndex

uint256

The starting index of the list to retrieve.

endIndex

uint256

The ending index of the list to retrieve.

Returns

Name
Type
Description

returnElements

IMaverickV2IncentiveMatcher[]

An array of IncentiveMatcher contracts within the specified range.

incentiveMatchersLength

This function returns the total number of existing IncentiveMatcher contracts.

incentiveMatcherAddress

This function retrieves the address of the IncentiveMatcher contract associated with a given veToken.

Parameters

Name
Type
Description

veToken

IMaverickV2VotingEscrow

The voting escrow token for which to retrieve the corresponding IncentiveMatcher.

Returns

Name
Type
Description

incentiveMatcher

IMaverickV2IncentiveMatcher

The address of the IncentiveMatcher contract associated with the veToken.

Last updated