@alephium/powfi-sdk 0.0.1-rc.1

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.
Files changed (146) hide show
  1. package/README.md +4 -0
  2. package/clmm/artifacts/BitmapWord.ral.json +125 -0
  3. package/clmm/artifacts/BitmapWordDeployer.ral.json +31 -0
  4. package/clmm/artifacts/CreateConfig.ral.json +37 -0
  5. package/clmm/artifacts/CreateLiquidPool.ral.json +55 -0
  6. package/clmm/artifacts/DexAccount.ral.json +110 -0
  7. package/clmm/artifacts/LiquidityAmountsTest.ral.json +161 -0
  8. package/clmm/artifacts/LiquidityManagmentTest.ral.json +384 -0
  9. package/clmm/artifacts/Pool.ral.json +1530 -0
  10. package/clmm/artifacts/PoolConfig.ral.json +31 -0
  11. package/clmm/artifacts/PoolFactory.ral.json +300 -0
  12. package/clmm/artifacts/PoolRouterDemo.ral.json +49 -0
  13. package/clmm/artifacts/PoolUser.ral.json +89 -0
  14. package/clmm/artifacts/Position.ral.json +183 -0
  15. package/clmm/artifacts/PositionManager.ral.json +416 -0
  16. package/clmm/artifacts/SwapWithoutAccount.ral.json +46 -0
  17. package/clmm/artifacts/TestToken.ral.json +68 -0
  18. package/clmm/artifacts/Tick.ral.json +161 -0
  19. package/clmm/artifacts/TickBitmapTest.ral.json +220 -0
  20. package/clmm/artifacts/constants.ral.json +81 -0
  21. package/clmm/artifacts/structs.ral.json +335 -0
  22. package/clmm/artifacts/ts/BitmapWord.ts +337 -0
  23. package/clmm/artifacts/ts/BitmapWordDeployer.ts +164 -0
  24. package/clmm/artifacts/ts/DexAccount.ts +330 -0
  25. package/clmm/artifacts/ts/LiquidityAmountsTest.ts +464 -0
  26. package/clmm/artifacts/ts/LiquidityManagmentTest.ts +859 -0
  27. package/clmm/artifacts/ts/Pool.ts +2535 -0
  28. package/clmm/artifacts/ts/PoolConfig.ts +179 -0
  29. package/clmm/artifacts/ts/PoolFactory.ts +640 -0
  30. package/clmm/artifacts/ts/PoolUser.ts +237 -0
  31. package/clmm/artifacts/ts/Position.ts +440 -0
  32. package/clmm/artifacts/ts/PositionManager.ts +929 -0
  33. package/clmm/artifacts/ts/TestToken.ts +277 -0
  34. package/clmm/artifacts/ts/Tick.ts +351 -0
  35. package/clmm/artifacts/ts/TickBitmapTest.ts +512 -0
  36. package/clmm/artifacts/ts/constants.ts +17 -0
  37. package/clmm/artifacts/ts/contracts.ts +26 -0
  38. package/clmm/artifacts/ts/deployments.ts +160 -0
  39. package/clmm/artifacts/ts/index.ts +20 -0
  40. package/clmm/artifacts/ts/scripts.ts +76 -0
  41. package/clmm/artifacts/ts/types.ts +105 -0
  42. package/clmm/deployments/.deployments.devnet.json +350 -0
  43. package/clmm/deployments/.deployments.testnet.json +350 -0
  44. package/cpmm/artifacts/dex/DexAccount.ral.json +110 -0
  45. package/cpmm/artifacts/dex/Router.ral.json +361 -0
  46. package/cpmm/artifacts/dex/TokenPair.ral.json +512 -0
  47. package/cpmm/artifacts/dex/TokenPairFactory.ral.json +297 -0
  48. package/cpmm/artifacts/examples/ExampleOracleSimple.ral.json +192 -0
  49. package/cpmm/artifacts/examples/FeeCollectorFactoryImpl.ral.json +185 -0
  50. package/cpmm/artifacts/examples/FeeCollectorPerTokenPairImpl.ral.json +216 -0
  51. package/cpmm/artifacts/examples/FullMathTest.ral.json +123 -0
  52. package/cpmm/artifacts/scripts/AddLiquidity.ral.json +46 -0
  53. package/cpmm/artifacts/scripts/Burn.ral.json +31 -0
  54. package/cpmm/artifacts/scripts/CollectFee.ral.json +25 -0
  55. package/cpmm/artifacts/scripts/CreatePair.ral.json +37 -0
  56. package/cpmm/artifacts/scripts/CreatePairAndAddLiquidity.ral.json +43 -0
  57. package/cpmm/artifacts/scripts/EnableFeeCollector.ral.json +28 -0
  58. package/cpmm/artifacts/scripts/Mint.ral.json +34 -0
  59. package/cpmm/artifacts/scripts/RemoveLiquidity.ral.json +43 -0
  60. package/cpmm/artifacts/scripts/SetFeeCollectorFactory.ral.json +28 -0
  61. package/cpmm/artifacts/scripts/Swap.ral.json +46 -0
  62. package/cpmm/artifacts/scripts/SwapMaxIn.ral.json +46 -0
  63. package/cpmm/artifacts/scripts/SwapMinOut.ral.json +46 -0
  64. package/cpmm/artifacts/test/GetToken.ral.json +31 -0
  65. package/cpmm/artifacts/test/MathTest.ral.json +49 -0
  66. package/cpmm/artifacts/test/TestToken.ral.json +87 -0
  67. package/cpmm/artifacts/ts/DexAccount.ts +329 -0
  68. package/cpmm/artifacts/ts/ExampleOracleSimple.ts +383 -0
  69. package/cpmm/artifacts/ts/FeeCollectorFactoryImpl.ts +227 -0
  70. package/cpmm/artifacts/ts/FeeCollectorPerTokenPairImpl.ts +327 -0
  71. package/cpmm/artifacts/ts/FullMathTest.ts +251 -0
  72. package/cpmm/artifacts/ts/MathTest.ts +183 -0
  73. package/cpmm/artifacts/ts/Router.ts +554 -0
  74. package/cpmm/artifacts/ts/TestToken.ts +312 -0
  75. package/cpmm/artifacts/ts/TokenPair.ts +947 -0
  76. package/cpmm/artifacts/ts/TokenPairFactory.ts +501 -0
  77. package/cpmm/artifacts/ts/contracts.ts +26 -0
  78. package/cpmm/artifacts/ts/deployments.ts +109 -0
  79. package/cpmm/artifacts/ts/index.ts +16 -0
  80. package/cpmm/artifacts/ts/scripts.ts +142 -0
  81. package/cpmm/deployments/.deployments.devnet.json +77 -0
  82. package/cpmm/deployments/.deployments.testnet.json +79 -0
  83. package/lib/index.d.mts +8800 -0
  84. package/lib/index.d.ts +8800 -0
  85. package/lib/index.js +21769 -0
  86. package/lib/index.js.map +1 -0
  87. package/lib/index.mjs +22118 -0
  88. package/lib/index.mjs.map +1 -0
  89. package/package.json +80 -0
  90. package/src/clmm/clmm.ts +607 -0
  91. package/src/clmm/constants.ts +7 -0
  92. package/src/clmm/index.ts +6 -0
  93. package/src/clmm/liquidity.ts +163 -0
  94. package/src/clmm/pool.ts +154 -0
  95. package/src/clmm/tick.ts +335 -0
  96. package/src/clmm/types.ts +155 -0
  97. package/src/common/constants.ts +1 -0
  98. package/src/common/error.ts +46 -0
  99. package/src/common/index.ts +7 -0
  100. package/src/common/logger.ts +82 -0
  101. package/src/common/math.ts +88 -0
  102. package/src/common/numeric.ts +64 -0
  103. package/src/common/types.ts +49 -0
  104. package/src/common/utils.ts +3 -0
  105. package/src/cpmm/constants.ts +2 -0
  106. package/src/cpmm/cpmm.ts +631 -0
  107. package/src/cpmm/index.ts +3 -0
  108. package/src/cpmm/types.ts +113 -0
  109. package/src/index.ts +25 -0
  110. package/src/moduleBase.ts +64 -0
  111. package/src/staking/index.ts +4 -0
  112. package/src/staking/settings.ts +38 -0
  113. package/src/staking/staking.ts +277 -0
  114. package/src/staking/types.ts +15 -0
  115. package/src/staking/utils.ts +25 -0
  116. package/src/token/index.ts +1 -0
  117. package/src/token/token.ts +163 -0
  118. package/src/zeta.ts +105 -0
  119. package/staking/artifacts/AlphStakeAndLock.ral.json +31 -0
  120. package/staking/artifacts/AlphUnstakeVault.ral.json +151 -0
  121. package/staking/artifacts/XAlphStakeVault.ral.json +559 -0
  122. package/staking/artifacts/XAlphToken.ral.json +404 -0
  123. package/staking/artifacts/XAlphUnlockAndStartUnstake.ral.json +31 -0
  124. package/staking/artifacts/examples/GovernanceDemo.ral.json +282 -0
  125. package/staking/artifacts/examples/RewardSharingVault.ral.json +253 -0
  126. package/staking/artifacts/structs.ral.json +47 -0
  127. package/staking/artifacts/ts/AlphUnstakeVault.ts +354 -0
  128. package/staking/artifacts/ts/FullMathTest.ts +175 -0
  129. package/staking/artifacts/ts/GovernanceDemo.ts +726 -0
  130. package/staking/artifacts/ts/RewardSharingVault.ts +559 -0
  131. package/staking/artifacts/ts/TestDynamicArrayByteVec32.ts +431 -0
  132. package/staking/artifacts/ts/TestDynamicSortedArrayForU256.ts +516 -0
  133. package/staking/artifacts/ts/TestMerkleProof.ts +343 -0
  134. package/staking/artifacts/ts/XAlphStakeVault.ts +1120 -0
  135. package/staking/artifacts/ts/XAlphToken.ts +835 -0
  136. package/staking/artifacts/ts/contracts.ts +26 -0
  137. package/staking/artifacts/ts/deployments.ts +109 -0
  138. package/staking/artifacts/ts/index.ts +15 -0
  139. package/staking/artifacts/ts/scripts.ts +35 -0
  140. package/staking/artifacts/ts/types.ts +19 -0
  141. package/staking/artifacts/utils/FullMathTest.ral.json +57 -0
  142. package/staking/artifacts/utils/TestDynamicArrayByteVec32.ral.json +165 -0
  143. package/staking/artifacts/utils/TestDynamicSortedArrayForU256.ral.json +189 -0
  144. package/staking/artifacts/utils/TestMerkleProof.ral.json +134 -0
  145. package/staking/deployments/.deployments.devnet.json +77 -0
  146. package/staking/deployments/.deployments.testnet.json +78 -0
@@ -0,0 +1,464 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import {
6
+ Address,
7
+ Contract,
8
+ ContractState,
9
+ TestContractResult,
10
+ HexString,
11
+ ContractFactory,
12
+ EventSubscribeOptions,
13
+ EventSubscription,
14
+ CallContractParams,
15
+ CallContractResult,
16
+ TestContractParams,
17
+ ContractEvent,
18
+ subscribeContractEvent,
19
+ subscribeContractEvents,
20
+ testMethod,
21
+ callMethod,
22
+ multicallMethods,
23
+ fetchContractState,
24
+ Asset,
25
+ ContractInstance,
26
+ getContractEventsCurrentCount,
27
+ TestContractParamsWithoutMaps,
28
+ TestContractResultWithoutMaps,
29
+ SignExecuteContractMethodParams,
30
+ SignExecuteScriptTxResult,
31
+ signExecuteMethod,
32
+ addStdIdToFields,
33
+ encodeContractFields,
34
+ Narrow,
35
+ } from "@alephium/web3";
36
+ import { default as LiquidityAmountsTestContractJson } from "../LiquidityAmountsTest.ral.json";
37
+ import { getContractByCodeHash, registerContract } from "./contracts";
38
+ import * as types from "./types";
39
+
40
+ // Custom types for the contract
41
+ export namespace LiquidityAmountsTestTypes {
42
+ export type State = Omit<ContractState<any>, "fields">;
43
+
44
+ export interface CallMethodTable {
45
+ getLiquidityForAmount0: {
46
+ params: CallContractParams<{
47
+ sqrtRatioAX96: bigint;
48
+ sqrtRatioBX96: bigint;
49
+ amount0: bigint;
50
+ }>;
51
+ result: CallContractResult<bigint>;
52
+ };
53
+ getLiquidityForAmount1: {
54
+ params: CallContractParams<{
55
+ sqrtRatioAX96: bigint;
56
+ sqrtRatioBX96: bigint;
57
+ amount1: bigint;
58
+ }>;
59
+ result: CallContractResult<bigint>;
60
+ };
61
+ getLiquidityForAmounts: {
62
+ params: CallContractParams<{
63
+ sqrtRatioX96: bigint;
64
+ sqrtRatioAX96: bigint;
65
+ sqrtRatioBX96: bigint;
66
+ amount0: bigint;
67
+ amount1: bigint;
68
+ }>;
69
+ result: CallContractResult<bigint>;
70
+ };
71
+ getAmount0ForLiquidity: {
72
+ params: CallContractParams<{
73
+ sqrtRatioAX96: bigint;
74
+ sqrtRatioBX96: bigint;
75
+ liquidity: bigint;
76
+ }>;
77
+ result: CallContractResult<bigint>;
78
+ };
79
+ mulDiv: {
80
+ params: CallContractParams<{ a: bigint; b: bigint; denominator: bigint }>;
81
+ result: CallContractResult<bigint>;
82
+ };
83
+ mulDivRoundingUp: {
84
+ params: CallContractParams<{ a: bigint; b: bigint; denominator: bigint }>;
85
+ result: CallContractResult<bigint>;
86
+ };
87
+ }
88
+ export type CallMethodParams<T extends keyof CallMethodTable> =
89
+ CallMethodTable[T]["params"];
90
+ export type CallMethodResult<T extends keyof CallMethodTable> =
91
+ CallMethodTable[T]["result"];
92
+ export type MultiCallParams = Partial<{
93
+ [Name in keyof CallMethodTable]: CallMethodTable[Name]["params"];
94
+ }>;
95
+ export type MultiCallResults<T extends MultiCallParams> = {
96
+ [MaybeName in keyof T]: MaybeName extends keyof CallMethodTable
97
+ ? CallMethodTable[MaybeName]["result"]
98
+ : undefined;
99
+ };
100
+ export type MulticallReturnType<Callss extends MultiCallParams[]> = {
101
+ [index in keyof Callss]: MultiCallResults<Callss[index]>;
102
+ };
103
+
104
+ export interface SignExecuteMethodTable {
105
+ getLiquidityForAmount0: {
106
+ params: SignExecuteContractMethodParams<{
107
+ sqrtRatioAX96: bigint;
108
+ sqrtRatioBX96: bigint;
109
+ amount0: bigint;
110
+ }>;
111
+ result: SignExecuteScriptTxResult;
112
+ };
113
+ getLiquidityForAmount1: {
114
+ params: SignExecuteContractMethodParams<{
115
+ sqrtRatioAX96: bigint;
116
+ sqrtRatioBX96: bigint;
117
+ amount1: bigint;
118
+ }>;
119
+ result: SignExecuteScriptTxResult;
120
+ };
121
+ getLiquidityForAmounts: {
122
+ params: SignExecuteContractMethodParams<{
123
+ sqrtRatioX96: bigint;
124
+ sqrtRatioAX96: bigint;
125
+ sqrtRatioBX96: bigint;
126
+ amount0: bigint;
127
+ amount1: bigint;
128
+ }>;
129
+ result: SignExecuteScriptTxResult;
130
+ };
131
+ getAmount0ForLiquidity: {
132
+ params: SignExecuteContractMethodParams<{
133
+ sqrtRatioAX96: bigint;
134
+ sqrtRatioBX96: bigint;
135
+ liquidity: bigint;
136
+ }>;
137
+ result: SignExecuteScriptTxResult;
138
+ };
139
+ mulDiv: {
140
+ params: SignExecuteContractMethodParams<{
141
+ a: bigint;
142
+ b: bigint;
143
+ denominator: bigint;
144
+ }>;
145
+ result: SignExecuteScriptTxResult;
146
+ };
147
+ mulDivRoundingUp: {
148
+ params: SignExecuteContractMethodParams<{
149
+ a: bigint;
150
+ b: bigint;
151
+ denominator: bigint;
152
+ }>;
153
+ result: SignExecuteScriptTxResult;
154
+ };
155
+ }
156
+ export type SignExecuteMethodParams<T extends keyof SignExecuteMethodTable> =
157
+ SignExecuteMethodTable[T]["params"];
158
+ export type SignExecuteMethodResult<T extends keyof SignExecuteMethodTable> =
159
+ SignExecuteMethodTable[T]["result"];
160
+ }
161
+
162
+ class Factory extends ContractFactory<LiquidityAmountsTestInstance, {}> {
163
+ encodeFields() {
164
+ return encodeContractFields({}, this.contract.fieldsSig, types.AllStructs);
165
+ }
166
+
167
+ consts = { FullMathError: { MulDivOverflow: BigInt("351") } };
168
+
169
+ at(address: string): LiquidityAmountsTestInstance {
170
+ return new LiquidityAmountsTestInstance(address);
171
+ }
172
+
173
+ tests = {
174
+ getLiquidityForAmount0: async (
175
+ params: Omit<
176
+ TestContractParamsWithoutMaps<
177
+ never,
178
+ { sqrtRatioAX96: bigint; sqrtRatioBX96: bigint; amount0: bigint }
179
+ >,
180
+ "initialFields"
181
+ >
182
+ ): Promise<TestContractResultWithoutMaps<bigint>> => {
183
+ return testMethod(
184
+ this,
185
+ "getLiquidityForAmount0",
186
+ params,
187
+ getContractByCodeHash
188
+ );
189
+ },
190
+ getLiquidityForAmount1: async (
191
+ params: Omit<
192
+ TestContractParamsWithoutMaps<
193
+ never,
194
+ { sqrtRatioAX96: bigint; sqrtRatioBX96: bigint; amount1: bigint }
195
+ >,
196
+ "initialFields"
197
+ >
198
+ ): Promise<TestContractResultWithoutMaps<bigint>> => {
199
+ return testMethod(
200
+ this,
201
+ "getLiquidityForAmount1",
202
+ params,
203
+ getContractByCodeHash
204
+ );
205
+ },
206
+ getLiquidityForAmounts: async (
207
+ params: Omit<
208
+ TestContractParamsWithoutMaps<
209
+ never,
210
+ {
211
+ sqrtRatioX96: bigint;
212
+ sqrtRatioAX96: bigint;
213
+ sqrtRatioBX96: bigint;
214
+ amount0: bigint;
215
+ amount1: bigint;
216
+ }
217
+ >,
218
+ "initialFields"
219
+ >
220
+ ): Promise<TestContractResultWithoutMaps<bigint>> => {
221
+ return testMethod(
222
+ this,
223
+ "getLiquidityForAmounts",
224
+ params,
225
+ getContractByCodeHash
226
+ );
227
+ },
228
+ getAmount0ForLiquidity: async (
229
+ params: Omit<
230
+ TestContractParamsWithoutMaps<
231
+ never,
232
+ { sqrtRatioAX96: bigint; sqrtRatioBX96: bigint; liquidity: bigint }
233
+ >,
234
+ "initialFields"
235
+ >
236
+ ): Promise<TestContractResultWithoutMaps<bigint>> => {
237
+ return testMethod(
238
+ this,
239
+ "getAmount0ForLiquidity",
240
+ params,
241
+ getContractByCodeHash
242
+ );
243
+ },
244
+ mulDiv: async (
245
+ params: Omit<
246
+ TestContractParamsWithoutMaps<
247
+ never,
248
+ { a: bigint; b: bigint; denominator: bigint }
249
+ >,
250
+ "initialFields"
251
+ >
252
+ ): Promise<TestContractResultWithoutMaps<bigint>> => {
253
+ return testMethod(this, "mulDiv", params, getContractByCodeHash);
254
+ },
255
+ mulDivRoundingUp: async (
256
+ params: Omit<
257
+ TestContractParamsWithoutMaps<
258
+ never,
259
+ { a: bigint; b: bigint; denominator: bigint }
260
+ >,
261
+ "initialFields"
262
+ >
263
+ ): Promise<TestContractResultWithoutMaps<bigint>> => {
264
+ return testMethod(
265
+ this,
266
+ "mulDivRoundingUp",
267
+ params,
268
+ getContractByCodeHash
269
+ );
270
+ },
271
+ };
272
+
273
+ stateForTest(initFields: {}, asset?: Asset, address?: string) {
274
+ return this.stateForTest_(initFields, asset, address, undefined);
275
+ }
276
+ }
277
+
278
+ // Use this object to test and deploy the contract
279
+ export const LiquidityAmountsTest = new Factory(
280
+ Contract.fromJson(
281
+ LiquidityAmountsTestContractJson,
282
+ "",
283
+ "6a4ba04c81892909e02efe02e9f3ebf139cf27afd40f5fca01f4a9b98a9003da",
284
+ types.AllStructs
285
+ )
286
+ );
287
+ registerContract(LiquidityAmountsTest);
288
+
289
+ // Use this class to interact with the blockchain
290
+ export class LiquidityAmountsTestInstance extends ContractInstance {
291
+ constructor(address: Address) {
292
+ super(address);
293
+ }
294
+
295
+ async fetchState(): Promise<LiquidityAmountsTestTypes.State> {
296
+ return fetchContractState(LiquidityAmountsTest, this);
297
+ }
298
+
299
+ view = {
300
+ getLiquidityForAmount0: async (
301
+ params: LiquidityAmountsTestTypes.CallMethodParams<"getLiquidityForAmount0">
302
+ ): Promise<
303
+ LiquidityAmountsTestTypes.CallMethodResult<"getLiquidityForAmount0">
304
+ > => {
305
+ return callMethod(
306
+ LiquidityAmountsTest,
307
+ this,
308
+ "getLiquidityForAmount0",
309
+ params,
310
+ getContractByCodeHash
311
+ );
312
+ },
313
+ getLiquidityForAmount1: async (
314
+ params: LiquidityAmountsTestTypes.CallMethodParams<"getLiquidityForAmount1">
315
+ ): Promise<
316
+ LiquidityAmountsTestTypes.CallMethodResult<"getLiquidityForAmount1">
317
+ > => {
318
+ return callMethod(
319
+ LiquidityAmountsTest,
320
+ this,
321
+ "getLiquidityForAmount1",
322
+ params,
323
+ getContractByCodeHash
324
+ );
325
+ },
326
+ getLiquidityForAmounts: async (
327
+ params: LiquidityAmountsTestTypes.CallMethodParams<"getLiquidityForAmounts">
328
+ ): Promise<
329
+ LiquidityAmountsTestTypes.CallMethodResult<"getLiquidityForAmounts">
330
+ > => {
331
+ return callMethod(
332
+ LiquidityAmountsTest,
333
+ this,
334
+ "getLiquidityForAmounts",
335
+ params,
336
+ getContractByCodeHash
337
+ );
338
+ },
339
+ getAmount0ForLiquidity: async (
340
+ params: LiquidityAmountsTestTypes.CallMethodParams<"getAmount0ForLiquidity">
341
+ ): Promise<
342
+ LiquidityAmountsTestTypes.CallMethodResult<"getAmount0ForLiquidity">
343
+ > => {
344
+ return callMethod(
345
+ LiquidityAmountsTest,
346
+ this,
347
+ "getAmount0ForLiquidity",
348
+ params,
349
+ getContractByCodeHash
350
+ );
351
+ },
352
+ mulDiv: async (
353
+ params: LiquidityAmountsTestTypes.CallMethodParams<"mulDiv">
354
+ ): Promise<LiquidityAmountsTestTypes.CallMethodResult<"mulDiv">> => {
355
+ return callMethod(
356
+ LiquidityAmountsTest,
357
+ this,
358
+ "mulDiv",
359
+ params,
360
+ getContractByCodeHash
361
+ );
362
+ },
363
+ mulDivRoundingUp: async (
364
+ params: LiquidityAmountsTestTypes.CallMethodParams<"mulDivRoundingUp">
365
+ ): Promise<
366
+ LiquidityAmountsTestTypes.CallMethodResult<"mulDivRoundingUp">
367
+ > => {
368
+ return callMethod(
369
+ LiquidityAmountsTest,
370
+ this,
371
+ "mulDivRoundingUp",
372
+ params,
373
+ getContractByCodeHash
374
+ );
375
+ },
376
+ };
377
+
378
+ transact = {
379
+ getLiquidityForAmount0: async (
380
+ params: LiquidityAmountsTestTypes.SignExecuteMethodParams<"getLiquidityForAmount0">
381
+ ): Promise<
382
+ LiquidityAmountsTestTypes.SignExecuteMethodResult<"getLiquidityForAmount0">
383
+ > => {
384
+ return signExecuteMethod(
385
+ LiquidityAmountsTest,
386
+ this,
387
+ "getLiquidityForAmount0",
388
+ params
389
+ );
390
+ },
391
+ getLiquidityForAmount1: async (
392
+ params: LiquidityAmountsTestTypes.SignExecuteMethodParams<"getLiquidityForAmount1">
393
+ ): Promise<
394
+ LiquidityAmountsTestTypes.SignExecuteMethodResult<"getLiquidityForAmount1">
395
+ > => {
396
+ return signExecuteMethod(
397
+ LiquidityAmountsTest,
398
+ this,
399
+ "getLiquidityForAmount1",
400
+ params
401
+ );
402
+ },
403
+ getLiquidityForAmounts: async (
404
+ params: LiquidityAmountsTestTypes.SignExecuteMethodParams<"getLiquidityForAmounts">
405
+ ): Promise<
406
+ LiquidityAmountsTestTypes.SignExecuteMethodResult<"getLiquidityForAmounts">
407
+ > => {
408
+ return signExecuteMethod(
409
+ LiquidityAmountsTest,
410
+ this,
411
+ "getLiquidityForAmounts",
412
+ params
413
+ );
414
+ },
415
+ getAmount0ForLiquidity: async (
416
+ params: LiquidityAmountsTestTypes.SignExecuteMethodParams<"getAmount0ForLiquidity">
417
+ ): Promise<
418
+ LiquidityAmountsTestTypes.SignExecuteMethodResult<"getAmount0ForLiquidity">
419
+ > => {
420
+ return signExecuteMethod(
421
+ LiquidityAmountsTest,
422
+ this,
423
+ "getAmount0ForLiquidity",
424
+ params
425
+ );
426
+ },
427
+ mulDiv: async (
428
+ params: LiquidityAmountsTestTypes.SignExecuteMethodParams<"mulDiv">
429
+ ): Promise<LiquidityAmountsTestTypes.SignExecuteMethodResult<"mulDiv">> => {
430
+ return signExecuteMethod(LiquidityAmountsTest, this, "mulDiv", params);
431
+ },
432
+ mulDivRoundingUp: async (
433
+ params: LiquidityAmountsTestTypes.SignExecuteMethodParams<"mulDivRoundingUp">
434
+ ): Promise<
435
+ LiquidityAmountsTestTypes.SignExecuteMethodResult<"mulDivRoundingUp">
436
+ > => {
437
+ return signExecuteMethod(
438
+ LiquidityAmountsTest,
439
+ this,
440
+ "mulDivRoundingUp",
441
+ params
442
+ );
443
+ },
444
+ };
445
+
446
+ async multicall<Calls extends LiquidityAmountsTestTypes.MultiCallParams>(
447
+ calls: Calls
448
+ ): Promise<LiquidityAmountsTestTypes.MultiCallResults<Calls>>;
449
+ async multicall<Callss extends LiquidityAmountsTestTypes.MultiCallParams[]>(
450
+ callss: Narrow<Callss>
451
+ ): Promise<LiquidityAmountsTestTypes.MulticallReturnType<Callss>>;
452
+ async multicall<
453
+ Callss extends
454
+ | LiquidityAmountsTestTypes.MultiCallParams
455
+ | LiquidityAmountsTestTypes.MultiCallParams[]
456
+ >(callss: Callss): Promise<unknown> {
457
+ return await multicallMethods(
458
+ LiquidityAmountsTest,
459
+ this,
460
+ callss,
461
+ getContractByCodeHash
462
+ );
463
+ }
464
+ }