anvil/eth/util.rs
1use alloy_primitives::hex;
2use itertools::Itertools;
3
4/// Formats values as hex strings, separated by commas.
5pub fn hex_fmt_many<I, T>(i: I) -> String
6where
7 I: IntoIterator<Item = T>,
8 T: AsRef<[u8]>,
9{
10 let items = i.into_iter().map(|item| hex::encode(item.as_ref())).format(", ");
11 format!("{items}")
12}