Crates.io | alloy-erc20 |
lib.rs | alloy-erc20 |
version | 0.5.0 |
source | src |
created_at | 2024-06-17 19:48:57.009067 |
updated_at | 2024-10-25 20:17:31.474524 |
description | Interact with ERC-20 contracts using Alloy. |
homepage | https://github.com/leruaa/alloy-erc20 |
repository | https://github.com/leruaa/alloy-erc20 |
max_upload_size | |
id | 1274762 |
size | 117,606 |
ERC20 is a Rust libary relying on Alloy allowing to interact with ERC-20 contracts.
Add alloy-erc20
to your Cargo.toml
.
alloy-erc20 = "0.5"
Token
struct and associated extensions methods on Alloy's
Provider
, allowing to retrieve token decimals, and compute balances
as BigDecimal
from U256
.TokenStore
trait, and a BasicTokenStore
impl, allowing to cache
Token
s in memory.LazyToken
struct, acting as a wrapper around Alloy contract instance,
lazily retrieving name
, symbol
, decimals
and totalSupply
from the
blockchain.