-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
A-cheatcodesArea: cheatcodesArea: cheatcodesC-forgeCommand: forgeCommand: forgeCmd-forge-testCommand: forge testCommand: forge testD-averageDifficulty: averageDifficulty: averageP-normalPriority: normalPriority: normalT-featureType: featureType: feature
Milestone
Description
I think we should disallow vm.etch
for addresses 0 < n < 10, and throw an error about using an address >10.
I prefer breaking these early and getting "correct" behavior vs hacking something on Revm.
(This should be fine for transfers etc on the <10 addresses and seems only a vm.etch issue?)
Originally posted by @gakonst in #1146 (comment)
Worth considering disallowing other cheatcodes for those addresses. It's not realistic to prank
that address or mockCall
with it, and you also don't want to save
or load
slots from there, for example.
As for what addresses to block off, to be safe we might also want to:
- Disallow a larger range, such as 0 < n < 99 to account for precompiles being added or other EVM chains that have additional precompiles
- Prevent
etch
ing at addresses that other chains have predeployed contracts at. For example Optimism has predeployed contracts at0x420...000
< n <0x420...013
, not sure about other networks offhand
Originally posted by @mds1 in #1146 (comment)
This is a breaking change
Metadata
Metadata
Assignees
Labels
A-cheatcodesArea: cheatcodesArea: cheatcodesC-forgeCommand: forgeCommand: forgeCmd-forge-testCommand: forge testCommand: forge testD-averageDifficulty: averageDifficulty: averageP-normalPriority: normalPriority: normalT-featureType: featureType: feature
Type
Projects
Status
Done