1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use crate::Coin;
use super::query_response::QueryResponseType;
#[non_exhaustive]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum BankQuery {
#[cfg(feature = "cosmwasm_1_1")]
Supply { denom: String },
Balance { address: String, denom: String },
AllBalances { address: String },
}
#[cfg(feature = "cosmwasm_1_1")]
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
#[non_exhaustive]
pub struct SupplyResponse {
pub amount: Coin,
}
#[cfg(feature = "cosmwasm_1_1")]
impl QueryResponseType for SupplyResponse {}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub struct BalanceResponse {
pub amount: Coin,
}
impl QueryResponseType for BalanceResponse {}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub struct AllBalanceResponse {
pub amount: Vec<Coin>,
}
impl QueryResponseType for AllBalanceResponse {}