pub enum VaultStandardQueryMsg<T = ExtensionQueryMsg>where
T: JsonSchema,{
VaultStandardInfo {},
Info {},
PreviewDeposit {
amount: Uint128,
},
PreviewRedeem {
amount: Uint128,
},
TotalAssets {},
TotalVaultTokenSupply {},
VaultTokenExchangeRate {
quote_denom: String,
},
ConvertToShares {
amount: Uint128,
},
ConvertToAssets {
amount: Uint128,
},
VaultExtension(T),
}Expand description
The default QueryMsg variants that all vaults must implement.
This enum can be extended with additional variants by defining an extension
enum and then passing it as the generic argument T to this enum.
Variants§
VaultStandardInfo
Returns VaultStandardInfoResponse with information on the version of
the vault standard used as well as any enabled extensions.
Info
Returns VaultInfoResponse representing vault requirements, lockup, &
vault token denom.
PreviewDeposit
Returns Uint128 amount of vault tokens that will be returned for the
passed in amount of base tokens.
Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given current on-chain conditions.
Must return as close to and no more than the exact amount of vault tokens that would be minted in a deposit call in the same transaction. I.e. Deposit should return the same or more vault tokens as PreviewDeposit if called in the same transaction.
Fields
PreviewRedeem
Returns Uint128 amount of base tokens that would be withdrawn in
exchange for redeeming amount of vault tokens.
Allows an on-chain or off-chain user to simulate the effects of their redeem at the current block, given current on-chain conditions.
Must return as close to and no more than the exact amount of base tokens that would be withdrawn in a redeem call in the same transaction.
Fields
TotalAssets
Returns the amount of assets managed by the vault denominated in base tokens. Useful for display purposes, and does not have to confer the exact amount of base tokens.
TotalVaultTokenSupply
Returns Uint128 total amount of vault tokens in circulation.
VaultTokenExchangeRate
Returns the exchange rate of vault tokens quoted in terms of the
supplied quote_denom. Returns a Decimal containing the amount of
quote_denom assets that can be exchanged for 1 unit of vault
tokens.
May return an error if the quote denom is not supported by the vault.
The amount of vault tokens that the vault would exchange for the amount of assets provided, in an ideal scenario where all the conditions are met.
Useful for display purposes and does not have to confer the exact amount of vault tokens returned by the vault if the passed in assets were deposited. This calculation should not reflect the “per-user” price-per-share, and instead should reflect the “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and from.
ConvertToAssets
Returns the amount of base tokens that the Vault would exchange for
the amount of vault tokens provided, in an ideal scenario where all
the conditions are met.
Useful for display purposes and does not have to confer the exact amount of assets returned by the vault if the passed in vault tokens were redeemed. This calculation should not reflect the “per-user” price-per-share, and instead should reflect the “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and from.
VaultExtension(T)
Handle queries of any enabled extensions.
Trait Implementations§
Source§impl<T> Clone for VaultStandardQueryMsg<T>where
T: JsonSchema + Clone,
impl<T> Clone for VaultStandardQueryMsg<T>where
T: JsonSchema + Clone,
Source§fn clone(&self) -> VaultStandardQueryMsg<T>
fn clone(&self) -> VaultStandardQueryMsg<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<T> Debug for VaultStandardQueryMsg<T>where
T: JsonSchema + Debug,
impl<T> Debug for VaultStandardQueryMsg<T>where
T: JsonSchema + Debug,
Source§impl<'de, T> Deserialize<'de> for VaultStandardQueryMsg<T>where
T: JsonSchema + Deserialize<'de>,
impl<'de, T> Deserialize<'de> for VaultStandardQueryMsg<T>where
T: JsonSchema + Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<T> JsonSchema for VaultStandardQueryMsg<T>where
T: JsonSchema + JsonSchema,
impl<T> JsonSchema for VaultStandardQueryMsg<T>where
T: JsonSchema + JsonSchema,
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more