๐ญVault Factory
The vault factory contract is used to create vaults. Similarly to the pool factory, the vault factory acts as a directory for the vaults that have been created through the factory. Note that the vault factory is permissioned, meaning the messages can only be executed by the owner of the contract.
The code for the vault factory contract can be found here .
The following are the messages that can be executed on the vault factory:
Instantiate
Instantiates the vault factory. Requires storing the vault and token contracts in advance so that the contract code ids can be provided.
Key | Type | Description |
---|---|---|
| String | The owner of the factory |
| u64 | The code ID for the vault contract |
| u64 | The code ID for the liquidity token contract |
| String | The address where fees get collected |
Migrate
Migrates the vault factory.
ExecuteMsg
Create vault (native/ibc)
Creates a vault. Includes token info and vault fees.
Key | Type | Description |
---|---|---|
| AssetInfo | Asset info to create a vault with |
| VaultFee | Fees for the vault |
| bool | If true, the factory will use the token factory to create the LP token for the vault. If false, it will use a cw20 token instead |
Migrate vaults
Migrates vault contracts to the given vault code id. If vault_addr
is provided, the message migrates only that given vault. Otherwise, it migrates all the vaults created by the factory.
Key | Type | Description |
---|---|---|
| Option<String> | Vault address to migrate |
| u64 | Code id of the vault contract to migrate to |
Update config
Updates the configuration of the vault factory.
Key | Type | Description |
---|---|---|
| Option<String> | New owner of the factory |
| Option<String> | New fee collector address |
| Option<u64> | New code id for creating vault contracts with |
| Option<u64> | New code id for the token contract |
Remove vault
Removes a vault from the factory's registry.
Key | Type | Description |
---|---|---|
| AssetInfo | The asset_info of the vault to be removed |
Update vault config
Updates the configuration of the given vault with the provided UpdateConfigParams
.
Key | Type | Description |
---|---|---|
| String | Vault address |
| UpdateConfigParams | Parameters to update the config with |
Queries
Config
Retrieves the configuration of the contract in a Config
response.
Vault
Retrieves the vault address given the AssetInfo
.
Key | Type | Description |
---|---|---|
| AssetInfo | Asset info of the vault to retrieve the address of |
Vaults
Retrieves the addresses for all the vaults. Returns an Option<Vec<String>>
.
Key | Type | Description |
---|---|---|
| Option<Vec> | Asset info reference (as bytes) to paginate from |
| Option<u32> | How many items to fetch at once. Default is |
Last updated