{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "QueryMsg", "oneOf": [ { "type": "object", "required": [ "get_balance" ], "properties": { "get_balance": { "type": "object", "required": [ "address", "denom" ], "properties": { "address": { "type": "string" }, "denom": { "type": "string" } } } }, "additionalProperties": false }, { "type": "object", "required": [ "get_cw20_balance" ], "properties": { "get_cw20_balance": { "type": "object", "required": [ "address", "cw20_contract" ], "properties": { "address": { "type": "string" }, "cw20_contract": { "type": "string" } } } }, "additionalProperties": false }, { "type": "object", "required": [ "has_balance_gte" ], "properties": { "has_balance_gte": { "$ref": "#/definitions/HasBalanceGte" } }, "additionalProperties": false }, { "type": "object", "required": [ "check_owner_of_nft" ], "properties": { "check_owner_of_nft": { "$ref": "#/definitions/CheckOwnerOfNft" } }, "additionalProperties": false }, { "type": "object", "required": [ "check_proposal_status" ], "properties": { "check_proposal_status": { "$ref": "#/definitions/CheckProposalStatus" } }, "additionalProperties": false }, { "type": "object", "required": [ "generic_query" ], "properties": { "generic_query": { "$ref": "#/definitions/GenericQuery" } }, "additionalProperties": false }, { "type": "object", "required": [ "query_construct" ], "properties": { "query_construct": { "$ref": "#/definitions/QueryConstruct" } }, "additionalProperties": false }, { "type": "object", "required": [ "smart_query" ], "properties": { "smart_query": { "$ref": "#/definitions/SmartQueryHead" } }, "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" }, "Balance": { "oneOf": [ { "type": "object", "required": [ "native" ], "properties": { "native": { "$ref": "#/definitions/NativeBalance" } }, "additionalProperties": false }, { "type": "object", "required": [ "cw20" ], "properties": { "cw20": { "$ref": "#/definitions/Cw20CoinVerified" } }, "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" }, "CheckOwnerOfNft": { "type": "object", "required": [ "address", "nft_address", "token_id" ], "properties": { "address": { "type": "string" }, "nft_address": { "type": "string" }, "token_id": { "type": "string" } } }, "CheckProposalStatus": { "type": "object", "required": [ "dao_address", "proposal_id", "status" ], "properties": { "dao_address": { "type": "string" }, "proposal_id": { "type": "integer", "format": "uint64", "minimum": 0.0 }, "status": { "$ref": "#/definitions/Status" } } }, "Coin": { "type": "object", "required": [ "amount", "denom" ], "properties": { "amount": { "$ref": "#/definitions/Uint128" }, "denom": { "type": "string" } } }, "CroncatQuery": { "oneOf": [ { "type": "object", "required": [ "query" ], "properties": { "query": { "type": "object", "required": [ "contract_addr", "msg" ], "properties": { "contract_addr": { "type": "string" }, "msg": { "$ref": "#/definitions/Binary" } } } }, "additionalProperties": false }, { "type": "object", "required": [ "has_balance_gte" ], "properties": { "has_balance_gte": { "$ref": "#/definitions/HasBalanceGte" } }, "additionalProperties": false }, { "type": "object", "required": [ "check_owner_of_nft" ], "properties": { "check_owner_of_nft": { "$ref": "#/definitions/CheckOwnerOfNft" } }, "additionalProperties": false }, { "type": "object", "required": [ "check_proposal_status" ], "properties": { "check_proposal_status": { "$ref": "#/definitions/CheckProposalStatus" } }, "additionalProperties": false }, { "type": "object", "required": [ "generic_query" ], "properties": { "generic_query": { "$ref": "#/definitions/GenericQuery" } }, "additionalProperties": false }, { "type": "object", "required": [ "smart_query" ], "properties": { "smart_query": { "$ref": "#/definitions/SmartQueryHead" } }, "additionalProperties": false } ] }, "Cw20CoinVerified": { "type": "object", "required": [ "address", "amount" ], "properties": { "address": { "$ref": "#/definitions/Addr" }, "amount": { "$ref": "#/definitions/Uint128" } } }, "GenericQuery": { "type": "object", "required": [ "contract_addr", "msg", "ordering", "path_to_value", "value" ], "properties": { "contract_addr": { "type": "string" }, "msg": { "$ref": "#/definitions/Binary" }, "ordering": { "$ref": "#/definitions/ValueOrdering" }, "path_to_value": { "$ref": "#/definitions/PathToValue" }, "value": { "$ref": "#/definitions/Binary" } } }, "HasBalanceGte": { "type": "object", "required": [ "address", "required_balance" ], "properties": { "address": { "type": "string" }, "required_balance": { "$ref": "#/definitions/Balance" } } }, "NativeBalance": { "type": "array", "items": { "$ref": "#/definitions/Coin" } }, "PathToValue": { "type": "array", "items": { "$ref": "#/definitions/ValueIndex" } }, "QueryConstruct": { "type": "object", "required": [ "queries" ], "properties": { "queries": { "type": "array", "items": { "$ref": "#/definitions/CroncatQuery" } } } }, "SmartQueries": { "type": "array", "items": { "$ref": "#/definitions/SmartQuery" } }, "SmartQuery": { "type": "object", "required": [ "contract_addr", "msg", "path_to_msg_value", "path_to_query_value" ], "properties": { "contract_addr": { "type": "string" }, "msg": { "$ref": "#/definitions/Binary" }, "path_to_msg_value": { "description": "Replace value inside this query", "allOf": [ { "$ref": "#/definitions/PathToValue" } ] }, "path_to_query_value": { "description": "Value passed to the next iteration", "allOf": [ { "$ref": "#/definitions/PathToValue" } ] } } }, "SmartQueryHead": { "type": "object", "required": [ "contract_addr", "msg", "ordering", "path_to_query_value", "queries", "value" ], "properties": { "contract_addr": { "type": "string" }, "msg": { "description": "First query without placeholder!", "allOf": [ { "$ref": "#/definitions/Binary" } ] }, "ordering": { "$ref": "#/definitions/ValueOrdering" }, "path_to_query_value": { "description": "Value from this message", "allOf": [ { "$ref": "#/definitions/PathToValue" } ] }, "queries": { "$ref": "#/definitions/SmartQueries" }, "value": { "$ref": "#/definitions/Binary" } } }, "Status": { "oneOf": [ { "type": "string", "enum": [ "execution_failed" ] }, { "description": "The proposal is open for voting.", "type": "string", "enum": [ "open" ] }, { "description": "The proposal has been rejected.", "type": "string", "enum": [ "rejected" ] }, { "description": "The proposal has been passed but has not been executed.", "type": "string", "enum": [ "passed" ] }, { "description": "The proposal has been passed and executed.", "type": "string", "enum": [ "executed" ] }, { "description": "The proposal has failed or expired and has been closed. A proposal deposit refund has been issued if applicable.", "type": "string", "enum": [ "closed" ] } ] }, "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" }, "ValueIndex": { "oneOf": [ { "type": "object", "required": [ "key" ], "properties": { "key": { "type": "string" } }, "additionalProperties": false }, { "type": "object", "required": [ "index" ], "properties": { "index": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "additionalProperties": false } ] }, "ValueOrdering": { "type": "string", "enum": [ "unit_above", "unit_above_equal", "unit_below", "unit_below_equal", "equal", "not_equal" ] } } }