diff --git a/main/src/deploy.rs b/main/src/deploy.rs index 26ca81b..c6d1887 100644 --- a/main/src/deploy.rs +++ b/main/src/deploy.rs @@ -99,13 +99,12 @@ pub async fn deploy(cfg: DeployConfig) -> Result<()> { ContractCheck::Active { .. } => greyln!("wasm already activated!"), } println!(""); - let note = format!( - r#"NOTE: We recommend running cargo stylus cache bid 0 {} to cache your activated contract in ArbOS. + let contract_addr = hex::encode(contract_addr); + mintln!( + r#"NOTE: We recommend running cargo stylus cache bid {contract_addr} 0 to cache your activated contract in ArbOS. Cached contracts benefit from cheaper calls. To read more about the Stylus contract cache, see -https://docs.arbitrum.io/stylus/concepts/stylus-cache-manager"#, - hex::encode(contract_addr), - ).debug_mint(); - println!("{note}"); +https://docs.arbitrum.io/stylus/concepts/stylus-cache-manager"# + ); Ok(()) } diff --git a/main/src/macros.rs b/main/src/macros.rs index 82aef8d..c91a8f7 100644 --- a/main/src/macros.rs +++ b/main/src/macros.rs @@ -8,6 +8,13 @@ macro_rules! greyln { }}; } +macro_rules! mintln { + ($($msg:expr),*) => {{ + let msg = format!($($msg),*); + println!("{}", msg.mint()) + }}; +} + macro_rules! egreyln { ($($msg:expr),*) => {{ let msg = format!($($msg),*); @@ -15,4 +22,4 @@ macro_rules! egreyln { }}; } -pub(crate) use {egreyln, greyln}; +pub(crate) use {egreyln, greyln, mintln};