vending_minter_wl_flex/
msg.rs1use cosmwasm_schema::{cw_serde, QueryResponses};
2use cosmwasm_std::{Coin, Timestamp};
3use sg4::StatusResponse;
4use vending_factory::{msg::VendingMinterCreateMsg, state::VendingMinterParams};
5
6#[cw_serde]
7pub struct InstantiateMsg {
8 pub create_msg: VendingMinterCreateMsg,
9 pub params: VendingMinterParams,
10}
11
12#[cw_serde]
13pub enum ExecuteMsg {
14 Mint {},
15 SetWhitelist {
16 whitelist: String,
17 },
18 Purge {},
19 UpdateMintPrice {
20 price: u128,
21 },
22 UpdateStartTime(Timestamp),
23 UpdateStartTradingTime(Option<Timestamp>),
25 UpdatePerAddressLimit {
26 per_address_limit: u32,
27 },
28 MintTo {
29 recipient: String,
30 },
31 MintFor {
32 token_id: u32,
33 recipient: String,
34 },
35 Shuffle {},
36 BurnRemaining {},
37 UpdateDiscountPrice {
38 price: u128,
39 },
40 RemoveDiscountPrice {},
41}
42
43#[cw_serde]
44#[derive(QueryResponses)]
45pub enum QueryMsg {
46 #[returns(ConfigResponse)]
47 Config {},
48 #[returns(MintableNumTokensResponse)]
49 MintableNumTokens {},
50 #[returns(StartTimeResponse)]
51 StartTime {},
52 #[returns(MintPriceResponse)]
53 MintPrice {},
54 #[returns(MintCountResponse)]
55 MintCount { address: String },
56 #[returns(StatusResponse)]
57 Status {},
58}
59
60#[cw_serde]
61pub struct ConfigResponse {
62 pub admin: String,
63 pub base_token_uri: String,
64 pub num_tokens: u32,
65 pub per_address_limit: u32,
66 pub sg721_address: String,
67 pub sg721_code_id: u64,
68 pub start_time: Timestamp,
69 pub mint_price: Coin,
70 pub whitelist: Option<String>,
71 pub factory: String,
72 pub discount_price: Option<Coin>,
73}
74
75#[cw_serde]
76pub struct MintableNumTokensResponse {
77 pub count: u32,
78}
79
80#[cw_serde]
81pub struct StartTimeResponse {
82 pub start_time: String,
83}
84
85#[cw_serde]
86pub struct MintPriceResponse {
87 pub public_price: Coin,
88 pub airdrop_price: Coin,
89 pub whitelist_price: Option<Coin>,
90 pub current_price: Coin,
91 pub discount_price: Option<Coin>,
92}
93
94#[cw_serde]
95pub struct MintCountResponse {
96 pub address: String,
97 pub count: u32,
98 pub whitelist_count: u32,
99}