@oydual31/more-vaults-sdk 1.1.8 → 1.1.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/viem/index.cjs
CHANGED
|
@@ -2510,15 +2510,20 @@ async function waitForCompose(hubPublicClient, composeData, receiver, pollInterv
|
|
|
2510
2510
|
fromBlock: from,
|
|
2511
2511
|
toBlock: chunkEnd
|
|
2512
2512
|
});
|
|
2513
|
+
console.log(`[more-vaults-sdk] waitForCompose chunk ${from}\u2192${chunkEnd}: ${logs.length} ComposeSent log(s)`);
|
|
2513
2514
|
for (const log of logs) {
|
|
2514
2515
|
const args = log.args;
|
|
2515
|
-
|
|
2516
|
+
const toMatch = args.to ? viem.getAddress(args.to) === composer : false;
|
|
2517
|
+
const msgMatch = args.message?.toLowerCase().includes(receiverNeedle) ?? false;
|
|
2518
|
+
console.log(`[more-vaults-sdk] waitForCompose log @ block ${log.blockNumber}: to_match=${toMatch} msg_match=${msgMatch} from=${args.from}`);
|
|
2519
|
+
if (toMatch && msgMatch) {
|
|
2516
2520
|
const hash = await hubPublicClient.readContract({
|
|
2517
2521
|
address: endpoint,
|
|
2518
2522
|
abi: LZ_ENDPOINT_ABI,
|
|
2519
2523
|
functionName: "composeQueue",
|
|
2520
2524
|
args: [viem.getAddress(args.from), composer, args.guid, args.index ?? 0]
|
|
2521
2525
|
});
|
|
2526
|
+
console.log(`[more-vaults-sdk] waitForCompose composeQueue hash=${hash} empty=${hash === EMPTY_HASH} received=${hash === RECEIVED_HASH}`);
|
|
2522
2527
|
if (hash !== EMPTY_HASH && hash !== RECEIVED_HASH) {
|
|
2523
2528
|
console.log(`[${elapsed}s] Poll #${attempt} \u2014 compose found! (block ${log.blockNumber}, scanned from ${startBlock})`);
|
|
2524
2529
|
return {
|
|
@@ -2533,7 +2538,8 @@ async function waitForCompose(hubPublicClient, composeData, receiver, pollInterv
|
|
|
2533
2538
|
}
|
|
2534
2539
|
}
|
|
2535
2540
|
scannedUpTo = chunkEnd;
|
|
2536
|
-
} catch {
|
|
2541
|
+
} catch (e) {
|
|
2542
|
+
console.log(`[more-vaults-sdk] waitForCompose chunk ${from}\u2192${chunkEnd} failed, will retry:`, String(e).slice(0, 120));
|
|
2537
2543
|
break;
|
|
2538
2544
|
}
|
|
2539
2545
|
from = chunkEnd + 1n;
|