VaultFactoryAuth

Git Source

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

NameTypeDescription
deployer_addressThe address to be set as deployer.
allowed_boolA 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

NameTypeDescription
globalAuth_addressThe address to be set as global authorization.
allowed_boolA 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

NameTypeDescription
vault_addressThe address of the vault for which the authorization is being set.
vaultAuth_addressThe address to be set as vault authorization.
allowed_boolA 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

NameTypeDescription
deploymentLogic_addressThe address of the vault deployment logic contract to be set.
allowed_boolA 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

NameTypeDescription
target_addressAddress to which the call needs to be delegated
data_bytesData 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

NameTypeDescription
deployer_addressThe address to be checked for deployer authorization.

Returns

NameTypeDescription
<none>boolReturns 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

NameTypeDescription
globalAuth_addressThe address to be checked for global authorization privileges.

Returns

NameTypeDescription
<none>boolReturns 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

NameTypeDescription
vault_addressThe address of the vault to check.
vaultAuth_addressThe address to be checked for vault authorization privileges.

Returns

NameTypeDescription
<none>boolReturns 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

NameTypeDescription
vaultDeploymentLogic_addressThe address of the vault deploy logic to check for authorization privileges.

Returns

NameTypeDescription
<none>boolReturns true if the given address has authorization privileges for vault deployment, otherwise false.