Registry.vy
Functions
setGovernance
function setGovernance(address)
Starts the 1st phase of the governance transfer.
Throws if the caller is not current governance.
Parameters:
Name | Type | Description |
---|---|---|
* governance * | * * | * The next governance address * |
acceptGovernance
function acceptGovernance()
Completes the 2nd phase of the governance transfer.
Throws if the caller is not the pending caller. Emits a NewGovernance
event.
latestRelease
function latestRelease()
Returns the api version of the latest release.
Throws if no releases are registered yet.
Return Values:
Description |
---|
* The api version of the latest release. * |
latestVault
function latestVault(address)
Returns the latest deployed vault for the given token.
Throws if no vaults are endorsed yet for the given token.
Parameters:
Name | Type | Description |
---|---|---|
* token * | * * | * The token address to find the latest vault for. * |
Return Values:
Description |
---|
* The address of the latest vault for the given token. * |
newRelease
function newRelease(address)
Add a previously deployed Vault as the template contract for the latest release, to be used by further "forwarder-style" delegatecall proxy contracts that can be deployed from the registry throw other methods (to save gas).
Throws if caller isn't self.governance
. Throws if vault
's governance isn't self.governance
. Throws if the api version is the same as the previous release. Emits a NewVault
event.
Parameters:
Name | Type | Description |
---|---|---|
* vault * | * * | * The vault that will be used as the template contract for the next release. * |
newVault
function newVault(address,address,address,string,string)
Create a new vault for the given token using the latest release in the registry, as a simple "forwarder-style" delegatecall proxy to the latest release. Also adds the new vault to the list of "endorsed" vaults for that token.
governance
is set in the new vault as self.governance
, with no ability to override. Throws if caller isn't self.governance
. Throws if no releases are registered yet. Throws if there already is a registered vault for the given token with the latest api version. Emits a NewVault
event.
Parameters:
Name | Type | Description |
---|---|---|
* token * | * * | * The token that may be deposited into the new Vault. * |
* guardian * | * * | * The address authorized for guardian interactions in the new Vault. * |
* rewards * | * * | * The address to use for collecting rewards in the new Vault * |
* name * | * * | * Specify a custom Vault name. Set to empty string for default choice. * |
* symbol * | * * | * Specify a custom Vault symbol name. Set to empty string for default choice. * |
* releaseDelta * | * * | * Specify the number of releases prior to the latest to use as a target. Default is latest. * |
Return Values:
Description |
---|
* The address of the newly-deployed vault * |
newVault
function newVault(address,address,address,string,string,uint256)
governance
is set in the new vault as self.governance
, with no ability to override. Throws if caller isn't self.governance
. Throws if no releases are registered yet. Throws if there already is a registered vault for the given token with the latest api version. Emits a NewVault
event.