-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathmod.rs
35 lines (31 loc) · 1.15 KB
/
mod.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
mod query_cw20;
mod query_native;
mod send_cw20;
mod send_native;
use strum::{EnumDiscriminants, EnumIter, EnumMessage};
use super::CosmosContext;
#[derive(Debug, Clone, interactive_clap::InteractiveClap)]
#[interactive_clap(context = CosmosContext)]
pub struct AssetCommands {
#[interactive_clap(subcommand)]
action: AssetAction,
}
#[derive(Debug, EnumDiscriminants, Clone, interactive_clap::InteractiveClap)]
#[strum_discriminants(derive(EnumMessage, EnumIter))]
#[interactive_clap(context = CosmosContext)]
/// Select asset action
pub enum AssetAction {
/// Native or factory coin send
#[strum_discriminants(strum(message = "Send native coins"))]
SendNative(send_native::SendNativeCommands),
/// Native or factory coin transfer
#[strum_discriminants(strum(message = "Send cw20 coin"))]
SendCw20(send_cw20::Cw20TransferCommands),
/// Native or factory coins query
#[strum_discriminants(strum(message = "Query native coins"))]
QueryNative(query_native::QueryNativeCommands),
/// Cw20 coin query
#[strum_discriminants(strum(message = "Query cw20 coins"))]
QueryCw20(query_cw20::QueryCw20Commands),
// TODO: cw720?
}