-
Notifications
You must be signed in to change notification settings - Fork 12
Release 17.03.2025 #194
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
Release 17.03.2025 #194
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -112,7 +112,25 @@ export class Paymaster { | |
| if (!userOp.signature) userOp.signature = '0x'; | ||
| if (userOp.factory && userOp.factoryData) userOp.initCode = hexConcat([userOp.factory, userOp.factoryData ?? '']) | ||
| if (!userOp.initCode) userOp.initCode = "0x"; | ||
| const paymasterPostOpGasLimit = BigNumber.from("40000").toHexString(); | ||
| if (estimate) { | ||
| userOp.paymaster = paymasterAddress; | ||
| userOp.paymasterVerificationGasLimit = this.EP7_PVGL; | ||
| userOp.paymasterPostOpGasLimit = paymasterPostOpGasLimit; | ||
| const accountGasLimits = this.packUint(userOp.verificationGasLimit, userOp.callGasLimit) | ||
| const gasFees = this.packUint(userOp.maxPriorityFeePerGas, userOp.maxFeePerGas); | ||
| const packedUserOp = { | ||
| sender: userOp.sender, | ||
| nonce: userOp.nonce, | ||
| initCode: userOp.initCode, | ||
| callData: userOp.callData, | ||
| accountGasLimits: accountGasLimits, | ||
| preVerificationGas: userOp.preVerificationGas, | ||
| gasFees: gasFees, | ||
| paymasterAndData: this.packPaymasterData(paymasterAddress, this.EP7_PVGL, paymasterPostOpGasLimit), | ||
| signature: userOp.signature | ||
| } | ||
| userOp.paymasterData = await this.getPaymasterData(packedUserOp, validUntil, validAfter, paymasterContract, signer); | ||
|
Comment on lines
+117
to
+133
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical bug fix: Paymaster data is now correctly included before estimation. This change fixes the core issue with the Verifying Paymaster by ensuring that when The key improvements:
This ensures the bundler can correctly estimate gas costs for operations involving undeployed wallets. |
||
| const response = await provider.send('eth_estimateUserOperationGas', [userOp, entryPoint]); | ||
| userOp.verificationGasLimit = response.verificationGasLimit; | ||
| userOp.callGasLimit = response.callGasLimit; | ||
|
|
@@ -128,7 +146,7 @@ export class Paymaster { | |
| accountGasLimits: accountGasLimits, | ||
| preVerificationGas: userOp.preVerificationGas, | ||
| gasFees: gasFees, | ||
| paymasterAndData: this.packPaymasterData(paymasterAddress, this.EP7_PVGL, "0x1"), | ||
| paymasterAndData: this.packPaymasterData(paymasterAddress, this.EP7_PVGL, paymasterPostOpGasLimit), | ||
| signature: userOp.signature | ||
| } | ||
|
|
||
|
|
@@ -142,7 +160,7 @@ export class Paymaster { | |
| verificationGasLimit: BigNumber.from(userOp.verificationGasLimit).toHexString(), | ||
| callGasLimit: BigNumber.from(userOp.callGasLimit).toHexString(), | ||
| paymasterVerificationGasLimit: this.EP7_PVGL.toHexString(), | ||
| paymasterPostOpGasLimit: "0x1" | ||
| paymasterPostOpGasLimit | ||
| } | ||
| } else { | ||
| returnValue = { | ||
|
|
||
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.
🧹 Nitpick (assertive)
Changelog properly documents the bug fix.
The changelog entry clearly describes the issue that was fixed: "Fixed Verifying Paymaster execution for undeployed wallets." This aligns with the code changes in the paymaster module.
There are some minor markdown formatting issues though - headings should be surrounded by blank lines according to markdown best practices.
📝 Committable suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
2-2: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
2-2: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
3-3: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above
(MD022, blanks-around-headings)
3-3: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
4-4: Lists should be surrounded by blank lines
null
(MD032, blanks-around-lists)