@1llet.xyz/erc4337-gasless-sdk 0.4.20 → 0.4.21
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.js +19 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1783,20 +1783,25 @@ async function processCCTPSettlement(context, crossChainConfig) {
|
|
|
1783
1783
|
errorReason: `Invalid deposit transaction: ${e instanceof Error ? e.message : "Unknown error"}`
|
|
1784
1784
|
};
|
|
1785
1785
|
}
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1786
|
+
let facilitatorBalance = BigInt(0);
|
|
1787
|
+
const maxRetries = 5;
|
|
1788
|
+
for (let i = 0; i < maxRetries; i++) {
|
|
1789
|
+
facilitatorBalance = await publicClient.readContract({
|
|
1790
|
+
address: usdcAddress,
|
|
1791
|
+
abi: usdcErc3009Abi,
|
|
1792
|
+
functionName: "balanceOf",
|
|
1793
|
+
args: [facilitatorAccount.address]
|
|
1794
|
+
});
|
|
1795
|
+
if (facilitatorBalance >= amountBigInt) break;
|
|
1796
|
+
await new Promise((r) => setTimeout(r, 2e3));
|
|
1797
|
+
}
|
|
1798
|
+
if (facilitatorBalance < amountBigInt) {
|
|
1799
|
+
return {
|
|
1800
|
+
success: false,
|
|
1801
|
+
errorReason: "Deposit verified but facilitator balance insufficient (Funds sent to wrong address?)"
|
|
1802
|
+
};
|
|
1803
|
+
}
|
|
1804
|
+
} else {
|
|
1800
1805
|
return {
|
|
1801
1806
|
success: true,
|
|
1802
1807
|
data: {
|