#[macro_export]
macro_rules! rpc {
($chain_id:expr) => {{
$crate::CHAINS
.iter()
.find(|chain| chain.chain_id == Some($chain_id))
.expect("Chain ID not found")
}};
}
#[cfg(test)]
mod tests {
#[test]
fn test_rpc_macro() {
let chain = rpc!(1);
assert_eq!(chain.name, "Ethereum Mainnet");
}
}