coinbase / smart-wallet

MIT License
258 stars 47 forks source link

fix(ERC1271InputGenerator): fix code start with `0xef` error by adding `0xff` as first byte #71

Open xenoliss opened 2 months ago

xenoliss commented 2 months ago

It is possible that the computed replaySafeHash begins with 0xef. In such a case, our implementation, inspired by this example, would result in a contract bytecode also starting with 0xef.

With the London upgrade, create and create2 calls will fail if the deployed bytecode begins with 0xef.

This PR updates the constructor of the ERC1271InputGenerator contract to prefix the returned replaySafeHash with a constant 0xff byte. This prevents the aforementioned error from occurring.

vegeta321311 commented 2 months ago

0x331a94dac38795536d418a18cbaaf315d3188684

davyus.eth

twitter X. @Sdavyus

cb-heimdall commented 1 month ago

Review Error for Ronaldsmith2966h @ 2024-05-28 07:52:48 UTC User must have write permissions to review