You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suppose you have a differential test that compares the bytecodes of a contract deployed using two different methods, e.g. see deployPermit2.
Now, imagine the contract-under-test takes a storage record of its address(this) in the constructor. In this case, the two deployment methods would produce two slightly different bytecodes (only ~20 bytes would be different), so the differential test would fail.
There are various ways to fix this using vm.ffi, but it would be nice to have a native find-and-replace cheat so that users don't have to exit Solidity in this scenario.
Additional context
Late edit: it looks like I could use Solady's LibString for this.
The text was updated successfully, but these errors were encountered:
Component
Forge
Describe the feature you would like
Suppose you have a differential test that compares the bytecodes of a contract deployed using two different methods, e.g. see
deployPermit2
.Now, imagine the contract-under-test takes a storage record of its
address(this)
in the constructor. In this case, the two deployment methods would produce two slightly different bytecodes (only ~20 bytes would be different), so the differential test would fail.There are various ways to fix this using
vm.ffi
, but it would be nice to have a native find-and-replace cheat so that users don't have to exit Solidity in this scenario.Additional context
Late edit: it looks like I could use Solady's
LibString
for this.The text was updated successfully, but these errors were encountered: