@1llet.xyz/erc4337-gasless-sdk 0.4.49 → 0.4.51
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/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -423,7 +423,7 @@ var BundlerClient = class {
|
|
|
423
423
|
return result.result;
|
|
424
424
|
}
|
|
425
425
|
async estimateGas(userOp) {
|
|
426
|
-
|
|
426
|
+
const result = await this.call("eth_estimateUserOperationGas", [
|
|
427
427
|
{
|
|
428
428
|
sender: userOp.sender,
|
|
429
429
|
nonce: userOp.nonce ? "0x" + userOp.nonce.toString(16) : "0x0",
|
|
@@ -434,6 +434,14 @@ var BundlerClient = class {
|
|
|
434
434
|
},
|
|
435
435
|
this.entryPointAddress
|
|
436
436
|
]);
|
|
437
|
+
return {
|
|
438
|
+
callGasLimit: result.callGasLimit,
|
|
439
|
+
verificationGasLimit: result.verificationGasLimit,
|
|
440
|
+
preVerificationGas: result.preVerificationGas,
|
|
441
|
+
maxFeePerGas: result.maxFeePerGas,
|
|
442
|
+
maxPriorityFeePerGas: result.maxPriorityFeePerGas,
|
|
443
|
+
paymasterAndData: result.paymasterAndData
|
|
444
|
+
};
|
|
437
445
|
}
|
|
438
446
|
async sendUserOperation(userOp) {
|
|
439
447
|
return await this.call("eth_sendUserOperation", [
|
|
@@ -608,6 +616,7 @@ var UserOpBuilder = class {
|
|
|
608
616
|
preVerificationGas: BigInt(gasEstimate.preVerificationGas),
|
|
609
617
|
maxFeePerGas: BigInt(gasEstimate.maxFeePerGas),
|
|
610
618
|
maxPriorityFeePerGas: BigInt(gasEstimate.maxPriorityFeePerGas),
|
|
619
|
+
paymasterAndData: gasEstimate.paymasterAndData || partialOp.paymasterAndData,
|
|
611
620
|
signature: "0x"
|
|
612
621
|
};
|
|
613
622
|
}
|
|
@@ -632,6 +641,7 @@ var UserOpBuilder = class {
|
|
|
632
641
|
preVerificationGas: BigInt(gasEstimate.preVerificationGas),
|
|
633
642
|
maxFeePerGas: BigInt(gasEstimate.maxFeePerGas),
|
|
634
643
|
maxPriorityFeePerGas: BigInt(gasEstimate.maxPriorityFeePerGas),
|
|
644
|
+
paymasterAndData: gasEstimate.paymasterAndData || partialOp.paymasterAndData,
|
|
635
645
|
signature: "0x"
|
|
636
646
|
};
|
|
637
647
|
}
|
|
@@ -1995,7 +2005,7 @@ async function executeCCTPBridge(sourceChain, amount, crossChainConfig, facilita
|
|
|
1995
2005
|
const amountBigInt = BigInt(Math.floor(parseFloat(amount) * 1e6));
|
|
1996
2006
|
const feeRaw = calculateFee();
|
|
1997
2007
|
const fee = BigInt(Math.floor(feeRaw * 1e6));
|
|
1998
|
-
const minRequired = fee
|
|
2008
|
+
const minRequired = fee;
|
|
1999
2009
|
if (amountBigInt <= minRequired) {
|
|
2000
2010
|
return {
|
|
2001
2011
|
success: false,
|
|
@@ -2051,8 +2061,8 @@ async function executeCCTPBridge(sourceChain, amount, crossChainConfig, facilita
|
|
|
2051
2061
|
abi: tokenMessengerAbi,
|
|
2052
2062
|
functionName: "depositForBurn",
|
|
2053
2063
|
args: [
|
|
2054
|
-
amountBigInt - fee
|
|
2055
|
-
// Deduct 0.02 USDC Fee
|
|
2064
|
+
amountBigInt - fee,
|
|
2065
|
+
// Deduct 0.02 USDC Fee
|
|
2056
2066
|
crossChainConfig.destinationDomain,
|
|
2057
2067
|
mintRecipient,
|
|
2058
2068
|
networkConfig.usdc,
|