Skip to main content

VaultRegistry.sol

Details

All vaults are created through this contract

Methods

DEFAULT_ADMIN_ROLE()

Solidity

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

NameTypeDescription
_0bytes32undefined

beaconAddresses(string)

Solidity

function beaconAddresses(string) external view returns (address)

Parameters

NameTypeDescription
_0stringundefined

Returns

NameTypeDescription
_0addressundefined

beaconTypes(address)

Solidity

function beaconTypes(address) external view returns (string)

Parameters

NameTypeDescription
_0addressundefined

Returns

NameTypeDescription
_0stringundefined

createVault(bytes,uint256,string,address,string)

Solidity

function createVault(bytes _params, uint256 _tokenId, string _beaconName, address _vaultManager, string _payloadIpfs) external nonpayable returns (address)
Details

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

NameTypeDescription
_paramsbytesis extra parameters in vault.
_tokenIduint256is the NFT of the execution bundle this vault will be using. Note that if the given tokenID does not yet exist, the vault will remain inactive.
_beaconNamestringbeacon identifier of vault type to be created
_vaultManageraddressis the address which will manage the vault being created
_payloadIpfsstringundefined

Returns

NameTypeDescription
_0addressundefined

deployAndRegisterBeacon(address,string,string)

Solidity

function deployAndRegisterBeacon(address _address, string _name, string _ipfsConfigForBeacon) external nonpayable returns (address)
Details

Deploy new beacon for a new vault type AND register it

Parameters

NameTypeDescription
_addressaddressThe address of the implementation for the beacon
_namestringThe name of the beacon (identifier)
_ipfsConfigForBeaconstringIPFS hash for the config of this beacon note that the contract registered as a beacon should not be used as a vault, to avoid confusion.

Returns

NameTypeDescription
_0addressundefined

deregisterBeacon(string)

Solidity

function deregisterBeacon(string _name) external nonpayable
Details

Removes a beacon associated with a vault typeThis will stop the creation of more vaults of the type provided

Parameters

NameTypeDescription
_namestringThe name of the beacon (identifier)

doISupportInterface(bytes4)

Solidity

function doISupportInterface(bytes4 interfaceId) external view returns (bool)
Details

check whether msg.sender supports a given interface id. Used to support ERC165 from a central location.

Parameters

NameTypeDescription
interfaceIdbytes4the interface id to check

Returns

NameTypeDescription
_0boolundefined

getRoleAdmin(bytes32)

Solidity

function getRoleAdmin(bytes32 role) external view returns (bytes32)
Details

Returns the admin role that controls role. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.

Parameters

NameTypeDescription
rolebytes32undefined

Returns

NameTypeDescription
_0bytes32undefined

getStrategyCreatorForVault(address)

Solidity

function getStrategyCreatorForVault(address _vault) external view returns (address)
Details

Retrieves the creator of a given vault

Parameters

NameTypeDescription
_vaultaddressThe address of the vault

Returns

NameTypeDescription
_0addressThe address of the creator

getVaultByStrategyAndIndex(uint256,uint256)

Solidity

function getVaultByStrategyAndIndex(uint256 _tokenId, uint256 _vaultId) external view returns (struct VaultRegistry.VaultData)
Details

Retrieves the vault by vault token id and vault index

Parameters

NameTypeDescription
_tokenIduint256The token id of the vault
_vaultIduint256The index of the vault

Returns

NameTypeDescription
_0VaultRegistry.VaultDataVault details

getVaultCountByStrategyId(uint256)

Solidity

function getVaultCountByStrategyId(uint256 _tokenId) external view returns (uint256)
Details

Retrieves the vault count by vault token id

Parameters

NameTypeDescription
_tokenIduint256The token id of the vault

Returns

NameTypeDescription
_0uint256The count of the vault

getVaultDetails(address)

Solidity

function getVaultDetails(address _address) external view returns (struct VaultRegistry.VaultData)
Details

Retrieves the details of a given vault by address

Parameters

NameTypeDescription
_addressaddressThe address of the vault

Returns

NameTypeDescription
_0VaultRegistry.VaultDataThe details of the vault

grantRole(bytes32,address)

Solidity

function grantRole(bytes32 role, address account) external nonpayable
Details

Grants role to account. If account had not been already granted role, emits a {RoleGranted} event. Requirements: - the caller must have role's admin role.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

hasRole(bytes32,address)

Solidity

function hasRole(bytes32 role, address account) external view returns (bool)
Details

Returns true if account has been granted role.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

Returns

NameTypeDescription
_0boolundefined

initialize(address,address,address)

Solidity

function initialize(address _strategyRegistry, address _internalGovernance, address _whitelistRegistry) external nonpayable
Details

intializes the vault registry

Parameters

NameTypeDescription
_strategyRegistryaddressThe address of the strategy registry
_internalGovernanceaddressThe address of Internal Governance
_whitelistRegistryaddressAddress of whitelist registry which keeps track of whitelist managers and members of whitelisted vaults

interfaceImplementations(string,bytes4)

Solidity

function interfaceImplementations(string, bytes4) external view returns (bool)

Parameters

NameTypeDescription
_0stringundefined
_1bytes4undefined

Returns

NameTypeDescription
_0boolundefined

linkedVaults(uint256,uint256)

Solidity

function linkedVaults(uint256, uint256) external view returns (address)

Parameters

NameTypeDescription
_0uint256undefined
_1uint256undefined

Returns

NameTypeDescription
_0addressundefined

owner()

Solidity

function owner() external view returns (address)
Details

Returns the address of the current owner.

Returns

NameTypeDescription
_0addressundefined

pause()

Solidity

function pause() external nonpayable
Details

Pauses the minting of the ERC721 tokens for the vaultThis function is only available to the pauser role

paused()

Solidity

function paused() external view returns (bool)
Details

Returns true if the contract is paused, and false otherwise.

Returns

NameTypeDescription
_0boolundefined

registerBeacon(string,address,string)

Solidity

function registerBeacon(string _name, address _address, string _ipfsConfigForBeacon) external nonpayable
Details

Registers a beacon associated with a new vault typeThis function is only available to the beacon creatorRegisters any address as a new beacon. Useful for alternative beacon types (i.e. a contract which will use a proxy structure other than the standard beacon).

Parameters

NameTypeDescription
_namestringThe name of the vault type this beacon will be using
_addressaddressThe address of the beacon contract
_ipfsConfigForBeaconstringIPFS hash for the config of this beacon

renounceOwnership()

Solidity

function renounceOwnership() external nonpayable
Details

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

renounceRole(bytes32,address)

Solidity

function renounceRole(bytes32 role, address account) external nonpayable
Details

Revokes role from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked role, emits a {RoleRevoked} event. Requirements: - the caller must be account.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

revokeRole(bytes32,address)

Solidity

function revokeRole(bytes32 role, address account) external nonpayable
Details

Revokes role from account. If account had been granted role, emits a {RoleRevoked} event. Requirements: - the caller must have role's admin role.

Parameters

NameTypeDescription
rolebytes32undefined
accountaddressundefined

strategyRegistry()

Solidity

function strategyRegistry() external view returns (contract IStrategyRegistry)

Returns

NameTypeDescription
_0contract IStrategyRegistryundefined

supportsInterface(bytes4)

Solidity

function supportsInterface(bytes4 interfaceId) external view returns (bool)
Details

See {IERC165-supportsInterface}.

Parameters

NameTypeDescription
interfaceIdbytes4undefined

Returns

NameTypeDescription
_0boolundefined

totalVaultCount()

Solidity

function totalVaultCount() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

transferOwnership(address)

Solidity

function transferOwnership(address newOwner) external nonpayable
Details

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription
newOwneraddressundefined

unpause()

Solidity

function unpause() external nonpayable

updateBeaconConfig(string,string)

Solidity

function updateBeaconConfig(string _name, string _newIPFSConfigForBeacon) external nonpayable
Details

Updates the ipfs link storing the beaconConfig

Parameters

NameTypeDescription
_namestringThe name of the beacon (identifier)
_newIPFSConfigForBeaconstringIPFS hash for the config of this beacon

updateInterfaceImplementations(string,bytes4[],bool[])

Solidity

function updateInterfaceImplementations(string beaconName, bytes4[] selectors, bool[] isImplemented) external nonpayable
Details

add interface info to given beacon

Parameters

NameTypeDescription
beaconNamestringundefined
selectorsbytes4[]undefined
isImplementedbool[]undefined

updateVaultState(address,uint8)

Solidity

function updateVaultState(address _vault, enum VaultRegistry.VaultState _newState) external nonpayable
Details

Updates the vault state and emits a VaultStateChanged eventThis function is only available to the registry owner.

Parameters

NameTypeDescription
_vaultaddressThe address of the vault
_newStateenum VaultRegistry.VaultStateThe new state of the vault

upgradeTo(address)

Solidity

function upgradeTo(address newImplementation) external nonpayable
Details

Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

NameTypeDescription
newImplementationaddressundefined

upgradeToAndCall(address,bytes)

Solidity

function upgradeToAndCall(address newImplementation, bytes data) external payable
Details

Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters

NameTypeDescription
newImplementationaddressundefined
databytesundefined

whitelistRegistry()

Solidity

function whitelistRegistry() external view returns (address)

Returns

NameTypeDescription
_0addressundefined

Events

AdminChanged

Solidity

event AdminChanged(address previousAdmin, address newAdmin)

Parameters

NameTypeDescription
previousAdminaddressundefined
newAdminaddressundefined

BeaconConfigUpdated

Solidity

event BeaconConfigUpdated(string _name, string _ipfsHash)

Parameters

NameTypeDescription
_namestringundefined
_ipfsHashstringundefined

BeaconDeregistered

Solidity

event BeaconDeregistered(string _name)

Parameters

NameTypeDescription
_namestringundefined

BeaconRegistered

Solidity

event BeaconRegistered(string _name, address _address, string _ipfsHash)

Parameters

NameTypeDescription
_namestringundefined
_addressaddressundefined
_ipfsHashstringundefined

BeaconUpgraded

Solidity

event BeaconUpgraded(address indexed beacon)

Parameters

NameTypeDescription
beacon indexedaddressundefined

OwnershipTransferred

Solidity

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressundefined
newOwner indexedaddressundefined

Paused

Solidity

event Paused(address account)

Parameters

NameTypeDescription
accountaddressundefined

RoleAdminChanged

Solidity

event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)

Parameters

NameTypeDescription
role indexedbytes32undefined
previousAdminRole indexedbytes32undefined
newAdminRole indexedbytes32undefined

RoleGranted

Solidity

event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)

Parameters

NameTypeDescription
role indexedbytes32undefined
account indexedaddressundefined
sender indexedaddressundefined

RoleRevoked

Solidity

event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)

Parameters

NameTypeDescription
role indexedbytes32undefined
account indexedaddressundefined
sender indexedaddressundefined

Unpaused

Solidity

event Unpaused(address account)

Parameters

NameTypeDescription
accountaddressundefined

Upgraded

Solidity

event Upgraded(address indexed implementation)

Parameters

NameTypeDescription
implementation indexedaddressundefined

VaultCreated

Solidity

event VaultCreated(address deployer, address vault, string beaconName, uint256 indexed tokenId, address vaultManager)
Details

Vault creation event

Parameters

NameTypeDescription
deployeraddressThe address of the deployer
vaultaddressThe address of the vault
beaconNamestringundefined
tokenId indexeduint256ERC721 token id for the vault
vaultManageraddressis the address which will manage the vault being created

VaultStateChanged

Solidity

event VaultStateChanged(address indexed vault, enum VaultRegistry.VaultState newState)
Details

Vault state change event

Parameters

NameTypeDescription
vault indexedaddressThe address of the vault
newStateenum VaultRegistry.VaultStateThe new state of the vault

Errors

IncorrectArrayLengths

Solidity

error IncorrectArrayLengths(uint256 selectorLength, uint256 isImplementedLength)

Parameters

NameTypeDescription
selectorLengthuint256undefined
isImplementedLengthuint256undefined