1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4use cosmwasm_std::{CosmosMsg, CustomMsg};
5
6#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
8#[serde(rename_all = "snake_case")]
9pub enum DefundMsg {
10 EditFund {
11 symbol: String,
12 holdings: Vec<Holding>
13 },
14}
15
16#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
17pub struct Holding {
18 pub token: String,
19 pub percent: i64,
20 pub pool_id: u64,
21 pub broker_id: String,
22 pub asset_type: String,
23}
24
25impl From<DefundMsg> for CosmosMsg<DefundMsg> {
26 fn from(msg: DefundMsg) -> CosmosMsg<DefundMsg> {
27 CosmosMsg::Custom(msg)
28 }
29}
30
31impl CustomMsg for DefundMsg {}