diff --git a/crates/cargo-contract/src/cmd/info.rs b/crates/cargo-contract/src/cmd/info.rs index b5f9bc880..b682bd962 100644 --- a/crates/cargo-contract/src/cmd/info.rs +++ b/crates/cargo-contract/src/cmd/info.rs @@ -21,6 +21,7 @@ use super::{ }; use crate::{ cmd::{ + extrinsics::MAX_KEY_COL_WIDTH, runtime_api::api::runtime_types::pallet_contracts::storage::ContractInfo, Balance, CodeHash, @@ -128,12 +129,21 @@ impl InfoToJson { /// Display contract information in a formatted way pub fn basic_display_format_contract_info(&self) { - name_value_println!("TrieId:", format!("{}", self.trie_id)); - name_value_println!("Code hash:", format!("{:?}", self.code_hash)); - name_value_println!("Storage items:", format!("{:?}", self.storage_items)); + name_value_println!("TrieId", format!("{}", self.trie_id), MAX_KEY_COL_WIDTH); name_value_println!( - "Storage deposit:", - format!("{:?}", self.storage_item_deposit) + "Code Hash", + format!("{:?}", self.code_hash), + MAX_KEY_COL_WIDTH + ); + name_value_println!( + "Storage Items", + format!("{:?}", self.storage_items), + MAX_KEY_COL_WIDTH + ); + name_value_println!( + "Storage Deposit", + format!("{:?}", self.storage_item_deposit), + MAX_KEY_COL_WIDTH ); } }