gokite-aa-sdk 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gokite-aa-sdk.js +9 -4
- package/dist/utils.js +1 -1
- package/package.json +1 -1
package/dist/gokite-aa-sdk.js
CHANGED
|
@@ -78,8 +78,10 @@ class BundlerProvider {
|
|
|
78
78
|
callGasLimit: BigInt(result.result.callGasLimit),
|
|
79
79
|
verificationGasLimit: BigInt(result.result.verificationGasLimit),
|
|
80
80
|
preVerificationGas: BigInt(result.result.preVerificationGas),
|
|
81
|
-
maxFeePerGas: BigInt(result.result.maxFeePerGas || 1000000000n),
|
|
82
|
-
maxPriorityFeePerGas: BigInt(result.result.maxPriorityFeePerGas || 1000000000n), // 1 gwei
|
|
81
|
+
// maxFeePerGas: BigInt(result.result.maxFeePerGas || 1000000000n), // 1 gwei
|
|
82
|
+
// maxPriorityFeePerGas: BigInt(result.result.maxPriorityFeePerGas || 1000000000n), // 1 gwei
|
|
83
|
+
maxFeePerGas: BigInt(1000000000n),
|
|
84
|
+
maxPriorityFeePerGas: BigInt(1000000000n),
|
|
83
85
|
};
|
|
84
86
|
}
|
|
85
87
|
catch (error) {
|
|
@@ -314,6 +316,7 @@ class GokiteAASDK {
|
|
|
314
316
|
// Update gas fields in packed format (verificationGasLimit first, callGasLimit second)
|
|
315
317
|
userOp.accountGasLimits = (0, utils_1.packAccountGasLimits)(gasEstimate.verificationGasLimit, gasEstimate.callGasLimit);
|
|
316
318
|
userOp.preVerificationGas = gasEstimate.preVerificationGas;
|
|
319
|
+
userOp.gasFees = (0, utils_1.packAccountGasLimits)(gasEstimate.maxPriorityFeePerGas, gasEstimate.maxFeePerGas);
|
|
317
320
|
const userOpHash = await this.getUserOpHash(userOp);
|
|
318
321
|
// Sign user operation
|
|
319
322
|
const signature = await signFn(userOpHash);
|
|
@@ -426,8 +429,10 @@ class GokiteAASDK {
|
|
|
426
429
|
gasEstimate.callGasLimit = gasEstimate.callGasLimit + 5000000n;
|
|
427
430
|
gasEstimate.verificationGasLimit = gasEstimate.verificationGasLimit + 1000000n;
|
|
428
431
|
gasEstimate.preVerificationGas = gasEstimate.preVerificationGas + 1000000n;
|
|
429
|
-
gasEstimate.maxFeePerGas = BigInt(
|
|
430
|
-
gasEstimate.maxPriorityFeePerGas = BigInt(
|
|
432
|
+
// gasEstimate.maxFeePerGas = BigInt(gasEstimate.maxFeePerGas || 1000000000n); // 1 gwei
|
|
433
|
+
// gasEstimate.maxPriorityFeePerGas = BigInt(gasEstimate.maxPriorityFeePerGas || 1000000000n); // 1 gwei
|
|
434
|
+
gasEstimate.maxFeePerGas = BigInt(1000000000n);
|
|
435
|
+
gasEstimate.maxPriorityFeePerGas = BigInt(1000000000n);
|
|
431
436
|
userOp.gasFees = (0, utils_1.packAccountGasLimits)(gasEstimate.maxPriorityFeePerGas, gasEstimate.maxFeePerGas);
|
|
432
437
|
// Pack gas limits and fees (note: verificationGasLimit first, callGasLimit second)
|
|
433
438
|
userOp.accountGasLimits = (0, utils_1.packAccountGasLimits)(gasEstimate.verificationGasLimit, gasEstimate.callGasLimit);
|
package/dist/utils.js
CHANGED
|
@@ -130,7 +130,7 @@ function serializeUserOperation(userOp) {
|
|
|
130
130
|
exports.serializeUserOperation = serializeUserOperation;
|
|
131
131
|
// default salt is 0
|
|
132
132
|
function generateSalt() {
|
|
133
|
-
return BigInt(
|
|
133
|
+
return BigInt(0);
|
|
134
134
|
}
|
|
135
135
|
exports.generateSalt = generateSalt;
|
|
136
136
|
/**
|