foundry-rs / foundry-rs/foundry

feat(`anvil`): add incremental block reveal with forked networks + block replay feature

Open
#10,114 1 comment 0 reactions 0 assignees View on GitHub
C-anvil T-feature
Dominant language
Rust
Stars
10.6k
Forks
2.6k
Avg merge
18h 20m
Merged PRs (30d)
510

Description

### Component

Anvil

### Describe the feature you would like

gm, thank you for your work. To be able to back-test it would be useful to replay past blocks on a forked network. For example specifying `--fork-block-number 22000000 --replay-delay 6` so that every 6 seconds a new block is revealed with all the necessary events emitted.

The use-case I'm trying to pursue is to test event filter handling. I found a Java web3 library `web3j` allows to do exactly that https://docs.web3j.io/4.12.3/advanced/filters_and_events/#replay-filters, but I'm unsure how it's implemented & hope to avoid Java if possible.

My question is are you planning to implement this and whether something like what I'm looking for already exists? Thank you.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.