Skip to content

Commit

Permalink
chore(cast): use checksum-case when print addr (foundry-rs#5149)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinasab authored Jun 13, 2023
1 parent 89f2782 commit b712920
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use ethers::{
prelude::TransactionReceipt,
providers::Middleware,
types::U256,
utils::format_units,
utils::{format_units, to_checksum},
};
use eyre::Result;
use foundry_config::{Chain, Config};
Expand Down Expand Up @@ -204,7 +204,7 @@ pub fn enable_paint() {
pub fn print_receipt(chain: Chain, receipt: &TransactionReceipt) {
let contract_address = receipt
.contract_address
.map(|addr| format!("\nContract Address: 0x{}", hex::encode(addr.as_bytes())))
.map(|addr| format!("\nContract Address: {}", to_checksum(&addr, None)))
.unwrap_or_default();

let gas_used = receipt.gas_used.unwrap_or_default();
Expand Down

0 comments on commit b712920

Please sign in to comment.