Skip to content

Commit 7f7af13

Browse files
authored
Merge pull request #194 from etherspot/develop
Release 17.03.2025
2 parents 5ca6f68 + 08073a1 commit 7f7af13

3 files changed

Lines changed: 25 additions & 3 deletions

File tree

backend/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Changelog
2+
## [3.1.3] - 2025-03-13
3+
### Fixes
4+
- Fixed Verifying Paymaster execution for undeployed wallets
5+
26
## [3.1.2] - 2025-02-28
37
### Fixes
48
- Fixed invalid address error on cronJob

backend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "arka",
3-
"version": "3.1.2",
3+
"version": "3.1.3",
44
"description": "ARKA - (Albanian for Cashier's case) is the first open source Paymaster as a service software",
55
"type": "module",
66
"directories": {

backend/src/paymaster/index.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,25 @@ export class Paymaster {
112112
if (!userOp.signature) userOp.signature = '0x';
113113
if (userOp.factory && userOp.factoryData) userOp.initCode = hexConcat([userOp.factory, userOp.factoryData ?? ''])
114114
if (!userOp.initCode) userOp.initCode = "0x";
115+
const paymasterPostOpGasLimit = BigNumber.from("40000").toHexString();
115116
if (estimate) {
117+
userOp.paymaster = paymasterAddress;
118+
userOp.paymasterVerificationGasLimit = this.EP7_PVGL;
119+
userOp.paymasterPostOpGasLimit = paymasterPostOpGasLimit;
120+
const accountGasLimits = this.packUint(userOp.verificationGasLimit, userOp.callGasLimit)
121+
const gasFees = this.packUint(userOp.maxPriorityFeePerGas, userOp.maxFeePerGas);
122+
const packedUserOp = {
123+
sender: userOp.sender,
124+
nonce: userOp.nonce,
125+
initCode: userOp.initCode,
126+
callData: userOp.callData,
127+
accountGasLimits: accountGasLimits,
128+
preVerificationGas: userOp.preVerificationGas,
129+
gasFees: gasFees,
130+
paymasterAndData: this.packPaymasterData(paymasterAddress, this.EP7_PVGL, paymasterPostOpGasLimit),
131+
signature: userOp.signature
132+
}
133+
userOp.paymasterData = await this.getPaymasterData(packedUserOp, validUntil, validAfter, paymasterContract, signer);
116134
const response = await provider.send('eth_estimateUserOperationGas', [userOp, entryPoint]);
117135
userOp.verificationGasLimit = response.verificationGasLimit;
118136
userOp.callGasLimit = response.callGasLimit;
@@ -128,7 +146,7 @@ export class Paymaster {
128146
accountGasLimits: accountGasLimits,
129147
preVerificationGas: userOp.preVerificationGas,
130148
gasFees: gasFees,
131-
paymasterAndData: this.packPaymasterData(paymasterAddress, this.EP7_PVGL, "0x1"),
149+
paymasterAndData: this.packPaymasterData(paymasterAddress, this.EP7_PVGL, paymasterPostOpGasLimit),
132150
signature: userOp.signature
133151
}
134152

@@ -142,7 +160,7 @@ export class Paymaster {
142160
verificationGasLimit: BigNumber.from(userOp.verificationGasLimit).toHexString(),
143161
callGasLimit: BigNumber.from(userOp.callGasLimit).toHexString(),
144162
paymasterVerificationGasLimit: this.EP7_PVGL.toHexString(),
145-
paymasterPostOpGasLimit: "0x1"
163+
paymasterPostOpGasLimit
146164
}
147165
} else {
148166
returnValue = {

0 commit comments

Comments
 (0)