Skip to main content

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


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

pyrevm_contract-0.1.9-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page