• Stars
    star
    158
  • Rank 237,061 (Top 5 %)
  • Language
    Rust
  • Created about 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Python wrapper around https://github.com/bluealloy/revm/ using PyO3

pyrevm

Blazing-fast Python bindings to revm

py rust

Quickstart

make install
make test

Example Usage

Here we show how you can fork from Ethereum mainnet and simulate a transaction from vitalik.eth.

from pyrevm import *

address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" # vitalik.eth
address2 = "0xBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"

fork_url = "https://mainnet.infura.io/v3/c60b0bb42f8a4c6481ecd229eddaca27"

# set up an evm
evm = EVM(
    # can fork from a remote node
    fork_url=fork_url, 
    # can set tracing to true/false
    tracing = True, 
    # can configure the environment
    env = Env(
        block = BlockEnv( timestamp = 100
    ))
);

vb_before = evm.basic(address)
assert vb_before != 0

# Execute the tx
evm.call_raw_committing(
    caller = address,
    to = address2,
    value = 10000
    # data
);

assert vb_before != evm.basic(address)
assert evm.basic(address2).balance == 10000

Develop

We use Poetry for virtual environment management and Maturin as our Rust <> Python FFI build system. The Rust bindings are auto-generated from the macros provided by PyO3.

To build the library, run poetry run maturin develop

Note: If building for production, do not forget the --release flag, else performance will be degraded.

Benchmarks

TODO

More Repositories

1

reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
Rust
3,910
star
2

artemis

A simple, modular, and fast framework for writing MEV bots in Rust.
Rust
2,292
star
3

cryo

cryo is the easiest way to extract blockchain data to parquet, csv, json, or python dataframes
Rust
1,137
star
4

rivet

Developer Wallet & DevTools for Anvil
TypeScript
804
star
5

flux

Graph-based LLM power tool for exploring many completions in parallel.
TypeScript
773
star
6

paradigm-ctf-2021

Official repository for Paradigm CTF 2021
Solidity
488
star
7

flood

flood is a load testing tool for benchmarking EVM nodes over RPC
Python
316
star
8

paradigm-ctf-2022

Rust
296
star
9

paradigm-data-portal

a collection of open source crypto datasets for researchers and tool builders
Python
288
star
10

revmc

JIT and AOT compiler for the Ethereum Virtual Machine, built on Revm.
Rust
202
star
11

zk-eth-rng

Secure randomness for Ethereum's execution layer via SNARKs and RANDAO.
Solidity
172
star
12

mev-share-rs

Rust client library for Flashbots MEV-share
Rust
167
star
13

mesc

MESC is a specification for how crypto tools configure their RPC endpoints
Rust
167
star
14

ultimate_evm_tracing_reference

a collection of EVM tracing information for easy reference
156
star
15

etop

like htop for Ethereum and other EVM chains
Rust
143
star
16

jitevm

convert evm bytecode to native machine code and go vroom - just an experiment, probably broken, reach out to [email protected] to contribute / productionize.
Rust
141
star
17

spice

Simple client for extracting data from the Dune Analytics API
Python
131
star
18

tbl

tbl is a swiss army knife for parquet read and write operations
Rust
112
star
19

reth-exex-examples

Collection of ExEx examples built on Reth
Rust
100
star
20

paradigm-ctf-infrastructure

Public infra related to hosting Paradigm CTF
Solidity
98
star
21

sinker

Synchronize Postgres to Elasticsearch
Python
63
star
22

local_reth

Run Reth+Prometheus+Grafana locally via docker-compose
Dockerfile
60
star
23

paradigm-ctf-2023

Solidity
59
star
24

stress4844

Tiny CLI for submitting large calldata transactions to EVM networks to stress test the networking layer. Main motivation: EIP4844blobs.
Rust
56
star
25

fig

Guidelines & best practices for developing Frames: https://www.figma.com/community/file/1367670879509913267/frame-interface-guidelines
52
star
26

paradigm-ctf-2022-teaser

https://rinkeby.etherscan.io/address/0xffb9205c84d0b209c215212a3cdfc50bf1cfb0e0#code
Solidity
40
star
27

op-rs

Rust
37
star
28

how-to-raise-the-gas-limit

Data & code accompanying Paradigm's How to Raise the Gas Limit post.
Jupyter Notebook
33
star
29

foundry-alphanet

Foundry tools for interfacing with Reth Alphanet's bleeding-edge EVM extensions.
Shell
29
star
30

humanizooor

16
star
31

phishing-list

A rapidly-updated list of live phishing domains for consumption by the eth-phishing-detect module
16
star
32

state_growth

Python
15
star
33

homebrew-brew

A homebrew tap
Ruby
12
star
34

.github

7
star
35

evm-inspectors

EVM Execution Hooks.
2
star
36

crypto_colors

Python
1
star