jk_cosmwasm_std/query/wasm.rs
1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4use crate::Binary;
5
6#[non_exhaustive]
7#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
8#[serde(rename_all = "snake_case")]
9pub enum WasmQuery {
10 /// this queries the public API of another contract at a known address (with known ABI)
11 /// return value is whatever the contract returns (caller should know)
12 Smart {
13 contract_addr: String,
14 /// msg is the json-encoded QueryMsg struct
15 msg: Binary,
16 },
17 /// this queries the raw kv-store of the contract.
18 /// returns the raw, unparsed data stored at that key, which may be an empty vector if not present
19 Raw {
20 contract_addr: String,
21 /// Key is the raw key used in the contracts Storage
22 key: Binary,
23 },
24}