Add your description here
Project description
EVM contract abstraction and ABI utilities.
The main difference from Web3().eth.contract() is decoupling the contract from the Web3 instance, makes it easy to work with multiple providers, which is particularly important in today's multi-chain environment.
See the unit tests for examples of how to use it.
Builtin common contract ABIs:
- ERC20
- CREATE2 factory (0x4e59b44847b379578588920ca78fbf26c0b4956c)
include cli utility to deploy contract using the factory,
python -m eth_contract.create2 --help. - createx factory (https://github.com/pcaversaccio/createx)
include cli utility to deploy contract with create3,
python -m eth_contract.create3 --help. - multicall3 (https://github.com/mds1/multicall3)
- weth (https://github.com/gnosis/canonical-weth)
- ERC-4337 EntryPoint (v0.7 and v0.8) for account abstraction
- Parser of human readable abi (https://abitype.dev/api/human).
Please open issue if you want to see more ABIs included.
TODO
- event filter arguments building.
- more tests.
- more builtin contract ABIs for convenience
- permit2
- etc
Project Setup
- Install nix
- Install direnv and nix-direnv
uv sync --frozento install all dependencies. (Without--fronzen,uvversion after v0.6.15 modifies theuv.lock)pytestto run all tests
If you are able to run all tests, you are ready to go!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eth_contract-0.3.0.tar.gz.
File metadata
- Download URL: eth_contract-0.3.0.tar.gz
- Upload date:
- Size: 104.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cafb061127e14c36461ac203611d2285dbda1d8cca4de784a0c48da78159cd8
|
|
| MD5 |
1a2d640ae4ce6490fb5ad262dcbc361b
|
|
| BLAKE2b-256 |
c266eadb55c44c766fb7dda37a58fd06cdb3c3c543224c3d54bf56127d22bd9f
|
File details
Details for the file eth_contract-0.3.0-py3-none-any.whl.
File metadata
- Download URL: eth_contract-0.3.0-py3-none-any.whl
- Upload date:
- Size: 96.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
817b34023a21dcb414ac1051e409e3f0b066fa616ac8d682ed053153fbcec749
|
|
| MD5 |
5aa4700a24dc8908a54211936c213800
|
|
| BLAKE2b-256 |
59584760a58fcea7bdb8584049bf7bd4ffe56e8cc8c64a2d3ae4cd9e73d2a1ba
|