@hypurrquant/defi-cli 1.0.6 → 1.0.7
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 +8 -0
- package/dist/index.js.map +1 -1
- package/dist/main.js +8 -0
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/skills/defi-cli/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -11098,6 +11098,14 @@ function registerBridge(parent, getOpts) {
|
|
|
11098
11098
|
}
|
|
11099
11099
|
const amountUsdc = Number(BigInt(opts.amount)) / 1e6;
|
|
11100
11100
|
const { fee, maxFeeSubunits } = await getCctpFeeEstimate(srcDomain, dstDomain, amountUsdc);
|
|
11101
|
+
if (BigInt(opts.amount) <= maxFeeSubunits) {
|
|
11102
|
+
printOutput({
|
|
11103
|
+
error: `CCTP: amount ${opts.amount} (${amountUsdc} USDC) is below the minimum bridge fee of ${maxFeeSubunits} (${fee} USDC). Increase --amount.`,
|
|
11104
|
+
minimum_amount_wei: maxFeeSubunits.toString(),
|
|
11105
|
+
minimum_amount_usdc: fee
|
|
11106
|
+
}, getOpts());
|
|
11107
|
+
return;
|
|
11108
|
+
}
|
|
11101
11109
|
const recipientPadded = `0x${"0".repeat(24)}${recipient.replace("0x", "").toLowerCase()}`;
|
|
11102
11110
|
const { encodeFunctionData: encodeFunctionData31, parseAbi: parseAbi35 } = await import("viem");
|
|
11103
11111
|
const tokenMessengerAbi = parseAbi35([
|