@panoptic-eng/sdk 1.0.59 → 1.0.61
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/cow/index.js +1207 -484
- package/dist/cow/index.js.map +1 -1
- package/dist/{cow-CHb343la.js → cow-BItQK2Bi.js} +1 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -6
- package/dist/index.js.map +1 -1
- package/dist/{irm-BIaLQ-0n.js → irm-BEug2-TH.js} +2 -2
- package/dist/panoptic/v2/index.d.ts +62 -4
- package/dist/panoptic/v2/index.d.ts.map +1 -1
- package/dist/panoptic/v2/index.js +278 -83
- package/dist/panoptic/v2/index.js.map +1 -1
- package/dist/panoptic/v2/react-public.d.ts +72 -6
- package/dist/panoptic/v2/react-public.d.ts.map +1 -1
- package/dist/panoptic/v2/react-public.js +294 -89
- package/dist/panoptic/v2/react-public.js.map +1 -1
- package/dist/{rates-COAJpKRd.js → rates-CPHxWqpT.js} +498 -482
- package/dist/{router-DiVbG7km.js → router-BZGHjEcU.js} +2 -2
- package/dist/{router-NeVmoCOu.js → router-kTiatP_R.js} +2 -2
- package/dist/{transactionFees-CNbjAigT.js → transactionFees-MocbcAyR.js} +10 -5
- package/dist/uniswap/index.js +724 -1
- package/dist/uniswap/index.js.map +1 -1
- package/dist/{v2-B23d5d4I.js → v2-odOz_0wM.js} +184 -201
- package/dist/vault-transaction-fees.d.ts +1 -0
- package/dist/vault-transaction-fees.d.ts.map +1 -1
- package/dist/vault-transaction-fees.js +10 -5
- package/dist/vault-transaction-fees.js.map +1 -1
- package/dist/{writes-CllMRkmo.js → writes-gs0k0uoN.js} +234 -38
- package/dist/zodiac/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PanopticError, getBlockMeta, getPoolMetadata, submitWrite } from "./rates-
|
|
1
|
+
import { PanopticError, getBlockMeta, getPoolMetadata, submitWrite } from "./rates-CPHxWqpT.js";
|
|
2
2
|
import { tickToSqrtPriceX96 } from "./greeks-CNi1-cnp.js";
|
|
3
|
-
import { decodeAllLegs } from "./writes-
|
|
3
|
+
import { decodeAllLegs } from "./writes-gs0k0uoN.js";
|
|
4
4
|
import { BaseError, ContractFunctionRevertedError, encodeAbiParameters, encodeFunctionData, encodePacked, isAddressEqual, zeroAddress } from "viem";
|
|
5
5
|
|
|
6
6
|
//#region src/uniswap/lpDeposit.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PanopticError, getBlockMeta, getPool, submitWrite } from "./rates-
|
|
2
|
-
import { AmountExceedsUint128Error, InvalidSwapTokenError, MissingSweepRecipientError, QuoterUnavailableError, getUniswapV4Addresses, universalRouterAbi } from "./router-
|
|
1
|
+
import { PanopticError, getBlockMeta, getPool, submitWrite } from "./rates-CPHxWqpT.js";
|
|
2
|
+
import { AmountExceedsUint128Error, InvalidSwapTokenError, MissingSweepRecipientError, QuoterUnavailableError, getUniswapV4Addresses, universalRouterAbi } from "./router-BZGHjEcU.js";
|
|
3
3
|
import { BaseError, ContractFunctionRevertedError, encodeAbiParameters, encodeFunctionData, encodePacked, erc20Abi, isAddressEqual, maxUint256, zeroAddress } from "viem";
|
|
4
4
|
|
|
5
5
|
//#region src/uniswap/v4/router/encodeSwap.ts
|
|
@@ -89,6 +89,7 @@ function resolveFeeHistoryQuote({ baseFeePerGas, reward, minimumPriorityFeePerGa
|
|
|
89
89
|
const maxPriorityFeePerGas = clampPriorityFee(sampledPriorityFee, effectivePriorityFeeFloor);
|
|
90
90
|
const bufferedBaseFee = ceilMultiplyFraction(baseFeePerGas[latestBaseFeeIndex], BASE_FEE_BUFFER_NUMERATOR, BASE_FEE_BUFFER_DENOMINATOR);
|
|
91
91
|
return {
|
|
92
|
+
currentBaseFeePerGas: baseFeePerGas[latestBaseFeeIndex],
|
|
92
93
|
maxFeePerGas: bufferedBaseFee + maxPriorityFeePerGas,
|
|
93
94
|
maxPriorityFeePerGas,
|
|
94
95
|
minimumMaxFeePerGas: bufferedBaseFee + effectivePriorityFeeFloor,
|
|
@@ -223,11 +224,15 @@ function validateVaultSignedTransactionFeeCaps(feeCaps, quote) {
|
|
|
223
224
|
code: "GasCostTooHigh",
|
|
224
225
|
reason: `Signed transaction maximum gas cost (${(gasLimit * maxFeePerGas).toString()} wei) must not exceed ${MAX_VAULT_TRANSACTION_GAS_COST.toString()} wei (0.015 ETH).`
|
|
225
226
|
};
|
|
226
|
-
if (quote !== void 0
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
227
|
+
if (quote !== void 0) {
|
|
228
|
+
const feeRequirementDescription = quote.currentBaseFeePerGas === void 0 ? "buffered next-block base fee" : "current base fee";
|
|
229
|
+
const minimumBroadcastMaxFeePerGas = quote.currentBaseFeePerGas === void 0 ? quote.minimumMaxFeePerGas : quote.currentBaseFeePerGas + minimumPriorityFeePerGas;
|
|
230
|
+
if (maxFeePerGas < minimumBroadcastMaxFeePerGas) return {
|
|
231
|
+
valid: false,
|
|
232
|
+
code: "MaxFeeTooLow",
|
|
233
|
+
reason: `Signed transaction maxFeePerGas (${maxFeePerGas.toString()} wei) must be at least ${minimumBroadcastMaxFeePerGas.toString()} wei for the ${feeRequirementDescription} and configured minimum priority fee.`
|
|
234
|
+
};
|
|
235
|
+
}
|
|
231
236
|
return { valid: true };
|
|
232
237
|
}
|
|
233
238
|
async function resolveVaultTransactionFeeQuote({ readFeeHistory, readFallbackEstimate, minimumPriorityFeePerGas }) {
|