{ "contract_name": "dexter-weighted-pool", "contract_version": "1.1.1", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InstantiateMsg", "description": "This struct describes the basic settings for creating a contract.", "type": "object", "required": [ "asset_infos", "fee_info", "lp_token_addr", "native_asset_precisions", "pool_id", "pool_type", "vault_addr" ], "properties": { "asset_infos": { "description": "Assets supported by the pool", "type": "array", "items": { "$ref": "#/definitions/AssetInfo" } }, "fee_info": { "description": "The Fee details of the pool", "allOf": [ { "$ref": "#/definitions/FeeStructs" } ] }, "init_params": { "description": "Optional binary serialised parameters for custom pool types", "anyOf": [ { "$ref": "#/definitions/Binary" }, { "type": "null" } ] }, "lp_token_addr": { "description": "Address of the LP Token Contract", "allOf": [ { "$ref": "#/definitions/Addr" } ] }, "native_asset_precisions": { "description": "Native asset precisions", "type": "array", "items": { "$ref": "#/definitions/NativeAssetPrecisionInfo" } }, "pool_id": { "description": "Pool ID", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "pool_type": { "description": "The pools type (provided in a [`PoolType`])", "allOf": [ { "$ref": "#/definitions/PoolType" } ] }, "vault_addr": { "description": "the vault contract address", "allOf": [ { "$ref": "#/definitions/Addr" } ] } }, "additionalProperties": false, "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "AssetInfo": { "description": "This enum describes available Token types.", "oneOf": [ { "description": "Non-native Token", "type": "object", "required": [ "token" ], "properties": { "token": { "type": "object", "required": [ "contract_addr" ], "properties": { "contract_addr": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Native token", "type": "object", "required": [ "native_token" ], "properties": { "native_token": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "Binary": { "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "FeeStructs": { "title": "Description", "type": "object", "required": [ "total_fee_bps" ], "properties": { "total_fee_bps": { "type": "integer", "format": "uint16", "minimum": 0.0 } }, "additionalProperties": false }, "NativeAssetPrecisionInfo": { "type": "object", "required": [ "denom", "precision" ], "properties": { "denom": { "type": "string" }, "precision": { "type": "integer", "format": "uint8", "minimum": 0.0 } }, "additionalProperties": false }, "PoolType": { "description": "This enum describes the key for the different Pool types supported by Dexter", "oneOf": [ { "description": "Stable pool type", "type": "object", "required": [ "stable_swap" ], "properties": { "stable_swap": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Weighted pool type", "type": "object", "required": [ "weighted" ], "properties": { "weighted": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Custom pool type", "type": "object", "required": [ "custom" ], "properties": { "custom": { "type": "string" } }, "additionalProperties": false } ] }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } }, "execute": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ExecuteMsg", "description": "This struct describes the execute messages of the contract. Each msg's params should be kept generic to allow addition of new pool types later, allow addition of logic which may need those variables, even though those params might not be used by the current pools.", "oneOf": [ { "title": "Description - Update updatable parameters related to Pool's configuration", "type": "object", "required": [ "update_config" ], "properties": { "update_config": { "type": "object", "required": [ "params" ], "properties": { "params": { "$ref": "#/definitions/Binary" } }, "additionalProperties": false } }, "additionalProperties": false }, { "title": "Description - Update total fee bps", "type": "object", "required": [ "update_fee" ], "properties": { "update_fee": { "type": "object", "required": [ "total_fee_bps" ], "properties": { "total_fee_bps": { "type": "integer", "format": "uint16", "minimum": 0.0 } }, "additionalProperties": false } }, "additionalProperties": false }, { "title": "Description - Executable only by Dexter Vault. Updates locally stored asset balances state for the pool and updates the TWAP.", "type": "object", "required": [ "update_liquidity" ], "properties": { "update_liquidity": { "type": "object", "required": [ "assets" ], "properties": { "assets": { "type": "array", "items": { "$ref": "#/definitions/Asset" } } }, "additionalProperties": false } }, "additionalProperties": false } ], "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "Asset": { "title": "Description - This enum describes a asset (native or CW20).", "type": "object", "required": [ "amount", "info" ], "properties": { "amount": { "description": "A token amount", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "info": { "description": "Information about an asset stored in a [`AssetInfo`] struct", "allOf": [ { "$ref": "#/definitions/AssetInfo" } ] } }, "additionalProperties": false }, "AssetInfo": { "description": "This enum describes available Token types.", "oneOf": [ { "description": "Non-native Token", "type": "object", "required": [ "token" ], "properties": { "token": { "type": "object", "required": [ "contract_addr" ], "properties": { "contract_addr": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Native token", "type": "object", "required": [ "native_token" ], "properties": { "native_token": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "Binary": { "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } }, "query": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "QueryMsg", "description": "This struct describes the query messages of the contract. Each msg's params should be kept generic to allow addition of new pool types later, allow addition of logic which may need those variables, even though those params might not be used by the current pools.", "oneOf": [ { "title": "Description - Returns the current configuration of the pool.", "type": "object", "required": [ "config" ], "properties": { "config": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "title": "Description - Returns information about the Fees settings in a [`FeeResponse`] object.", "type": "object", "required": [ "fee_params" ], "properties": { "fee_params": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "title": "Description - Returns Pool ID which is of type [`Uint128`]", "type": "object", "required": [ "pool_id" ], "properties": { "pool_id": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "title": "Description - Returns [`AfterJoinResponse`] type which contains - `return_assets` info, number of LP shares to be minted, the `response` of type [`ResponseType`]", "description": "and `fee` of type [`Option`] which is the fee to be charged", "type": "object", "required": [ "on_join_pool" ], "properties": { "on_join_pool": { "type": "object", "properties": { "assets_in": { "type": [ "array", "null" ], "items": { "$ref": "#/definitions/Asset" } }, "mint_amount": { "anyOf": [ { "$ref": "#/definitions/Uint128" }, { "type": "null" } ] } }, "additionalProperties": false } }, "additionalProperties": false }, { "title": "Description - Returns [`AfterExitResponse`] type which contains - `assets_out` info, number of LP shares to be burnt, the `response` of type [`ResponseType`]", "description": "and `fee` of type [`Option`] which is the fee to be charged", "type": "object", "required": [ "on_exit_pool" ], "properties": { "on_exit_pool": { "type": "object", "required": [ "exit_type" ], "properties": { "exit_type": { "$ref": "#/definitions/ExitType" } }, "additionalProperties": false } }, "additionalProperties": false }, { "title": "Description - Returns [`SwapResponse`] type which contains - `trade_params` info, the `response` of type [`ResponseType`] and `fee` of type [`Option`] which is the fee to be charged", "type": "object", "required": [ "on_swap" ], "properties": { "on_swap": { "type": "object", "required": [ "amount", "ask_asset", "offer_asset", "swap_type" ], "properties": { "amount": { "$ref": "#/definitions/Uint128" }, "ask_asset": { "$ref": "#/definitions/AssetInfo" }, "offer_asset": { "$ref": "#/definitions/AssetInfo" }, "swap_type": { "$ref": "#/definitions/SwapType" } }, "additionalProperties": false } }, "additionalProperties": false }, { "title": "Description - Returns the spot price of the asset in a [`SpotPrice`] object.", "type": "object", "required": [ "spot_price" ], "properties": { "spot_price": { "type": "object", "required": [ "ask_asset", "offer_asset" ], "properties": { "ask_asset": { "$ref": "#/definitions/AssetInfo" }, "offer_asset": { "$ref": "#/definitions/AssetInfo" } }, "additionalProperties": false } }, "additionalProperties": false }, { "title": "Description - Returns information about the cumulative price of the asset in a [`CumulativePriceResponse`] object.", "type": "object", "required": [ "cumulative_price" ], "properties": { "cumulative_price": { "type": "object", "required": [ "ask_asset", "offer_asset" ], "properties": { "ask_asset": { "$ref": "#/definitions/AssetInfo" }, "offer_asset": { "$ref": "#/definitions/AssetInfo" } }, "additionalProperties": false } }, "additionalProperties": false }, { "title": "Description - Returns information about the cumulative prices in a [`CumulativePricesResponse`] object.", "type": "object", "required": [ "cumulative_prices" ], "properties": { "cumulative_prices": { "type": "object", "additionalProperties": false } }, "additionalProperties": false } ], "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "Asset": { "title": "Description - This enum describes a asset (native or CW20).", "type": "object", "required": [ "amount", "info" ], "properties": { "amount": { "description": "A token amount", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "info": { "description": "Information about an asset stored in a [`AssetInfo`] struct", "allOf": [ { "$ref": "#/definitions/AssetInfo" } ] } }, "additionalProperties": false }, "AssetInfo": { "description": "This enum describes available Token types.", "oneOf": [ { "description": "Non-native Token", "type": "object", "required": [ "token" ], "properties": { "token": { "type": "object", "required": [ "contract_addr" ], "properties": { "contract_addr": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Native token", "type": "object", "required": [ "native_token" ], "properties": { "native_token": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "ExitType": { "description": "This struct describes the ways one can choose to exit from a pool.", "oneOf": [ { "description": "provide this to convey that only this much LP tokens should be burned, irrespective of how much assets you will get back.", "type": "object", "required": [ "exact_lp_burn" ], "properties": { "exact_lp_burn": { "$ref": "#/definitions/Uint128" } }, "additionalProperties": false }, { "description": "provide this to convey that you want exactly these assets out, irrespective of how much LP tokens need to be burned for that.", "type": "object", "required": [ "exact_assets_out" ], "properties": { "exact_assets_out": { "type": "array", "items": { "$ref": "#/definitions/Asset" } } }, "additionalProperties": false } ] }, "SwapType": { "description": "This enum describes available Swap types.", "oneOf": [ { "type": "object", "required": [ "give_in" ], "properties": { "give_in": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "give_out" ], "properties": { "give_out": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Custom swap type", "type": "object", "required": [ "custom" ], "properties": { "custom": { "type": "string" } }, "additionalProperties": false } ] }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } }, "migrate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MigrateMsg", "description": "This struct describes a migration message. We currently take no arguments for migrations.", "oneOf": [ { "type": "object", "required": [ "v1_1" ], "properties": { "v1_1": { "type": "object", "additionalProperties": false } }, "additionalProperties": false } ] }, "sudo": null, "responses": { "config": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ConfigResponse", "type": "object", "required": [ "assets", "block_time_last", "fee_info", "lp_token_addr", "pool_id", "pool_type", "vault_addr" ], "properties": { "additional_params": { "anyOf": [ { "$ref": "#/definitions/Binary" }, { "type": "null" } ] }, "assets": { "description": "Assets supported by the pool", "type": "array", "items": { "$ref": "#/definitions/Asset" } }, "block_time_last": { "description": "The last time block", "type": "integer", "format": "uint64", "minimum": 0.0 }, "fee_info": { "$ref": "#/definitions/FeeStructs" }, "lp_token_addr": { "$ref": "#/definitions/Addr" }, "math_params": { "description": "Custom Math Config parameters are returned in binary format here", "anyOf": [ { "$ref": "#/definitions/Binary" }, { "type": "null" } ] }, "pool_id": { "description": "ID of contract which is allowed to create pools of this type", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "pool_type": { "description": "The pools type (provided in a [`PoolType`])", "allOf": [ { "$ref": "#/definitions/PoolType" } ] }, "vault_addr": { "description": "the vault contract address", "allOf": [ { "$ref": "#/definitions/Addr" } ] } }, "additionalProperties": false, "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "Asset": { "title": "Description - This enum describes a asset (native or CW20).", "type": "object", "required": [ "amount", "info" ], "properties": { "amount": { "description": "A token amount", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "info": { "description": "Information about an asset stored in a [`AssetInfo`] struct", "allOf": [ { "$ref": "#/definitions/AssetInfo" } ] } }, "additionalProperties": false }, "AssetInfo": { "description": "This enum describes available Token types.", "oneOf": [ { "description": "Non-native Token", "type": "object", "required": [ "token" ], "properties": { "token": { "type": "object", "required": [ "contract_addr" ], "properties": { "contract_addr": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Native token", "type": "object", "required": [ "native_token" ], "properties": { "native_token": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "Binary": { "description": "Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also .", "type": "string" }, "FeeStructs": { "title": "Description", "type": "object", "required": [ "total_fee_bps" ], "properties": { "total_fee_bps": { "type": "integer", "format": "uint16", "minimum": 0.0 } }, "additionalProperties": false }, "PoolType": { "description": "This enum describes the key for the different Pool types supported by Dexter", "oneOf": [ { "description": "Stable pool type", "type": "object", "required": [ "stable_swap" ], "properties": { "stable_swap": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Weighted pool type", "type": "object", "required": [ "weighted" ], "properties": { "weighted": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Custom pool type", "type": "object", "required": [ "custom" ], "properties": { "custom": { "type": "string" } }, "additionalProperties": false } ] }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } }, "cumulative_price": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Description - Helper struct for [`QueryMsg::CumulativePrice`]", "type": "object", "required": [ "exchange_info", "total_share" ], "properties": { "exchange_info": { "$ref": "#/definitions/AssetExchangeRate" }, "total_share": { "$ref": "#/definitions/Uint128" } }, "additionalProperties": false, "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "AssetExchangeRate": { "type": "object", "required": [ "ask_info", "offer_info", "rate" ], "properties": { "ask_info": { "$ref": "#/definitions/AssetInfo" }, "offer_info": { "$ref": "#/definitions/AssetInfo" }, "rate": { "$ref": "#/definitions/Uint128" } }, "additionalProperties": false }, "AssetInfo": { "description": "This enum describes available Token types.", "oneOf": [ { "description": "Non-native Token", "type": "object", "required": [ "token" ], "properties": { "token": { "type": "object", "required": [ "contract_addr" ], "properties": { "contract_addr": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Native token", "type": "object", "required": [ "native_token" ], "properties": { "native_token": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } }, "cumulative_prices": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Description - Helper struct for [`QueryMsg::CumulativePrices`]", "type": "object", "required": [ "exchange_infos", "total_share" ], "properties": { "exchange_infos": { "type": "array", "items": { "$ref": "#/definitions/AssetExchangeRate" } }, "total_share": { "$ref": "#/definitions/Uint128" } }, "additionalProperties": false, "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "AssetExchangeRate": { "type": "object", "required": [ "ask_info", "offer_info", "rate" ], "properties": { "ask_info": { "$ref": "#/definitions/AssetInfo" }, "offer_info": { "$ref": "#/definitions/AssetInfo" }, "rate": { "$ref": "#/definitions/Uint128" } }, "additionalProperties": false }, "AssetInfo": { "description": "This enum describes available Token types.", "oneOf": [ { "description": "Non-native Token", "type": "object", "required": [ "token" ], "properties": { "token": { "type": "object", "required": [ "contract_addr" ], "properties": { "contract_addr": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Native token", "type": "object", "required": [ "native_token" ], "properties": { "native_token": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } }, "fee_params": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Description", "type": "object", "required": [ "total_fee_bps" ], "properties": { "total_fee_bps": { "description": "The total fees (in bps) charged by a pool of this type", "type": "integer", "format": "uint16", "minimum": 0.0 } }, "additionalProperties": false }, "on_exit_pool": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Description - Helper struct for [`QueryMsg::OnExitPool`]", "type": "object", "required": [ "assets_out", "burn_shares", "response" ], "properties": { "assets_out": { "description": "Sorted list of assets which will be transferred to the recipient against tokens being burnt", "type": "array", "items": { "$ref": "#/definitions/Asset" } }, "burn_shares": { "description": "Number of LP tokens to burn", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "fee": { "description": "Fee to be charged", "type": [ "array", "null" ], "items": { "$ref": "#/definitions/Asset" } }, "response": { "description": "Operation will be a `Success` or `Failure`", "allOf": [ { "$ref": "#/definitions/ResponseType" } ] } }, "additionalProperties": false, "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "Asset": { "title": "Description - This enum describes a asset (native or CW20).", "type": "object", "required": [ "amount", "info" ], "properties": { "amount": { "description": "A token amount", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "info": { "description": "Information about an asset stored in a [`AssetInfo`] struct", "allOf": [ { "$ref": "#/definitions/AssetInfo" } ] } }, "additionalProperties": false }, "AssetInfo": { "description": "This enum describes available Token types.", "oneOf": [ { "description": "Non-native Token", "type": "object", "required": [ "token" ], "properties": { "token": { "type": "object", "required": [ "contract_addr" ], "properties": { "contract_addr": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Native token", "type": "object", "required": [ "native_token" ], "properties": { "native_token": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "ResponseType": { "title": "Description", "description": "This enum is used to describe if the math computations (joins/exits/swaps) will be successful or not", "oneOf": [ { "type": "object", "required": [ "success" ], "properties": { "success": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "failure" ], "properties": { "failure": { "type": "string" } }, "additionalProperties": false } ] }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } }, "on_join_pool": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Description - Helper struct for [`QueryMsg::OnJoinPool`]", "type": "object", "required": [ "new_shares", "provided_assets", "response" ], "properties": { "fee": { "type": [ "array", "null" ], "items": { "$ref": "#/definitions/Asset" } }, "new_shares": { "$ref": "#/definitions/Uint128" }, "provided_assets": { "type": "array", "items": { "$ref": "#/definitions/Asset" } }, "response": { "$ref": "#/definitions/ResponseType" } }, "additionalProperties": false, "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "Asset": { "title": "Description - This enum describes a asset (native or CW20).", "type": "object", "required": [ "amount", "info" ], "properties": { "amount": { "description": "A token amount", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "info": { "description": "Information about an asset stored in a [`AssetInfo`] struct", "allOf": [ { "$ref": "#/definitions/AssetInfo" } ] } }, "additionalProperties": false }, "AssetInfo": { "description": "This enum describes available Token types.", "oneOf": [ { "description": "Non-native Token", "type": "object", "required": [ "token" ], "properties": { "token": { "type": "object", "required": [ "contract_addr" ], "properties": { "contract_addr": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Native token", "type": "object", "required": [ "native_token" ], "properties": { "native_token": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "ResponseType": { "title": "Description", "description": "This enum is used to describe if the math computations (joins/exits/swaps) will be successful or not", "oneOf": [ { "type": "object", "required": [ "success" ], "properties": { "success": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "failure" ], "properties": { "failure": { "type": "string" } }, "additionalProperties": false } ] }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } }, "on_swap": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Description - Helper struct for [`QueryMsg::OnSwap`]", "type": "object", "required": [ "response", "trade_params" ], "properties": { "fee": { "description": "Fee to be charged", "anyOf": [ { "$ref": "#/definitions/Asset" }, { "type": "null" } ] }, "response": { "description": "Operation will be a `Success` or `Failure`", "allOf": [ { "$ref": "#/definitions/ResponseType" } ] }, "trade_params": { "description": "Is of type [`Trade`] which contains all params related with the trade", "allOf": [ { "$ref": "#/definitions/Trade" } ] } }, "additionalProperties": false, "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "Asset": { "title": "Description - This enum describes a asset (native or CW20).", "type": "object", "required": [ "amount", "info" ], "properties": { "amount": { "description": "A token amount", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "info": { "description": "Information about an asset stored in a [`AssetInfo`] struct", "allOf": [ { "$ref": "#/definitions/AssetInfo" } ] } }, "additionalProperties": false }, "AssetInfo": { "description": "This enum describes available Token types.", "oneOf": [ { "description": "Non-native Token", "type": "object", "required": [ "token" ], "properties": { "token": { "type": "object", "required": [ "contract_addr" ], "properties": { "contract_addr": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Native token", "type": "object", "required": [ "native_token" ], "properties": { "native_token": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "ResponseType": { "title": "Description", "description": "This enum is used to describe if the math computations (joins/exits/swaps) will be successful or not", "oneOf": [ { "type": "object", "required": [ "success" ], "properties": { "success": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "failure" ], "properties": { "failure": { "type": "string" } }, "additionalProperties": false } ] }, "Trade": { "title": "Description", "description": "This helper struct is used for swap operations in the pool", "type": "object", "required": [ "amount_in", "amount_out", "spread" ], "properties": { "amount_in": { "description": "The number of tokens to be sent by the user to the Vault", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "amount_out": { "description": "The number of tokens to be received by the user from the Vault", "allOf": [ { "$ref": "#/definitions/Uint128" } ] }, "spread": { "description": "The spread associated with the swap tx", "allOf": [ { "$ref": "#/definitions/Uint128" } ] } }, "additionalProperties": false }, "Uint128": { "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" } } }, "pool_id": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Uint128", "description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```", "type": "string" }, "spot_price": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "SpotPrice", "type": "object", "required": [ "from", "price", "price_including_fee", "to" ], "properties": { "from": { "$ref": "#/definitions/AssetInfo" }, "price": { "$ref": "#/definitions/Decimal256" }, "price_including_fee": { "$ref": "#/definitions/Decimal256" }, "to": { "$ref": "#/definitions/AssetInfo" } }, "additionalProperties": false, "definitions": { "Addr": { "description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.", "type": "string" }, "AssetInfo": { "description": "This enum describes available Token types.", "oneOf": [ { "description": "Non-native Token", "type": "object", "required": [ "token" ], "properties": { "token": { "type": "object", "required": [ "contract_addr" ], "properties": { "contract_addr": { "$ref": "#/definitions/Addr" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Native token", "type": "object", "required": [ "native_token" ], "properties": { "native_token": { "type": "object", "required": [ "denom" ], "properties": { "denom": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false } ] }, "Decimal256": { "description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal256(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 115792089237316195423570985008687907853269984665640564039457.584007913129639935 (which is (2^256 - 1) / 10^18)", "type": "string" } } } } }