Skip to content

feat(forge script + anvil): improve ability to run programmatic "tests" against Anvil #5517

Open
@Keinberger

Description

@Keinberger

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 #5421

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions