use alloy_primitives::address;
use ensip25::erc7930::InteropAddress;
#[allow(clippy::print_stdout)]
fn main() {
let addr = InteropAddress::evm(1, address!("8004A169FB4a3325136EB29fA0ceB6D2e539a432"));
let hex = addr.to_hex();
println!("Encoded: {hex}");
let decoded = InteropAddress::from_hex(&hex).expect("valid hex");
assert_eq!(addr, decoded);
println!("Display: {addr}");
println!("Chain type: {}", addr.chain_type);
println!(
"Chain ref: 0x{}",
alloy_primitives::hex::encode(&addr.chain_ref)
);
println!(
"Address: 0x{}",
alloy_primitives::hex::encode(&addr.address)
);
}