erc3770
erc3770 copied to clipboard
ERC-3770
erc3770
Implements a 🔥 blazingly fast 🔥 helper method for ERC-3770 in Rust™
Example
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"
);
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.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.