lgtm, note on performance, would like us to revisit script wallets handling if we want to support scripting cheats in tests as well
Originally posted by @klkvr in #9087 (review)
#9087 intoduces cheatcodes that lets users add unlocked wallets to the forge environment not only in scripts but also in tests.
This works well for scripts but can lead to a performance lag when used in tests as we may clone the cheatcodes_config via Arc::make_mut(&mut state.config) to modify script_wallets
Possible solution: Move script_wallets into Cheatcodes and rename it to wallets. Add new API method wallets(&self, wallets) to the InspectorStackBuilder interface. Use that while initializing cheatcodes for tests and scripts.
Originally posted by @klkvr in #9087 (review)
#9087 intoduces cheatcodes that lets users add unlocked wallets to the forge environment not only in scripts but also in tests.
This works well for scripts but can lead to a performance lag when used in tests as we may clone the
cheatcodes_configviaArc::make_mut(&mut state.config)to modifyscript_walletsPossible solution: Move
script_walletsintoCheatcodesand rename it towallets. Add new API methodwallets(&self, wallets)to theInspectorStackBuilderinterface. Use that while initializing cheatcodes for tests and scripts.