BeaconManager.sol
contract managing beacon data for all vaults
Methods
DEFAULT_ADMIN_ROLE()
function DEFAULT_ADMIN_ROLE() external view returns (bytes32)
Returns
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
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 |
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 note that the contract registered as a beacon should not be used as a vault, to avoid confusion. |
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) |
getRoleAdmin(bytes32)
function getRoleAdmin(bytes32 role) external view returns (bytes32)
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
grantRole(bytes32,address)
function grantRole(bytes32 role, address account) external nonpayable
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
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
hasRole(bytes32,address)
function hasRole(bytes32 role, address account) external view returns (bool)
Returns true
if account
has been granted role
.
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
owner()
function owner() external view returns (address)
Returns the address of the current owner.
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
registerBeacon(string,address,string)
function registerBeacon(string _name, address _address, string _ipfsConfigForBeacon) external nonpayable
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
Name | Type | Description |
---|---|---|
_name | string | The name of the vault type this beacon will be using |
_address | address | The address of the beacon contract |
_ipfsConfigForBeacon | string | IPFS hash for the config of this beacon |
renounceOwnership()
function renounceOwnership() external nonpayable
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)
function renounceRole(bytes32 role, address account) external nonpayable
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
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
revokeRole(bytes32,address)
function revokeRole(bytes32 role, address account) external nonpayable
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role.
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
supportsInterface(bytes4)
function supportsInterface(bytes4 interfaceId) external view returns (bool)
See {IERC165-supportsInterface}.
Parameters
Name | Type | Description |
---|---|---|
interfaceId | bytes4 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
transferOwnership(address)
function transferOwnership(address newOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Parameters
Name | Type | Description |
---|---|---|
newOwner | address | undefined |
updateBeaconConfig(string,string)
function updateBeaconConfig(string _name, string _newIPFSConfigForBeacon) external nonpayable
Updates the ipfs link storing the beaconConfig
Parameters
Name | Type | Description |
---|---|---|
_name | string | The name of the beacon (identifier) |
_newIPFSConfigForBeacon | string | IPFS hash for the config of this beacon |
Events
BeaconConfigUpdated
event BeaconConfigUpdated(string _name, string _ipfsHash)
Beacon config updation event
Parameters
Name | Type | Description |
---|---|---|
_name | string | The name of the beacon getting registered |
_ipfsHash | string | updated IPFS hash for the config of this beacon |
BeaconDeregistered
event BeaconDeregistered(string _name)
Beacon deregisteration event
Parameters
Name | Type | Description |
---|---|---|
_name | string | The name of the beacon getting registered |
BeaconRegistered
event BeaconRegistered(string _name, address _address, string _ipfsHash)
Beacon registeration event
Parameters
Name | Type | Description |
---|---|---|
_name | string | The name of the beacon getting registered |
_address | address | The implementation address that this beacon will point to |
_ipfsHash | string | IPFS hash for the config of this beacon |
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Parameters
Name | Type | Description |
---|---|---|
previousOwner indexed | address | undefined |
newOwner indexed | address | undefined |
RoleAdminChanged
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)
Parameters
Name | Type | Description |
---|---|---|
role indexed | bytes32 | undefined |
previousAdminRole indexed | bytes32 | undefined |
newAdminRole indexed | bytes32 | undefined |
RoleGranted
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)
Parameters
Name | Type | Description |
---|---|---|
role indexed | bytes32 | undefined |
account indexed | address | undefined |
sender indexed | address | undefined |
RoleRevoked
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)
Parameters
Name | Type | Description |
---|---|---|
role indexed | bytes32 | undefined |
account indexed | address | undefined |
sender indexed | address | undefined |