VaultFactoryAuth
Inherits:VaultFactoryCore
Implements Vault Factory auth-only callable methods. Owner / auths can set various config values and can define the allow-listed deployers.
Functions
setDeployer
Sets an address (deployer_
) as allowed deployer or not.
This function can only be called by the owner.
function setDeployer(address deployer_, bool allowed_) external onlyOwner validAddress(deployer_);
Parameters
Name | Type | Description |
---|---|---|
deployer_ | address | The address to be set as deployer. |
allowed_ | bool | A boolean indicating whether the specified address is allowed to deploy vaults. |
setGlobalAuth
Sets an address (globalAuth_
) as a global authorization or not.
This function can only be called by the owner.
function setGlobalAuth(address globalAuth_, bool allowed_) external onlyOwner validAddress(globalAuth_);
Parameters
Name | Type | Description |
---|---|---|
globalAuth_ | address | The address to be set as global authorization. |
allowed_ | bool | A boolean indicating whether the specified address is allowed to update any vault config. |
setVaultAuth
Sets an address (vaultAuth_
) as allowed vault authorization or not for a specific vault (vault_
).
This function can only be called by the owner.
function setVaultAuth(address vault_, address vaultAuth_, bool allowed_) external onlyOwner validAddress(vaultAuth_);
Parameters
Name | Type | Description |
---|---|---|
vault_ | address | The address of the vault for which the authorization is being set. |
vaultAuth_ | address | The address to be set as vault authorization. |
allowed_ | bool | A boolean indicating whether the specified address is allowed to update the specific vault config. |
setVaultDeploymentLogic
Sets an address as allowed vault deployment logic (deploymentLogic_
) contract or not.
This function can only be called by the owner.
function setVaultDeploymentLogic(address deploymentLogic_, bool allowed_)
public
onlyOwner
validAddress(deploymentLogic_);
Parameters
Name | Type | Description |
---|---|---|
deploymentLogic_ | address | The address of the vault deployment logic contract to be set. |
allowed_ | bool | A boolean indicating whether the specified address is allowed to deploy new type of vault. |
spell
Spell allows owner aka governance to do any arbitrary call on factory
function spell(address target_, bytes memory data_) external onlyOwner returns (bytes memory response_);
Parameters
Name | Type | Description |
---|---|---|
target_ | address | Address to which the call needs to be delegated |
data_ | bytes | Data to execute at the delegated address |
isDeployer
Checks if the provided address (deployer_
) is authorized as a deployer.
function isDeployer(address deployer_) public view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
deployer_ | address | The address to be checked for deployer authorization. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | Returns true if the address is a deployer, otherwise false . |
isGlobalAuth
Checks if the provided address (globalAuth_
) has global vault authorization privileges.
function isGlobalAuth(address globalAuth_) public view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
globalAuth_ | address | The address to be checked for global authorization privileges. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | Returns true if the given address has global authorization privileges, otherwise false . |
isVaultAuth
Checks if the provided address (vaultAuth_
) has vault authorization privileges for the specified vault (vault_
).
function isVaultAuth(address vault_, address vaultAuth_) public view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
vault_ | address | The address of the vault to check. |
vaultAuth_ | address | The address to be checked for vault authorization privileges. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | Returns true if the given address has vault authorization privileges for the specified vault, otherwise false . |
isVaultDeploymentLogic
Checks if the provided (vaultDeploymentLogic_
) address has authorization for vault deployment.
function isVaultDeploymentLogic(address vaultDeploymentLogic_) public view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
vaultDeploymentLogic_ | address | The address of the vault deploy logic to check for authorization privileges. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | Returns true if the given address has authorization privileges for vault deployment, otherwise false . |