Open 0xalpharush opened 2 months ago
The primitive of loading alloc's produced by forge test
is done e.g. https://github.com/0xalpharush/foundry-dumpstate/blob/e18fe00b9d783ae99f4b0777a4491cf8e950c6d5/test/Counter.t.sol#L15
You can also use anvil for rmm-core as shown here. First, start anvil: anvil --dump-state dump-state.json
. Then run npx hardhat test test/unit/unit_test_seed.test.ts --network localhost
What remains to be done is some way to map the ABI to the deployed address since the contract created event likely won't register the right ABI given the code is included in the genesis block
I think we should be able to run Anvil, run a deploy script against its RPC, and load the output of anvil_dumpState https://github.com/ethereum-optimism/optimism/blob/develop/op-chain-ops/foundry/allocs.go#L26