mars_core/xmars_token.rs
1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4use cosmwasm_std::Uint128;
5
6#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema, Debug, Default)]
7pub struct TotalSupplyResponse {
8 pub total_supply: Uint128,
9}
10
11pub mod msg {
12 use schemars::JsonSchema;
13 use serde::{Deserialize, Serialize};
14
15 pub use cw20_base::msg::{ExecuteMsg, InstantiateMsg};
16
17 #[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
18 #[serde(rename_all = "snake_case")]
19 pub enum QueryMsg {
20 /// Returns the current balance of the given address, 0 if unset.
21 /// Return type: BalanceResponse.
22 Balance {
23 address: String,
24 },
25 /// Returns the balance of the given address at a given block
26 /// Return type: BalanceResponse.
27 BalanceAt {
28 address: String,
29 block: u64,
30 },
31 /// Returns metadata on the contract - name, decimals, supply, etc.
32 /// Return type: TokenInfoResponse.
33 TokenInfo {},
34 /// Total Supply at a given block
35 /// Return type: TotalSupplyResponse
36 TotalSupplyAt {
37 block: u64,
38 },
39 Minter {},
40 /// Only with "allowance" extension.
41 /// Returns how much spender can use from owner account, 0 if unset.
42 /// Return type: AllowanceResponse.
43 Allowance {
44 owner: String,
45 spender: String,
46 },
47 /// Only with "enumerable" extension (and "allowances")
48 /// Returns all allowances this owner has approved. Supports pagination.
49 /// Return type: AllAllowancesResponse.
50 AllAllowances {
51 owner: String,
52 start_after: Option<String>,
53 limit: Option<u32>,
54 },
55 /// Only with "enumerable" extension
56 /// Returns all accounts that have balances. Supports pagination.
57 /// Return type: AllAccountsResponse.
58 AllAccounts {
59 start_after: Option<String>,
60 limit: Option<u32>,
61 },
62 /// Only with "marketing" extension
63 /// Returns more metadata on the contract to display in the client:
64 /// - description, logo, project url, etc.
65 /// Return type: MarketingInfoResponse
66 MarketingInfo {},
67 /// Only with "marketing" extension
68 /// Downloads the mbeded logo data (if stored on chain). Errors if no logo data ftored for this
69 /// contract.
70 /// Return type: DownloadLogoResponse.
71 DownloadLogo {},
72 }
73}