safe-global / safe-modules

A collection of modules that can be used with the Safe contract
GNU Lesser General Public License v3.0
140 stars 73 forks source link

`Safe4337Mock`: Remove signature check function inlining and call the function via call instead #450

Closed mmv08 closed 2 months ago

mmv08 commented 2 months ago

In https://github.com/safe-global/safe-modules/pull/446, I inlined the signature check function because we didn't want it to revert in unsuccessful cases. I inlined it because the try/catch statement didn't work for internal function calls. Little did I know that I could do this.f() and that would use the CALL opcode instead of JUMP, making the try/catch statement possible

More info: https://www.perplexity.ai/search/if-i-call-1VYIfl5eQEWvJ302U7wVOA#0