diff --git a/src/deploy.rs b/src/deploy.rs index ee5fbd8..00be823 100644 --- a/src/deploy.rs +++ b/src/deploy.rs @@ -7,7 +7,7 @@ use std::path::{Path, PathBuf}; use std::str::FromStr; use ethers::types::{Eip1559TransactionRequest, H160, U256}; -use ethers::utils::get_contract_address; +use ethers::utils::{get_contract_address, to_checksum}; use ethers::{ middleware::SignerMiddleware, providers::{Http, Middleware, Provider}, @@ -61,11 +61,7 @@ pub async fn deploy(cfg: DeployConfig) -> eyre::Result<()> { let addr = wallet.address(); - println!( - "Deployer address: {}{}", - "0x".grey(), - hex::encode(addr).grey() - ); + println!("Deployer address: {}", to_checksum(&addr, None).grey(),); let nonce = client .get_transaction_count(addr, None) @@ -104,9 +100,9 @@ on the --mode flag under cargo stylus deploy --help"# let balance = provider.get_balance(addr, None).await?; if balance == U256::zero() { bail!( - r#"address 0x{} has 0 balance onchain – please refer to our Quickstart guide for deploying + r#"address {} has 0 balance onchain – please refer to our Quickstart guide for deploying programs to Stylus chains here https://docs.arbitrum.io/stylus/stylus-quickstart"#, - hex::encode(addr), + to_checksum(&addr, None), ); } } @@ -134,9 +130,8 @@ programs to Stylus chains here https://docs.arbitrum.io/stylus/stylus-quickstart println!(""); println!("{}", "====DEPLOYMENT====".grey()); println!( - "Deploying program to address {}{}", - "0x".mint(), - hex::encode(expected_program_addr).mint() + "Deploying program to address {}", + to_checksum(&expected_program_addr, None).mint(), ); let deployment_calldata = program_deployment_calldata(&deploy_ready_code); @@ -170,9 +165,8 @@ programs to Stylus chains here https://docs.arbitrum.io/stylus/stylus-quickstart .unwrap_or(expected_program_addr); println!("{}", "====ACTIVATION====".grey()); println!( - "Activating program at address {}{}", - "0x".mint(), - hex::encode(program_addr).mint() + "Activating program at address {}", + to_checksum(&program_addr, None).mint(), ); let activate_calldata = activation_calldata(&program_addr); diff --git a/src/main.rs b/src/main.rs index c7f73a1..e6f777f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -165,7 +165,7 @@ async fn main() -> eyre::Result<()> { if let Err(e) = new::new_stylus_project(&name, minimal) { println!( "Could not create new stylus project with name {name}: {}", - e.red() + e.pink() ); }; } @@ -178,21 +178,21 @@ async fn main() -> eyre::Result<()> { if let Err(e) = export_abi::export_json_abi(release, output) { println!( "Could not export Stylus program Solidity ABI as JSON: {}", - e.red() + e.pink() ); }; } else if let Err(e) = export_abi::export_solidity_abi(release, output) { - println!("Could not export Stylus program Solidity ABI: {}", e.red()); + println!("Could not export Stylus program Solidity ABI: {}", e.pink()); } } StylusSubcommands::Check(cfg) => { if let Err(e) = check::run_checks(cfg).await { - println!("Stylus checks failed: {}", e.red()); + println!("Stylus checks failed: {}", e.pink()); }; } StylusSubcommands::Deploy(cfg) => { if let Err(e) = deploy::deploy(cfg).await { - println!("Deploy / activation command failed: {}", e.red()); + println!("Deploy / activation command failed: {}", e.pink()); }; } } diff --git a/src/tx.rs b/src/tx.rs index e2b13e7..e906449 100644 --- a/src/tx.rs +++ b/src/tx.rs @@ -98,8 +98,8 @@ where .map_err(|e| eyre!("could not format effective gas price: {e}"))?; println!( "Confirmed {tx_kind} tx {}{}", - "0x".pink(), - hex::encode(tx_hash.as_bytes()).pink(), + "0x".mint(), + hex::encode(tx_hash.as_bytes()).mint(), ); println!( "Gas units used {}, effective gas price {} gwei",