Minimal Brownie like contract wrapper for Pyrevm
Project description
pyrevm_contract
Minimal Brownie like contract wrapper for Pyrevm
pip install pyrevm_contract
from pyrevm_contract import Revm, Contract
caller = "0x00000000000000000000000000000000000021E8"
weth_addr = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
weth_abi_path = ... # abi .json file path
Revm("https://eth.llamarpc.com", block_number=5282490) # revm singleton; sets backend for all contracts
weth = Contract(weth_addr, abi_file_path=weth_abi_path)
weth.balanceOf(caller) # -> 0
weth.deposit(value=100, caller=caller)
weth.balanceOf(caller) # -> 100
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for pyrevm_contract-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53dd519e880014e19333c251a50a41b6a65c75009cb92466ce465767cdabc13c |
|
MD5 | f9d488610431431038a6b80f4a54287a |
|
BLAKE2b-256 | c2b3451df389107afb8468af00714aa1f18b564a0a1d16cf4b95300d1e11f86f |