alloy-erc20

Crates.ioalloy-erc20
lib.rsalloy-erc20
version0.5.0
sourcesrc
created_at2024-06-17 19:48:57.009067
updated_at2024-10-25 20:17:31.474524
descriptionInteract with ERC-20 contracts using Alloy.
homepagehttps://github.com/leruaa/alloy-erc20
repositoryhttps://github.com/leruaa/alloy-erc20
max_upload_size
id1274762
size117,606
Aurélien (leruaa)

documentation

https://docs.rs/alloy-erc20

README

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's Provider, allowing to retrieve token decimals, and compute balances as BigDecimal from U256.
  • A TokenStore trait, and a BasicTokenStore impl, allowing to cache Tokens in memory.
  • A LazyToken struct, acting as a wrapper around Alloy contract instance, lazily retrieving name, symbol, decimals and totalSupply from the blockchain.
Commit count: 79

cargo fmt