@oydual31/more-vaults-sdk 1.1.17 → 1.1.18
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/ethers/index.cjs +18 -4
- package/dist/ethers/index.cjs.map +1 -1
- package/dist/ethers/index.d.cts +4 -1
- package/dist/ethers/index.d.ts +4 -1
- package/dist/ethers/index.js +18 -5
- package/dist/ethers/index.js.map +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/viem/index.cjs +34 -10
- package/dist/viem/index.cjs.map +1 -1
- package/dist/viem/index.d.cts +4 -1
- package/dist/viem/index.d.ts +4 -1
- package/dist/viem/index.js +34 -11
- package/dist/viem/index.js.map +1 -1
- package/package.json +1 -1
- package/src/ethers/crossChainFlows.ts +15 -5
- package/src/ethers/errors.ts +7 -0
- package/src/ethers/index.ts +1 -0
- package/src/viem/crossChainFlows.ts +31 -14
- package/src/viem/errors.ts +7 -0
- package/src/viem/index.ts +1 -0
package/dist/ethers/index.cjs
CHANGED
|
@@ -742,6 +742,12 @@ var ComposeTimeoutError = class extends MoreVaultsError {
|
|
|
742
742
|
this.guid = guid;
|
|
743
743
|
}
|
|
744
744
|
};
|
|
745
|
+
var ComposeAlreadyExecutedError = class extends MoreVaultsError {
|
|
746
|
+
constructor() {
|
|
747
|
+
super("[MoreVaults] Compose already executed \u2014 deposit is complete, no action needed.");
|
|
748
|
+
this.name = "ComposeAlreadyExecutedError";
|
|
749
|
+
}
|
|
750
|
+
};
|
|
745
751
|
var WithdrawalTimelockActiveError = class extends MoreVaultsError {
|
|
746
752
|
timelockEndsAt;
|
|
747
753
|
requestTxHash;
|
|
@@ -1186,7 +1192,11 @@ async function waitForCompose(hubProvider, composeData, receiver, pollIntervalMs
|
|
|
1186
1192
|
logGuid,
|
|
1187
1193
|
logIndex
|
|
1188
1194
|
);
|
|
1189
|
-
if (hash
|
|
1195
|
+
if (hash === RECEIVED_HASH) {
|
|
1196
|
+
console.log(`[more-vaults-sdk] waitForCompose compose already executed (RECEIVED_HASH) \u2014 signaling done`);
|
|
1197
|
+
throw new ComposeAlreadyExecutedError();
|
|
1198
|
+
}
|
|
1199
|
+
if (hash !== EMPTY_HASH) {
|
|
1190
1200
|
console.log(`[${elapsed}s] Poll #${attempt} \u2014 compose found! (block ${log.blockNumber})`);
|
|
1191
1201
|
return {
|
|
1192
1202
|
...composeData,
|
|
@@ -1198,16 +1208,19 @@ async function waitForCompose(hubProvider, composeData, receiver, pollIntervalMs
|
|
|
1198
1208
|
};
|
|
1199
1209
|
}
|
|
1200
1210
|
}
|
|
1201
|
-
} catch {
|
|
1211
|
+
} catch (e) {
|
|
1212
|
+
if (e instanceof ComposeAlreadyExecutedError) throw e;
|
|
1202
1213
|
}
|
|
1203
1214
|
}
|
|
1204
|
-
} catch {
|
|
1215
|
+
} catch (e) {
|
|
1216
|
+
if (e instanceof ComposeAlreadyExecutedError) throw e;
|
|
1205
1217
|
break;
|
|
1206
1218
|
}
|
|
1207
1219
|
from = chunkEnd + 1n;
|
|
1208
1220
|
}
|
|
1209
1221
|
scannedUpTo = currentBlock;
|
|
1210
|
-
} catch {
|
|
1222
|
+
} catch (e) {
|
|
1223
|
+
if (e instanceof ComposeAlreadyExecutedError) throw e;
|
|
1211
1224
|
}
|
|
1212
1225
|
let guidMatchFound = false;
|
|
1213
1226
|
for (const fromAddr of knownFromAddresses) {
|
|
@@ -3690,6 +3703,7 @@ exports.CHAIN_ID_TO_EID = CHAIN_ID_TO_EID;
|
|
|
3690
3703
|
exports.CONFIG_ABI = CONFIG_ABI;
|
|
3691
3704
|
exports.CURATOR_CONFIG_ABI = CURATOR_CONFIG_ABI;
|
|
3692
3705
|
exports.CapacityFullError = CapacityFullError;
|
|
3706
|
+
exports.ComposeAlreadyExecutedError = ComposeAlreadyExecutedError;
|
|
3693
3707
|
exports.ComposeTimeoutError = ComposeTimeoutError;
|
|
3694
3708
|
exports.ComposerNotConfiguredError = ComposerNotConfiguredError;
|
|
3695
3709
|
exports.DEX_ABI = DEX_ABI;
|