@strobelabs/perpcity-sdk 0.1.3 → 0.1.5
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/README.md +8 -10
- package/dist/index.d.mts +989 -13
- package/dist/index.d.ts +989 -13
- package/dist/index.js +1399 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1388 -45
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WalletClient, Address, Abi, Hex } from 'viem';
|
|
2
2
|
import { GraphQLClient } from 'graphql-request';
|
|
3
3
|
|
|
4
4
|
type PerpCityContextConfig = {
|
|
5
|
-
publicClient: PublicClient;
|
|
6
5
|
walletClient: WalletClient;
|
|
7
6
|
goldskyEndpoint: string;
|
|
8
7
|
perpManagerAddress: Address;
|
|
@@ -10,7 +9,6 @@ type PerpCityContextConfig = {
|
|
|
10
9
|
beaconAbi: Abi;
|
|
11
10
|
};
|
|
12
11
|
declare class PerpCityContext {
|
|
13
|
-
readonly publicClient: PublicClient;
|
|
14
12
|
readonly walletClient: WalletClient;
|
|
15
13
|
readonly goldskyClient: GraphQLClient;
|
|
16
14
|
readonly perpManagerAddress: Address;
|
|
@@ -25,18 +23,16 @@ type ClosePositionParams = {
|
|
|
25
23
|
maxAmt1In: number;
|
|
26
24
|
};
|
|
27
25
|
declare class Position {
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
readonly context: PerpCityContext;
|
|
27
|
+
readonly perpId: Hex;
|
|
30
28
|
readonly positionId: bigint;
|
|
31
29
|
constructor(context: PerpCityContext, perpId: Hex, positionId: bigint);
|
|
32
|
-
closePosition(params: ClosePositionParams): Promise<Position | null>;
|
|
33
30
|
}
|
|
34
31
|
|
|
35
32
|
type OpenMakerPositionParams = {
|
|
36
33
|
margin: number;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
tickUpper: number;
|
|
34
|
+
priceLower: number;
|
|
35
|
+
priceUpper: number;
|
|
40
36
|
maxAmt0In: number;
|
|
41
37
|
maxAmt1In: number;
|
|
42
38
|
};
|
|
@@ -47,15 +43,18 @@ type OpenTakerPositionParams = {
|
|
|
47
43
|
unspecifiedAmountLimit: number;
|
|
48
44
|
};
|
|
49
45
|
declare class Perp {
|
|
50
|
-
|
|
46
|
+
readonly context: PerpCityContext;
|
|
51
47
|
readonly id: Hex;
|
|
52
48
|
constructor(context: PerpCityContext, id: Hex);
|
|
49
|
+
getTickSpacing(): Promise<number>;
|
|
50
|
+
approveAndOpenMakerPosition(params: OpenMakerPositionParams): Promise<Position>;
|
|
51
|
+
approveAndOpenTakerPosition(params: OpenTakerPositionParams): Promise<Position>;
|
|
53
52
|
openMakerPosition(params: OpenMakerPositionParams): Promise<Position>;
|
|
54
53
|
openTakerPosition(params: OpenTakerPositionParams): Promise<Position>;
|
|
55
54
|
}
|
|
56
55
|
|
|
57
56
|
declare class PerpCollection {
|
|
58
|
-
|
|
57
|
+
readonly context: PerpCityContext;
|
|
59
58
|
readonly perps: Perp[];
|
|
60
59
|
constructor(context: PerpCityContext, perps: Perp[]);
|
|
61
60
|
}
|
|
@@ -65,7 +64,7 @@ type CreatePerpParams = {
|
|
|
65
64
|
beacon: Address;
|
|
66
65
|
};
|
|
67
66
|
declare class PerpManager {
|
|
68
|
-
|
|
67
|
+
readonly context: PerpCityContext;
|
|
69
68
|
constructor(context: PerpCityContext);
|
|
70
69
|
getPerps(): Promise<PerpCollection>;
|
|
71
70
|
createPerp(params: CreatePerpParams): Promise<Perp>;
|
|
@@ -74,5 +73,982 @@ declare class PerpManager {
|
|
|
74
73
|
declare function priceToSqrtPriceX96(price: number): bigint;
|
|
75
74
|
declare function scale6Decimals(amount: number): bigint;
|
|
76
75
|
declare function scaleX96(amount: number): bigint;
|
|
76
|
+
declare function priceToTick(price: number, roundDown: boolean): number;
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
declare function approveUsdc(context: PerpCityContext, amount: bigint): Promise<void>;
|
|
79
|
+
declare function getUsdcAddress(context: PerpCityContext): Promise<Address>;
|
|
80
|
+
|
|
81
|
+
declare const DECIMAL_PRECISION_6: number;
|
|
82
|
+
declare const Q96: bigint;
|
|
83
|
+
|
|
84
|
+
declare function estimateLiquidity(context: PerpCityContext, tickLower: bigint, tickUpper: bigint, usdScaled: bigint): Promise<bigint>;
|
|
85
|
+
|
|
86
|
+
declare const PERP_MANAGER_BASE_SEPOLIA_ADDRESS: Address;
|
|
87
|
+
|
|
88
|
+
declare const GOLDSKY_BASE_SEPOLIA_URL: string;
|
|
89
|
+
|
|
90
|
+
declare const PERP_MANAGER_ABI: readonly [{
|
|
91
|
+
readonly inputs: readonly [{
|
|
92
|
+
readonly internalType: "contract IPoolManager";
|
|
93
|
+
readonly name: "poolManager";
|
|
94
|
+
readonly type: "address";
|
|
95
|
+
}, {
|
|
96
|
+
readonly internalType: "address";
|
|
97
|
+
readonly name: "usdc";
|
|
98
|
+
readonly type: "address";
|
|
99
|
+
}];
|
|
100
|
+
readonly stateMutability: "nonpayable";
|
|
101
|
+
readonly type: "constructor";
|
|
102
|
+
}, {
|
|
103
|
+
readonly inputs: readonly [{
|
|
104
|
+
readonly internalType: "uint8";
|
|
105
|
+
readonly name: "action";
|
|
106
|
+
readonly type: "uint8";
|
|
107
|
+
}];
|
|
108
|
+
readonly name: "InvalidAction";
|
|
109
|
+
readonly type: "error";
|
|
110
|
+
}, {
|
|
111
|
+
readonly inputs: readonly [{
|
|
112
|
+
readonly internalType: "address";
|
|
113
|
+
readonly name: "caller";
|
|
114
|
+
readonly type: "address";
|
|
115
|
+
}, {
|
|
116
|
+
readonly internalType: "address";
|
|
117
|
+
readonly name: "expectedCaller";
|
|
118
|
+
readonly type: "address";
|
|
119
|
+
}];
|
|
120
|
+
readonly name: "InvalidCaller";
|
|
121
|
+
readonly type: "error";
|
|
122
|
+
}, {
|
|
123
|
+
readonly inputs: readonly [{
|
|
124
|
+
readonly internalType: "address";
|
|
125
|
+
readonly name: "caller";
|
|
126
|
+
readonly type: "address";
|
|
127
|
+
}, {
|
|
128
|
+
readonly internalType: "address";
|
|
129
|
+
readonly name: "holder";
|
|
130
|
+
readonly type: "address";
|
|
131
|
+
}, {
|
|
132
|
+
readonly internalType: "bool";
|
|
133
|
+
readonly name: "isLiquidated";
|
|
134
|
+
readonly type: "bool";
|
|
135
|
+
}];
|
|
136
|
+
readonly name: "InvalidClose";
|
|
137
|
+
readonly type: "error";
|
|
138
|
+
}, {
|
|
139
|
+
readonly inputs: readonly [{
|
|
140
|
+
readonly internalType: "uint128";
|
|
141
|
+
readonly name: "liquidity";
|
|
142
|
+
readonly type: "uint128";
|
|
143
|
+
}];
|
|
144
|
+
readonly name: "InvalidLiquidity";
|
|
145
|
+
readonly type: "error";
|
|
146
|
+
}, {
|
|
147
|
+
readonly inputs: readonly [{
|
|
148
|
+
readonly internalType: "uint256";
|
|
149
|
+
readonly name: "margin";
|
|
150
|
+
readonly type: "uint256";
|
|
151
|
+
}];
|
|
152
|
+
readonly name: "InvalidMargin";
|
|
153
|
+
readonly type: "error";
|
|
154
|
+
}, {
|
|
155
|
+
readonly inputs: readonly [{
|
|
156
|
+
readonly internalType: "uint256";
|
|
157
|
+
readonly name: "currentTimestamp";
|
|
158
|
+
readonly type: "uint256";
|
|
159
|
+
}, {
|
|
160
|
+
readonly internalType: "uint256";
|
|
161
|
+
readonly name: "lockupPeriodEnd";
|
|
162
|
+
readonly type: "uint256";
|
|
163
|
+
}];
|
|
164
|
+
readonly name: "MakerPositionLocked";
|
|
165
|
+
readonly type: "error";
|
|
166
|
+
}, {
|
|
167
|
+
readonly inputs: readonly [{
|
|
168
|
+
readonly internalType: "uint256";
|
|
169
|
+
readonly name: "maximumAmount";
|
|
170
|
+
readonly type: "uint256";
|
|
171
|
+
}, {
|
|
172
|
+
readonly internalType: "uint256";
|
|
173
|
+
readonly name: "amountRequested";
|
|
174
|
+
readonly type: "uint256";
|
|
175
|
+
}];
|
|
176
|
+
readonly name: "MaximumAmountExceeded";
|
|
177
|
+
readonly type: "error";
|
|
178
|
+
}, {
|
|
179
|
+
readonly inputs: readonly [{
|
|
180
|
+
readonly internalType: "uint256";
|
|
181
|
+
readonly name: "minimumAmount";
|
|
182
|
+
readonly type: "uint256";
|
|
183
|
+
}, {
|
|
184
|
+
readonly internalType: "uint256";
|
|
185
|
+
readonly name: "amountReceived";
|
|
186
|
+
readonly type: "uint256";
|
|
187
|
+
}];
|
|
188
|
+
readonly name: "MinimumAmountInsufficient";
|
|
189
|
+
readonly type: "error";
|
|
190
|
+
}, {
|
|
191
|
+
readonly inputs: readonly [];
|
|
192
|
+
readonly name: "NotPoolManager";
|
|
193
|
+
readonly type: "error";
|
|
194
|
+
}, {
|
|
195
|
+
readonly inputs: readonly [{
|
|
196
|
+
readonly internalType: "bytes";
|
|
197
|
+
readonly name: "reason";
|
|
198
|
+
readonly type: "bytes";
|
|
199
|
+
}];
|
|
200
|
+
readonly name: "UnexpectedRevertBytes";
|
|
201
|
+
readonly type: "error";
|
|
202
|
+
}, {
|
|
203
|
+
readonly anonymous: false;
|
|
204
|
+
readonly inputs: readonly [{
|
|
205
|
+
readonly indexed: false;
|
|
206
|
+
readonly internalType: "PoolId";
|
|
207
|
+
readonly name: "perpId";
|
|
208
|
+
readonly type: "bytes32";
|
|
209
|
+
}, {
|
|
210
|
+
readonly indexed: false;
|
|
211
|
+
readonly internalType: "uint256";
|
|
212
|
+
readonly name: "posId";
|
|
213
|
+
readonly type: "uint256";
|
|
214
|
+
}, {
|
|
215
|
+
readonly indexed: false;
|
|
216
|
+
readonly internalType: "uint256";
|
|
217
|
+
readonly name: "newMargin";
|
|
218
|
+
readonly type: "uint256";
|
|
219
|
+
}];
|
|
220
|
+
readonly name: "MarginAdded";
|
|
221
|
+
readonly type: "event";
|
|
222
|
+
}, {
|
|
223
|
+
readonly anonymous: false;
|
|
224
|
+
readonly inputs: readonly [{
|
|
225
|
+
readonly indexed: false;
|
|
226
|
+
readonly internalType: "PoolId";
|
|
227
|
+
readonly name: "perpId";
|
|
228
|
+
readonly type: "bytes32";
|
|
229
|
+
}, {
|
|
230
|
+
readonly indexed: false;
|
|
231
|
+
readonly internalType: "address";
|
|
232
|
+
readonly name: "beacon";
|
|
233
|
+
readonly type: "address";
|
|
234
|
+
}, {
|
|
235
|
+
readonly indexed: false;
|
|
236
|
+
readonly internalType: "uint256";
|
|
237
|
+
readonly name: "startingSqrtPriceX96";
|
|
238
|
+
readonly type: "uint256";
|
|
239
|
+
}];
|
|
240
|
+
readonly name: "PerpCreated";
|
|
241
|
+
readonly type: "event";
|
|
242
|
+
}, {
|
|
243
|
+
readonly anonymous: false;
|
|
244
|
+
readonly inputs: readonly [{
|
|
245
|
+
readonly indexed: false;
|
|
246
|
+
readonly internalType: "PoolId";
|
|
247
|
+
readonly name: "perpId";
|
|
248
|
+
readonly type: "bytes32";
|
|
249
|
+
}, {
|
|
250
|
+
readonly indexed: false;
|
|
251
|
+
readonly internalType: "uint256";
|
|
252
|
+
readonly name: "posId";
|
|
253
|
+
readonly type: "uint256";
|
|
254
|
+
}, {
|
|
255
|
+
readonly indexed: false;
|
|
256
|
+
readonly internalType: "bool";
|
|
257
|
+
readonly name: "wasLiquidated";
|
|
258
|
+
readonly type: "bool";
|
|
259
|
+
}, {
|
|
260
|
+
readonly indexed: false;
|
|
261
|
+
readonly internalType: "uint256";
|
|
262
|
+
readonly name: "sqrtPriceX96";
|
|
263
|
+
readonly type: "uint256";
|
|
264
|
+
}];
|
|
265
|
+
readonly name: "PositionClosed";
|
|
266
|
+
readonly type: "event";
|
|
267
|
+
}, {
|
|
268
|
+
readonly anonymous: false;
|
|
269
|
+
readonly inputs: readonly [{
|
|
270
|
+
readonly indexed: false;
|
|
271
|
+
readonly internalType: "PoolId";
|
|
272
|
+
readonly name: "perpId";
|
|
273
|
+
readonly type: "bytes32";
|
|
274
|
+
}, {
|
|
275
|
+
readonly indexed: false;
|
|
276
|
+
readonly internalType: "uint256";
|
|
277
|
+
readonly name: "posId";
|
|
278
|
+
readonly type: "uint256";
|
|
279
|
+
}, {
|
|
280
|
+
readonly indexed: false;
|
|
281
|
+
readonly internalType: "bool";
|
|
282
|
+
readonly name: "isMaker";
|
|
283
|
+
readonly type: "bool";
|
|
284
|
+
}, {
|
|
285
|
+
readonly indexed: false;
|
|
286
|
+
readonly internalType: "uint256";
|
|
287
|
+
readonly name: "margin";
|
|
288
|
+
readonly type: "uint256";
|
|
289
|
+
}, {
|
|
290
|
+
readonly indexed: false;
|
|
291
|
+
readonly internalType: "uint256";
|
|
292
|
+
readonly name: "sqrtPriceX96";
|
|
293
|
+
readonly type: "uint256";
|
|
294
|
+
}];
|
|
295
|
+
readonly name: "PositionOpened";
|
|
296
|
+
readonly type: "event";
|
|
297
|
+
}, {
|
|
298
|
+
readonly inputs: readonly [];
|
|
299
|
+
readonly name: "POOL_MANAGER";
|
|
300
|
+
readonly outputs: readonly [{
|
|
301
|
+
readonly internalType: "contract IPoolManager";
|
|
302
|
+
readonly name: "";
|
|
303
|
+
readonly type: "address";
|
|
304
|
+
}];
|
|
305
|
+
readonly stateMutability: "view";
|
|
306
|
+
readonly type: "function";
|
|
307
|
+
}, {
|
|
308
|
+
readonly inputs: readonly [];
|
|
309
|
+
readonly name: "USDC";
|
|
310
|
+
readonly outputs: readonly [{
|
|
311
|
+
readonly internalType: "address";
|
|
312
|
+
readonly name: "";
|
|
313
|
+
readonly type: "address";
|
|
314
|
+
}];
|
|
315
|
+
readonly stateMutability: "view";
|
|
316
|
+
readonly type: "function";
|
|
317
|
+
}, {
|
|
318
|
+
readonly inputs: readonly [{
|
|
319
|
+
readonly internalType: "PoolId";
|
|
320
|
+
readonly name: "perpId";
|
|
321
|
+
readonly type: "bytes32";
|
|
322
|
+
}, {
|
|
323
|
+
readonly components: readonly [{
|
|
324
|
+
readonly internalType: "uint128";
|
|
325
|
+
readonly name: "posId";
|
|
326
|
+
readonly type: "uint128";
|
|
327
|
+
}, {
|
|
328
|
+
readonly internalType: "uint256";
|
|
329
|
+
readonly name: "margin";
|
|
330
|
+
readonly type: "uint256";
|
|
331
|
+
}];
|
|
332
|
+
readonly internalType: "struct IPerpManager.AddMarginParams";
|
|
333
|
+
readonly name: "params";
|
|
334
|
+
readonly type: "tuple";
|
|
335
|
+
}];
|
|
336
|
+
readonly name: "addMargin";
|
|
337
|
+
readonly outputs: readonly [];
|
|
338
|
+
readonly stateMutability: "nonpayable";
|
|
339
|
+
readonly type: "function";
|
|
340
|
+
}, {
|
|
341
|
+
readonly inputs: readonly [{
|
|
342
|
+
readonly internalType: "PoolId";
|
|
343
|
+
readonly name: "perpId";
|
|
344
|
+
readonly type: "bytes32";
|
|
345
|
+
}, {
|
|
346
|
+
readonly components: readonly [{
|
|
347
|
+
readonly internalType: "uint128";
|
|
348
|
+
readonly name: "posId";
|
|
349
|
+
readonly type: "uint128";
|
|
350
|
+
}, {
|
|
351
|
+
readonly internalType: "uint128";
|
|
352
|
+
readonly name: "minAmt0Out";
|
|
353
|
+
readonly type: "uint128";
|
|
354
|
+
}, {
|
|
355
|
+
readonly internalType: "uint128";
|
|
356
|
+
readonly name: "minAmt1Out";
|
|
357
|
+
readonly type: "uint128";
|
|
358
|
+
}, {
|
|
359
|
+
readonly internalType: "uint128";
|
|
360
|
+
readonly name: "maxAmt1In";
|
|
361
|
+
readonly type: "uint128";
|
|
362
|
+
}];
|
|
363
|
+
readonly internalType: "struct IPerpManager.ClosePositionParams";
|
|
364
|
+
readonly name: "params";
|
|
365
|
+
readonly type: "tuple";
|
|
366
|
+
}];
|
|
367
|
+
readonly name: "closePosition";
|
|
368
|
+
readonly outputs: readonly [{
|
|
369
|
+
readonly internalType: "uint128";
|
|
370
|
+
readonly name: "posId";
|
|
371
|
+
readonly type: "uint128";
|
|
372
|
+
}];
|
|
373
|
+
readonly stateMutability: "nonpayable";
|
|
374
|
+
readonly type: "function";
|
|
375
|
+
}, {
|
|
376
|
+
readonly inputs: readonly [{
|
|
377
|
+
readonly components: readonly [{
|
|
378
|
+
readonly internalType: "uint160";
|
|
379
|
+
readonly name: "startingSqrtPriceX96";
|
|
380
|
+
readonly type: "uint160";
|
|
381
|
+
}, {
|
|
382
|
+
readonly internalType: "address";
|
|
383
|
+
readonly name: "beacon";
|
|
384
|
+
readonly type: "address";
|
|
385
|
+
}];
|
|
386
|
+
readonly internalType: "struct IPerpManager.CreatePerpParams";
|
|
387
|
+
readonly name: "params";
|
|
388
|
+
readonly type: "tuple";
|
|
389
|
+
}];
|
|
390
|
+
readonly name: "createPerp";
|
|
391
|
+
readonly outputs: readonly [{
|
|
392
|
+
readonly internalType: "PoolId";
|
|
393
|
+
readonly name: "perpId";
|
|
394
|
+
readonly type: "bytes32";
|
|
395
|
+
}];
|
|
396
|
+
readonly stateMutability: "nonpayable";
|
|
397
|
+
readonly type: "function";
|
|
398
|
+
}, {
|
|
399
|
+
readonly inputs: readonly [{
|
|
400
|
+
readonly internalType: "int24";
|
|
401
|
+
readonly name: "tickA";
|
|
402
|
+
readonly type: "int24";
|
|
403
|
+
}, {
|
|
404
|
+
readonly internalType: "int24";
|
|
405
|
+
readonly name: "tickB";
|
|
406
|
+
readonly type: "int24";
|
|
407
|
+
}, {
|
|
408
|
+
readonly internalType: "uint256";
|
|
409
|
+
readonly name: "amount1";
|
|
410
|
+
readonly type: "uint256";
|
|
411
|
+
}];
|
|
412
|
+
readonly name: "estimateLiquidityForAount1";
|
|
413
|
+
readonly outputs: readonly [{
|
|
414
|
+
readonly internalType: "uint128";
|
|
415
|
+
readonly name: "liquidity";
|
|
416
|
+
readonly type: "uint128";
|
|
417
|
+
}];
|
|
418
|
+
readonly stateMutability: "pure";
|
|
419
|
+
readonly type: "function";
|
|
420
|
+
}, {
|
|
421
|
+
readonly inputs: readonly [{
|
|
422
|
+
readonly internalType: "PoolId";
|
|
423
|
+
readonly name: "perpId";
|
|
424
|
+
readonly type: "bytes32";
|
|
425
|
+
}, {
|
|
426
|
+
readonly internalType: "uint128";
|
|
427
|
+
readonly name: "posId";
|
|
428
|
+
readonly type: "uint128";
|
|
429
|
+
}];
|
|
430
|
+
readonly name: "getPosition";
|
|
431
|
+
readonly outputs: readonly [{
|
|
432
|
+
readonly components: readonly [{
|
|
433
|
+
readonly internalType: "address";
|
|
434
|
+
readonly name: "holder";
|
|
435
|
+
readonly type: "address";
|
|
436
|
+
}, {
|
|
437
|
+
readonly internalType: "uint256";
|
|
438
|
+
readonly name: "margin";
|
|
439
|
+
readonly type: "uint256";
|
|
440
|
+
}, {
|
|
441
|
+
readonly internalType: "int256";
|
|
442
|
+
readonly name: "perpDelta";
|
|
443
|
+
readonly type: "int256";
|
|
444
|
+
}, {
|
|
445
|
+
readonly internalType: "int256";
|
|
446
|
+
readonly name: "usdDelta";
|
|
447
|
+
readonly type: "int256";
|
|
448
|
+
}, {
|
|
449
|
+
readonly internalType: "int256";
|
|
450
|
+
readonly name: "entryTwPremiumX96";
|
|
451
|
+
readonly type: "int256";
|
|
452
|
+
}, {
|
|
453
|
+
readonly components: readonly [{
|
|
454
|
+
readonly internalType: "uint32";
|
|
455
|
+
readonly name: "entryTimestamp";
|
|
456
|
+
readonly type: "uint32";
|
|
457
|
+
}, {
|
|
458
|
+
readonly internalType: "int24";
|
|
459
|
+
readonly name: "tickLower";
|
|
460
|
+
readonly type: "int24";
|
|
461
|
+
}, {
|
|
462
|
+
readonly internalType: "int24";
|
|
463
|
+
readonly name: "tickUpper";
|
|
464
|
+
readonly type: "int24";
|
|
465
|
+
}, {
|
|
466
|
+
readonly internalType: "uint128";
|
|
467
|
+
readonly name: "liquidity";
|
|
468
|
+
readonly type: "uint128";
|
|
469
|
+
}, {
|
|
470
|
+
readonly internalType: "int256";
|
|
471
|
+
readonly name: "entryTwPremiumGrowthInsideX96";
|
|
472
|
+
readonly type: "int256";
|
|
473
|
+
}, {
|
|
474
|
+
readonly internalType: "int256";
|
|
475
|
+
readonly name: "entryTwPremiumDivBySqrtPriceGrowthInsideX96";
|
|
476
|
+
readonly type: "int256";
|
|
477
|
+
}, {
|
|
478
|
+
readonly internalType: "int256";
|
|
479
|
+
readonly name: "entryTwPremiumGrowthBelowX96";
|
|
480
|
+
readonly type: "int256";
|
|
481
|
+
}];
|
|
482
|
+
readonly internalType: "struct IPerpManager.MakerDetails";
|
|
483
|
+
readonly name: "makerDetails";
|
|
484
|
+
readonly type: "tuple";
|
|
485
|
+
}];
|
|
486
|
+
readonly internalType: "struct IPerpManager.Position";
|
|
487
|
+
readonly name: "";
|
|
488
|
+
readonly type: "tuple";
|
|
489
|
+
}];
|
|
490
|
+
readonly stateMutability: "view";
|
|
491
|
+
readonly type: "function";
|
|
492
|
+
}, {
|
|
493
|
+
readonly inputs: readonly [{
|
|
494
|
+
readonly internalType: "PoolId";
|
|
495
|
+
readonly name: "perpId";
|
|
496
|
+
readonly type: "bytes32";
|
|
497
|
+
}, {
|
|
498
|
+
readonly internalType: "uint32";
|
|
499
|
+
readonly name: "secondsAgo";
|
|
500
|
+
readonly type: "uint32";
|
|
501
|
+
}];
|
|
502
|
+
readonly name: "getTimeWeightedAvg";
|
|
503
|
+
readonly outputs: readonly [{
|
|
504
|
+
readonly internalType: "uint256";
|
|
505
|
+
readonly name: "";
|
|
506
|
+
readonly type: "uint256";
|
|
507
|
+
}];
|
|
508
|
+
readonly stateMutability: "view";
|
|
509
|
+
readonly type: "function";
|
|
510
|
+
}, {
|
|
511
|
+
readonly inputs: readonly [{
|
|
512
|
+
readonly internalType: "PoolId";
|
|
513
|
+
readonly name: "perpId";
|
|
514
|
+
readonly type: "bytes32";
|
|
515
|
+
}, {
|
|
516
|
+
readonly internalType: "uint32";
|
|
517
|
+
readonly name: "cardinalityNext";
|
|
518
|
+
readonly type: "uint32";
|
|
519
|
+
}];
|
|
520
|
+
readonly name: "increaseCardinalityNext";
|
|
521
|
+
readonly outputs: readonly [];
|
|
522
|
+
readonly stateMutability: "nonpayable";
|
|
523
|
+
readonly type: "function";
|
|
524
|
+
}, {
|
|
525
|
+
readonly inputs: readonly [{
|
|
526
|
+
readonly internalType: "PoolId";
|
|
527
|
+
readonly name: "perpId";
|
|
528
|
+
readonly type: "bytes32";
|
|
529
|
+
}, {
|
|
530
|
+
readonly internalType: "uint128";
|
|
531
|
+
readonly name: "posId";
|
|
532
|
+
readonly type: "uint128";
|
|
533
|
+
}];
|
|
534
|
+
readonly name: "livePositionDetails";
|
|
535
|
+
readonly outputs: readonly [{
|
|
536
|
+
readonly internalType: "int256";
|
|
537
|
+
readonly name: "pnl";
|
|
538
|
+
readonly type: "int256";
|
|
539
|
+
}, {
|
|
540
|
+
readonly internalType: "int256";
|
|
541
|
+
readonly name: "fundingPayment";
|
|
542
|
+
readonly type: "int256";
|
|
543
|
+
}, {
|
|
544
|
+
readonly internalType: "int256";
|
|
545
|
+
readonly name: "effectiveMargin";
|
|
546
|
+
readonly type: "int256";
|
|
547
|
+
}, {
|
|
548
|
+
readonly internalType: "bool";
|
|
549
|
+
readonly name: "isLiquidatable";
|
|
550
|
+
readonly type: "bool";
|
|
551
|
+
}, {
|
|
552
|
+
readonly internalType: "uint256";
|
|
553
|
+
readonly name: "newPriceX96";
|
|
554
|
+
readonly type: "uint256";
|
|
555
|
+
}];
|
|
556
|
+
readonly stateMutability: "nonpayable";
|
|
557
|
+
readonly type: "function";
|
|
558
|
+
}, {
|
|
559
|
+
readonly inputs: readonly [{
|
|
560
|
+
readonly internalType: "PoolId";
|
|
561
|
+
readonly name: "perpId";
|
|
562
|
+
readonly type: "bytes32";
|
|
563
|
+
}, {
|
|
564
|
+
readonly components: readonly [{
|
|
565
|
+
readonly internalType: "uint256";
|
|
566
|
+
readonly name: "margin";
|
|
567
|
+
readonly type: "uint256";
|
|
568
|
+
}, {
|
|
569
|
+
readonly internalType: "uint128";
|
|
570
|
+
readonly name: "liquidity";
|
|
571
|
+
readonly type: "uint128";
|
|
572
|
+
}, {
|
|
573
|
+
readonly internalType: "int24";
|
|
574
|
+
readonly name: "tickLower";
|
|
575
|
+
readonly type: "int24";
|
|
576
|
+
}, {
|
|
577
|
+
readonly internalType: "int24";
|
|
578
|
+
readonly name: "tickUpper";
|
|
579
|
+
readonly type: "int24";
|
|
580
|
+
}, {
|
|
581
|
+
readonly internalType: "uint128";
|
|
582
|
+
readonly name: "maxAmt0In";
|
|
583
|
+
readonly type: "uint128";
|
|
584
|
+
}, {
|
|
585
|
+
readonly internalType: "uint128";
|
|
586
|
+
readonly name: "maxAmt1In";
|
|
587
|
+
readonly type: "uint128";
|
|
588
|
+
}];
|
|
589
|
+
readonly internalType: "struct IPerpManager.OpenMakerPositionParams";
|
|
590
|
+
readonly name: "params";
|
|
591
|
+
readonly type: "tuple";
|
|
592
|
+
}];
|
|
593
|
+
readonly name: "openMakerPosition";
|
|
594
|
+
readonly outputs: readonly [{
|
|
595
|
+
readonly internalType: "uint128";
|
|
596
|
+
readonly name: "makerPosId";
|
|
597
|
+
readonly type: "uint128";
|
|
598
|
+
}];
|
|
599
|
+
readonly stateMutability: "nonpayable";
|
|
600
|
+
readonly type: "function";
|
|
601
|
+
}, {
|
|
602
|
+
readonly inputs: readonly [{
|
|
603
|
+
readonly internalType: "PoolId";
|
|
604
|
+
readonly name: "perpId";
|
|
605
|
+
readonly type: "bytes32";
|
|
606
|
+
}, {
|
|
607
|
+
readonly components: readonly [{
|
|
608
|
+
readonly internalType: "bool";
|
|
609
|
+
readonly name: "isLong";
|
|
610
|
+
readonly type: "bool";
|
|
611
|
+
}, {
|
|
612
|
+
readonly internalType: "uint256";
|
|
613
|
+
readonly name: "margin";
|
|
614
|
+
readonly type: "uint256";
|
|
615
|
+
}, {
|
|
616
|
+
readonly internalType: "uint256";
|
|
617
|
+
readonly name: "levX96";
|
|
618
|
+
readonly type: "uint256";
|
|
619
|
+
}, {
|
|
620
|
+
readonly internalType: "uint128";
|
|
621
|
+
readonly name: "unspecifiedAmountLimit";
|
|
622
|
+
readonly type: "uint128";
|
|
623
|
+
}];
|
|
624
|
+
readonly internalType: "struct IPerpManager.OpenTakerPositionParams";
|
|
625
|
+
readonly name: "params";
|
|
626
|
+
readonly type: "tuple";
|
|
627
|
+
}];
|
|
628
|
+
readonly name: "openTakerPosition";
|
|
629
|
+
readonly outputs: readonly [{
|
|
630
|
+
readonly internalType: "uint128";
|
|
631
|
+
readonly name: "takerPosId";
|
|
632
|
+
readonly type: "uint128";
|
|
633
|
+
}];
|
|
634
|
+
readonly stateMutability: "nonpayable";
|
|
635
|
+
readonly type: "function";
|
|
636
|
+
}, {
|
|
637
|
+
readonly inputs: readonly [{
|
|
638
|
+
readonly internalType: "PoolId";
|
|
639
|
+
readonly name: "";
|
|
640
|
+
readonly type: "bytes32";
|
|
641
|
+
}];
|
|
642
|
+
readonly name: "perps";
|
|
643
|
+
readonly outputs: readonly [{
|
|
644
|
+
readonly internalType: "address";
|
|
645
|
+
readonly name: "vault";
|
|
646
|
+
readonly type: "address";
|
|
647
|
+
}, {
|
|
648
|
+
readonly internalType: "address";
|
|
649
|
+
readonly name: "beacon";
|
|
650
|
+
readonly type: "address";
|
|
651
|
+
}, {
|
|
652
|
+
readonly internalType: "address";
|
|
653
|
+
readonly name: "creator";
|
|
654
|
+
readonly type: "address";
|
|
655
|
+
}, {
|
|
656
|
+
readonly internalType: "uint32";
|
|
657
|
+
readonly name: "creationTimestamp";
|
|
658
|
+
readonly type: "uint32";
|
|
659
|
+
}, {
|
|
660
|
+
readonly internalType: "uint32";
|
|
661
|
+
readonly name: "makerLockupPeriod";
|
|
662
|
+
readonly type: "uint32";
|
|
663
|
+
}, {
|
|
664
|
+
readonly internalType: "uint32";
|
|
665
|
+
readonly name: "twapWindow";
|
|
666
|
+
readonly type: "uint32";
|
|
667
|
+
}, {
|
|
668
|
+
readonly internalType: "uint32";
|
|
669
|
+
readonly name: "lastTwPremiumsUpdate";
|
|
670
|
+
readonly type: "uint32";
|
|
671
|
+
}, {
|
|
672
|
+
readonly internalType: "uint24";
|
|
673
|
+
readonly name: "creatorFee";
|
|
674
|
+
readonly type: "uint24";
|
|
675
|
+
}, {
|
|
676
|
+
readonly internalType: "uint24";
|
|
677
|
+
readonly name: "insuranceFee";
|
|
678
|
+
readonly type: "uint24";
|
|
679
|
+
}, {
|
|
680
|
+
readonly internalType: "uint24";
|
|
681
|
+
readonly name: "liquidationFee";
|
|
682
|
+
readonly type: "uint24";
|
|
683
|
+
}, {
|
|
684
|
+
readonly internalType: "uint24";
|
|
685
|
+
readonly name: "liquidatorFeeSplit";
|
|
686
|
+
readonly type: "uint24";
|
|
687
|
+
}, {
|
|
688
|
+
readonly internalType: "uint128";
|
|
689
|
+
readonly name: "nextPosId";
|
|
690
|
+
readonly type: "uint128";
|
|
691
|
+
}, {
|
|
692
|
+
readonly internalType: "uint256";
|
|
693
|
+
readonly name: "sqrtPriceLowerMultiX96";
|
|
694
|
+
readonly type: "uint256";
|
|
695
|
+
}, {
|
|
696
|
+
readonly internalType: "uint256";
|
|
697
|
+
readonly name: "sqrtPriceUpperMultiX96";
|
|
698
|
+
readonly type: "uint256";
|
|
699
|
+
}, {
|
|
700
|
+
readonly internalType: "uint24";
|
|
701
|
+
readonly name: "minOpeningMargin";
|
|
702
|
+
readonly type: "uint24";
|
|
703
|
+
}, {
|
|
704
|
+
readonly internalType: "uint24";
|
|
705
|
+
readonly name: "minMakerOpeningMarginRatio";
|
|
706
|
+
readonly type: "uint24";
|
|
707
|
+
}, {
|
|
708
|
+
readonly internalType: "uint24";
|
|
709
|
+
readonly name: "maxMakerOpeningMarginRatio";
|
|
710
|
+
readonly type: "uint24";
|
|
711
|
+
}, {
|
|
712
|
+
readonly internalType: "uint24";
|
|
713
|
+
readonly name: "makerLiquidationMarginRatio";
|
|
714
|
+
readonly type: "uint24";
|
|
715
|
+
}, {
|
|
716
|
+
readonly internalType: "uint24";
|
|
717
|
+
readonly name: "minTakerOpeningMarginRatio";
|
|
718
|
+
readonly type: "uint24";
|
|
719
|
+
}, {
|
|
720
|
+
readonly internalType: "uint24";
|
|
721
|
+
readonly name: "maxTakerOpeningMarginRatio";
|
|
722
|
+
readonly type: "uint24";
|
|
723
|
+
}, {
|
|
724
|
+
readonly internalType: "uint24";
|
|
725
|
+
readonly name: "takerLiquidationMarginRatio";
|
|
726
|
+
readonly type: "uint24";
|
|
727
|
+
}, {
|
|
728
|
+
readonly internalType: "int256";
|
|
729
|
+
readonly name: "twPremiumX96";
|
|
730
|
+
readonly type: "int256";
|
|
731
|
+
}, {
|
|
732
|
+
readonly internalType: "int256";
|
|
733
|
+
readonly name: "twPremiumDivBySqrtPriceX96";
|
|
734
|
+
readonly type: "int256";
|
|
735
|
+
}, {
|
|
736
|
+
readonly internalType: "int256";
|
|
737
|
+
readonly name: "premiumPerSecondX96";
|
|
738
|
+
readonly type: "int256";
|
|
739
|
+
}, {
|
|
740
|
+
readonly components: readonly [{
|
|
741
|
+
readonly internalType: "Currency";
|
|
742
|
+
readonly name: "currency0";
|
|
743
|
+
readonly type: "address";
|
|
744
|
+
}, {
|
|
745
|
+
readonly internalType: "Currency";
|
|
746
|
+
readonly name: "currency1";
|
|
747
|
+
readonly type: "address";
|
|
748
|
+
}, {
|
|
749
|
+
readonly internalType: "uint24";
|
|
750
|
+
readonly name: "fee";
|
|
751
|
+
readonly type: "uint24";
|
|
752
|
+
}, {
|
|
753
|
+
readonly internalType: "int24";
|
|
754
|
+
readonly name: "tickSpacing";
|
|
755
|
+
readonly type: "int24";
|
|
756
|
+
}, {
|
|
757
|
+
readonly internalType: "contract IHooks";
|
|
758
|
+
readonly name: "hooks";
|
|
759
|
+
readonly type: "address";
|
|
760
|
+
}];
|
|
761
|
+
readonly internalType: "struct PoolKey";
|
|
762
|
+
readonly name: "key";
|
|
763
|
+
readonly type: "tuple";
|
|
764
|
+
}, {
|
|
765
|
+
readonly components: readonly [{
|
|
766
|
+
readonly internalType: "uint128";
|
|
767
|
+
readonly name: "baseFeeX96";
|
|
768
|
+
readonly type: "uint128";
|
|
769
|
+
}, {
|
|
770
|
+
readonly internalType: "uint128";
|
|
771
|
+
readonly name: "startFeeX96";
|
|
772
|
+
readonly type: "uint128";
|
|
773
|
+
}, {
|
|
774
|
+
readonly internalType: "uint128";
|
|
775
|
+
readonly name: "targetFeeX96";
|
|
776
|
+
readonly type: "uint128";
|
|
777
|
+
}, {
|
|
778
|
+
readonly internalType: "uint128";
|
|
779
|
+
readonly name: "decay";
|
|
780
|
+
readonly type: "uint128";
|
|
781
|
+
}, {
|
|
782
|
+
readonly internalType: "uint128";
|
|
783
|
+
readonly name: "volatilityScalerX96";
|
|
784
|
+
readonly type: "uint128";
|
|
785
|
+
}, {
|
|
786
|
+
readonly internalType: "uint128";
|
|
787
|
+
readonly name: "maxFeeMultiplierX96";
|
|
788
|
+
readonly type: "uint128";
|
|
789
|
+
}];
|
|
790
|
+
readonly internalType: "struct TradingFee.Config";
|
|
791
|
+
readonly name: "tradingFeeConfig";
|
|
792
|
+
readonly type: "tuple";
|
|
793
|
+
}, {
|
|
794
|
+
readonly components: readonly [{
|
|
795
|
+
readonly internalType: "uint32";
|
|
796
|
+
readonly name: "index";
|
|
797
|
+
readonly type: "uint32";
|
|
798
|
+
}, {
|
|
799
|
+
readonly internalType: "uint32";
|
|
800
|
+
readonly name: "cardinality";
|
|
801
|
+
readonly type: "uint32";
|
|
802
|
+
}, {
|
|
803
|
+
readonly internalType: "uint32";
|
|
804
|
+
readonly name: "cardinalityNext";
|
|
805
|
+
readonly type: "uint32";
|
|
806
|
+
}, {
|
|
807
|
+
readonly components: readonly [{
|
|
808
|
+
readonly internalType: "uint32";
|
|
809
|
+
readonly name: "blockTimestamp";
|
|
810
|
+
readonly type: "uint32";
|
|
811
|
+
}, {
|
|
812
|
+
readonly internalType: "uint216";
|
|
813
|
+
readonly name: "cumulativeValue";
|
|
814
|
+
readonly type: "uint216";
|
|
815
|
+
}, {
|
|
816
|
+
readonly internalType: "bool";
|
|
817
|
+
readonly name: "initialized";
|
|
818
|
+
readonly type: "bool";
|
|
819
|
+
}];
|
|
820
|
+
readonly internalType: "struct TimeWeightedAvg.Observation[65535]";
|
|
821
|
+
readonly name: "observations";
|
|
822
|
+
readonly type: "tuple[65535]";
|
|
823
|
+
}];
|
|
824
|
+
readonly internalType: "struct TimeWeightedAvg.State";
|
|
825
|
+
readonly name: "twapState";
|
|
826
|
+
readonly type: "tuple";
|
|
827
|
+
}];
|
|
828
|
+
readonly stateMutability: "view";
|
|
829
|
+
readonly type: "function";
|
|
830
|
+
}, {
|
|
831
|
+
readonly inputs: readonly [{
|
|
832
|
+
readonly internalType: "PoolId";
|
|
833
|
+
readonly name: "perpId";
|
|
834
|
+
readonly type: "bytes32";
|
|
835
|
+
}];
|
|
836
|
+
readonly name: "tickSpacing";
|
|
837
|
+
readonly outputs: readonly [{
|
|
838
|
+
readonly internalType: "int24";
|
|
839
|
+
readonly name: "";
|
|
840
|
+
readonly type: "int24";
|
|
841
|
+
}];
|
|
842
|
+
readonly stateMutability: "view";
|
|
843
|
+
readonly type: "function";
|
|
844
|
+
}, {
|
|
845
|
+
readonly inputs: readonly [{
|
|
846
|
+
readonly internalType: "bytes";
|
|
847
|
+
readonly name: "data";
|
|
848
|
+
readonly type: "bytes";
|
|
849
|
+
}];
|
|
850
|
+
readonly name: "unlockCallback";
|
|
851
|
+
readonly outputs: readonly [{
|
|
852
|
+
readonly internalType: "bytes";
|
|
853
|
+
readonly name: "encodedDelta";
|
|
854
|
+
readonly type: "bytes";
|
|
855
|
+
}];
|
|
856
|
+
readonly stateMutability: "nonpayable";
|
|
857
|
+
readonly type: "function";
|
|
858
|
+
}];
|
|
859
|
+
|
|
860
|
+
declare const BEACON_ABI: readonly [{
|
|
861
|
+
readonly inputs: readonly [{
|
|
862
|
+
readonly internalType: "contract IVerifierWrapper";
|
|
863
|
+
readonly name: "verifierWrapper";
|
|
864
|
+
readonly type: "address";
|
|
865
|
+
}, {
|
|
866
|
+
readonly internalType: "uint256";
|
|
867
|
+
readonly name: "initialData";
|
|
868
|
+
readonly type: "uint256";
|
|
869
|
+
}, {
|
|
870
|
+
readonly internalType: "uint32";
|
|
871
|
+
readonly name: "initialCardinalityNext";
|
|
872
|
+
readonly type: "uint32";
|
|
873
|
+
}];
|
|
874
|
+
readonly stateMutability: "nonpayable";
|
|
875
|
+
readonly type: "constructor";
|
|
876
|
+
}, {
|
|
877
|
+
readonly inputs: readonly [{
|
|
878
|
+
readonly internalType: "bytes";
|
|
879
|
+
readonly name: "proof";
|
|
880
|
+
readonly type: "bytes";
|
|
881
|
+
}, {
|
|
882
|
+
readonly internalType: "bytes";
|
|
883
|
+
readonly name: "publicSignals";
|
|
884
|
+
readonly type: "bytes";
|
|
885
|
+
}];
|
|
886
|
+
readonly name: "InvalidProof";
|
|
887
|
+
readonly type: "error";
|
|
888
|
+
}, {
|
|
889
|
+
readonly inputs: readonly [{
|
|
890
|
+
readonly internalType: "bytes";
|
|
891
|
+
readonly name: "proof";
|
|
892
|
+
readonly type: "bytes";
|
|
893
|
+
}, {
|
|
894
|
+
readonly internalType: "bytes";
|
|
895
|
+
readonly name: "publicSignals";
|
|
896
|
+
readonly type: "bytes";
|
|
897
|
+
}];
|
|
898
|
+
readonly name: "ProofAlreadyUsed";
|
|
899
|
+
readonly type: "error";
|
|
900
|
+
}, {
|
|
901
|
+
readonly anonymous: false;
|
|
902
|
+
readonly inputs: readonly [{
|
|
903
|
+
readonly indexed: false;
|
|
904
|
+
readonly internalType: "uint256";
|
|
905
|
+
readonly name: "data";
|
|
906
|
+
readonly type: "uint256";
|
|
907
|
+
}];
|
|
908
|
+
readonly name: "DataUpdated";
|
|
909
|
+
readonly type: "event";
|
|
910
|
+
}, {
|
|
911
|
+
readonly inputs: readonly [];
|
|
912
|
+
readonly name: "MAX_DATA";
|
|
913
|
+
readonly outputs: readonly [{
|
|
914
|
+
readonly internalType: "int256";
|
|
915
|
+
readonly name: "";
|
|
916
|
+
readonly type: "int256";
|
|
917
|
+
}];
|
|
918
|
+
readonly stateMutability: "view";
|
|
919
|
+
readonly type: "function";
|
|
920
|
+
}, {
|
|
921
|
+
readonly inputs: readonly [];
|
|
922
|
+
readonly name: "MIN_DATA";
|
|
923
|
+
readonly outputs: readonly [{
|
|
924
|
+
readonly internalType: "int256";
|
|
925
|
+
readonly name: "";
|
|
926
|
+
readonly type: "int256";
|
|
927
|
+
}];
|
|
928
|
+
readonly stateMutability: "view";
|
|
929
|
+
readonly type: "function";
|
|
930
|
+
}, {
|
|
931
|
+
readonly inputs: readonly [];
|
|
932
|
+
readonly name: "VERIFIER_WRAPPER";
|
|
933
|
+
readonly outputs: readonly [{
|
|
934
|
+
readonly internalType: "contract IVerifierWrapper";
|
|
935
|
+
readonly name: "";
|
|
936
|
+
readonly type: "address";
|
|
937
|
+
}];
|
|
938
|
+
readonly stateMutability: "view";
|
|
939
|
+
readonly type: "function";
|
|
940
|
+
}, {
|
|
941
|
+
readonly inputs: readonly [];
|
|
942
|
+
readonly name: "data";
|
|
943
|
+
readonly outputs: readonly [{
|
|
944
|
+
readonly internalType: "uint256";
|
|
945
|
+
readonly name: "";
|
|
946
|
+
readonly type: "uint256";
|
|
947
|
+
}];
|
|
948
|
+
readonly stateMutability: "view";
|
|
949
|
+
readonly type: "function";
|
|
950
|
+
}, {
|
|
951
|
+
readonly inputs: readonly [];
|
|
952
|
+
readonly name: "getData";
|
|
953
|
+
readonly outputs: readonly [{
|
|
954
|
+
readonly internalType: "uint256";
|
|
955
|
+
readonly name: "";
|
|
956
|
+
readonly type: "uint256";
|
|
957
|
+
}, {
|
|
958
|
+
readonly internalType: "uint256";
|
|
959
|
+
readonly name: "";
|
|
960
|
+
readonly type: "uint256";
|
|
961
|
+
}];
|
|
962
|
+
readonly stateMutability: "view";
|
|
963
|
+
readonly type: "function";
|
|
964
|
+
}, {
|
|
965
|
+
readonly inputs: readonly [{
|
|
966
|
+
readonly internalType: "uint32";
|
|
967
|
+
readonly name: "twapSecondsAgo";
|
|
968
|
+
readonly type: "uint32";
|
|
969
|
+
}];
|
|
970
|
+
readonly name: "getTwap";
|
|
971
|
+
readonly outputs: readonly [{
|
|
972
|
+
readonly internalType: "uint256";
|
|
973
|
+
readonly name: "twapPrice";
|
|
974
|
+
readonly type: "uint256";
|
|
975
|
+
}];
|
|
976
|
+
readonly stateMutability: "view";
|
|
977
|
+
readonly type: "function";
|
|
978
|
+
}, {
|
|
979
|
+
readonly inputs: readonly [{
|
|
980
|
+
readonly internalType: "uint32";
|
|
981
|
+
readonly name: "cardinalityNext";
|
|
982
|
+
readonly type: "uint32";
|
|
983
|
+
}];
|
|
984
|
+
readonly name: "increaseCardinalityNext";
|
|
985
|
+
readonly outputs: readonly [{
|
|
986
|
+
readonly internalType: "uint32";
|
|
987
|
+
readonly name: "cardinalityNextOld";
|
|
988
|
+
readonly type: "uint32";
|
|
989
|
+
}, {
|
|
990
|
+
readonly internalType: "uint32";
|
|
991
|
+
readonly name: "cardinalityNextNew";
|
|
992
|
+
readonly type: "uint32";
|
|
993
|
+
}];
|
|
994
|
+
readonly stateMutability: "nonpayable";
|
|
995
|
+
readonly type: "function";
|
|
996
|
+
}, {
|
|
997
|
+
readonly inputs: readonly [];
|
|
998
|
+
readonly name: "timestamp";
|
|
999
|
+
readonly outputs: readonly [{
|
|
1000
|
+
readonly internalType: "uint256";
|
|
1001
|
+
readonly name: "";
|
|
1002
|
+
readonly type: "uint256";
|
|
1003
|
+
}];
|
|
1004
|
+
readonly stateMutability: "view";
|
|
1005
|
+
readonly type: "function";
|
|
1006
|
+
}, {
|
|
1007
|
+
readonly inputs: readonly [];
|
|
1008
|
+
readonly name: "twapState";
|
|
1009
|
+
readonly outputs: readonly [{
|
|
1010
|
+
readonly internalType: "uint32";
|
|
1011
|
+
readonly name: "index";
|
|
1012
|
+
readonly type: "uint32";
|
|
1013
|
+
}, {
|
|
1014
|
+
readonly internalType: "uint32";
|
|
1015
|
+
readonly name: "cardinality";
|
|
1016
|
+
readonly type: "uint32";
|
|
1017
|
+
}, {
|
|
1018
|
+
readonly internalType: "uint32";
|
|
1019
|
+
readonly name: "cardinalityNext";
|
|
1020
|
+
readonly type: "uint32";
|
|
1021
|
+
}];
|
|
1022
|
+
readonly stateMutability: "view";
|
|
1023
|
+
readonly type: "function";
|
|
1024
|
+
}, {
|
|
1025
|
+
readonly inputs: readonly [{
|
|
1026
|
+
readonly internalType: "bytes";
|
|
1027
|
+
readonly name: "proof";
|
|
1028
|
+
readonly type: "bytes";
|
|
1029
|
+
}, {
|
|
1030
|
+
readonly internalType: "bytes";
|
|
1031
|
+
readonly name: "publicSignals";
|
|
1032
|
+
readonly type: "bytes";
|
|
1033
|
+
}];
|
|
1034
|
+
readonly name: "updateData";
|
|
1035
|
+
readonly outputs: readonly [];
|
|
1036
|
+
readonly stateMutability: "nonpayable";
|
|
1037
|
+
readonly type: "function";
|
|
1038
|
+
}, {
|
|
1039
|
+
readonly inputs: readonly [{
|
|
1040
|
+
readonly internalType: "bytes";
|
|
1041
|
+
readonly name: "";
|
|
1042
|
+
readonly type: "bytes";
|
|
1043
|
+
}];
|
|
1044
|
+
readonly name: "usedProofs";
|
|
1045
|
+
readonly outputs: readonly [{
|
|
1046
|
+
readonly internalType: "bool";
|
|
1047
|
+
readonly name: "";
|
|
1048
|
+
readonly type: "bool";
|
|
1049
|
+
}];
|
|
1050
|
+
readonly stateMutability: "view";
|
|
1051
|
+
readonly type: "function";
|
|
1052
|
+
}];
|
|
1053
|
+
|
|
1054
|
+
export { BEACON_ABI, type ClosePositionParams, type CreatePerpParams, DECIMAL_PRECISION_6, GOLDSKY_BASE_SEPOLIA_URL, type OpenMakerPositionParams, type OpenTakerPositionParams, PERP_MANAGER_ABI, PERP_MANAGER_BASE_SEPOLIA_ADDRESS, Perp, PerpCityContext, type PerpCityContextConfig, PerpManager, Position, Q96, approveUsdc, estimateLiquidity, getUsdcAddress, priceToSqrtPriceX96, priceToTick, scale6Decimals, scaleX96 };
|