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.
- event filter arguments building.
- more tests.
- more builtin contract ABIs for convenience
- permit2
- etc
- 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!