soroban_cli/commands/contract/
asset.rs1use crate::commands::global;
2
3use super::{deploy, id};
4
5#[derive(Debug, clap::Subcommand)]
6pub enum Cmd {
7 Id(id::asset::Cmd),
9 Deploy(deploy::asset::Cmd),
11}
12
13#[derive(thiserror::Error, Debug)]
14pub enum Error {
15 #[error(transparent)]
16 Id(#[from] id::asset::Error),
17 #[error(transparent)]
18 Deploy(#[from] deploy::asset::Error),
19}
20
21impl Cmd {
22 pub async fn run(&self, global_args: &global::Args) -> Result<(), Error> {
23 match &self {
24 Cmd::Id(id) => id.run()?,
25 Cmd::Deploy(asset) => asset.run(global_args).await?,
26 }
27 Ok(())
28 }
29}