IMaverickV2VotingEscrowFactory
Functions
legacyVeMav
This function retrieves the address of the legacy Maverick V1 Voting Escrow (veMAV) token. The address will be zero for blockchains where this contract is deployed that do not have a legacy MAV contract deployed.
Returns
Name | Type | Description |
---|---|---|
|
| legacyVeMav The address of the IERC20 legacy veMav token. |
isFactoryToken
This function checks whether a provided IMaverickV2VotingEscrow contract address was created by this factory.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the IMaverickV2VotingEscrow contract to be checked. |
Returns
Name | Type | Description |
---|---|---|
|
| isFactoryToken True if the veToken was created by this factory, False otherwise (bool). |
createVotingEscrow
This function creates a new Maverick V2 Voting Escrow (veToken) contract for a specified ERC20 base token.
Once the ve contract is created, it will call name()
and symbol()
on the baseToken
. If those functions do not exist, the ve creation will revert.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the ERC-20 token to be used as the base token for the new veToken. |
Returns
Name | Type | Description |
---|---|---|
|
| The address of the newly created IMaverickV2VotingEscrow contract. |
votingEscrows
This function retrieves a paginated list of existing Maverick V2 Voting Escrow (veToken) contracts within a specified index range.
Parameters
Name | Type | Description |
---|---|---|
|
| The starting index for the desired range of veTokens. |
|
| The ending index for the desired range of veTokens. |
Returns
Name | Type | Description |
---|---|---|
|
| An array of IMaverickV2VotingEscrow addresses representing the veTokens within the specified range. |
votingEscrowsLength
This function retrieves the total number of deployed Maverick V2 Voting Escrow (veToken) contracts.
Returns
Name | Type | Description |
---|---|---|
|
| The total number of veTokens. |
votingEscrowAddress
This function retrieves the address of the existing Maverick V2 Voting Escrow (veToken) contract associated with a specific ERC20 base token.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the ERC-20 base token for which to retrieve the veToken address. |
Returns
Name | Type | Description |
---|---|---|
|
| The address of the IMaverickV2VotingEscrow contract associated with the base token, or the zero address if none exists. |
baseTokenParameter
This function retrieves the default base token used for creating new voting escrow contracts. This state variable is only used temporarily when a new veToken is deployed.
Returns
Name | Type | Description |
---|---|---|
|
| baseToken The address of the default ERC-20 base token. |
Errors
VotingEscrowTokenAlreadyExists
Last updated