kujira_std/
msg.rs

1//!    Bindings for message execution on Kujira Core
2
3use cosmwasm_schema::cw_serde;
4use cosmwasm_std::{Addr, Coin, CosmosMsg, CustomMsg, Timestamp, Uint128};
5
6use crate::{denom::Denom, ica::IcaMsg};
7
8#[cw_serde]
9pub enum KujiraMsg {
10    Auth(AuthMsg),
11    Batch(BatchMsg),
12    Denom(DenomMsg),
13    Ica(IcaMsg),
14}
15
16impl CustomMsg for KujiraMsg {}
17
18impl From<KujiraMsg> for CosmosMsg<KujiraMsg> {
19    fn from(msg: KujiraMsg) -> Self {
20        CosmosMsg::Custom(msg)
21    }
22}
23
24#[cw_serde]
25pub enum AuthMsg {
26    CreateVestingAccount {
27        to_address: Addr,
28        amount: Vec<Coin>,
29        end_time: Option<Timestamp>,
30        delayed: Option<bool>,
31    },
32}
33
34impl From<AuthMsg> for CosmosMsg<KujiraMsg> {
35    fn from(msg: AuthMsg) -> Self {
36        KujiraMsg::Auth(msg).into()
37    }
38}
39
40#[cw_serde]
41pub enum BatchMsg {
42    WithdrawAllDelegatorRewards {},
43}
44
45#[cw_serde]
46pub enum DenomMsg {
47    Create {
48        subdenom: Denom,
49    },
50    ChangeAdmin {
51        denom: Denom,
52        address: Addr,
53    },
54    Mint {
55        denom: Denom,
56        amount: Uint128,
57        recipient: Addr,
58    },
59    Burn {
60        denom: Denom,
61        amount: Uint128,
62    },
63}
64
65impl From<DenomMsg> for CosmosMsg<KujiraMsg> {
66    fn from(msg: DenomMsg) -> Self {
67        KujiraMsg::Denom(msg).into()
68    }
69}