@paraswap/dex-lib 2.12.12-rfqtests.1 → 2.12.12

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 (105) hide show
  1. package/build/abi/augustus.json +375 -0
  2. package/build/abi/woo-fi-v2/IntegrationHelper.abi.json +116 -0
  3. package/build/abi/woo-fi-v2/WooOracleV2.abi.json +358 -0
  4. package/build/abi/woo-fi-v2/WooPPV2.abi.json +580 -0
  5. package/build/config.js +3 -3
  6. package/build/dex/aave-v3/tokens/arbitrum.json +20 -20
  7. package/build/dex/aave-v3/tokens/avalanche.json +44 -20
  8. package/build/dex/aave-v3/tokens/fantom.json +30 -30
  9. package/build/dex/aave-v3/tokens/optimism.json +18 -18
  10. package/build/dex/aave-v3/tokens/polygon.json +60 -42
  11. package/build/dex/generic-rfq/rate-fetcher.js +0 -1
  12. package/build/dex/generic-rfq/rate-fetcher.js.map +1 -1
  13. package/build/dex/generic-rfq/validators.d.ts +1 -1
  14. package/build/dex/generic-rfq/validators.js +26 -36
  15. package/build/dex/generic-rfq/validators.js.map +1 -1
  16. package/build/dex/hashflow/rate-fetcher.d.ts +14 -0
  17. package/build/dex/hashflow/rate-fetcher.js +37 -0
  18. package/build/dex/hashflow/rate-fetcher.js.map +1 -0
  19. package/build/dex/hashflow/validators.d.ts +3 -0
  20. package/build/dex/hashflow/validators.js +12 -0
  21. package/build/dex/hashflow/validators.js.map +1 -0
  22. package/build/dex/{test-aave-v3 → test-dex}/config.d.ts +1 -1
  23. package/build/dex/{test-aave-v3 → test-dex}/config.js +3 -3
  24. package/build/dex/test-dex/config.js.map +1 -0
  25. package/build/dex/{test-aave-v3/test-aave-v3-pool.d.ts → test-dex/test-dex-pool.d.ts} +3 -3
  26. package/build/dex/{test-aave-v3/test-aave-v3-pool.js → test-dex/test-dex-pool.js} +7 -7
  27. package/build/dex/test-dex/test-dex-pool.js.map +1 -0
  28. package/build/dex/{test-aave-v3/test-aave-v3.d.ts → test-dex/test-dex.d.ts} +8 -8
  29. package/build/dex/{test-aave-v3/test-aave-v3.js → test-dex/test-dex.js} +7 -7
  30. package/build/dex/test-dex/test-dex.js.map +1 -0
  31. package/build/dex/{test-aave-v3 → test-dex}/types.d.ts +1 -1
  32. package/build/dex/{test-aave-v3 → test-dex}/types.js.map +1 -1
  33. package/build/dex/uniswap-v3/config.js +13 -0
  34. package/build/dex/uniswap-v3/config.js.map +1 -1
  35. package/build/dex/woo-fi-v2/config.d.ts +4 -0
  36. package/build/dex/woo-fi-v2/config.js +87 -0
  37. package/build/dex/woo-fi-v2/config.js.map +1 -0
  38. package/build/dex/woo-fi-v2/constants.d.ts +5 -0
  39. package/build/dex/woo-fi-v2/constants.js +15 -0
  40. package/build/dex/woo-fi-v2/constants.js.map +1 -0
  41. package/build/dex/woo-fi-v2/decoders.d.ts +6 -0
  42. package/build/dex/woo-fi-v2/decoders.js +29 -0
  43. package/build/dex/woo-fi-v2/decoders.js.map +1 -0
  44. package/build/dex/woo-fi-v2/types.d.ts +41 -0
  45. package/build/dex/woo-fi-v2/types.js +3 -0
  46. package/build/dex/woo-fi-v2/types.js.map +1 -0
  47. package/build/dex/woo-fi-v2/utils.d.ts +2 -0
  48. package/build/dex/woo-fi-v2/utils.js +24 -0
  49. package/build/dex/woo-fi-v2/utils.js.map +1 -0
  50. package/build/dex/woo-fi-v2/woo-fi-math.d.ts +16 -0
  51. package/build/dex/woo-fi-v2/woo-fi-math.js +137 -0
  52. package/build/dex/woo-fi-v2/woo-fi-math.js.map +1 -0
  53. package/build/dex/woo-fi-v2/woo-fi-v2-math.d.ts +16 -0
  54. package/build/dex/woo-fi-v2/woo-fi-v2-math.js +137 -0
  55. package/build/dex/woo-fi-v2/woo-fi-v2-math.js.map +1 -0
  56. package/build/dex/woo-fi-v2/woo-fi-v2-pool.d.ts +12 -0
  57. package/build/dex/woo-fi-v2/woo-fi-v2-pool.js +79 -0
  58. package/build/dex/woo-fi-v2/woo-fi-v2-pool.js.map +1 -0
  59. package/build/dex/woo-fi-v2/woo-fi-v2.d.ts +52 -0
  60. package/build/dex/woo-fi-v2/woo-fi-v2.js +310 -0
  61. package/build/dex/woo-fi-v2/woo-fi-v2.js.map +1 -0
  62. package/build/lib/log-messages-suppressor.d.ts +30 -0
  63. package/build/lib/log-messages-suppressor.js +107 -0
  64. package/build/lib/log-messages-suppressor.js.map +1 -0
  65. package/build/lib/stateful-rpc-poller/state-polling-manager.d.ts +23 -0
  66. package/build/lib/stateful-rpc-poller/state-polling-manager.js +173 -0
  67. package/build/lib/stateful-rpc-poller/state-polling-manager.js.map +1 -0
  68. package/build/lib/stateful-rpc-poller/stateful-rpc-poller.d.ts +72 -0
  69. package/build/lib/stateful-rpc-poller/stateful-rpc-poller.js +369 -0
  70. package/build/lib/stateful-rpc-poller/stateful-rpc-poller.js.map +1 -0
  71. package/build/lib/stateful-rpc-poller/types.d.ts +35 -0
  72. package/build/lib/stateful-rpc-poller/types.js +10 -0
  73. package/build/lib/stateful-rpc-poller/types.js.map +1 -0
  74. package/build/lib/stateful-rpc-poller/utils.d.ts +4 -0
  75. package/build/lib/stateful-rpc-poller/utils.js +17 -0
  76. package/build/lib/stateful-rpc-poller/utils.js.map +1 -0
  77. package/build/lib/validators.d.ts +7 -0
  78. package/build/lib/validators.js +27 -0
  79. package/build/lib/validators.js.map +1 -0
  80. package/package.json +1 -1
  81. package/src/config.ts +3 -3
  82. package/src/dex/generic-rfq/generic-rfq-e2e.test.ts +71 -85
  83. package/src/dex/generic-rfq/rate-fetcher.ts +0 -1
  84. package/src/dex/generic-rfq/validators.test.ts +32 -6
  85. package/src/dex/generic-rfq/validators.ts +32 -57
  86. package/src/dex/uniswap-v3/config.ts +13 -0
  87. package/src/dex/uniswap-v3/uniswap-v3-e2e.test.ts +76 -0
  88. package/tests/constants-e2e.ts +0 -2
  89. package/tests/utils-e2e.ts +48 -59
  90. package/.idea/codeStyles/codeStyleConfig.xml +0 -5
  91. package/.idea/misc.xml +0 -6
  92. package/.idea/modules.xml +0 -8
  93. package/.idea/vcs.xml +0 -6
  94. package/.vscode/launch.json +0 -21
  95. package/build/dex/aave-v3/tokens/mainnet.json +0 -44
  96. package/build/dex/balancer-v2/VirtualBoostedPool.d.ts +0 -79
  97. package/build/dex/balancer-v2/VirtualBoostedPool.js +0 -382
  98. package/build/dex/balancer-v2/VirtualBoostedPool.js.map +0 -1
  99. package/build/dex/test-aave-v3/config.js.map +0 -1
  100. package/build/dex/test-aave-v3/test-aave-v3-pool.js.map +0 -1
  101. package/build/dex/test-aave-v3/test-aave-v3.js.map +0 -1
  102. package/src/dex/generic-rfq/generic-rfq-e2e-arbitrum.test.ts +0 -360
  103. package/src/dex/generic-rfq/generic-rfq-e2e-bsc.test.ts +0 -346
  104. package/src/dex/generic-rfq/generic-rfq-e2e-polygon.test.ts +0 -360
  105. /package/build/dex/{test-aave-v3 → test-dex}/types.js +0 -0
@@ -0,0 +1,358 @@
1
+ [
2
+ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" },
3
+ {
4
+ "anonymous": false,
5
+ "inputs": [
6
+ {
7
+ "indexed": true,
8
+ "internalType": "address",
9
+ "name": "previousOwner",
10
+ "type": "address"
11
+ },
12
+ {
13
+ "indexed": true,
14
+ "internalType": "address",
15
+ "name": "newOwner",
16
+ "type": "address"
17
+ }
18
+ ],
19
+ "name": "OwnershipTransferred",
20
+ "type": "event"
21
+ },
22
+ {
23
+ "inputs": [],
24
+ "name": "bound",
25
+ "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }],
26
+ "stateMutability": "view",
27
+ "type": "function"
28
+ },
29
+ {
30
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
31
+ "name": "clOracles",
32
+ "outputs": [
33
+ { "internalType": "address", "name": "oracle", "type": "address" },
34
+ { "internalType": "uint8", "name": "decimal", "type": "uint8" },
35
+ { "internalType": "bool", "name": "cloPreferred", "type": "bool" }
36
+ ],
37
+ "stateMutability": "view",
38
+ "type": "function"
39
+ },
40
+ {
41
+ "inputs": [
42
+ { "internalType": "address", "name": "base", "type": "address" }
43
+ ],
44
+ "name": "cloAddress",
45
+ "outputs": [
46
+ { "internalType": "address", "name": "clo", "type": "address" }
47
+ ],
48
+ "stateMutability": "view",
49
+ "type": "function"
50
+ },
51
+ {
52
+ "inputs": [
53
+ { "internalType": "address", "name": "base", "type": "address" }
54
+ ],
55
+ "name": "cloPrice",
56
+ "outputs": [
57
+ { "internalType": "uint256", "name": "", "type": "uint256" },
58
+ { "internalType": "uint256", "name": "", "type": "uint256" }
59
+ ],
60
+ "stateMutability": "view",
61
+ "type": "function"
62
+ },
63
+ {
64
+ "inputs": [
65
+ { "internalType": "address", "name": "base", "type": "address" }
66
+ ],
67
+ "name": "decimals",
68
+ "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],
69
+ "stateMutability": "view",
70
+ "type": "function"
71
+ },
72
+ {
73
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
74
+ "name": "infos",
75
+ "outputs": [
76
+ { "internalType": "uint128", "name": "price", "type": "uint128" },
77
+ { "internalType": "uint64", "name": "coeff", "type": "uint64" },
78
+ { "internalType": "uint64", "name": "spread", "type": "uint64" }
79
+ ],
80
+ "stateMutability": "view",
81
+ "type": "function"
82
+ },
83
+ {
84
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
85
+ "name": "isAdmin",
86
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
87
+ "stateMutability": "view",
88
+ "type": "function"
89
+ },
90
+ {
91
+ "inputs": [
92
+ { "internalType": "address", "name": "base", "type": "address" }
93
+ ],
94
+ "name": "isWoFeasible",
95
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
96
+ "stateMutability": "view",
97
+ "type": "function"
98
+ },
99
+ {
100
+ "inputs": [],
101
+ "name": "owner",
102
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
103
+ "stateMutability": "view",
104
+ "type": "function"
105
+ },
106
+ {
107
+ "inputs": [
108
+ { "internalType": "address", "name": "base", "type": "address" },
109
+ { "internalType": "uint128", "name": "newPrice", "type": "uint128" }
110
+ ],
111
+ "name": "postPrice",
112
+ "outputs": [],
113
+ "stateMutability": "nonpayable",
114
+ "type": "function"
115
+ },
116
+ {
117
+ "inputs": [
118
+ { "internalType": "address[]", "name": "bases", "type": "address[]" },
119
+ { "internalType": "uint128[]", "name": "newPrices", "type": "uint128[]" }
120
+ ],
121
+ "name": "postPriceList",
122
+ "outputs": [],
123
+ "stateMutability": "nonpayable",
124
+ "type": "function"
125
+ },
126
+ {
127
+ "inputs": [
128
+ { "internalType": "address", "name": "base", "type": "address" },
129
+ { "internalType": "uint64", "name": "newSpread", "type": "uint64" }
130
+ ],
131
+ "name": "postSpread",
132
+ "outputs": [],
133
+ "stateMutability": "nonpayable",
134
+ "type": "function"
135
+ },
136
+ {
137
+ "inputs": [
138
+ { "internalType": "address[]", "name": "bases", "type": "address[]" },
139
+ { "internalType": "uint64[]", "name": "newSpreads", "type": "uint64[]" }
140
+ ],
141
+ "name": "postSpreadList",
142
+ "outputs": [],
143
+ "stateMutability": "nonpayable",
144
+ "type": "function"
145
+ },
146
+ {
147
+ "inputs": [
148
+ { "internalType": "address", "name": "base", "type": "address" },
149
+ { "internalType": "uint128", "name": "newPrice", "type": "uint128" },
150
+ { "internalType": "uint64", "name": "newSpread", "type": "uint64" },
151
+ { "internalType": "uint64", "name": "newCoeff", "type": "uint64" }
152
+ ],
153
+ "name": "postState",
154
+ "outputs": [],
155
+ "stateMutability": "nonpayable",
156
+ "type": "function"
157
+ },
158
+ {
159
+ "inputs": [
160
+ { "internalType": "address[]", "name": "bases", "type": "address[]" },
161
+ { "internalType": "uint128[]", "name": "newPrices", "type": "uint128[]" },
162
+ { "internalType": "uint64[]", "name": "newSpreads", "type": "uint64[]" },
163
+ { "internalType": "uint64[]", "name": "newCoeffs", "type": "uint64[]" }
164
+ ],
165
+ "name": "postStateList",
166
+ "outputs": [],
167
+ "stateMutability": "nonpayable",
168
+ "type": "function"
169
+ },
170
+ {
171
+ "inputs": [
172
+ { "internalType": "address", "name": "base", "type": "address" }
173
+ ],
174
+ "name": "price",
175
+ "outputs": [
176
+ { "internalType": "uint256", "name": "priceOut", "type": "uint256" },
177
+ { "internalType": "bool", "name": "feasible", "type": "bool" }
178
+ ],
179
+ "stateMutability": "view",
180
+ "type": "function"
181
+ },
182
+ {
183
+ "inputs": [],
184
+ "name": "quoteToken",
185
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
186
+ "stateMutability": "view",
187
+ "type": "function"
188
+ },
189
+ {
190
+ "inputs": [],
191
+ "name": "renounceOwnership",
192
+ "outputs": [],
193
+ "stateMutability": "nonpayable",
194
+ "type": "function"
195
+ },
196
+ {
197
+ "inputs": [
198
+ { "internalType": "address", "name": "addr", "type": "address" },
199
+ { "internalType": "bool", "name": "flag", "type": "bool" }
200
+ ],
201
+ "name": "setAdmin",
202
+ "outputs": [],
203
+ "stateMutability": "nonpayable",
204
+ "type": "function"
205
+ },
206
+ {
207
+ "inputs": [
208
+ { "internalType": "uint64", "name": "_bound", "type": "uint64" }
209
+ ],
210
+ "name": "setBound",
211
+ "outputs": [],
212
+ "stateMutability": "nonpayable",
213
+ "type": "function"
214
+ },
215
+ {
216
+ "inputs": [
217
+ { "internalType": "address", "name": "token", "type": "address" },
218
+ { "internalType": "address", "name": "_oracle", "type": "address" },
219
+ { "internalType": "bool", "name": "_cloPreferred", "type": "bool" }
220
+ ],
221
+ "name": "setCLOracle",
222
+ "outputs": [],
223
+ "stateMutability": "nonpayable",
224
+ "type": "function"
225
+ },
226
+ {
227
+ "inputs": [
228
+ { "internalType": "address", "name": "token", "type": "address" },
229
+ { "internalType": "bool", "name": "_cloPreferred", "type": "bool" }
230
+ ],
231
+ "name": "setCloPreferred",
232
+ "outputs": [],
233
+ "stateMutability": "nonpayable",
234
+ "type": "function"
235
+ },
236
+ {
237
+ "inputs": [
238
+ { "internalType": "address", "name": "_quote", "type": "address" },
239
+ { "internalType": "address", "name": "_oracle", "type": "address" }
240
+ ],
241
+ "name": "setQuoteToken",
242
+ "outputs": [],
243
+ "stateMutability": "nonpayable",
244
+ "type": "function"
245
+ },
246
+ {
247
+ "inputs": [
248
+ {
249
+ "internalType": "uint256",
250
+ "name": "newStaleDuration",
251
+ "type": "uint256"
252
+ }
253
+ ],
254
+ "name": "setStaleDuration",
255
+ "outputs": [],
256
+ "stateMutability": "nonpayable",
257
+ "type": "function"
258
+ },
259
+ {
260
+ "inputs": [],
261
+ "name": "staleDuration",
262
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
263
+ "stateMutability": "view",
264
+ "type": "function"
265
+ },
266
+ {
267
+ "inputs": [
268
+ { "internalType": "address", "name": "base", "type": "address" }
269
+ ],
270
+ "name": "state",
271
+ "outputs": [
272
+ {
273
+ "components": [
274
+ { "internalType": "uint128", "name": "price", "type": "uint128" },
275
+ { "internalType": "uint64", "name": "spread", "type": "uint64" },
276
+ { "internalType": "uint64", "name": "coeff", "type": "uint64" },
277
+ { "internalType": "bool", "name": "woFeasible", "type": "bool" }
278
+ ],
279
+ "internalType": "struct IWooracleV2.State",
280
+ "name": "",
281
+ "type": "tuple"
282
+ }
283
+ ],
284
+ "stateMutability": "view",
285
+ "type": "function"
286
+ },
287
+ {
288
+ "inputs": [],
289
+ "name": "timestamp",
290
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
291
+ "stateMutability": "view",
292
+ "type": "function"
293
+ },
294
+ {
295
+ "inputs": [
296
+ { "internalType": "address", "name": "newOwner", "type": "address" }
297
+ ],
298
+ "name": "transferOwnership",
299
+ "outputs": [],
300
+ "stateMutability": "nonpayable",
301
+ "type": "function"
302
+ },
303
+ {
304
+ "inputs": [
305
+ { "internalType": "address", "name": "base", "type": "address" }
306
+ ],
307
+ "name": "woCoeff",
308
+ "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }],
309
+ "stateMutability": "view",
310
+ "type": "function"
311
+ },
312
+ {
313
+ "inputs": [
314
+ { "internalType": "address", "name": "base", "type": "address" }
315
+ ],
316
+ "name": "woPrice",
317
+ "outputs": [
318
+ { "internalType": "uint128", "name": "priceOut", "type": "uint128" },
319
+ {
320
+ "internalType": "uint256",
321
+ "name": "priceTimestampOut",
322
+ "type": "uint256"
323
+ }
324
+ ],
325
+ "stateMutability": "view",
326
+ "type": "function"
327
+ },
328
+ {
329
+ "inputs": [
330
+ { "internalType": "address", "name": "base", "type": "address" }
331
+ ],
332
+ "name": "woSpread",
333
+ "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }],
334
+ "stateMutability": "view",
335
+ "type": "function"
336
+ },
337
+ {
338
+ "inputs": [
339
+ { "internalType": "address", "name": "base", "type": "address" }
340
+ ],
341
+ "name": "woState",
342
+ "outputs": [
343
+ {
344
+ "components": [
345
+ { "internalType": "uint128", "name": "price", "type": "uint128" },
346
+ { "internalType": "uint64", "name": "spread", "type": "uint64" },
347
+ { "internalType": "uint64", "name": "coeff", "type": "uint64" },
348
+ { "internalType": "bool", "name": "woFeasible", "type": "bool" }
349
+ ],
350
+ "internalType": "struct IWooracleV2.State",
351
+ "name": "",
352
+ "type": "tuple"
353
+ }
354
+ ],
355
+ "stateMutability": "view",
356
+ "type": "function"
357
+ }
358
+ ]