Skip to content

Commit

Permalink
spl-token: provide more useful output when using create-token with th…
Browse files Browse the repository at this point in the history
…e output option and small redesign of token cli architecture (solana-labs#2593)

* spl-token: WIP

* Remove and_then, move tx handling in separate function- output handling still missing

* spl-token: add basic output handling for all calls, add detailed output to create-token

* spl-token: remove changes in bench that are not strictly necessary to remove # of files touched in this PR

* [spl-token] cli: HandleTxReturn is now TransactionReturnData

* [spl-token] cli: Make commands return output String that is printed in fn main()

* [spl-token] cli: remove old todos

* [spl-token] cli: only use no_wait arg in command_transfer and use constant for "create-token"
  • Loading branch information
paul-schaaf authored Nov 24, 2021
1 parent f83240a commit 7393f1d
Show file tree
Hide file tree
Showing 3 changed files with 542 additions and 149 deletions.
6 changes: 4 additions & 2 deletions token/cli/src/bench.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use crate::CommandResult;

/// The `bench` subcommand
use {
crate::{
Expand Down Expand Up @@ -165,7 +167,7 @@ pub(crate) fn bench_process_command(
config: &Config,
mut signers: Vec<Box<dyn Signer>>,
wallet_manager: &mut Option<Arc<RemoteWalletManager>>,
) -> Result<(), Error> {
) -> CommandResult {
assert!(!config.sign_only);

match matches.subcommand() {
Expand Down Expand Up @@ -229,7 +231,7 @@ pub(crate) fn bench_process_command(
_ => unreachable!(),
}

Ok(())
Ok("".to_string())
}

fn get_token_address_with_seed(token: &Pubkey, owner: &Pubkey, i: usize) -> (Pubkey, String) {
Expand Down
Loading

0 comments on commit 7393f1d

Please sign in to comment.