foundry-rs / foundry-rs/foundry
feat(`forge script` + `anvil`): improve ability to run programmatic "tests" against Anvil
- Dominant language
- Rust
- Stars
- 10.6k
- Forks
- 2.6k
- Avg merge
- 18h 20m
- Merged PRs (30d)
- 510
Description
### Component
Forge, Anvil
### Describe the feature you would like
### Background
When running tests using Foundry, it is possible to specify a `--rpc-url` to the `foundry test` command. When doing so, Foundry just queries and copies the state of the chain specified at the `--rpc-url` endpoint to the locally running testing node. Nevertheless, other Smart Contract development frameworks (hardhat) do provide a direct way to publish tests on an actual node, which can be tremendously useful for effective fork and staging testing.
### Proposal
Implement test transactions actually being published to anvil when specifying `--rpc-url` to a local anvil node. This would allow for more accurate fork-testing and external sources being able to use / query transaction data.
This feature could be used to effectively perform fork testing and integrate external sources into the testing environment.
### Additional context
### Discussed in https://github.com/foundry-rs/foundry/discussions/5421
Contributor guide
Assessment
This issue has not been assessed yet.