feat(forge script
+ anvil
): improve ability to run programmatic "tests" against Anvil
#5517
Labels
A-reth-anvil
Area: reth-anvil
C-anvil
Command: anvil
Cmd-forge-script
Command: forge script
T-feature
Type: feature
Component
Forge, Anvil
Describe the feature you would like
Background
When running tests using Foundry, it is possible to specify a
--rpc-url
to thefoundry 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 #5421
The text was updated successfully, but these errors were encountered: