Skip to content

bug(anvil / forge script): dumpState only returns wallet balances, regression since v1.1 #13062

@martinvol

Description

@martinvol

With forge 1.1, when we did vm.dumpState, the whole state of he script was dumped. We're using this to generate a genesis block using a forked version of Optimism's L2Genesis.s.sol.

I've now upgraded to forge 1.4, because it's the earliest version that support anvil's --celo flag.

Documentation now states that the behaviour of dumpState only dumps wallet balances, with only the accounts key present in the json.

    /// Dump a genesis JSON file's `allocs` to disk.
    function dumpState(string calldata pathToStateJson) external;

The script uses cheatcodes to set states, so we can't really broadcast tx to anvil and then dump anvil's state.

Is there an option to support this on newer versions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions