docs.rs failed to build alloy-erc20-1.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
alloy-erc20-0.5.0
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.
= "1.0"
Features
- A basic
Tokenstruct and associated extensions methods on Alloy'sProvider, allowing to retrieve token decimals, and compute balances asBigDecimalfromU256. - A
TokenStoretrait, and aBasicTokenStoreimpl, allowing to cacheTokens in memory. - A
LazyTokenstruct, acting as a wrapper around Alloy contract instance, lazily retrievingname,symbol,decimalsandtotalSupplyfrom the blockchain. - A
LazyTokenSignerstruct for executing write operations liketransfer,approve, andtransferFromwith a signer-capable provider.
Testing
This library includes comprehensive integration tests using testcontainers-modules and Anvil.
The integration tests:
- Run completely standalone without external RPC dependencies
- Deploy a mock ERC-20 contract to a blank Anvil dev chain
- Test all
LazyTokenandLazyTokenSigneroperations - Complete in approximately 1 second
- Require only Docker to be installed
To run the integration tests: