@oydual31/more-vaults-sdk 1.1.12 → 1.1.13
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 +12 -3
- package/dist/viem/index.cjs.map +1 -1
- package/dist/viem/index.d.cts +11 -1
- package/dist/viem/index.d.ts +11 -1
- package/dist/viem/index.js +12 -3
- package/dist/viem/index.js.map +1 -1
- package/package.json +1 -1
- package/src/viem/crossChainFlows.ts +35 -10
package/dist/viem/index.cjs
CHANGED
|
@@ -2678,6 +2678,7 @@ async function quoteComposeFee(hubPublicClient, vault, spokeEid, receiver) {
|
|
|
2678
2678
|
}
|
|
2679
2679
|
}
|
|
2680
2680
|
var ESCROW_REQUEST_TOPIC = "0x304ac8b57de34b9e6118fb049ba362689cfcfab98c30c9d78e3e2e14be7e0972";
|
|
2681
|
+
var COMPOSER_SENT_TOPIC = "0x27b5aea9f5736c02241d8a0272e9ec988ea44cf85c4b4760329431aa19678394";
|
|
2681
2682
|
async function executeCompose(walletClient, hubPublicClient, composeData, fee) {
|
|
2682
2683
|
const account = walletClient.account;
|
|
2683
2684
|
const endpoint = viem.getAddress(composeData.endpoint);
|
|
@@ -2717,17 +2718,25 @@ async function executeCompose(walletClient, hubPublicClient, composeData, fee) {
|
|
|
2717
2718
|
// initVaultActionRequest + LZ Read is gas-heavy
|
|
2718
2719
|
});
|
|
2719
2720
|
let guid;
|
|
2721
|
+
let composerSentGuid;
|
|
2722
|
+
let tokensLocked;
|
|
2720
2723
|
try {
|
|
2721
2724
|
const receipt = await hubPublicClient.waitForTransactionReceipt({ hash: txHash, timeout: 6e4 });
|
|
2722
2725
|
for (const log of receipt.logs) {
|
|
2723
|
-
if (log.topics[0] === ESCROW_REQUEST_TOPIC && log.topics[1]) {
|
|
2726
|
+
if (log.topics[0] === ESCROW_REQUEST_TOPIC && log.topics[1] && log.topics[2] && log.topics[3]) {
|
|
2724
2727
|
guid = log.topics[1];
|
|
2725
|
-
|
|
2728
|
+
const vault = `0x${log.topics[2].slice(26)}`;
|
|
2729
|
+
const token = `0x${log.topics[3].slice(26)}`;
|
|
2730
|
+
const amount = log.data.length >= 66 ? BigInt(`0x${log.data.slice(2, 66)}`) : 0n;
|
|
2731
|
+
tokensLocked = { guid, vault, token, amount };
|
|
2732
|
+
}
|
|
2733
|
+
if (log.topics[0] === COMPOSER_SENT_TOPIC && log.topics[1]) {
|
|
2734
|
+
composerSentGuid = log.topics[1];
|
|
2726
2735
|
}
|
|
2727
2736
|
}
|
|
2728
2737
|
} catch {
|
|
2729
2738
|
}
|
|
2730
|
-
return { txHash, guid };
|
|
2739
|
+
return { txHash, guid, composerSentGuid, tokensLocked };
|
|
2731
2740
|
}
|
|
2732
2741
|
|
|
2733
2742
|
// src/viem/preflight.ts
|