forked from aptos-labs/aptos-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move create and list under account command
- Loading branch information
1 parent
de801f2
commit 8f62a12
Showing
4 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (c) Aptos | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
//! A command to create a new account on-chain | ||
//! | ||
//! TODO: Examples | ||
//! | ||
use crate::common::types::CliResult; | ||
use clap::Subcommand; | ||
|
||
pub mod create; | ||
pub mod list; | ||
|
||
/// Command to create a new account on-chain | ||
/// | ||
#[derive(Debug, Subcommand)] | ||
pub enum AccountTool { | ||
Create(create::CreateAccount), | ||
List(list::ListResources), | ||
} | ||
|
||
impl AccountTool { | ||
pub async fn execute(self) -> CliResult { | ||
match self { | ||
AccountTool::Create(tool) => tool.execute().await, | ||
AccountTool::List(tool) => tool.execute().await, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters