-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(sim): handle v0.7 executeUserOp special call in call gas estimation #715
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
... and 2 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more.
|
41f14f2
to
f288be5
Compare
bytes memory executeCall; | ||
if (methodSig == IAccountExecute.executeUserOp.selector) { | ||
executeCall = abi.encodeCall(IAccountExecute.executeUserOp, (userOp, userOpHash)); | ||
} else { | ||
executeCall = callData; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New code that caused this whole debacle.
@@ -0,0 +1,198 @@ | |||
// SPDX-License-Identifier: UNLICENSED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is likely an opportunity to DRY this up as its mostly copied from the old proxy with minimal modifications.
Not sure its worth it given that we rarely modify this. I'm going to leave it as is for now.
f288be5
to
c275a63
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good apart from a nit
/// | ||
/// The easiest way to get the updated value is to run this module's tests. The | ||
/// failure will tell you the new value. | ||
const PROXY_TARGET_OFFSET: usize = 163; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This same value is used for both 0.6 and 0.7 we might want to consolidate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually explicitly split these to being distinct. Changes to the contracts can change these values, so its possible the two have a different value. Its just a coincidence that they are the same right now (likely due to the minimal differences).
Proposed Changes
executeUserOp
during gas estimation.