Implements a 🔥 blazingly fast 🔥 helper method for ERC-3770 in Rust™
use erc3770::create_address;
use alloy_chains::NamedChain;
use alloy_primitives::Address;
let address = Address::repeat_byte(0x42);
assert_eq!(
&create_address(NamedChain::Mainnet, address).unwrap(),
"eth:0x4242424242424242424242424242424242424242"
);
assert_eq!(
&create_address(NamedChain::Polygon, address).unwrap(),
"matic:0x4242424242424242424242424242424242424242"
);
assert_eq!(
&create_address(NamedChain::Base, address).unwrap(),
"base:0x4242424242424242424242424242424242424242"
);
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in these crates by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.