@pancakeswap/v3-sdk 2.0.0 → 3.0.0

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 (56) hide show
  1. package/dist/abi/MasterChefV3.d.ts +1222 -0
  2. package/dist/abi/MasterChefV3.d.ts.map +1 -0
  3. package/dist/abi/NonfungiblePositionManager.d.ts +962 -0
  4. package/dist/abi/NonfungiblePositionManager.d.ts.map +1 -0
  5. package/dist/abi/PeripheryPaymentsWithFee.d.ts +88 -0
  6. package/dist/abi/PeripheryPaymentsWithFee.d.ts.map +1 -0
  7. package/dist/abi/Quoter.d.ts +162 -0
  8. package/dist/abi/Quoter.d.ts.map +1 -0
  9. package/dist/abi/QuoterV2.d.ts +220 -0
  10. package/dist/abi/QuoterV2.d.ts.map +1 -0
  11. package/dist/abi/SelfPermit.d.ts +122 -0
  12. package/dist/abi/SelfPermit.d.ts.map +1 -0
  13. package/dist/abi/SwapRouter.d.ts +453 -0
  14. package/dist/abi/SwapRouter.d.ts.map +1 -0
  15. package/dist/abi/V3Staker.d.ts +547 -0
  16. package/dist/abi/V3Staker.d.ts.map +1 -0
  17. package/dist/constants.d.ts.map +1 -1
  18. package/dist/entities/pool.d.ts +2 -1
  19. package/dist/entities/pool.d.ts.map +1 -1
  20. package/dist/entities/tick.d.ts.map +1 -1
  21. package/dist/index.d.ts +8 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +1447 -1359
  24. package/dist/index.mjs +1447 -1367
  25. package/dist/masterchefV3.d.ts +1228 -9
  26. package/dist/masterchefV3.d.ts.map +1 -1
  27. package/dist/multicall.d.ts +16 -3
  28. package/dist/multicall.d.ts.map +1 -1
  29. package/dist/nonfungiblePositionManager.d.ts +976 -10
  30. package/dist/nonfungiblePositionManager.d.ts.map +1 -1
  31. package/dist/payments.d.ts +95 -6
  32. package/dist/payments.d.ts.map +1 -1
  33. package/dist/quoter.d.ts +385 -4
  34. package/dist/quoter.d.ts.map +1 -1
  35. package/dist/selfPermit.d.ts +128 -8
  36. package/dist/selfPermit.d.ts.map +1 -1
  37. package/dist/staker.d.ts +549 -3
  38. package/dist/staker.d.ts.map +1 -1
  39. package/dist/swapRouter.d.ts +452 -2
  40. package/dist/swapRouter.d.ts.map +1 -1
  41. package/dist/utils/calldata.d.ts +4 -3
  42. package/dist/utils/calldata.d.ts.map +1 -1
  43. package/dist/utils/computePoolAddress.d.ts +4 -3
  44. package/dist/utils/computePoolAddress.d.ts.map +1 -1
  45. package/dist/utils/encodeRouteToPath.d.ts +3 -2
  46. package/dist/utils/encodeRouteToPath.d.ts.map +1 -1
  47. package/dist/utils/encodeSqrtRatioX96.d.ts +1 -1
  48. package/dist/utils/encodeSqrtRatioX96.d.ts.map +1 -1
  49. package/dist/utils/feeCalculator.d.ts +1 -1
  50. package/dist/utils/feeCalculator.d.ts.map +1 -1
  51. package/dist/utils/parseProtocolFees.d.ts +1 -1
  52. package/dist/utils/parseProtocolFees.d.ts.map +1 -1
  53. package/dist/utils/positionMath.d.ts.map +1 -1
  54. package/dist/utils/priceTickConversions.d.ts +1 -1
  55. package/dist/utils/priceTickConversions.d.ts.map +1 -1
  56. package/package.json +6 -15
@@ -1 +1 @@
1
- {"version":3,"file":"nonfungiblePositionManager.d.ts","sourceRoot":"","sources":["../src/nonfungiblePositionManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EAEP,cAAc,EACd,QAAQ,EACR,cAAc,EAEf,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE9C,OAAO,EAAE,gBAAgB,EAAS,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAc,MAAM,cAAc,CAAA;AAExD,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAIjC,eAAO,MAAM,UAAU,QAAyB,CAAA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;;OAKG;WACW,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,sBAAsB,GAAG,gBAAgB;WAqF3F,0BAA0B,CAAC,OAAO,EAAE,mBAAmB,GAAG,gBAAgB;CAuBzF"}
@@ -1,5 +1,5 @@
1
- import { Interface } from '@ethersproject/abi';
2
1
  import { Percent, Token } from '@pancakeswap/sdk';
2
+ import { Address } from 'viem';
3
3
  export interface FeeOptions {
4
4
  /**
5
5
  * The percent of the output that will be taken as a fee.
@@ -8,17 +8,106 @@ export interface FeeOptions {
8
8
  /**
9
9
  * The recipient of the fee.
10
10
  */
11
- recipient: string;
11
+ recipient: Address;
12
12
  }
13
13
  export declare abstract class Payments {
14
- static INTERFACE: Interface;
14
+ static ABI: readonly [{
15
+ readonly inputs: readonly [];
16
+ readonly name: "refundETH";
17
+ readonly outputs: readonly [];
18
+ readonly stateMutability: "payable";
19
+ readonly type: "function";
20
+ }, {
21
+ readonly inputs: readonly [{
22
+ readonly internalType: "address";
23
+ readonly name: "token";
24
+ readonly type: "address";
25
+ }, {
26
+ readonly internalType: "uint256";
27
+ /**
28
+ * The recipient of the fee.
29
+ */
30
+ readonly name: "amountMinimum";
31
+ readonly type: "uint256";
32
+ }, {
33
+ readonly internalType: "address";
34
+ readonly name: "recipient";
35
+ readonly type: "address";
36
+ }];
37
+ readonly name: "sweepToken";
38
+ readonly outputs: readonly [];
39
+ readonly stateMutability: "payable";
40
+ readonly type: "function";
41
+ }, {
42
+ readonly inputs: readonly [{
43
+ readonly internalType: "address";
44
+ readonly name: "token";
45
+ readonly type: "address";
46
+ }, {
47
+ readonly internalType: "uint256";
48
+ readonly name: "amountMinimum";
49
+ readonly type: "uint256";
50
+ }, {
51
+ readonly internalType: "address";
52
+ readonly name: "recipient";
53
+ readonly type: "address";
54
+ }, {
55
+ readonly internalType: "uint256";
56
+ readonly name: "feeBips";
57
+ readonly type: "uint256";
58
+ }, {
59
+ readonly internalType: "address";
60
+ readonly name: "feeRecipient";
61
+ readonly type: "address";
62
+ }];
63
+ readonly name: "sweepTokenWithFee";
64
+ readonly outputs: readonly [];
65
+ readonly stateMutability: "payable";
66
+ readonly type: "function";
67
+ }, {
68
+ readonly inputs: readonly [{
69
+ readonly internalType: "uint256";
70
+ readonly name: "amountMinimum";
71
+ readonly type: "uint256";
72
+ }, {
73
+ readonly internalType: "address";
74
+ readonly name: "recipient";
75
+ readonly type: "address";
76
+ }];
77
+ readonly name: "unwrapWETH9";
78
+ readonly outputs: readonly [];
79
+ readonly stateMutability: "payable";
80
+ readonly type: "function";
81
+ }, {
82
+ readonly inputs: readonly [{
83
+ readonly internalType: "uint256";
84
+ readonly name: "amountMinimum";
85
+ readonly type: "uint256";
86
+ }, {
87
+ readonly internalType: "address";
88
+ readonly name: "recipient";
89
+ readonly type: "address";
90
+ }, {
91
+ readonly internalType: "uint256";
92
+ readonly name: "feeBips";
93
+ readonly type: "uint256";
94
+ }, {
95
+ readonly internalType: "address";
96
+ readonly name: "feeRecipient";
97
+ readonly type: "address";
98
+ }];
99
+ readonly name: "unwrapWETH9WithFee";
100
+ readonly outputs: readonly [];
101
+ readonly stateMutability: "payable";
102
+ readonly type: "function";
103
+ }];
15
104
  /**
16
105
  * Cannot be constructed.
17
106
  */
18
107
  private constructor();
19
108
  private static encodeFeeBips;
20
- static encodeUnwrapWETH9(amountMinimum: bigint, recipient: string, feeOptions?: FeeOptions): string;
21
- static encodeSweepToken(token: Token, amountMinimum: bigint, recipient: string, feeOptions?: FeeOptions): string;
22
- static encodeRefundETH(): string;
109
+ static encodeUnwrapWETH9(amountMinimum: bigint, recipient: Address, feeOptions?: FeeOptions): `0x${string}`;
110
+ static encodeSweepToken(token: Token, amountMinimum: bigint, recipient: Address, feeOptions?: FeeOptions): `0x${string}`;
111
+ static encodeRefundETH(): `0x${string}`;
23
112
  }
24
113
  //# sourceMappingURL=payments.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payments.d.ts","sourceRoot":"","sources":["../src/payments.ts"],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,CAAC,EAAE,UAAU,GAAG,KAAK,MAAM,EAAE;WAiBpG,gBAAgB,CAC5B,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,OAAO,EAClB,UAAU,CAAC,EAAE,UAAU,GACtB,KAAK,MAAM,EAAE;WAqBF,eAAe,IAAI,KAAK,MAAM,EAAE;CAG/C"}
package/dist/quoter.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { Interface } from '@ethersproject/abi';
2
- import { BigintIsh, Currency, CurrencyAmount, TradeType } from '@pancakeswap/sdk';
1
+ import { BigintIsh, Currency, CurrencyAmount, TradeType } from '@pancakeswap/swap-sdk-core';
3
2
  import { Route } from './entities';
4
3
  import { MethodParameters } from './utils';
5
4
  /**
@@ -20,8 +19,390 @@ export interface QuoteOptions {
20
19
  * calldata needed to call the quoter contract.
21
20
  */
22
21
  export declare abstract class SwapQuoter {
23
- static V1INTERFACE: Interface;
24
- static V2INTERFACE: Interface;
22
+ static V1ABI: readonly [{
23
+ readonly inputs: readonly [{
24
+ readonly internalType: "address";
25
+ readonly name: "_deployer";
26
+ readonly type: "address";
27
+ }, {
28
+ readonly internalType: "address";
29
+ readonly name: "_factory";
30
+ readonly type: "address";
31
+ }, {
32
+ readonly internalType: "address";
33
+ readonly name: "_WETH9";
34
+ readonly type: "address";
35
+ }];
36
+ readonly stateMutability: "nonpayable";
37
+ readonly type: "constructor";
38
+ }, {
39
+ readonly inputs: readonly [];
40
+ readonly name: "WETH9";
41
+ readonly outputs: readonly [{
42
+ readonly internalType: "address";
43
+ readonly name: "";
44
+ readonly type: "address";
45
+ }];
46
+ readonly stateMutability: "view";
47
+ readonly type: "function";
48
+ }, {
49
+ readonly inputs: readonly [];
50
+ readonly name: "deployer";
51
+ readonly outputs: readonly [{
52
+ readonly internalType: "address";
53
+ readonly name: "";
54
+ readonly type: "address";
55
+ }];
56
+ readonly stateMutability: "view";
57
+ readonly type: "function";
58
+ }, {
59
+ readonly inputs: readonly [];
60
+ readonly name: "factory";
61
+ readonly outputs: readonly [{
62
+ readonly internalType: "address";
63
+ readonly name: "";
64
+ readonly type: "address";
65
+ }];
66
+ readonly stateMutability: "view";
67
+ readonly type: "function";
68
+ }, {
69
+ readonly inputs: readonly [{
70
+ readonly internalType: "int256";
71
+ readonly name: "amount0Delta";
72
+ readonly type: "int256";
73
+ }, {
74
+ readonly internalType: "int256";
75
+ readonly name: "amount1Delta";
76
+ readonly type: "int256";
77
+ }, {
78
+ readonly internalType: "bytes";
79
+ readonly name: "path";
80
+ readonly type: "bytes";
81
+ }];
82
+ readonly name: "pancakeV3SwapCallback";
83
+ readonly outputs: readonly [];
84
+ readonly stateMutability: "view";
85
+ readonly type: "function";
86
+ }, {
87
+ readonly inputs: readonly [{
88
+ readonly internalType: "bytes";
89
+ readonly name: "path";
90
+ readonly type: "bytes";
91
+ }, {
92
+ readonly internalType: "uint256";
93
+ readonly name: "amountIn";
94
+ readonly type: "uint256";
95
+ }];
96
+ readonly name: "quoteExactInput";
97
+ readonly outputs: readonly [{
98
+ readonly internalType: "uint256";
99
+ readonly name: "amountOut";
100
+ readonly type: "uint256";
101
+ }];
102
+ readonly stateMutability: "nonpayable";
103
+ readonly type: "function";
104
+ }, {
105
+ readonly inputs: readonly [{
106
+ readonly internalType: "address";
107
+ readonly name: "tokenIn";
108
+ readonly type: "address";
109
+ }, {
110
+ readonly internalType: "address";
111
+ readonly name: "tokenOut";
112
+ readonly type: "address";
113
+ }, {
114
+ readonly internalType: "uint24";
115
+ readonly name: "fee";
116
+ readonly type: "uint24";
117
+ }, {
118
+ readonly internalType: "uint256";
119
+ readonly name: "amountIn";
120
+ readonly type: "uint256";
121
+ }, {
122
+ readonly internalType: "uint160";
123
+ readonly name: "sqrtPriceLimitX96";
124
+ readonly type: "uint160";
125
+ }];
126
+ readonly name: "quoteExactInputSingle";
127
+ readonly outputs: readonly [{
128
+ readonly internalType: "uint256";
129
+ readonly name: "amountOut";
130
+ readonly type: "uint256";
131
+ }];
132
+ readonly stateMutability: "nonpayable";
133
+ readonly type: "function";
134
+ }, {
135
+ readonly inputs: readonly [{
136
+ readonly internalType: "bytes";
137
+ readonly name: "path";
138
+ readonly type: "bytes";
139
+ }, {
140
+ readonly internalType: "uint256";
141
+ readonly name: "amountOut";
142
+ readonly type: "uint256";
143
+ }];
144
+ readonly name: "quoteExactOutput";
145
+ readonly outputs: readonly [{
146
+ readonly internalType: "uint256";
147
+ readonly name: "amountIn";
148
+ readonly type: "uint256";
149
+ }];
150
+ readonly stateMutability: "nonpayable";
151
+ readonly type: "function";
152
+ }, {
153
+ readonly inputs: readonly [{
154
+ readonly internalType: "address";
155
+ readonly name: "tokenIn";
156
+ readonly type: "address";
157
+ }, {
158
+ readonly internalType: "address";
159
+ readonly name: "tokenOut";
160
+ readonly type: "address";
161
+ }, {
162
+ readonly internalType: "uint24";
163
+ readonly name: "fee";
164
+ readonly type: "uint24";
165
+ }, {
166
+ readonly internalType: "uint256";
167
+ readonly name: "amountOut";
168
+ readonly type: "uint256";
169
+ }, {
170
+ readonly internalType: "uint160";
171
+ readonly name: "sqrtPriceLimitX96";
172
+ readonly type: "uint160";
173
+ }];
174
+ readonly name: "quoteExactOutputSingle";
175
+ readonly outputs: readonly [{
176
+ readonly internalType: "uint256";
177
+ readonly name: "amountIn";
178
+ readonly type: "uint256";
179
+ }];
180
+ readonly stateMutability: "nonpayable";
181
+ readonly type: "function";
182
+ }];
183
+ static V2ABI: readonly [{
184
+ readonly inputs: readonly [{
185
+ readonly internalType: "address";
186
+ readonly name: "_deployer";
187
+ readonly type: "address";
188
+ }, {
189
+ readonly internalType: "address";
190
+ readonly name: "_factory";
191
+ readonly type: "address";
192
+ }, {
193
+ readonly internalType: "address";
194
+ readonly name: "_WETH9";
195
+ readonly type: "address";
196
+ }];
197
+ readonly stateMutability: "nonpayable";
198
+ readonly type: "constructor";
199
+ }, {
200
+ readonly inputs: readonly [];
201
+ readonly name: "WETH9";
202
+ readonly outputs: readonly [{
203
+ readonly internalType: "address";
204
+ readonly name: "";
205
+ readonly type: "address";
206
+ }];
207
+ readonly stateMutability: "view";
208
+ readonly type: "function";
209
+ }, {
210
+ readonly inputs: readonly [];
211
+ readonly name: "deployer";
212
+ readonly outputs: readonly [{
213
+ readonly internalType: "address";
214
+ readonly name: "";
215
+ readonly type: "address";
216
+ }];
217
+ /**
218
+ * Represents the Pancake V3 QuoterV1 contract with a method for returning the formatted
219
+ * calldata needed to call the quoter contract.
220
+ */
221
+ readonly stateMutability: "view";
222
+ readonly type: "function";
223
+ }, {
224
+ readonly inputs: readonly [];
225
+ readonly name: "factory";
226
+ readonly outputs: readonly [{
227
+ readonly internalType: "address";
228
+ readonly name: "";
229
+ readonly type: "address";
230
+ }];
231
+ readonly stateMutability: "view";
232
+ readonly type: "function";
233
+ }, {
234
+ readonly inputs: readonly [{
235
+ readonly internalType: "int256";
236
+ readonly name: "amount0Delta";
237
+ readonly type: "int256";
238
+ }, {
239
+ readonly internalType: "int256";
240
+ readonly name: "amount1Delta";
241
+ readonly type: "int256";
242
+ }, {
243
+ readonly internalType: "bytes";
244
+ readonly name: "path";
245
+ readonly type: "bytes";
246
+ }];
247
+ readonly name: "pancakeV3SwapCallback";
248
+ readonly outputs: readonly [];
249
+ readonly stateMutability: "view";
250
+ readonly type: "function";
251
+ }, {
252
+ readonly inputs: readonly [{
253
+ readonly internalType: "bytes";
254
+ readonly name: "path";
255
+ readonly type: "bytes";
256
+ }, {
257
+ readonly internalType: "uint256";
258
+ readonly name: "amountIn";
259
+ readonly type: "uint256";
260
+ }];
261
+ readonly name: "quoteExactInput";
262
+ readonly outputs: readonly [{
263
+ readonly internalType: "uint256";
264
+ readonly name: "amountOut";
265
+ readonly type: "uint256";
266
+ }, {
267
+ readonly internalType: "uint160[]";
268
+ readonly name: "sqrtPriceX96AfterList";
269
+ readonly type: "uint160[]";
270
+ }, {
271
+ readonly internalType: "uint32[]";
272
+ readonly name: "initializedTicksCrossedList";
273
+ readonly type: "uint32[]";
274
+ }, {
275
+ readonly internalType: "uint256";
276
+ readonly name: "gasEstimate";
277
+ readonly type: "uint256";
278
+ }];
279
+ readonly stateMutability: "nonpayable";
280
+ readonly type: "function";
281
+ }, {
282
+ readonly inputs: readonly [{
283
+ readonly components: readonly [{
284
+ readonly internalType: "address";
285
+ readonly name: "tokenIn";
286
+ readonly type: "address";
287
+ }, {
288
+ readonly internalType: "address";
289
+ readonly name: "tokenOut";
290
+ readonly type: "address";
291
+ }, {
292
+ readonly internalType: "uint256";
293
+ readonly name: "amountIn";
294
+ readonly type: "uint256";
295
+ }, {
296
+ readonly internalType: "uint24";
297
+ readonly name: "fee";
298
+ readonly type: "uint24";
299
+ }, {
300
+ readonly internalType: "uint160";
301
+ readonly name: "sqrtPriceLimitX96";
302
+ readonly type: "uint160";
303
+ }];
304
+ readonly internalType: "struct IQuoterV2.QuoteExactInputSingleParams";
305
+ readonly name: "params";
306
+ readonly type: "tuple";
307
+ }];
308
+ readonly name: "quoteExactInputSingle";
309
+ readonly outputs: readonly [{
310
+ readonly internalType: "uint256";
311
+ readonly name: "amountOut";
312
+ readonly type: "uint256";
313
+ }, {
314
+ readonly internalType: "uint160";
315
+ readonly name: "sqrtPriceX96After";
316
+ readonly type: "uint160";
317
+ }, {
318
+ readonly internalType: "uint32";
319
+ readonly name: "initializedTicksCrossed";
320
+ readonly type: "uint32";
321
+ }, {
322
+ readonly internalType: "uint256";
323
+ readonly name: "gasEstimate";
324
+ readonly type: "uint256";
325
+ }];
326
+ readonly stateMutability: "nonpayable";
327
+ readonly type: "function";
328
+ }, {
329
+ readonly inputs: readonly [{
330
+ readonly internalType: "bytes";
331
+ readonly name: "path";
332
+ readonly type: "bytes";
333
+ }, {
334
+ readonly internalType: "uint256";
335
+ readonly name: "amountOut";
336
+ readonly type: "uint256";
337
+ }];
338
+ readonly name: "quoteExactOutput";
339
+ readonly outputs: readonly [{
340
+ readonly internalType: "uint256";
341
+ readonly name: "amountIn";
342
+ readonly type: "uint256";
343
+ }, {
344
+ readonly internalType: "uint160[]";
345
+ readonly name: "sqrtPriceX96AfterList";
346
+ readonly type: "uint160[]";
347
+ }, {
348
+ readonly internalType: "uint32[]";
349
+ readonly name: "initializedTicksCrossedList";
350
+ readonly type: "uint32[]";
351
+ }, {
352
+ readonly internalType: "uint256";
353
+ readonly name: "gasEstimate";
354
+ readonly type: "uint256";
355
+ }];
356
+ readonly stateMutability: "nonpayable";
357
+ readonly type: "function";
358
+ }, {
359
+ readonly inputs: readonly [{
360
+ readonly components: readonly [{
361
+ readonly internalType: "address";
362
+ readonly name: "tokenIn";
363
+ readonly type: "address";
364
+ }, {
365
+ readonly internalType: "address";
366
+ readonly name: "tokenOut";
367
+ readonly type: "address";
368
+ }, {
369
+ readonly internalType: "uint256";
370
+ readonly name: "amount";
371
+ readonly type: "uint256";
372
+ }, {
373
+ readonly internalType: "uint24";
374
+ readonly name: "fee";
375
+ readonly type: "uint24";
376
+ }, {
377
+ readonly internalType: "uint160";
378
+ readonly name: "sqrtPriceLimitX96";
379
+ readonly type: "uint160";
380
+ }];
381
+ readonly internalType: "struct IQuoterV2.QuoteExactOutputSingleParams";
382
+ readonly name: "params";
383
+ readonly type: "tuple";
384
+ }];
385
+ readonly name: "quoteExactOutputSingle";
386
+ readonly outputs: readonly [{
387
+ readonly internalType: "uint256";
388
+ readonly name: "amountIn";
389
+ readonly type: "uint256";
390
+ }, {
391
+ readonly internalType: "uint160";
392
+ readonly name: "sqrtPriceX96After";
393
+ readonly type: "uint160";
394
+ }, {
395
+ readonly internalType: "uint32";
396
+ readonly name: "initializedTicksCrossed";
397
+ readonly type: "uint32";
398
+ }, {
399
+ readonly internalType: "uint256";
400
+ readonly name: "gasEstimate";
401
+ readonly type: "uint256";
402
+ }];
403
+ readonly stateMutability: "nonpayable";
404
+ readonly type: "function";
405
+ }];
25
406
  /**
26
407
  * Produces the on-chain method name of the appropriate function within QuoterV2,
27
408
  * and the relevant hex encoded parameters.
@@ -1 +1 @@
1
- {"version":3,"file":"quoter.d.ts","sourceRoot":"","sources":["../src/quoter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAIjF,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAqB,gBAAgB,EAAS,MAAM,SAAS,CAAA;AAGpE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAA;IAE7B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AASD;;;GAGG;AACH,8BAAsB,UAAU;IAC9B,OAAc,WAAW,EAAE,SAAS,CAAyB;IAE7D,OAAc,WAAW,EAAE,SAAS,CAA2B;IAE/D;;;;;;;;;;OAUG;WACW,mBAAmB,CAAC,MAAM,SAAS,QAAQ,EAAE,OAAO,SAAS,QAAQ,EACjF,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,cAAc,CAAC,MAAM,GAAG,OAAO,CAAC,EACxC,SAAS,EAAE,SAAS,EACpB,OAAO,GAAE,YAAiB,GACzB,gBAAgB;CA6CpB"}
1
+ {"version":3,"file":"quoter.d.ts","sourceRoot":"","sources":["../src/quoter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAA;AAI3F,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAqB,gBAAgB,EAAS,MAAM,SAAS,CAAA;AAGpE;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAA;IAE7B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AASD;;;GAGG;AACH,8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