IArrakisMetaVaultFactory

Git Source

Functions

pause

function used to pause the factory.

only callable by owner.

function pause() external;

unpause

function used to unpause the factory.

only callable by owner.

function unpause() external;

setManager

function used to set a new manager.

only callable by owner.

function setManager(address newManager_) external;

Parameters

NameTypeDescription
newManager_addressaddress that will managed newly created vault.

deployPublicVault

function used to deploy ERC20 token wrapped Arrakis Meta Vault.

function deployPublicVault(
    bytes32 salt_,
    address token0_,
    address token1_,
    address owner_,
    address beacon_,
    bytes calldata moduleCreationPayload_,
    bytes calldata initManagementPayload_
) external returns (address vault);

Parameters

NameTypeDescription
salt_bytes32bytes32 used to get a deterministic all chains address.
token0_addressaddress of the first token of the token pair.
token1_addressaddress of the second token of the token pair.
owner_addressaddress of the owner of the vault.
beacon_addressaddress of the beacon that will be used to create the default module.
moduleCreationPayload_bytespayload for initializing the module.
initManagementPayload_bytesdata for initialize management.

Returns

NameTypeDescription
vaultaddressaddress of the newly created Token Meta Vault.

deployPrivateVault

function used to deploy owned Arrakis Meta Vault.

function deployPrivateVault(
    bytes32 salt_,
    address token0_,
    address token1_,
    address owner_,
    address beacon_,
    bytes calldata moduleCreationPayload_,
    bytes calldata initManagementPayload_
) external returns (address vault);

Parameters

NameTypeDescription
salt_bytes32bytes32 needed to compute vault address deterministic way.
token0_addressaddress of the first token of the token pair.
token1_addressaddress of the second token of the token pair.
owner_addressaddress of the owner of the vault.
beacon_addressaddress of the beacon that will be used to create the default module.
moduleCreationPayload_bytespayload for initializing the module.
initManagementPayload_bytesdata for initialize management.

Returns

NameTypeDescription
vaultaddressaddress of the newly created private Meta Vault.

whitelistDeployer

function used to grant the role to deploy to a list of addresses.

function whitelistDeployer(address[] calldata deployers_) external;

Parameters

NameTypeDescription
deployers_address[]list of addresses that owner want to grant permission to deploy.

blacklistDeployer

function used to grant the role to deploy to a list of addresses.

function blacklistDeployer(address[] calldata deployers_) external;

Parameters

NameTypeDescription
deployers_address[]list of addresses that owner want to revoke permission to deploy.

getTokenName

get Arrakis Modular standard token name for two corresponding tokens.

function getTokenName(
    address token0_,
    address token1_
) external view returns (string memory);

Parameters

NameTypeDescription
token0_addressaddress of the first token.
token1_addressaddress of the second token.

Returns

NameTypeDescription
<none>stringname name of the arrakis modular token vault.

publicVaults

get a list of public vaults created by this factory

function publicVaults(
    uint256 startIndex_,
    uint256 endIndex_
) external view returns (address[] memory);

Parameters

NameTypeDescription
startIndex_uint256start index
endIndex_uint256end index

Returns

NameTypeDescription
<none>address[]vaults list of all created vaults.

numOfPublicVaults

numOfPublicVaults counts the total number of token vaults in existence

function numOfPublicVaults() external view returns (uint256 result);

Returns

NameTypeDescription
resultuint256total number of vaults deployed

isPublicVault

isPublicVault check if the inputed vault is a public vault.

function isPublicVault(address vault_) external view returns (bool);

Parameters

NameTypeDescription
vault_addressaddress of the address to check.

Returns

NameTypeDescription
<none>boolisPublicVault true if the inputed vault is public or otherwise false.

privateVaults

get a list of private vaults created by this factory

function privateVaults(
    uint256 startIndex_,
    uint256 endIndex_
) external view returns (address[] memory);

Parameters

NameTypeDescription
startIndex_uint256start index
endIndex_uint256end index

Returns

NameTypeDescription
<none>address[]vaults list of all created vaults.

numOfPrivateVaults

numOfPrivateVaults counts the total number of private vaults in existence

function numOfPrivateVaults()
    external
    view
    returns (uint256 result);

Returns

NameTypeDescription
resultuint256total number of vaults deployed

isPrivateVault

isPrivateVault check if the inputed vault is a private vault.

function isPrivateVault(address vault_)
    external
    view
    returns (bool);

Parameters

NameTypeDescription
vault_addressaddress of the address to check.

Returns

NameTypeDescription
<none>boolisPublicVault true if the inputed vault is private or otherwise false.

manager

function used to get the manager of newly deployed vault.

function manager() external view returns (address);

Returns

NameTypeDescription
<none>addressmanager address that will manager vault that will be created.

deployers

function used to get a list of address that can deploy public vault.

function deployers() external view returns (address[] memory);

moduleRegistryPublic

function used to get public module registry.

function moduleRegistryPublic() external view returns (address);

moduleRegistryPrivate

function used to get private module registry.

function moduleRegistryPrivate() external view returns (address);

Events

LogPublicVaultCreation

event emitted when public vault is created by a deployer.

event LogPublicVaultCreation(
    address indexed creator,
    bytes32 salt,
    address token0,
    address token1,
    address owner,
    address module,
    address publicVault,
    address timeLock
);

Parameters

NameTypeDescription
creatoraddressaddress that is creating the public vault, a deployer.
saltbytes32salt used for create3.
token0addressfirst token of the token pair.
token1addresssecond token of the token pair.
owneraddressaddress of the owner.
moduleaddressdefault module that will be used by the meta vault.
publicVaultaddressaddress of the deployed meta vault.
timeLockaddresstimeLock that will owned the meta vault.

LogPrivateVaultCreation

event emitted when private vault is created.

event LogPrivateVaultCreation(
    address indexed creator,
    bytes32 salt,
    address token0,
    address token1,
    address owner,
    address module,
    address privateVault
);

Parameters

NameTypeDescription
creatoraddressaddress that is deploying the vault.
saltbytes32salt used for create3.
token0addressaddress of the first token of the pair.
token1addressaddress of the second token of the pair.
owneraddressaddress that will owned the private vault.
moduleaddressaddress of the default module.
privateVaultaddressaddress of the deployed meta vault.

LogWhitelistDeployers

event emitted when whitelisting an array of public vault deployers.

event LogWhitelistDeployers(address[] deployers);

Parameters

NameTypeDescription
deployersaddress[]list of deployers added to the whitelist.

LogBlacklistDeployers

event emitted when blacklisting an array of public vault deployers.

event LogBlacklistDeployers(address[] deployers);

Parameters

NameTypeDescription
deployersaddress[]list of deployers removed from the whitelist.

LogSetManager

event emitted when owner set a new manager.

event LogSetManager(address oldManager, address newManager);

Parameters

NameTypeDescription
oldManageraddressaddress of the previous manager.
newManageraddressaddress of the new manager.

Errors

AddressZero

error AddressZero();

StartIndexLtEndIndex

triggered when querying vaults on factory and start index is lower than end index.

error StartIndexLtEndIndex(uint256 startIndex, uint256 endIndex);

EndIndexGtNbOfVaults

triggered when querying vaults on factory and end index of the query is bigger the biggest index of the vaults array.

error EndIndexGtNbOfVaults(uint256 endIndex, uint256 numberOfVaults);

AlreadyWhitelistedDeployer

triggered when owner want to whitelist a deployer that has been already whitelisted.

error AlreadyWhitelistedDeployer(address deployer);

NotAlreadyADeployer

triggered when owner want to blackist a deployer that is not a current deployer.

error NotAlreadyADeployer(address deployer);

NotADeployer

triggered when public vault deploy function is called by an address that is not a deployer.

error NotADeployer();

CallFailed

triggered when init management low level failed.

error CallFailed();

VaultNotManaged

triggered when init management happened and still the vault is not under management by manager.

error VaultNotManaged();

SameManager

triggered when owner is setting a new manager, and the new manager address match with the old manager address.

error SameManager();