Skip to content

Commit 7393f1d

Browse files
authored
spl-token: provide more useful output when using create-token with the 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"
1 parent f83240a commit 7393f1d

File tree

3 files changed

+542
-149
lines changed

3 files changed

+542
-149
lines changed

token/cli/src/bench.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use crate::CommandResult;
2+
13
/// The `bench` subcommand
24
use {
35
crate::{
@@ -165,7 +167,7 @@ pub(crate) fn bench_process_command(
165167
config: &Config,
166168
mut signers: Vec<Box<dyn Signer>>,
167169
wallet_manager: &mut Option<Arc<RemoteWalletManager>>,
168-
) -> Result<(), Error> {
170+
) -> CommandResult {
169171
assert!(!config.sign_only);
170172

171173
match matches.subcommand() {
@@ -229,7 +231,7 @@ pub(crate) fn bench_process_command(
229231
_ => unreachable!(),
230232
}
231233

232-
Ok(())
234+
Ok("".to_string())
233235
}
234236

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

0 commit comments

Comments
 (0)