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

SDK v2 fixes #241

Merged
merged 16 commits into from
Jul 25, 2023
Merged

SDK v2 fixes #241

merged 16 commits into from
Jul 25, 2023

Conversation

livingrockrises
Copy link
Contributor

@livingrockrises livingrockrises commented Jul 24, 2023

Description

fixes userop gaslimit issues : #236
and for polygon / other chains with undeployed accounts
fixes AA10 issue

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

try {
finalUserOp = await this.estimateUserOpGas(finalUserOp)
const cgl = ethers.BigNumber.from(finalUserOp.callGasLimit)
if (finalUserOp.callGasLimit && cgl.lt(ethers.BigNumber.from('21000'))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we are adding this if statement ?
if (finalUserOp.callGasLimit && cgl.lt(ethers.BigNumber.from('21000')))

should not we just update finalUserOp callData with newCallData before calling estimateUserOpGas ?

finaluserOp.callData = newCallData
finalUserOp = await this.estimateUserOpGas(finalUserOp)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its already updated above then sent for estimation. If estimation still returns less cgl then send earlier op with updated calldata.

@talhamalik883
Copy link
Contributor

Since we are not introducing any new features, only providing minor bug fixes and small changes, we should update the last number in the versioning scheme i.e 3.0.1. This last number represents the "patch" number and is used for minor updates that address issues without adding new features or major changes.

@talhamalik883
Copy link
Contributor

reviewed and it LGTM. added few comments as well

@livingrockrises
Copy link
Contributor Author

Since we are not introducing any new features, only providing minor bug fixes and small changes, we should update the last number in the versioning scheme i.e 3.0.1. This last number represents the "patch" number and is used for minor updates that address issues without adding new features or major changes.

hence it's a prepatch

@livingrockrises livingrockrises merged commit d10e2e6 into master Jul 25, 2023
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