Skip to content

Commit

Permalink
[gh-2317] add dynamic field command to main rooch command list.
Browse files Browse the repository at this point in the history
  • Loading branch information
Feliciss committed Aug 13, 2024
1 parent f5c5522 commit 86824c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/rooch/src/commands/dynamic_field/commands/get.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use moveos_types::state::FieldKey;
use rooch_rpc_api::jsonrpc_types::{FieldKeyView, ObjectStateView, StateOptions};
use rooch_types::{error::RoochResult, function_arg::ParsedObjectID};

/// Get field states for a special dynamic field with a Field Key.
/// Get field states for a special dynamic field with an Object ID and Field Keys.
#[derive(Debug, Parser)]
pub struct GetFieldStatesCommand {
#[clap(short = 'i', long, required = true)]
Expand Down
10 changes: 6 additions & 4 deletions crates/rooch/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ use crate::commands::statedb::Statedb;
use clap::builder::styling::{AnsiColor, Effects, Styles};
use cli_types::CommandAction;
use commands::{
abi::ABI, account::Account, env::Env, genesis::Genesis, init::Init, move_cli::MoveCli,
object::ObjectCommand, resource::ResourceCommand, rpc::Rpc, server::Server,
session_key::SessionKey, state::StateCommand, transaction::Transaction, upgrade::Upgrade,
version::Version,
abi::ABI, account::Account, dynamic_field::DynamicField, env::Env, genesis::Genesis,
init::Init, move_cli::MoveCli, object::ObjectCommand, resource::ResourceCommand, rpc::Rpc,
server::Server, session_key::SessionKey, state::StateCommand, transaction::Transaction,
upgrade::Upgrade, version::Version,
};
use once_cell::sync::Lazy;
use rooch_types::error::RoochResult;
Expand Down Expand Up @@ -48,6 +48,7 @@ pub enum Command {
Server(Server),
State(StateCommand),
Object(ObjectCommand),
DynamicField(DynamicField),
Resource(ResourceCommand),
Transaction(Transaction),
Event(EventCommand),
Expand All @@ -71,6 +72,7 @@ pub async fn run_cli(opt: RoochCli) -> RoochResult<String> {
Command::Init(init) => init.execute_serialized().await,
Command::State(state) => state.execute_serialized().await,
Command::Object(object) => object.execute_serialized().await,
Command::DynamicField(dynamic_field) => dynamic_field.execute_serialized().await,
Command::Resource(resource) => resource.execute_serialized().await,
Command::Transaction(transation) => transation.execute().await,
Command::Event(event) => event.execute().await,
Expand Down

0 comments on commit 86824c6

Please sign in to comment.