Skip to content
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

Merged
merged 4 commits into from
Jul 11, 2023

Conversation

talhamalik883
Copy link
Contributor

This PR passing required userOp params for bundler estimation and removal of dummy userOp values

@livingrockrises livingrockrises changed the title removal of dummy userOp fix userOp estimate gas overrides Jul 10, 2023
@talhamalik883 talhamalik883 removed the request for review from livingrockrises July 10, 2023 14:54
@@ -255,6 +255,14 @@ export class BiconomySmartAccount extends SmartAccount implements IBiconomySmart
return executeBatchCallData
}

getDummySignature(): string {
return '0x73c3ac716c487ca34bb858247b5ccf1dc354fbaabdd089af3b2ac8e78ba85a4959a2d76250325bd67c11771c31fccda87c33ceec17cc0de912690521bb95ffcb1b'
Copy link
Contributor Author

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.

Copy link
Contributor

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()
Copy link
Contributor

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

Copy link
Contributor

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.

@livingrockrises livingrockrises merged commit b635382 into sdk_modularity Jul 11, 2023
@livingrockrises livingrockrises deleted the fix/bundler_dummy_op branch July 13, 2023 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants