ReleaseRegistry
Inherits: Governance2Step
Author: yearn.finance
Used by Yearn Governance to track on chain all releases of the V3 vaults by API Version.
State Variables
name
string public constant name = "Yearn V3 Release Registry";
numReleases
uint256 public numReleases;
factories
mapping(uint256 => address) public factories;
tokenizedStrategies
mapping(uint256 => address) public tokenizedStrategies;
releaseTargets
mapping(string => uint256) public releaseTargets;
Functions
constructor
constructor(address _governance) Governance2Step(_governance);
latestFactory
Returns the latest factory.
function latestFactory() external view virtual returns (address);
Returns
Name | Type | Description |
---|---|---|
<none> | address | The address of the factory for the latest release. |
latestTokenizedStrategy
Returns the latest tokenized strategy.
function latestTokenizedStrategy() external view virtual returns (address);
Returns
Name | Type | Description |
---|---|---|
<none> | address | The address of the tokenized strategy for the latest release. |
latestRelease
Returns the api version of the latest release.
function latestRelease() external view virtual returns (string memory);
Returns
Name | Type | Description |
---|---|---|
<none> | string | The api version of the latest release. |
newRelease
Issue a new release using a deployed factory.
Stores the factory address in factories
and the release
target in releaseTargets
with its associated API version.
Throws if caller isn't governance
.
Throws if the api version is the same as the previous release.
Throws if the factory does not have the same api version as the tokenized strategy.
Emits a NewRelease
event.
function newRelease(address _factory, address _tokenizedStrategy) external virtual onlyGovernance;
Parameters
Name | Type | Description |
---|---|---|
_factory | address | The factory that will be used create new vaults. |
_tokenizedStrategy | address |
Events
NewRelease
event NewRelease(
uint256 indexed releaseId, address indexed factory, address indexed tokenizedStrategy, string apiVersion
);