Skip to main content

ReleaseRegistry

Git Source

Inherits: Governance2Step

Author: yearn.finance

Used by Yearn Governance to track onchain 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

NameTypeDescription
<none>addressThe address of the factory for the latest release.

latestTokenizedStrategy​

Returns the latest tokenized strategy.

function latestTokenizedStrategy() external view virtual returns (address);

Returns

NameTypeDescription
<none>addressThe 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

NameTypeDescription
<none>stringThe 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

NameTypeDescription
_factoryaddressThe factory that will be used create new vaults.
_tokenizedStrategyaddress

Events​

NewRelease​

event NewRelease(
uint256 indexed releaseId, address indexed factory, address indexed tokenizedStrategy, string apiVersion
);