IVaultRegistry.sol
Methods
beaconAddresses(string)
function beaconAddresses(string) external view returns (address)
Parameters
Name | Type | Description |
---|---|---|
_0 | string | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
beaconTypes(address)
function beaconTypes(address) external view returns (string)
Parameters
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | string | undefined |
createVault(bytes,uint256,string,address,string)
function createVault(bytes _params, uint256 _tokenId, string _beaconName, address _vaultManager, string strategyData) external nonpayable returns (address)
Creates a new vault with the given strategyRegisters an execution bundle, mints an NFT and mappings it to execution bundle and it's details.owner is set as msg.sender.
Parameters
Name | Type | Description |
---|---|---|
_params | bytes | is extra parameters in vault. |
_tokenId | uint256 | is the NFT of the execution bundle this vault will be using. |
_beaconName | string | beacon identifier of vault type to be created |
_vaultManager | address | undefined |
strategyData | string | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
deployAndRegisterBeacon(address,string,string)
function deployAndRegisterBeacon(address _address, string _name, string _ipfsConfigForBeacon) external nonpayable returns (address)
Deploy new beacon for a new vault type AND register it
Parameters
Name | Type | Description |
---|---|---|
_address | address | The address of the implementation for the beacon |
_name | string | The name of the beacon (identifier) |
_ipfsConfigForBeacon | string | IPFS hash for the config of this beacon |
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
deregisterBeacon(string)
function deregisterBeacon(string _name) external nonpayable
Removes a beacon associated with a vault typeThis will stop the creation of more vaults of the type provided
Parameters
Name | Type | Description |
---|---|---|
_name | string | The name of the beacon (identifier) |
getStrategyCreatorForVault(address)
function getStrategyCreatorForVault(address _vault) external view returns (address)
Retrieves the creator of a given vault
Parameters
Name | Type | Description |
---|---|---|
_vault | address | The address of the vault |
Returns
Name | Type | Description |
---|---|---|
_0 | address | The address of the creator |
getVaultByStrategyAndIndex(uint256,uint256)
function getVaultByStrategyAndIndex(uint256 _tokenId, uint256 _vaultId) external view returns (struct IVaultRegistry.VaultData)
Retrieves the vault by vault token id and vault index
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | The token id of the vault |
_vaultId | uint256 | The index of the vault |
Returns
Name | Type | Description |
---|---|---|
_0 | IVaultRegistry.VaultData | Vault details |
getVaultCountByStrategyId(uint256)
function getVaultCountByStrategyId(uint256 _tokenId) external view returns (uint256)
Retrieves the vault count by vault token id
Parameters
Name | Type | Description |
---|---|---|
_tokenId | uint256 | The token id of the vault |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | The count of the vault |
getVaultDetails(address)
function getVaultDetails(address _address) external view returns (struct IVaultRegistry.VaultData)
Retrieves the details of a given vault by address
Parameters
Name | Type | Description |
---|---|---|
_address | address | The address of the vault |
Returns
Name | Type | Description |
---|---|---|
_0 | IVaultRegistry.VaultData | The details of the vault |
initialize(address,address,address)
function initialize(address _orchestrator, address _strategyRegistry, address _whitelistRegistry) external nonpayable
intializes the vault registry
Parameters
Name | Type | Description |
---|---|---|
_orchestrator | address | The address of the orchestrator |
_strategyRegistry | address | The address of the strategy registry |
_whitelistRegistry | address | The address of the whitelist registry |
orchestrator()
function orchestrator() external view returns (contract IOrchestrator)
Returns
Name | Type | Description |
---|---|---|
_0 | contract IOrchestrator | undefined |
pause()
function pause() external nonpayable
This function is only available to the pauser role
registerBeacon(string,address,string)
function registerBeacon(string _name, address _address, string _ipfsConfigForBeacon) external nonpayable
Registers a beacon associated with a new vault type
Parameters
Name | Type | Description |
---|---|---|
_name | string | The name of the vault type this beacon will be using |
_address | address | The address of the upgrade beacon |
_ipfsConfigForBeacon | string | IPFS hash for the config of this beacon |
strategyRegistry()
function strategyRegistry() external view returns (contract IStrategyRegistry)
Returns
Name | Type | Description |
---|---|---|
_0 | contract IStrategyRegistry | undefined |
totalVaultCount()
function totalVaultCount() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
unpause()
function unpause() external nonpayable
updateVaultState(address,uint8)
function updateVaultState(address _vault, enum IVaultRegistry.VaultState _newState) external nonpayable
Updates the vault state and emits a VaultStateChanged eventThis function is only available to the registry owner
Parameters
Name | Type | Description |
---|---|---|
_vault | address | The address of the vault |
_newState | enum IVaultRegistry.VaultState | The new state of the vault |
whitelistRegistry()
function whitelistRegistry() external view returns (address)
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
Events
VaultCreated
event VaultCreated(address deployer, address vault, string beaconName, uint256 indexed tokenId, address vaultManager)
Vault creation event
Parameters
Name | Type | Description |
---|---|---|
deployer | address | The address of the deployer |
vault | address | The address of the vault |
beaconName | string | undefined |
tokenId indexed | uint256 | ERC721 token id for the vault |
vaultManager | address | is the address which will manage the vault being created |
VaultStateChanged
event VaultStateChanged(address indexed vault, enum IVaultRegistry.VaultState newState)
Vault state change event
Parameters
Name | Type | Description |
---|---|---|
vault indexed | address | The address of the vault |
newState | enum IVaultRegistry.VaultState | The new state of the vault |