1use cosmwasm_schema::cw_serde;
2use cosmwasm_std::{Addr, Coin, Decimal, Timestamp, Uint128};
3use kujira_std::{CallbackMsg, Denom};
4
5#[cw_serde]
6pub enum ExecuteMsg {
7 Create {
9 sale: CreateSale,
10 orca: CreateOrca,
11 },
12 Execute {
14 idx: Uint128,
15 },
16 Retract {
18 idx: Uint128,
19 },
20 Orca {
21 sale: Uint128,
22 msg: kujira_orca::ExecuteMsg,
23 },
24 UpdateConfig {
25 owner: Option<Addr>,
26 orca_code_id: Option<u64>,
27 orca_admin: Option<Addr>,
28 orca_owner: Option<Addr>,
29 sale_fee: Option<Decimal>,
30 withdrawal_fee: Option<Decimal>,
31 deposit: Option<Coin>,
32 fee_address: Option<Addr>,
33 },
34 UpdateSaleDescription {
36 idx: Uint128,
37 description: String,
38 },
39 Callback(CallbackMsg),
40}
41
42#[cw_serde]
43pub struct CreateSale {
44 pub title: String,
45
46 pub description: String,
47
48 pub url: String,
49
50 pub beneficiary: Addr,
52
53 pub price: Decimal,
55
56 pub opens: Timestamp,
57
58 pub closes: Timestamp,
60}
61
62#[cw_serde]
63pub struct CreateOrca {
64 pub bid_denom: Denom,
66
67 pub bid_threshold: Uint128,
69
70 pub max_slot: u8,
72
73 pub premium_rate_per_slot: Decimal,
75
76 pub waiting_period: u64,
78}
79
80#[cw_serde]
81pub enum Status {
82 Live { closes_at: Timestamp },
84 Retracted(Timestamp),
86 Executed {
88 at: Timestamp,
89 raise_total: Uint128,
90 raise_fee: Uint128,
91 raise_amount: Uint128,
92 },
93}
94
95#[cw_serde]
96pub enum CallbackType {
97 LiquidationCallback { idx: Uint128 },
98}