-
Notifications
You must be signed in to change notification settings - Fork 80
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 userOp estimate gas overrides #227
Conversation
@@ -255,6 +255,14 @@ export class BiconomySmartAccount extends SmartAccount implements IBiconomySmart | |||
return executeBatchCallData | |||
} | |||
|
|||
getDummySignature(): string { | |||
return '0x73c3ac716c487ca34bb858247b5ccf1dc354fbaabdd089af3b2ac8e78ba85a4959a2d76250325bd67c11771c31fccda87c33ceec17cc0de912690521bb95ffcb1b' |
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 believe we should include an optional signature parameter in the buildOp function as well. This way, if anyone wants to override it, it can be easily done. If no value is supplied, we can use the getDummySignature method to retrieve the signature.
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.
if we give param signature it self it just accept param and returns the same?
what else could be input param for this method, can you think in terms of ownerless - I know lot of info there is being passed as part of userop signature cc @filmakarov
However this class is limited to ECDSA Biconomy Smart Account always so implementing abstract method is correct. If you know what param should be there for this method in abstract class, I can add it.
Anyway there might be more changes to the abstract class also when we implement ownerless. this is the only use case I can think of for your point
@@ -286,6 +294,9 @@ export class BiconomySmartAccount extends SmartAccount implements IBiconomySmart | |||
callData: callData | |||
} | |||
|
|||
// for this Smart Account dummy ECDSA signature will be used to estimate gas | |||
userOp.signature = this.getDummySignature() |
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.
but even if sdk doesn’t send a dummy signature the bundler still appends a dummy signature right? do we need to add this @talhamalik883
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.
bundler wouldn't know account information. I think it accepts a dummy sig and if not present defaults to ECDSA mock signature.
This PR passing required userOp params for bundler estimation and removal of dummy userOp values