6 releases (3 breaking)
0.5.0 | Oct 25, 2024 |
---|---|
0.4.0 | Oct 5, 2024 |
0.2.1 | Sep 3, 2024 |
0.2.0 | Jul 28, 2024 |
0.1.1 | Jun 19, 2024 |
#686 in Magic Beans
189 downloads per month
29KB
681 lines
alloy-erc20
ERC20 is a Rust libary relying on Alloy allowing to interact with ERC-20 contracts.
Installation
Add alloy-erc20
to your Cargo.toml
.
alloy-erc20 = "0.5"
Features
- A basic
Token
struct and associated extensions methods on Alloy'sProvider
, allowing to retrieve token decimals, and compute balances asBigDecimal
fromU256
. - A
TokenStore
trait, and aBasicTokenStore
impl, allowing to cacheToken
s in memory. - A
LazyToken
struct, acting as a wrapper around Alloy contract instance, lazily retrievingname
,symbol
,decimals
andtotalSupply
from the blockchain.
Dependencies
~31–41MB
~733K SLoC