Skip to main content

junomint_prices/
query.rs

1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4use cosmwasm_std::{Uint128};
5
6#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
7pub struct SwapDetailsResponse {
8    pub name: String,
9    pub receiver: String,
10    pub swap_address: String,
11    pub token2_amount: Uint128,
12    pub type_code: String
13}
14
15#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
16pub struct SwapDetailsPriceResponse {
17    pub name: String,
18    pub receiver: String,
19    pub swap_address: String,
20    pub token1_amount: Uint128,
21    pub token2_amount: Uint128,
22    pub type_code: String
23}
24
25#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
26#[serde(rename_all = "snake_case")]
27pub enum QueryMsg {
28    Token1ForToken2Price {
29        type_code: String
30    },
31    SwapDetails {
32        type_code: String
33    }
34}