Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rjected/erc3770

ERC-3770
https://github.com/rjected/erc3770

erc-3770 ethereum rust ux

Last synced: 15 days ago
JSON representation

ERC-3770

Awesome Lists containing this project

README

        

# erc3770

Implements a πŸ”₯ _blazingly fast_ πŸ”₯ helper method for [ERC-3770](https://github.com/ethereum/ERCs/blob/e83c0862bce4ae2b53db5ea4ce26799b1e3cfe20/ERCS/erc-3770.md) in Rustβ„’

## Example
```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"
);
```

#### 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.