Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
rauljordan committed Aug 28, 2024
1 parent 92a701d commit 5f80180
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
11 changes: 5 additions & 6 deletions main/src/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}

Expand Down
9 changes: 8 additions & 1 deletion main/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,18 @@ macro_rules! greyln {
}};
}

macro_rules! mintln {
($($msg:expr),*) => {{
let msg = format!($($msg),*);
println!("{}", msg.mint())
}};
}

macro_rules! egreyln {
($($msg:expr),*) => {{
let msg = format!($($msg),*);
eprintln!("{}", msg.grey())
}};
}

pub(crate) use {egreyln, greyln};
pub(crate) use {egreyln, greyln, mintln};

0 comments on commit 5f80180

Please sign in to comment.