diff --git a/src/commands/add_command/access_key/operation_mode/mod.rs b/src/commands/add_command/access_key/operation_mode/mod.rs index 93cfe21e9..6a72af641 100644 --- a/src/commands/add_command/access_key/operation_mode/mod.rs +++ b/src/commands/add_command/access_key/operation_mode/mod.rs @@ -26,12 +26,12 @@ impl OperationMode { ///Do you want to derive some information required for transaction construction automatically querying it online? pub enum Mode { #[strum_discriminants(strum(message = "Yes, I keep it simple"))] - /// Prepare and, optionally, submit a new transaction with online mode + /// Prepare and, optionally, submit a new transaction in online mode Network(self::online_mode::NetworkArgs), #[strum_discriminants(strum( message = "No, I want to work in no-network (air-gapped) environment" ))] - /// Prepare and, optionally, submit a new transaction with offline mode + /// Prepare and, optionally, submit a new transaction in offline mode Offline(self::offline_mode::OfflineArgs), } diff --git a/src/commands/add_command/contract_code/contract/initialize_mode/call_function_type/mod.rs b/src/commands/add_command/contract_code/contract/initialize_mode/call_function_type/mod.rs index 212250b10..015d33207 100644 --- a/src/commands/add_command/contract_code/contract/initialize_mode/call_function_type/mod.rs +++ b/src/commands/add_command/contract_code/contract/initialize_mode/call_function_type/mod.rs @@ -30,7 +30,7 @@ impl CallFunctionAction { println!(); let gas: u64 = loop { let input_gas: crate::common::NearGas = Input::new() - .with_prompt("Enter a gas for function") + .with_prompt("Enter gas for function call") .with_initial_text("100 TeraGas") .interact_text()?; let gas: u64 = match input_gas { @@ -58,7 +58,7 @@ impl CallFunctionAction { println!(); let deposit: crate::common::NearBalance = Input::new() .with_prompt( - "Enter a deposit for function (example: 10NEAR or 0.5near or 10000yoctonear).", + "Enter deposit for a function call (example: 10NEAR or 0.5near or 10000yoctonear).", ) .with_initial_text("0 NEAR") .interact_text()?; diff --git a/src/commands/add_command/contract_code/contract/mod.rs b/src/commands/add_command/contract_code/contract/mod.rs index 9e642d69e..84e18bdcc 100644 --- a/src/commands/add_command/contract_code/contract/mod.rs +++ b/src/commands/add_command/contract_code/contract/mod.rs @@ -16,7 +16,7 @@ impl ContractFile { ) -> color_eyre::eyre::Result { println!(); let input_file_path: String = Input::new() - .with_prompt("What is a file location of the contract?") + .with_prompt("What is the file location of the contract?") .interact_text()?; Ok(std::path::PathBuf::from(input_file_path).into()) } diff --git a/src/commands/construct_transaction_command/transaction_actions/add_contract_code_type/mod.rs b/src/commands/construct_transaction_command/transaction_actions/add_contract_code_type/mod.rs index 96de1ac53..16668e36e 100644 --- a/src/commands/construct_transaction_command/transaction_actions/add_contract_code_type/mod.rs +++ b/src/commands/construct_transaction_command/transaction_actions/add_contract_code_type/mod.rs @@ -81,7 +81,7 @@ impl ContractFile { ) -> color_eyre::eyre::Result { println!(); let input_file_path: String = Input::new() - .with_prompt("What is a file location of the contract?") + .with_prompt("What is the file location of the contract?") .interact_text()?; Ok(std::path::PathBuf::from(input_file_path).into()) } diff --git a/src/commands/construct_transaction_command/transaction_actions/call_function_type/mod.rs b/src/commands/construct_transaction_command/transaction_actions/call_function_type/mod.rs index 9f38cdab5..879044eed 100644 --- a/src/commands/construct_transaction_command/transaction_actions/call_function_type/mod.rs +++ b/src/commands/construct_transaction_command/transaction_actions/call_function_type/mod.rs @@ -141,7 +141,7 @@ impl CallFunctionAction { println!(); let gas: u64 = loop { let input_gas: crate::common::NearGas = Input::new() - .with_prompt("Enter a gas for function") + .with_prompt("Enter gas for function call") .with_initial_text("100 TeraGas") .interact_text()?; let gas: u64 = match input_gas { @@ -170,7 +170,7 @@ impl CallFunctionAction { println!(); let deposit: crate::common::NearBalance = Input::new() .with_prompt( - "Enter a deposit for function (example: 10NEAR or 0.5near or 10000yoctonear).", + "Enter deposit for a function call (example: 10NEAR or 0.5near or 10000yoctonear).", ) .with_initial_text("0 NEAR") .interact_text()?; diff --git a/src/commands/execute_command/change_method/call_function_type/mod.rs b/src/commands/execute_command/change_method/call_function_type/mod.rs index 382f7a773..5ad64f338 100644 --- a/src/commands/execute_command/change_method/call_function_type/mod.rs +++ b/src/commands/execute_command/change_method/call_function_type/mod.rs @@ -30,7 +30,7 @@ impl CallFunctionAction { println!(); let gas: u64 = loop { let input_gas: crate::common::NearGas = Input::new() - .with_prompt("Enter a gas for function") + .with_prompt("Enter gas for function call") .with_initial_text("100 TeraGas") .interact_text()?; let gas: u64 = match input_gas { @@ -60,7 +60,7 @@ impl CallFunctionAction { println!(); let deposit: crate::common::NearBalance = Input::new() .with_prompt( - "Enter a deposit for function (example: 10NEAR or 0.5near or 10000yoctonear).", + "Enter deposit for a function call (example: 10NEAR or 0.5near or 10000yoctonear).", ) .with_initial_text("0 NEAR") .interact_text()?; diff --git a/src/commands/execute_command/mod.rs b/src/commands/execute_command/mod.rs index b192d6275..66a157053 100644 --- a/src/commands/execute_command/mod.rs +++ b/src/commands/execute_command/mod.rs @@ -25,12 +25,12 @@ impl OptionMethod { ///Choose your method pub enum Method { #[strum_discriminants(strum( - message = "Execute a changing method (construct a transaction with a function call)" + message = "Execute a change method (construct a transaction with a function call)" ))] /// Specify a change method ChangeMethod(self::change_method::operation_mode::OperationMode), #[strum_discriminants(strum( - message = "Execute a viewing method (read-only call, which does not require a transaction)" + message = "Execute a view method (read-only call, which does not require signing)" ))] /// Specify a view method ViewMethod(self::view_method::operation_mode::OperationMode), diff --git a/src/commands/execute_command/view_method/block_id/mod.rs b/src/commands/execute_command/view_method/block_id/mod.rs index 8c612afb9..0caf77694 100644 --- a/src/commands/execute_command/view_method/block_id/mod.rs +++ b/src/commands/execute_command/view_method/block_id/mod.rs @@ -11,7 +11,7 @@ pub enum BlockId { #[strum_discriminants(strum(message = "View this contract at final block"))] /// Specify a block ID final to view this contract AtFinalBlock, - #[strum_discriminants(strum(message = "View this contract at block heigt"))] + #[strum_discriminants(strum(message = "View this contract at block height"))] /// Specify a block ID height to view this contract AtBlockHeight(self::block_id_height::BlockIdHeight), #[strum_discriminants(strum(message = "View this contract at block hash"))] diff --git a/src/commands/utils_command/mod.rs b/src/commands/utils_command/mod.rs index 7c7a7f6fb..040b51fc8 100644 --- a/src/commands/utils_command/mod.rs +++ b/src/commands/utils_command/mod.rs @@ -136,8 +136,8 @@ impl From for CliUtil { Util::SignTransactionWithLedger(sign_transaction_with_ledger) => { Self::SignTransactionWithLedger(sign_transaction_with_ledger.into()) } - Util::CombineTransactionSignature(combine_transaction_signaturte) => { - Self::CombineTransactionSignature(combine_transaction_signaturte.into()) + Util::CombineTransactionSignature(combine_transaction_signature) => { + Self::CombineTransactionSignature(combine_transaction_signature.into()) } Util::ViewSerializedTransaction(view_serialized_transaction) => { Self::ViewSerializedTransaction(view_serialized_transaction.into()) diff --git a/src/commands/utils_command/sign_transaction_subcommand_with_secret_key/mod.rs b/src/commands/utils_command/sign_transaction_subcommand_with_secret_key/mod.rs index d722ed96d..3da76dbec 100644 --- a/src/commands/utils_command/sign_transaction_subcommand_with_secret_key/mod.rs +++ b/src/commands/utils_command/sign_transaction_subcommand_with_secret_key/mod.rs @@ -38,11 +38,11 @@ impl CliSignTransactionPrivateKey { } impl From for CliSignTransactionPrivateKey { - fn from(sign_transacrion_private_key: SignTransactionPrivateKey) -> Self { + fn from(sign_transaction_private_key: SignTransactionPrivateKey) -> Self { Self { - signer_private_key: Some(sign_transacrion_private_key.signer_private_key), + signer_private_key: Some(sign_transaction_private_key.signer_private_key), unsigned_transaction: Some(crate::common::TransactionAsBase64 { - inner: sign_transacrion_private_key.unsigned_transaction, + inner: sign_transaction_private_key.unsigned_transaction, }), } } diff --git a/src/commands/view_command/view_account/block_id/mod.rs b/src/commands/view_command/view_account/block_id/mod.rs index 370d13e03..80197ecb6 100644 --- a/src/commands/view_command/view_account/block_id/mod.rs +++ b/src/commands/view_command/view_account/block_id/mod.rs @@ -14,7 +14,7 @@ pub enum BlockId { #[strum_discriminants(strum(message = "View this account at final block"))] /// Specify a block ID final to view this account AtFinalBlock, - #[strum_discriminants(strum(message = "View this account at block heigt"))] + #[strum_discriminants(strum(message = "View this account at block height"))] /// Specify a block ID height to view this account AtBlockHeight(self::block_id_height::BlockIdHeight), #[strum_discriminants(strum(message = "View this account at block hash"))] diff --git a/src/commands/view_command/view_contract_code/block_id/mod.rs b/src/commands/view_command/view_contract_code/block_id/mod.rs index 1dcfd4423..ae290d246 100644 --- a/src/commands/view_command/view_contract_code/block_id/mod.rs +++ b/src/commands/view_command/view_contract_code/block_id/mod.rs @@ -12,7 +12,7 @@ pub enum BlockId { #[strum_discriminants(strum(message = "View this contract at final block"))] /// Specify a block ID final to view this contract AtFinalBlock, - #[strum_discriminants(strum(message = "View this contract at block heigt"))] + #[strum_discriminants(strum(message = "View this contract at block height"))] /// Specify a block ID height to view this contract AtBlockHeight(self::block_id_height::BlockIdHeight), #[strum_discriminants(strum(message = "View this contract at block hash"))] diff --git a/src/commands/view_command/view_contract_state/block_id/mod.rs b/src/commands/view_command/view_contract_state/block_id/mod.rs index 7c26384a5..b8eb2e8a1 100644 --- a/src/commands/view_command/view_contract_state/block_id/mod.rs +++ b/src/commands/view_command/view_contract_state/block_id/mod.rs @@ -11,7 +11,7 @@ pub enum BlockId { #[strum_discriminants(strum(message = "View this contract at final block"))] /// Specify a block ID final to view this contract AtFinalBlock, - #[strum_discriminants(strum(message = "View this contract at block heigt"))] + #[strum_discriminants(strum(message = "View this contract at block height"))] /// Specify a block ID height to view this contract AtBlockHeight(self::block_id_height::BlockIdHeight), #[strum_discriminants(strum(message = "View this contract at block hash"))] diff --git a/src/commands/view_command/view_transaction_status/signer/mod.rs b/src/commands/view_command/view_transaction_status/signer/mod.rs index 2e4e1d8f7..9832d6856 100644 --- a/src/commands/view_command/view_transaction_status/signer/mod.rs +++ b/src/commands/view_command/view_transaction_status/signer/mod.rs @@ -72,7 +72,7 @@ impl Sender { err )) })?; - println!("Transactiion status: {:#?}", query_view_transaction_status); + println!("Transaction status: {:#?}", query_view_transaction_status); Ok(()) } } diff --git a/src/common.rs b/src/common.rs index ec69aca0c..f1dc96718 100644 --- a/src/common.rs +++ b/src/common.rs @@ -801,13 +801,13 @@ fn print_value_successful_transaction( } near_primitives::views::ActionView::DeleteKey { public_key } => { println!( - "Access key <{}> for account <{}> has been successfully deletted.", + "Access key <{}> for account <{}> has been successfully deleted.", public_key, transaction_info.transaction.signer_id, ); } near_primitives::views::ActionView::DeleteAccount { beneficiary_id: _ } => { println!( - "Account <{}> has been successfully deletted.", + "Account <{}> has been successfully deleted.", transaction_info.transaction.signer_id, ); } @@ -874,7 +874,7 @@ pub fn rpc_transaction_error( pub fn print_action_error(action_error: near_primitives::errors::ActionError) { match action_error.kind { near_primitives::errors::ActionErrorKind::AccountAlreadyExists { account_id } => { - println!("Error: Create Account action tries to create an account with account ID <{}> which is already exists in the storage.", account_id) + println!("Error: Create Account action tries to create an account with account ID <{}> which already exists in the storage.", account_id) } near_primitives::errors::ActionErrorKind::AccountDoesNotExist { account_id } => { println!( @@ -926,7 +926,7 @@ pub fn print_action_error(action_error: near_primitives::errors::ActionError) { ) } near_primitives::errors::ActionErrorKind::LackBalanceForState { account_id, amount } => { - println!("Error: Receipt action can't be completed, because the remaining balance will not be enough to cover storage.\nAn account which needs balance: <{}>\nBalance required to complete an action: <{}>", + println!("Error: Receipt action can't be completed, because the remaining balance will not be enough to cover storage.\nAn account which needs balance: <{}>\nBalance required to complete the action: <{}>", account_id, crate::common::NearBalance::from_yoctonear(amount) ) @@ -972,7 +972,7 @@ pub fn print_action_error(action_error: near_primitives::errors::ActionError) { near_primitives::errors::ActionErrorKind::OnlyImplicitAccountCreationAllowed { account_id: _, } => { - println!("Error: Error occurs when a `CreateAccount` action is called on hex-characters account of length 64.\nSee implicit account creation NEP: https://github.com/nearprotocol/NEPs/pull/71") + println!("Error: `CreateAccount` action is called on hex-characters account of length 64.\nSee implicit account creation NEP: https://github.com/nearprotocol/NEPs/pull/71") } near_primitives::errors::ActionErrorKind::DeleteAccountWithLargeState { account_id } => { println!( @@ -1015,10 +1015,10 @@ pub fn handler_invalid_tx_error( } }, near_primitives::errors::InvalidTxError::InvalidSignerId { signer_id } => { - format!("Error: TX signer ID <{}> is not in a valid format or not satisfy requirements see \"near_runtime_utils::utils::is_valid_account_id\".", signer_id) + format!("Error: TX signer ID <{}> is not in a valid format or does not satisfy requirements\nSee \"near_runtime_utils::utils::is_valid_account_id\".", signer_id) }, near_primitives::errors::InvalidTxError::SignerDoesNotExist { signer_id } => { - format!("Error: TX signer ID <{}> is not found in a storage.", signer_id) + format!("Error: TX signer ID <{}> is not found in the storage.", signer_id) }, near_primitives::errors::InvalidTxError::InvalidNonce { tx_nonce, ak_nonce } => { format!("Error: Transaction nonce ({}) must be account[access_key].nonce ({}) + 1.", tx_nonce, ak_nonce) @@ -1027,7 +1027,7 @@ pub fn handler_invalid_tx_error( format!("Error: Transaction nonce ({}) is larger than the upper bound ({}) given by the block height.", tx_nonce, upper_bound) }, near_primitives::errors::InvalidTxError::InvalidReceiverId { receiver_id } => { - format!("Error: TX receiver ID ({}) is not in a valid format or not satisfy requirements see \"near_runtime_utils::is_valid_account_id\".", receiver_id) + format!("Error: TX receiver ID ({}) is not in a valid format or does not satisfy requirements\nSee \"near_runtime_utils::is_valid_account_id\".", receiver_id) }, near_primitives::errors::InvalidTxError::InvalidSignature => { format!("Error: TX signature is not valid") @@ -1057,7 +1057,7 @@ pub fn handler_invalid_tx_error( near_primitives::errors::InvalidTxError::ActionsValidation(actions_validation_error) => { match actions_validation_error { near_primitives::errors::ActionsValidationError::DeleteActionMustBeFinal => { - format!("Error: The delete action must be a final action in transaction.") + format!("Error: The delete action must be the final action in transaction.") }, near_primitives::errors::ActionsValidationError::TotalPrepaidGasExceeded {total_prepaid_gas, limit} => { format!("Error: The total prepaid gas ({}) for all given actions exceeded the limit ({}).", @@ -1075,7 +1075,7 @@ pub fn handler_invalid_tx_error( format!("Error: The length ({}) of some method name exceeded the limit ({}) in a Add Key action.", length, limit) }, near_primitives::errors::ActionsValidationError::IntegerOverflow => { - format!("Error: Integer overflow during a compute.") + format!("Error: Integer overflow.") }, near_primitives::errors::ActionsValidationError::InvalidAccountId {account_id} => { format!("Error: Invalid account ID <{}>.", account_id) @@ -1235,7 +1235,7 @@ pub fn try_external_subcommand_execution() -> CliResult { if let Some(perr) = err.downcast_ref::() { if let Some(code) = perr.code { - return Err(color_eyre::eyre::eyre!("perror occured, code: {}", code)); + return Err(color_eyre::eyre::eyre!("perror occurred, code: {}", code)); } } return Err(color_eyre::eyre::eyre!(err));