timelock-sdk 0.0.46 → 0.0.48
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/abis.cjs +1 -1
- package/dist/abis.d.cts +1 -1
- package/dist/abis.d.ts +1 -1
- package/dist/abis.js +2 -2
- package/dist/client.cjs +17 -9
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +122 -118
- package/dist/client.d.ts +67 -63
- package/dist/client.js +18 -10
- package/dist/client.js.map +1 -1
- package/dist/{index-B7b3c8cu.d.cts → index-Bg4UAy7Y.d.cts} +3 -3
- package/dist/{index-CRhFaRiq.d.ts → index-DiDvh-kv.d.ts} +94 -94
- package/dist/{numberUtils-DKGWDsOu.cjs → numberUtils-BKQtAolx.cjs} +2 -2
- package/dist/{numberUtils-DKGWDsOu.cjs.map → numberUtils-BKQtAolx.cjs.map} +1 -1
- package/dist/{numberUtils-Dk_yqgfN.js → numberUtils-Dk0TuHnT.js} +3 -3
- package/dist/{numberUtils-Dk_yqgfN.js.map → numberUtils-Dk0TuHnT.js.map} +1 -1
- package/dist/{optionsMarket-DyBxHplR.js → optionsMarket-CvArD6d_.js} +432 -116
- package/dist/{optionsMarket-DyBxHplR.js.map → optionsMarket-CvArD6d_.js.map} +1 -1
- package/dist/{optionsMarket-Br-bjuSA.cjs → optionsMarket-PBduSBXF.cjs} +431 -115
- package/dist/{optionsMarket-Br-bjuSA.cjs.map → optionsMarket-PBduSBXF.cjs.map} +1 -1
- package/dist/package.cjs +2 -2
- package/dist/package.d.cts +2 -2
- package/dist/package.d.ts +2 -2
- package/dist/package.js +2 -2
- package/dist/{singleOwnerVault-DMu9pqN1.js → singleOwnerVault-BeJChjfJ.js} +2 -2
- package/dist/{singleOwnerVault-DMu9pqN1.js.map → singleOwnerVault-BeJChjfJ.js.map} +1 -1
- package/dist/{uniswapMathLens-MrB_VfJB.d.ts → uniswapMathLens-BiaRFVeY.d.cts} +354 -97
- package/dist/{uniswapMathLens-B1MIL2yT.d.cts → uniswapMathLens-uDGUc-kg.d.ts} +354 -97
- package/package.json +6 -6
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./uniswapMathLens-
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
1
|
+
import "./uniswapMathLens-uDGUc-kg.js";
|
|
2
|
+
import { D as TimelockMarketData, O as UniswapMathLens, d as Amount } from "./index-DiDvh-kv.js";
|
|
3
|
+
import * as viem0 from "viem";
|
|
4
4
|
import { Address } from "viem";
|
|
5
5
|
import React, { ReactNode } from "react";
|
|
6
6
|
import { GraphQLClient, RequestOptions } from "graphql-request";
|
|
@@ -11,9 +11,9 @@ import * as _wagmi_core0 from "@wagmi/core";
|
|
|
11
11
|
import * as _tanstack_query_core0 from "@tanstack/query-core";
|
|
12
12
|
|
|
13
13
|
//#region src/generated/graphql.d.ts
|
|
14
|
-
type Exact<T extends {
|
|
14
|
+
type Exact<T$1 extends {
|
|
15
15
|
[key: string]: unknown;
|
|
16
|
-
}> = { [K in keyof T]: T[K] };
|
|
16
|
+
}> = { [K in keyof T$1]: T$1[K] };
|
|
17
17
|
type GraphQLClientRequestHeaders = RequestOptions['requestHeaders'];
|
|
18
18
|
/** All built-in and custom scalars, mapped to their actual values */
|
|
19
19
|
type Scalars = {
|
|
@@ -2286,12 +2286,16 @@ declare const useMintOption: (marketAddr?: Address) => {
|
|
|
2286
2286
|
//#endregion
|
|
2287
2287
|
//#region src/hooks/market/useOptionPnl.d.ts
|
|
2288
2288
|
declare const useOptionPnl: (option: OptionData) => {
|
|
2289
|
-
unrealizedPayout:
|
|
2290
|
-
displayPnl:
|
|
2289
|
+
unrealizedPayout: Amount | undefined;
|
|
2290
|
+
displayPnl: Amount | undefined;
|
|
2291
2291
|
};
|
|
2292
2292
|
//#endregion
|
|
2293
2293
|
//#region src/hooks/market/useOptionPremium.d.ts
|
|
2294
|
-
declare const useOptionPremium: (marketAddr: Address | undefined, optionType: "CALL" | "PUT", optionAmount: bigint, duration: number, strikeTick?: number) =>
|
|
2294
|
+
declare const useOptionPremium: (marketAddr: Address | undefined, optionType: "CALL" | "PUT", optionAmount: bigint, duration: number, strikeTick?: number) => {
|
|
2295
|
+
premium: Amount;
|
|
2296
|
+
protocolFee: Amount;
|
|
2297
|
+
totalPremium: Amount;
|
|
2298
|
+
} | undefined;
|
|
2295
2299
|
//#endregion
|
|
2296
2300
|
//#region src/hooks/pool/useCurrentPrice.d.ts
|
|
2297
2301
|
declare const useCurrentPrice: (poolAddr?: Address) => {
|
|
@@ -2310,7 +2314,7 @@ declare const useCurrentTick: (poolAddr?: Address) => {
|
|
|
2310
2314
|
//#endregion
|
|
2311
2315
|
//#region src/hooks/pool/usePoolData.d.ts
|
|
2312
2316
|
type UniswapPoolData = ReturnType<typeof usePoolData>;
|
|
2313
|
-
type NonUndefined<T> = T extends undefined ? never : T;
|
|
2317
|
+
type NonUndefined<T$1> = T$1 extends undefined ? never : T$1;
|
|
2314
2318
|
declare const usePoolData: (poolAddr?: Address) => Partial<NonUndefined<{
|
|
2315
2319
|
token0: `0x${string}`;
|
|
2316
2320
|
token1: `0x${string}`;
|
|
@@ -2357,7 +2361,7 @@ declare const useBurnLiquidity: (vaultAddr?: Address) => {
|
|
|
2357
2361
|
//#region src/hooks/vault/useLiquidityBlocks.d.ts
|
|
2358
2362
|
type LiquidityBlockData = ReturnType<typeof useLiquidityBlocks>['data'][0];
|
|
2359
2363
|
declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
2360
|
-
error:
|
|
2364
|
+
error: viem0.ReadContractErrorType;
|
|
2361
2365
|
isError: true;
|
|
2362
2366
|
isPending: false;
|
|
2363
2367
|
isLoading: false;
|
|
@@ -2369,7 +2373,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2369
2373
|
dataUpdatedAt: number;
|
|
2370
2374
|
errorUpdatedAt: number;
|
|
2371
2375
|
failureCount: number;
|
|
2372
|
-
failureReason:
|
|
2376
|
+
failureReason: viem0.ReadContractErrorType | null;
|
|
2373
2377
|
errorUpdateCount: number;
|
|
2374
2378
|
isFetched: boolean;
|
|
2375
2379
|
isFetchedAfterMount: boolean;
|
|
@@ -2389,7 +2393,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2389
2393
|
totalAmount1: bigint;
|
|
2390
2394
|
borrowedAmount0: bigint;
|
|
2391
2395
|
borrowedAmount1: bigint;
|
|
2392
|
-
}[],
|
|
2396
|
+
}[], viem0.ReadContractErrorType>>;
|
|
2393
2397
|
fetchStatus: _tanstack_query_core0.FetchStatus;
|
|
2394
2398
|
promise: Promise<readonly {
|
|
2395
2399
|
tickLower: number;
|
|
@@ -2427,7 +2431,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2427
2431
|
dataUpdatedAt: number;
|
|
2428
2432
|
errorUpdatedAt: number;
|
|
2429
2433
|
failureCount: number;
|
|
2430
|
-
failureReason:
|
|
2434
|
+
failureReason: viem0.ReadContractErrorType | null;
|
|
2431
2435
|
errorUpdateCount: number;
|
|
2432
2436
|
isFetched: boolean;
|
|
2433
2437
|
isFetchedAfterMount: boolean;
|
|
@@ -2447,7 +2451,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2447
2451
|
totalAmount1: bigint;
|
|
2448
2452
|
borrowedAmount0: bigint;
|
|
2449
2453
|
borrowedAmount1: bigint;
|
|
2450
|
-
}[],
|
|
2454
|
+
}[], viem0.ReadContractErrorType>>;
|
|
2451
2455
|
fetchStatus: _tanstack_query_core0.FetchStatus;
|
|
2452
2456
|
promise: Promise<readonly {
|
|
2453
2457
|
tickLower: number;
|
|
@@ -2473,7 +2477,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2473
2477
|
borrowedAmount1: bigint;
|
|
2474
2478
|
}[];
|
|
2475
2479
|
} | {
|
|
2476
|
-
error:
|
|
2480
|
+
error: viem0.ReadContractErrorType;
|
|
2477
2481
|
isError: true;
|
|
2478
2482
|
isPending: false;
|
|
2479
2483
|
isLoading: false;
|
|
@@ -2485,7 +2489,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2485
2489
|
dataUpdatedAt: number;
|
|
2486
2490
|
errorUpdatedAt: number;
|
|
2487
2491
|
failureCount: number;
|
|
2488
|
-
failureReason:
|
|
2492
|
+
failureReason: viem0.ReadContractErrorType | null;
|
|
2489
2493
|
errorUpdateCount: number;
|
|
2490
2494
|
isFetched: boolean;
|
|
2491
2495
|
isFetchedAfterMount: boolean;
|
|
@@ -2505,7 +2509,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2505
2509
|
totalAmount1: bigint;
|
|
2506
2510
|
borrowedAmount0: bigint;
|
|
2507
2511
|
borrowedAmount1: bigint;
|
|
2508
|
-
}[],
|
|
2512
|
+
}[], viem0.ReadContractErrorType>>;
|
|
2509
2513
|
fetchStatus: _tanstack_query_core0.FetchStatus;
|
|
2510
2514
|
promise: Promise<readonly {
|
|
2511
2515
|
tickLower: number;
|
|
@@ -2543,7 +2547,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2543
2547
|
dataUpdatedAt: number;
|
|
2544
2548
|
errorUpdatedAt: number;
|
|
2545
2549
|
failureCount: number;
|
|
2546
|
-
failureReason:
|
|
2550
|
+
failureReason: viem0.ReadContractErrorType | null;
|
|
2547
2551
|
errorUpdateCount: number;
|
|
2548
2552
|
isFetched: boolean;
|
|
2549
2553
|
isFetchedAfterMount: boolean;
|
|
@@ -2563,7 +2567,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2563
2567
|
totalAmount1: bigint;
|
|
2564
2568
|
borrowedAmount0: bigint;
|
|
2565
2569
|
borrowedAmount1: bigint;
|
|
2566
|
-
}[],
|
|
2570
|
+
}[], viem0.ReadContractErrorType>>;
|
|
2567
2571
|
fetchStatus: _tanstack_query_core0.FetchStatus;
|
|
2568
2572
|
promise: Promise<readonly {
|
|
2569
2573
|
tickLower: number;
|
|
@@ -2600,7 +2604,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2600
2604
|
dataUpdatedAt: number;
|
|
2601
2605
|
errorUpdatedAt: number;
|
|
2602
2606
|
failureCount: number;
|
|
2603
|
-
failureReason:
|
|
2607
|
+
failureReason: viem0.ReadContractErrorType | null;
|
|
2604
2608
|
errorUpdateCount: number;
|
|
2605
2609
|
isFetched: boolean;
|
|
2606
2610
|
isFetchedAfterMount: boolean;
|
|
@@ -2621,7 +2625,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2621
2625
|
totalAmount1: bigint;
|
|
2622
2626
|
borrowedAmount0: bigint;
|
|
2623
2627
|
borrowedAmount1: bigint;
|
|
2624
|
-
}[],
|
|
2628
|
+
}[], viem0.ReadContractErrorType>>;
|
|
2625
2629
|
fetchStatus: _tanstack_query_core0.FetchStatus;
|
|
2626
2630
|
promise: Promise<readonly {
|
|
2627
2631
|
tickLower: number;
|
|
@@ -2659,7 +2663,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2659
2663
|
dataUpdatedAt: number;
|
|
2660
2664
|
errorUpdatedAt: number;
|
|
2661
2665
|
failureCount: number;
|
|
2662
|
-
failureReason:
|
|
2666
|
+
failureReason: viem0.ReadContractErrorType | null;
|
|
2663
2667
|
errorUpdateCount: number;
|
|
2664
2668
|
isFetched: boolean;
|
|
2665
2669
|
isFetchedAfterMount: boolean;
|
|
@@ -2679,7 +2683,7 @@ declare const useLiquidityBlocks: (vaultAddr?: Address) => {
|
|
|
2679
2683
|
totalAmount1: bigint;
|
|
2680
2684
|
borrowedAmount0: bigint;
|
|
2681
2685
|
borrowedAmount1: bigint;
|
|
2682
|
-
}[],
|
|
2686
|
+
}[], viem0.ReadContractErrorType>>;
|
|
2683
2687
|
fetchStatus: _tanstack_query_core0.FetchStatus;
|
|
2684
2688
|
promise: Promise<readonly {
|
|
2685
2689
|
tickLower: number;
|
|
@@ -2752,14 +2756,14 @@ declare const useVaultTVL: (vaultAddr?: Address) => {
|
|
|
2752
2756
|
borrowedAmount0: Amount;
|
|
2753
2757
|
borrowedAmount1: Amount;
|
|
2754
2758
|
blocksCount: bigint;
|
|
2755
|
-
refetch: (options?: _tanstack_query_core0.RefetchOptions) => Promise<_tanstack_query_core0.QueryObserverResult<readonly [bigint, bigint, bigint, bigint, bigint, bigint, bigint],
|
|
2759
|
+
refetch: (options?: _tanstack_query_core0.RefetchOptions) => Promise<_tanstack_query_core0.QueryObserverResult<readonly [bigint, bigint, bigint, bigint, bigint, bigint, bigint], viem0.ReadContractErrorType>>;
|
|
2756
2760
|
};
|
|
2757
2761
|
//#endregion
|
|
2758
2762
|
//#region src/hooks/useLens.d.ts
|
|
2759
2763
|
declare const useLens: () => {
|
|
2760
2764
|
timelockLens: {
|
|
2761
2765
|
read: {
|
|
2762
|
-
batchGetRefTick: (args: readonly [`0x${string}`, readonly number[]], options?:
|
|
2766
|
+
batchGetRefTick: (args: readonly [`0x${string}`, readonly number[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
2763
2767
|
readonly type: "function";
|
|
2764
2768
|
readonly name: "batchGetRefTick";
|
|
2765
2769
|
readonly inputs: readonly [{
|
|
@@ -3465,7 +3469,7 @@ declare const useLens: () => {
|
|
|
3465
3469
|
}];
|
|
3466
3470
|
readonly stateMutability: "view";
|
|
3467
3471
|
}], "batchGetRefTick", readonly [`0x${string}`, readonly number[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly number[]>;
|
|
3468
|
-
getAllBlocks: (args: readonly [`0x${string}`], options?:
|
|
3472
|
+
getAllBlocks: (args: readonly [`0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
3469
3473
|
readonly type: "function";
|
|
3470
3474
|
readonly name: "batchGetRefTick";
|
|
3471
3475
|
readonly inputs: readonly [{
|
|
@@ -4181,7 +4185,7 @@ declare const useLens: () => {
|
|
|
4181
4185
|
borrowedAmount0: bigint;
|
|
4182
4186
|
borrowedAmount1: bigint;
|
|
4183
4187
|
}[]>;
|
|
4184
|
-
getExpiredOptions: (args: readonly [`0x${string}`, bigint, bigint], options?:
|
|
4188
|
+
getExpiredOptions: (args: readonly [`0x${string}`, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
4185
4189
|
readonly type: "function";
|
|
4186
4190
|
readonly name: "batchGetRefTick";
|
|
4187
4191
|
readonly inputs: readonly [{
|
|
@@ -4906,7 +4910,7 @@ declare const useLens: () => {
|
|
|
4906
4910
|
createdAt: bigint;
|
|
4907
4911
|
liquidities: readonly bigint[];
|
|
4908
4912
|
}[], bigint, boolean]>;
|
|
4909
|
-
getLiquidityAtTick: (args: readonly [`0x${string}`, number], options?:
|
|
4913
|
+
getLiquidityAtTick: (args: readonly [`0x${string}`, number], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
4910
4914
|
readonly type: "function";
|
|
4911
4915
|
readonly name: "batchGetRefTick";
|
|
4912
4916
|
readonly inputs: readonly [{
|
|
@@ -5612,7 +5616,7 @@ declare const useLens: () => {
|
|
|
5612
5616
|
}];
|
|
5613
5617
|
readonly stateMutability: "view";
|
|
5614
5618
|
}], "getLiquidityAtTick", readonly [`0x${string}`, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
|
|
5615
|
-
getMarketData: (args: readonly [`0x${string}`], options?:
|
|
5619
|
+
getMarketData: (args: readonly [`0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
5616
5620
|
readonly type: "function";
|
|
5617
5621
|
readonly name: "batchGetRefTick";
|
|
5618
5622
|
readonly inputs: readonly [{
|
|
@@ -6331,7 +6335,7 @@ declare const useLens: () => {
|
|
|
6331
6335
|
payoutAssetName: string;
|
|
6332
6336
|
optionsCount: bigint;
|
|
6333
6337
|
}>;
|
|
6334
|
-
getMaxPositionSize: (args: readonly [`0x${string}`, number, number], options?:
|
|
6338
|
+
getMaxPositionSize: (args: readonly [`0x${string}`, number, number], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
6335
6339
|
readonly type: "function";
|
|
6336
6340
|
readonly name: "batchGetRefTick";
|
|
6337
6341
|
readonly inputs: readonly [{
|
|
@@ -7037,7 +7041,7 @@ declare const useLens: () => {
|
|
|
7037
7041
|
}];
|
|
7038
7042
|
readonly stateMutability: "view";
|
|
7039
7043
|
}], "getMaxPositionSize", readonly [`0x${string}`, number, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
|
|
7040
|
-
getMaxPositionSizeAtCurrentTick: (args: readonly [`0x${string}`, number], options?:
|
|
7044
|
+
getMaxPositionSizeAtCurrentTick: (args: readonly [`0x${string}`, number], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
7041
7045
|
readonly type: "function";
|
|
7042
7046
|
readonly name: "batchGetRefTick";
|
|
7043
7047
|
readonly inputs: readonly [{
|
|
@@ -7743,7 +7747,7 @@ declare const useLens: () => {
|
|
|
7743
7747
|
}];
|
|
7744
7748
|
readonly stateMutability: "view";
|
|
7745
7749
|
}], "getMaxPositionSizeAtCurrentTick", readonly [`0x${string}`, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
|
|
7746
|
-
getOptionData: (args: readonly [`0x${string}`, bigint], options?:
|
|
7750
|
+
getOptionData: (args: readonly [`0x${string}`, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
7747
7751
|
readonly type: "function";
|
|
7748
7752
|
readonly name: "batchGetRefTick";
|
|
7749
7753
|
readonly inputs: readonly [{
|
|
@@ -8468,7 +8472,7 @@ declare const useLens: () => {
|
|
|
8468
8472
|
createdAt: bigint;
|
|
8469
8473
|
liquidities: readonly bigint[];
|
|
8470
8474
|
}>;
|
|
8471
|
-
getOptionsData: (args: readonly [`0x${string}`, readonly bigint[]], options?:
|
|
8475
|
+
getOptionsData: (args: readonly [`0x${string}`, readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
8472
8476
|
readonly type: "function";
|
|
8473
8477
|
readonly name: "batchGetRefTick";
|
|
8474
8478
|
readonly inputs: readonly [{
|
|
@@ -9193,7 +9197,7 @@ declare const useLens: () => {
|
|
|
9193
9197
|
createdAt: bigint;
|
|
9194
9198
|
liquidities: readonly bigint[];
|
|
9195
9199
|
}[]>;
|
|
9196
|
-
getPoolData: (args: readonly [`0x${string}`], options?:
|
|
9200
|
+
getPoolData: (args: readonly [`0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
9197
9201
|
readonly type: "function";
|
|
9198
9202
|
readonly name: "batchGetRefTick";
|
|
9199
9203
|
readonly inputs: readonly [{
|
|
@@ -9910,7 +9914,7 @@ declare const useLens: () => {
|
|
|
9910
9914
|
tickSpacing: number;
|
|
9911
9915
|
fee: number;
|
|
9912
9916
|
}>;
|
|
9913
|
-
getRefTick: (args: readonly [`0x${string}`, number], options?:
|
|
9917
|
+
getRefTick: (args: readonly [`0x${string}`, number], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
9914
9918
|
readonly type: "function";
|
|
9915
9919
|
readonly name: "batchGetRefTick";
|
|
9916
9920
|
readonly inputs: readonly [{
|
|
@@ -10616,7 +10620,7 @@ declare const useLens: () => {
|
|
|
10616
10620
|
}];
|
|
10617
10621
|
readonly stateMutability: "view";
|
|
10618
10622
|
}], "getRefTick", readonly [`0x${string}`, number]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<number>;
|
|
10619
|
-
getUserOptions: (args: readonly [`0x${string}`, `0x${string}`, bigint, bigint], options?:
|
|
10623
|
+
getUserOptions: (args: readonly [`0x${string}`, `0x${string}`, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
10620
10624
|
readonly type: "function";
|
|
10621
10625
|
readonly name: "batchGetRefTick";
|
|
10622
10626
|
readonly inputs: readonly [{
|
|
@@ -11341,7 +11345,7 @@ declare const useLens: () => {
|
|
|
11341
11345
|
createdAt: bigint;
|
|
11342
11346
|
liquidities: readonly bigint[];
|
|
11343
11347
|
}[], bigint, boolean]>;
|
|
11344
|
-
getVaultTVL: (args: readonly [`0x${string}`], options?:
|
|
11348
|
+
getVaultTVL: (args: readonly [`0x${string}`], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
11345
11349
|
readonly type: "function";
|
|
11346
11350
|
readonly name: "batchGetRefTick";
|
|
11347
11351
|
readonly inputs: readonly [{
|
|
@@ -12758,7 +12762,7 @@ declare const useLens: () => {
|
|
|
12758
12762
|
} | undefined;
|
|
12759
12763
|
uniswapLens: {
|
|
12760
12764
|
read: {
|
|
12761
|
-
batchGetAmount0ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?:
|
|
12765
|
+
batchGetAmount0ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
12762
12766
|
readonly type: "function";
|
|
12763
12767
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
12764
12768
|
readonly inputs: readonly [{
|
|
@@ -13379,7 +13383,7 @@ declare const useLens: () => {
|
|
|
13379
13383
|
}];
|
|
13380
13384
|
readonly stateMutability: "pure";
|
|
13381
13385
|
}], "batchGetAmount0ForLiquidity", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
13382
|
-
batchGetAmount0ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?:
|
|
13386
|
+
batchGetAmount0ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
13383
13387
|
readonly type: "function";
|
|
13384
13388
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
13385
13389
|
readonly inputs: readonly [{
|
|
@@ -14000,7 +14004,7 @@ declare const useLens: () => {
|
|
|
14000
14004
|
}];
|
|
14001
14005
|
readonly stateMutability: "pure";
|
|
14002
14006
|
}], "batchGetAmount0ForLiquidityTicks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
14003
|
-
batchGetAmount1ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?:
|
|
14007
|
+
batchGetAmount1ForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
14004
14008
|
readonly type: "function";
|
|
14005
14009
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
14006
14010
|
readonly inputs: readonly [{
|
|
@@ -14621,7 +14625,7 @@ declare const useLens: () => {
|
|
|
14621
14625
|
}];
|
|
14622
14626
|
readonly stateMutability: "pure";
|
|
14623
14627
|
}], "batchGetAmount1ForLiquidity", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
14624
|
-
batchGetAmount1ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?:
|
|
14628
|
+
batchGetAmount1ForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
14625
14629
|
readonly type: "function";
|
|
14626
14630
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
14627
14631
|
readonly inputs: readonly [{
|
|
@@ -15242,7 +15246,7 @@ declare const useLens: () => {
|
|
|
15242
15246
|
}];
|
|
15243
15247
|
readonly stateMutability: "pure";
|
|
15244
15248
|
}], "batchGetAmount1ForLiquidityTicks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
15245
|
-
batchGetAmountsForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?:
|
|
15249
|
+
batchGetAmountsForLiquidity: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
15246
15250
|
readonly type: "function";
|
|
15247
15251
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
15248
15252
|
readonly inputs: readonly [{
|
|
@@ -15863,7 +15867,7 @@ declare const useLens: () => {
|
|
|
15863
15867
|
}];
|
|
15864
15868
|
readonly stateMutability: "pure";
|
|
15865
15869
|
}], "batchGetAmountsForLiquidity", readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [readonly bigint[], readonly bigint[]]>;
|
|
15866
|
-
batchGetAmountsForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[]], options?:
|
|
15870
|
+
batchGetAmountsForLiquidityTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
15867
15871
|
readonly type: "function";
|
|
15868
15872
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
15869
15873
|
readonly inputs: readonly [{
|
|
@@ -16484,7 +16488,7 @@ declare const useLens: () => {
|
|
|
16484
16488
|
}];
|
|
16485
16489
|
readonly stateMutability: "pure";
|
|
16486
16490
|
}], "batchGetAmountsForLiquidityTicks", readonly [readonly number[], readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [readonly bigint[], readonly bigint[]]>;
|
|
16487
|
-
batchGetLiquidityForAmount0: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?:
|
|
16491
|
+
batchGetLiquidityForAmount0: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
16488
16492
|
readonly type: "function";
|
|
16489
16493
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
16490
16494
|
readonly inputs: readonly [{
|
|
@@ -17105,7 +17109,7 @@ declare const useLens: () => {
|
|
|
17105
17109
|
}];
|
|
17106
17110
|
readonly stateMutability: "pure";
|
|
17107
17111
|
}], "batchGetLiquidityForAmount0", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
17108
|
-
batchGetLiquidityForAmount0Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?:
|
|
17112
|
+
batchGetLiquidityForAmount0Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
17109
17113
|
readonly type: "function";
|
|
17110
17114
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
17111
17115
|
readonly inputs: readonly [{
|
|
@@ -17726,7 +17730,7 @@ declare const useLens: () => {
|
|
|
17726
17730
|
}];
|
|
17727
17731
|
readonly stateMutability: "pure";
|
|
17728
17732
|
}], "batchGetLiquidityForAmount0Ticks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
17729
|
-
batchGetLiquidityForAmount1: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?:
|
|
17733
|
+
batchGetLiquidityForAmount1: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
17730
17734
|
readonly type: "function";
|
|
17731
17735
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
17732
17736
|
readonly inputs: readonly [{
|
|
@@ -18347,7 +18351,7 @@ declare const useLens: () => {
|
|
|
18347
18351
|
}];
|
|
18348
18352
|
readonly stateMutability: "pure";
|
|
18349
18353
|
}], "batchGetLiquidityForAmount1", readonly [readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
18350
|
-
batchGetLiquidityForAmount1Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?:
|
|
18354
|
+
batchGetLiquidityForAmount1Ticks: (args: readonly [readonly number[], readonly number[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
18351
18355
|
readonly type: "function";
|
|
18352
18356
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
18353
18357
|
readonly inputs: readonly [{
|
|
@@ -18968,7 +18972,7 @@ declare const useLens: () => {
|
|
|
18968
18972
|
}];
|
|
18969
18973
|
readonly stateMutability: "pure";
|
|
18970
18974
|
}], "batchGetLiquidityForAmount1Ticks", readonly [readonly number[], readonly number[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
18971
|
-
batchGetLiquidityForAmounts: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?:
|
|
18975
|
+
batchGetLiquidityForAmounts: (args: readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
18972
18976
|
readonly type: "function";
|
|
18973
18977
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
18974
18978
|
readonly inputs: readonly [{
|
|
@@ -19589,7 +19593,7 @@ declare const useLens: () => {
|
|
|
19589
19593
|
}];
|
|
19590
19594
|
readonly stateMutability: "pure";
|
|
19591
19595
|
}], "batchGetLiquidityForAmounts", readonly [readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
19592
|
-
batchGetLiquidityForAmountsTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[], readonly bigint[]], options?:
|
|
19596
|
+
batchGetLiquidityForAmountsTicks: (args: readonly [readonly number[], readonly number[], readonly number[], readonly bigint[], readonly bigint[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
19593
19597
|
readonly type: "function";
|
|
19594
19598
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
19595
19599
|
readonly inputs: readonly [{
|
|
@@ -20210,7 +20214,7 @@ declare const useLens: () => {
|
|
|
20210
20214
|
}];
|
|
20211
20215
|
readonly stateMutability: "pure";
|
|
20212
20216
|
}], "batchGetLiquidityForAmountsTicks", readonly [readonly number[], readonly number[], readonly number[], readonly bigint[], readonly bigint[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
20213
|
-
batchGetPriceAtTick: (args: readonly [readonly number[]], options?:
|
|
20217
|
+
batchGetPriceAtTick: (args: readonly [readonly number[]], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
20214
20218
|
readonly type: "function";
|
|
20215
20219
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
20216
20220
|
readonly inputs: readonly [{
|
|
@@ -20831,7 +20835,7 @@ declare const useLens: () => {
|
|
|
20831
20835
|
}];
|
|
20832
20836
|
readonly stateMutability: "pure";
|
|
20833
20837
|
}], "batchGetPriceAtTick", readonly [readonly number[]]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly bigint[]>;
|
|
20834
|
-
getAmount0ForLiquidity: (args: readonly [bigint, bigint, bigint], options?:
|
|
20838
|
+
getAmount0ForLiquidity: (args: readonly [bigint, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
20835
20839
|
readonly type: "function";
|
|
20836
20840
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
20837
20841
|
readonly inputs: readonly [{
|
|
@@ -21452,7 +21456,7 @@ declare const useLens: () => {
|
|
|
21452
21456
|
}];
|
|
21453
21457
|
readonly stateMutability: "pure";
|
|
21454
21458
|
}], "getAmount0ForLiquidity", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
21455
|
-
getAmount0ForLiquidityTicks: (args: readonly [number, number, bigint], options?:
|
|
21459
|
+
getAmount0ForLiquidityTicks: (args: readonly [number, number, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
21456
21460
|
readonly type: "function";
|
|
21457
21461
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
21458
21462
|
readonly inputs: readonly [{
|
|
@@ -22073,7 +22077,7 @@ declare const useLens: () => {
|
|
|
22073
22077
|
}];
|
|
22074
22078
|
readonly stateMutability: "pure";
|
|
22075
22079
|
}], "getAmount0ForLiquidityTicks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
22076
|
-
getAmount1ForLiquidity: (args: readonly [bigint, bigint, bigint], options?:
|
|
22080
|
+
getAmount1ForLiquidity: (args: readonly [bigint, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
22077
22081
|
readonly type: "function";
|
|
22078
22082
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
22079
22083
|
readonly inputs: readonly [{
|
|
@@ -22694,7 +22698,7 @@ declare const useLens: () => {
|
|
|
22694
22698
|
}];
|
|
22695
22699
|
readonly stateMutability: "pure";
|
|
22696
22700
|
}], "getAmount1ForLiquidity", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
22697
|
-
getAmount1ForLiquidityTicks: (args: readonly [number, number, bigint], options?:
|
|
22701
|
+
getAmount1ForLiquidityTicks: (args: readonly [number, number, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
22698
22702
|
readonly type: "function";
|
|
22699
22703
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
22700
22704
|
readonly inputs: readonly [{
|
|
@@ -23315,7 +23319,7 @@ declare const useLens: () => {
|
|
|
23315
23319
|
}];
|
|
23316
23320
|
readonly stateMutability: "pure";
|
|
23317
23321
|
}], "getAmount1ForLiquidityTicks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
23318
|
-
getAmountsForLiquidity: (args: readonly [bigint, bigint, bigint, bigint], options?:
|
|
23322
|
+
getAmountsForLiquidity: (args: readonly [bigint, bigint, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
23319
23323
|
readonly type: "function";
|
|
23320
23324
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
23321
23325
|
readonly inputs: readonly [{
|
|
@@ -23936,7 +23940,7 @@ declare const useLens: () => {
|
|
|
23936
23940
|
}];
|
|
23937
23941
|
readonly stateMutability: "pure";
|
|
23938
23942
|
}], "getAmountsForLiquidity", readonly [bigint, bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
|
|
23939
|
-
getAmountsForLiquidityTicks: (args: readonly [number, number, number, bigint], options?:
|
|
23943
|
+
getAmountsForLiquidityTicks: (args: readonly [number, number, number, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
23940
23944
|
readonly type: "function";
|
|
23941
23945
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
23942
23946
|
readonly inputs: readonly [{
|
|
@@ -24557,7 +24561,7 @@ declare const useLens: () => {
|
|
|
24557
24561
|
}];
|
|
24558
24562
|
readonly stateMutability: "pure";
|
|
24559
24563
|
}], "getAmountsForLiquidityTicks", readonly [number, number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<readonly [bigint, bigint]>;
|
|
24560
|
-
getLiquidityForAmount0: (args: readonly [bigint, bigint, bigint], options?:
|
|
24564
|
+
getLiquidityForAmount0: (args: readonly [bigint, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
24561
24565
|
readonly type: "function";
|
|
24562
24566
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
24563
24567
|
readonly inputs: readonly [{
|
|
@@ -25178,7 +25182,7 @@ declare const useLens: () => {
|
|
|
25178
25182
|
}];
|
|
25179
25183
|
readonly stateMutability: "pure";
|
|
25180
25184
|
}], "getLiquidityForAmount0", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
25181
|
-
getLiquidityForAmount0Ticks: (args: readonly [number, number, bigint], options?:
|
|
25185
|
+
getLiquidityForAmount0Ticks: (args: readonly [number, number, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
25182
25186
|
readonly type: "function";
|
|
25183
25187
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
25184
25188
|
readonly inputs: readonly [{
|
|
@@ -25799,7 +25803,7 @@ declare const useLens: () => {
|
|
|
25799
25803
|
}];
|
|
25800
25804
|
readonly stateMutability: "pure";
|
|
25801
25805
|
}], "getLiquidityForAmount0Ticks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
25802
|
-
getLiquidityForAmount1: (args: readonly [bigint, bigint, bigint], options?:
|
|
25806
|
+
getLiquidityForAmount1: (args: readonly [bigint, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
25803
25807
|
readonly type: "function";
|
|
25804
25808
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
25805
25809
|
readonly inputs: readonly [{
|
|
@@ -26420,7 +26424,7 @@ declare const useLens: () => {
|
|
|
26420
26424
|
}];
|
|
26421
26425
|
readonly stateMutability: "pure";
|
|
26422
26426
|
}], "getLiquidityForAmount1", readonly [bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
26423
|
-
getLiquidityForAmount1Ticks: (args: readonly [number, number, bigint], options?:
|
|
26427
|
+
getLiquidityForAmount1Ticks: (args: readonly [number, number, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
26424
26428
|
readonly type: "function";
|
|
26425
26429
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
26426
26430
|
readonly inputs: readonly [{
|
|
@@ -27041,7 +27045,7 @@ declare const useLens: () => {
|
|
|
27041
27045
|
}];
|
|
27042
27046
|
readonly stateMutability: "pure";
|
|
27043
27047
|
}], "getLiquidityForAmount1Ticks", readonly [number, number, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
27044
|
-
getLiquidityForAmounts: (args: readonly [bigint, bigint, bigint, bigint, bigint], options?:
|
|
27048
|
+
getLiquidityForAmounts: (args: readonly [bigint, bigint, bigint, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
27045
27049
|
readonly type: "function";
|
|
27046
27050
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
27047
27051
|
readonly inputs: readonly [{
|
|
@@ -27662,7 +27666,7 @@ declare const useLens: () => {
|
|
|
27662
27666
|
}];
|
|
27663
27667
|
readonly stateMutability: "pure";
|
|
27664
27668
|
}], "getLiquidityForAmounts", readonly [bigint, bigint, bigint, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
27665
|
-
getLiquidityForAmountsTicks: (args: readonly [number, number, number, bigint, bigint], options?:
|
|
27669
|
+
getLiquidityForAmountsTicks: (args: readonly [number, number, number, bigint, bigint], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
27666
27670
|
readonly type: "function";
|
|
27667
27671
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
27668
27672
|
readonly inputs: readonly [{
|
|
@@ -28283,7 +28287,7 @@ declare const useLens: () => {
|
|
|
28283
28287
|
}];
|
|
28284
28288
|
readonly stateMutability: "pure";
|
|
28285
28289
|
}], "getLiquidityForAmountsTicks", readonly [number, number, number, bigint, bigint]>, "address" | "abi" | "args" | "functionName">> | undefined) => Promise<bigint>;
|
|
28286
|
-
getPriceAtTick: (args: readonly [number], options?:
|
|
28290
|
+
getPriceAtTick: (args: readonly [number], options?: viem0.Prettify<viem0.UnionOmit<viem0.ReadContractParameters<readonly [{
|
|
28287
28291
|
readonly type: "function";
|
|
28288
28292
|
readonly name: "batchGetAmount0ForLiquidity";
|
|
28289
28293
|
readonly inputs: readonly [{
|
package/dist/client.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
import { lensAbi, optionsMarketAbi } from "./optionsMarket-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { r as lensAbi, t as optionsMarketAbi } from "./optionsMarket-CvArD6d_.js";
|
|
5
|
+
import { C as token1ToToken0, D as getUniswapMathLens, E as getTimelockMarket, O as timelockLenses, S as token0ToToken1, T as getTimelockLens, b as roundTickDown, d as wrapPrice, h as getPriceAtTick, k as uniswapMathLenses, l as wrapAmount, m as PRICE_PRECISION, w as getErc20, y as liquiditiesToAmounts } from "./numberUtils-Dk0TuHnT.js";
|
|
6
|
+
import { n as uniswapV3PoolAbi, t as singleOwnerVaultAbi } from "./singleOwnerVault-BeJChjfJ.js";
|
|
7
7
|
import { encodeFunctionData, erc20Abi, maxUint256, zeroAddress } from "viem";
|
|
8
8
|
import React, { createContext, useContext, useMemo } from "react";
|
|
9
9
|
import { useAccount, useChainId, useClient, useReadContract, useWaitForTransactionReceipt, useWriteContract } from "wagmi";
|
|
@@ -388,7 +388,7 @@ const useOptionPnl = (option) => {
|
|
|
388
388
|
const { exact: currentTick } = useCurrentTick(pool);
|
|
389
389
|
const strikeSize = positionSizeCurrent * strikePrice / PRICE_PRECISION;
|
|
390
390
|
const displayPnl = useMemo(() => {
|
|
391
|
-
if (optionAssetIsToken0 === void 0 || currentTick === void 0 || !positionSizeCurrent || !payoutAssetDecimals) return
|
|
391
|
+
if (optionAssetIsToken0 === void 0 || currentTick === void 0 || !positionSizeCurrent || !payoutAssetDecimals) return void 0;
|
|
392
392
|
const delta = (optionAssetIsToken0 ? token0ToToken1(positionSizeCurrent, currentTick) : token1ToToken0(positionSizeCurrent, currentTick)) - strikeSize;
|
|
393
393
|
return wrapAmount(optionType === "CALL" ? delta : -delta, payoutAssetDecimals);
|
|
394
394
|
}, [
|
|
@@ -400,7 +400,7 @@ const useOptionPnl = (option) => {
|
|
|
400
400
|
]);
|
|
401
401
|
return {
|
|
402
402
|
unrealizedPayout: useMemo(() => {
|
|
403
|
-
if (!payoutAssetDecimals || !currentTick || !tickSpacing) return
|
|
403
|
+
if (!payoutAssetDecimals || !currentTick || !tickSpacing) return void 0;
|
|
404
404
|
const [amount0, amount1] = liquiditiesToAmounts(option.liquiditiesCurrent, option.startTick, currentTick, tickSpacing);
|
|
405
405
|
const delta = (optionAssetIsToken0 ? amount1 + token0ToToken1(amount0, currentTick) : amount0 + token1ToToken0(amount1, currentTick)) - strikeSize;
|
|
406
406
|
const pnl = optionType === "CALL" ? delta : -delta;
|
|
@@ -433,7 +433,7 @@ const useOptionPremium = (marketAddr, optionType, optionAmount, duration, strike
|
|
|
433
433
|
optionAssetIsToken0,
|
|
434
434
|
strikeTick
|
|
435
435
|
]);
|
|
436
|
-
const { data:
|
|
436
|
+
const { data: [premium, protocolFee] = [] } = useReadContract({
|
|
437
437
|
address: marketAddr,
|
|
438
438
|
abi: optionsMarketAbi,
|
|
439
439
|
functionName: "calculatePremium",
|
|
@@ -441,14 +441,22 @@ const useOptionPremium = (marketAddr, optionType, optionAmount, duration, strike
|
|
|
441
441
|
optionType === "CALL" ? 0 : 1,
|
|
442
442
|
optionAmount,
|
|
443
443
|
strikeTickRounded,
|
|
444
|
-
|
|
444
|
+
duration
|
|
445
445
|
] : void 0,
|
|
446
446
|
query: { enabled: strikeTickRounded !== void 0 }
|
|
447
447
|
});
|
|
448
448
|
return useMemo(() => {
|
|
449
|
-
if (
|
|
450
|
-
return
|
|
451
|
-
|
|
449
|
+
if (premium === void 0 || protocolFee === void 0 || payoutAssetDecimals === void 0) return;
|
|
450
|
+
return {
|
|
451
|
+
premium: wrapAmount(premium, payoutAssetDecimals),
|
|
452
|
+
protocolFee: wrapAmount(protocolFee, payoutAssetDecimals),
|
|
453
|
+
totalPremium: wrapAmount(premium + protocolFee, payoutAssetDecimals)
|
|
454
|
+
};
|
|
455
|
+
}, [
|
|
456
|
+
premium,
|
|
457
|
+
protocolFee,
|
|
458
|
+
payoutAssetDecimals
|
|
459
|
+
]);
|
|
452
460
|
};
|
|
453
461
|
|
|
454
462
|
//#endregion
|