@paraswap/dex-lib 2.13.0 → 2.14.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 (74) hide show
  1. package/build/config.js +5 -23
  2. package/build/config.js.map +1 -1
  3. package/build/dex/curve-v1/config.js +0 -2
  4. package/build/dex/curve-v1/config.js.map +1 -1
  5. package/build/dex/curve-v1/curve-v1.js +0 -2
  6. package/build/dex/curve-v1/curve-v1.js.map +1 -1
  7. package/build/dex/curve-v1/types.d.ts +0 -1
  8. package/build/dex/curve-v1/types.js.map +1 -1
  9. package/build/dex/index.js +2 -2
  10. package/build/dex/index.js.map +1 -1
  11. package/build/dex/simple-exchange.d.ts +0 -1
  12. package/build/dex/simple-exchange.js +1 -3
  13. package/build/dex/simple-exchange.js.map +1 -1
  14. package/build/lib/decoders.d.ts +1 -2
  15. package/build/lib/decoders.js +1 -8
  16. package/build/lib/decoders.js.map +1 -1
  17. package/build/lib/multi-wrapper.d.ts +1 -2
  18. package/build/lib/multi-wrapper.js.map +1 -1
  19. package/build/lib/tokens/balancer-fetcher.js +5 -4
  20. package/build/lib/tokens/balancer-fetcher.js.map +1 -1
  21. package/build/lib/tokens/utils.d.ts +2 -2
  22. package/build/lib/tokens/utils.js +1 -1
  23. package/build/lib/tokens/utils.js.map +1 -1
  24. package/build/types.d.ts +0 -3
  25. package/dex-template/__DexName__-e2e.test.ts.template +0 -1
  26. package/dex-template/__DexName__-events.test.ts.template +0 -1
  27. package/dex-template/__DexName__-integration.test.ts.template +0 -1
  28. package/dex-template/__DexName__-pool.ts.template +5 -8
  29. package/package.json +1 -1
  30. package/scripts/generate-bytecode.ts +0 -2
  31. package/src/abi/woo-fi/WooFeeManager.abi.json +318 -0
  32. package/src/abi/{woo-fi-v2/WooPPV2.abi.json → woo-fi/WooPP.abi.json} +169 -201
  33. package/src/abi/{woo-fi-v2/WooOracleV2.abi.json → woo-fi/Wooracle.abi.json} +50 -148
  34. package/src/config.ts +5 -27
  35. package/src/dex/balancer-v2/balancer-v2-e2e.test.ts +1 -0
  36. package/src/dex/curve-v1/config.ts +0 -2
  37. package/src/dex/curve-v1/curve-v1-e2e.test.ts +37 -18
  38. package/src/dex/curve-v1/curve-v1.ts +0 -2
  39. package/src/dex/curve-v1/types.ts +0 -1
  40. package/src/dex/index.ts +2 -2
  41. package/src/dex/simple-exchange.ts +1 -4
  42. package/src/dex/woo-fi/config.ts +141 -0
  43. package/src/dex/woo-fi/constants.ts +21 -0
  44. package/src/dex/woo-fi/types.ts +55 -0
  45. package/src/dex/woo-fi/woo-fi-decimal-math.ts +45 -0
  46. package/src/dex/woo-fi/woo-fi-e2e.test.ts +183 -0
  47. package/src/dex/woo-fi/woo-fi-integration.test.ts +416 -0
  48. package/src/dex/woo-fi/woo-fi-math.ts +527 -0
  49. package/src/dex/woo-fi/woo-fi.ts +693 -0
  50. package/src/lib/decoders.ts +1 -12
  51. package/src/lib/multi-wrapper.ts +1 -2
  52. package/src/lib/tokens/balancer-fetcher.ts +6 -5
  53. package/src/lib/tokens/utils.ts +3 -5
  54. package/src/types.ts +0 -4
  55. package/tests/constants-e2e.ts +9 -9
  56. package/tests/tenderly-simulation.ts +1 -1
  57. package/tests/utils-e2e.ts +0 -2
  58. package/tests/utils.ts +0 -2
  59. package/src/abi/woo-fi-v2/IntegrationHelper.abi.json +0 -116
  60. package/src/dex/woo-fi-v2/config.ts +0 -87
  61. package/src/dex/woo-fi-v2/constants.ts +0 -22
  62. package/src/dex/woo-fi-v2/decoders.ts +0 -45
  63. package/src/dex/woo-fi-v2/types.ts +0 -63
  64. package/src/dex/woo-fi-v2/utils.ts +0 -19
  65. package/src/dex/woo-fi-v2/woo-fi-v2-e2e.test.ts +0 -216
  66. package/src/dex/woo-fi-v2/woo-fi-v2-integration.test.ts +0 -495
  67. package/src/dex/woo-fi-v2/woo-fi-v2-math.ts +0 -195
  68. package/src/dex/woo-fi-v2/woo-fi-v2-pool.ts +0 -112
  69. package/src/dex/woo-fi-v2/woo-fi-v2.ts +0 -487
  70. package/src/lib/log-messages-suppressor.ts +0 -173
  71. package/src/lib/stateful-rpc-poller/state-polling-manager.ts +0 -320
  72. package/src/lib/stateful-rpc-poller/stateful-rpc-poller.ts +0 -604
  73. package/src/lib/stateful-rpc-poller/types.ts +0 -66
  74. package/src/lib/stateful-rpc-poller/utils.ts +0 -23
@@ -1,7 +1,10 @@
1
1
  [
2
2
  {
3
3
  "inputs": [
4
- { "internalType": "address", "name": "_quoteToken", "type": "address" }
4
+ { "internalType": "address", "name": "newQuoteToken", "type": "address" },
5
+ { "internalType": "address", "name": "newWooracle", "type": "address" },
6
+ { "internalType": "address", "name": "newFeeManager", "type": "address" },
7
+ { "internalType": "address", "name": "newWooGuardian", "type": "address" }
5
8
  ],
6
9
  "stateMutability": "nonpayable",
7
10
  "type": "constructor"
@@ -12,17 +15,11 @@
12
15
  {
13
16
  "indexed": true,
14
17
  "internalType": "address",
15
- "name": "addr",
18
+ "name": "newFeeManager",
16
19
  "type": "address"
17
- },
18
- {
19
- "indexed": false,
20
- "internalType": "bool",
21
- "name": "flag",
22
- "type": "bool"
23
20
  }
24
21
  ],
25
- "name": "AdminUpdated",
22
+ "name": "FeeManagerUpdated",
26
23
  "type": "event"
27
24
  },
28
25
  {
@@ -31,23 +28,17 @@
31
28
  {
32
29
  "indexed": true,
33
30
  "internalType": "address",
34
- "name": "token",
31
+ "name": "previousOwner",
35
32
  "type": "address"
36
33
  },
37
34
  {
38
35
  "indexed": true,
39
36
  "internalType": "address",
40
- "name": "sender",
37
+ "name": "newOwner",
41
38
  "type": "address"
42
- },
43
- {
44
- "indexed": false,
45
- "internalType": "uint256",
46
- "name": "amount",
47
- "type": "uint256"
48
39
  }
49
40
  ],
50
- "name": "Deposit",
41
+ "name": "OwnershipTransferPrepared",
51
42
  "type": "event"
52
43
  },
53
44
  {
@@ -56,11 +47,17 @@
56
47
  {
57
48
  "indexed": true,
58
49
  "internalType": "address",
59
- "name": "newFeeAddr",
50
+ "name": "previousOwner",
51
+ "type": "address"
52
+ },
53
+ {
54
+ "indexed": true,
55
+ "internalType": "address",
56
+ "name": "newOwner",
60
57
  "type": "address"
61
58
  }
62
59
  ],
63
- "name": "FeeAddrUpdated",
60
+ "name": "OwnershipTransferred",
64
61
  "type": "event"
65
62
  },
66
63
  {
@@ -69,55 +66,68 @@
69
66
  {
70
67
  "indexed": true,
71
68
  "internalType": "address",
72
- "name": "token",
69
+ "name": "baseToken",
73
70
  "type": "address"
74
71
  },
75
72
  {
76
- "indexed": true,
77
- "internalType": "address",
78
- "name": "receiver",
79
- "type": "address"
73
+ "indexed": false,
74
+ "internalType": "uint256",
75
+ "name": "newThreshold",
76
+ "type": "uint256"
80
77
  },
81
78
  {
82
79
  "indexed": false,
83
80
  "internalType": "uint256",
84
- "name": "amount",
81
+ "name": "newR",
85
82
  "type": "uint256"
86
83
  }
87
84
  ],
88
- "name": "Migrate",
85
+ "name": "ParametersUpdated",
89
86
  "type": "event"
90
87
  },
91
88
  {
92
89
  "anonymous": false,
93
90
  "inputs": [
94
91
  {
95
- "indexed": true,
92
+ "indexed": false,
96
93
  "internalType": "address",
97
- "name": "previousOwner",
94
+ "name": "account",
98
95
  "type": "address"
99
- },
96
+ }
97
+ ],
98
+ "name": "Paused",
99
+ "type": "event"
100
+ },
101
+ {
102
+ "anonymous": false,
103
+ "inputs": [
100
104
  {
101
105
  "indexed": true,
102
106
  "internalType": "address",
103
- "name": "newOwner",
107
+ "name": "newRewardManager",
104
108
  "type": "address"
105
109
  }
106
110
  ],
107
- "name": "OwnershipTransferred",
111
+ "name": "RewardManagerUpdated",
108
112
  "type": "event"
109
113
  },
110
114
  {
111
115
  "anonymous": false,
112
116
  "inputs": [
113
117
  {
114
- "indexed": false,
118
+ "indexed": true,
115
119
  "internalType": "address",
116
- "name": "account",
120
+ "name": "strategist",
117
121
  "type": "address"
122
+ },
123
+ {
124
+ "indexed": false,
125
+ "internalType": "bool",
126
+ "name": "flag",
127
+ "type": "bool"
118
128
  }
119
129
  ],
120
- "name": "Paused",
130
+ "name": "StrategistUpdated",
121
131
  "type": "event"
122
132
  },
123
133
  {
@@ -145,7 +155,7 @@
145
155
  {
146
156
  "indexed": true,
147
157
  "internalType": "address",
148
- "name": "receiver",
158
+ "name": "to",
149
159
  "type": "address"
150
160
  },
151
161
  {
@@ -158,6 +168,19 @@
158
168
  "name": "Withdraw",
159
169
  "type": "event"
160
170
  },
171
+ {
172
+ "anonymous": false,
173
+ "inputs": [
174
+ {
175
+ "indexed": true,
176
+ "internalType": "address",
177
+ "name": "newWooGuardian",
178
+ "type": "address"
179
+ }
180
+ ],
181
+ "name": "WooGuardianUpdated",
182
+ "type": "event"
183
+ },
161
184
  {
162
185
  "anonymous": false,
163
186
  "inputs": [
@@ -202,18 +225,6 @@
202
225
  "internalType": "address",
203
226
  "name": "rebateTo",
204
227
  "type": "address"
205
- },
206
- {
207
- "indexed": false,
208
- "internalType": "uint256",
209
- "name": "swapVol",
210
- "type": "uint256"
211
- },
212
- {
213
- "indexed": false,
214
- "internalType": "uint256",
215
- "name": "swapFee",
216
- "type": "uint256"
217
228
  }
218
229
  ],
219
230
  "name": "WooSwap",
@@ -232,100 +243,44 @@
232
243
  "name": "WooracleUpdated",
233
244
  "type": "event"
234
245
  },
235
- {
236
- "inputs": [
237
- { "internalType": "address", "name": "token", "type": "address" }
238
- ],
239
- "name": "balance",
240
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
241
- "stateMutability": "view",
242
- "type": "function"
243
- },
244
246
  {
245
247
  "inputs": [],
246
- "name": "claimFee",
247
- "outputs": [],
248
- "stateMutability": "nonpayable",
249
- "type": "function"
250
- },
251
- {
252
- "inputs": [
253
- { "internalType": "address", "name": "baseToken", "type": "address" }
254
- ],
255
- "name": "decimalInfo",
256
- "outputs": [
257
- {
258
- "components": [
259
- { "internalType": "uint64", "name": "priceDec", "type": "uint64" },
260
- { "internalType": "uint64", "name": "quoteDec", "type": "uint64" },
261
- { "internalType": "uint64", "name": "baseDec", "type": "uint64" }
262
- ],
263
- "internalType": "struct WooPPV2.DecimalInfo",
264
- "name": "",
265
- "type": "tuple"
266
- }
267
- ],
248
+ "name": "_NEW_OWNER_",
249
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
268
250
  "stateMutability": "view",
269
251
  "type": "function"
270
252
  },
271
- {
272
- "inputs": [
273
- { "internalType": "address", "name": "token", "type": "address" },
274
- { "internalType": "uint256", "name": "amount", "type": "uint256" }
275
- ],
276
- "name": "deposit",
277
- "outputs": [],
278
- "stateMutability": "nonpayable",
279
- "type": "function"
280
- },
281
- {
282
- "inputs": [
283
- { "internalType": "address", "name": "token", "type": "address" }
284
- ],
285
- "name": "depositAll",
286
- "outputs": [],
287
- "stateMutability": "nonpayable",
288
- "type": "function"
289
- },
290
253
  {
291
254
  "inputs": [],
292
- "name": "feeAddr",
255
+ "name": "_OWNER_",
293
256
  "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
294
257
  "stateMutability": "view",
295
258
  "type": "function"
296
259
  },
297
260
  {
298
261
  "inputs": [
299
- { "internalType": "address", "name": "stuckToken", "type": "address" }
262
+ { "internalType": "address", "name": "baseToken", "type": "address" },
263
+ { "internalType": "uint256", "name": "threshold", "type": "uint256" },
264
+ { "internalType": "uint256", "name": "R", "type": "uint256" }
300
265
  ],
301
- "name": "inCaseTokenGotStuck",
266
+ "name": "addBaseToken",
302
267
  "outputs": [],
303
268
  "stateMutability": "nonpayable",
304
269
  "type": "function"
305
270
  },
306
271
  {
307
- "inputs": [
308
- { "internalType": "address", "name": "_wooracle", "type": "address" },
309
- { "internalType": "address", "name": "_feeAddr", "type": "address" }
310
- ],
311
- "name": "init",
272
+ "inputs": [],
273
+ "name": "claimOwnership",
312
274
  "outputs": [],
313
275
  "stateMutability": "nonpayable",
314
276
  "type": "function"
315
277
  },
316
278
  {
317
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
318
- "name": "isAdmin",
319
- "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
320
- "stateMutability": "view",
321
- "type": "function"
322
- },
323
- {
324
- "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
325
- "name": "lendManagers",
279
+ "inputs": [],
280
+ "name": "feeManager",
326
281
  "outputs": [
327
282
  {
328
- "internalType": "contract IWooLendingManager",
283
+ "internalType": "contract IWooFeeManager",
329
284
  "name": "",
330
285
  "type": "address"
331
286
  }
@@ -335,18 +290,24 @@
335
290
  },
336
291
  {
337
292
  "inputs": [
338
- { "internalType": "address", "name": "token", "type": "address" },
339
- { "internalType": "address", "name": "newPool", "type": "address" }
293
+ { "internalType": "address", "name": "newOwner", "type": "address" }
340
294
  ],
341
- "name": "migrateToNewPool",
295
+ "name": "initOwner",
342
296
  "outputs": [],
343
297
  "stateMutability": "nonpayable",
344
298
  "type": "function"
345
299
  },
300
+ {
301
+ "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
302
+ "name": "isStrategist",
303
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
304
+ "stateMutability": "view",
305
+ "type": "function"
306
+ },
346
307
  {
347
308
  "inputs": [],
348
- "name": "owner",
349
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
309
+ "name": "pairsInfo",
310
+ "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
350
311
  "stateMutability": "view",
351
312
  "type": "function"
352
313
  },
@@ -375,140 +336,138 @@
375
336
  },
376
337
  {
377
338
  "inputs": [
378
- { "internalType": "address", "name": "fromToken", "type": "address" },
379
- { "internalType": "address", "name": "toToken", "type": "address" },
380
- { "internalType": "uint256", "name": "fromAmount", "type": "uint256" }
339
+ { "internalType": "address", "name": "baseToken", "type": "address" },
340
+ { "internalType": "uint256", "name": "baseAmount", "type": "uint256" }
381
341
  ],
382
- "name": "query",
342
+ "name": "querySellBase",
383
343
  "outputs": [
384
- { "internalType": "uint256", "name": "toAmount", "type": "uint256" }
344
+ { "internalType": "uint256", "name": "quoteAmount", "type": "uint256" }
385
345
  ],
386
346
  "stateMutability": "view",
387
347
  "type": "function"
388
348
  },
389
349
  {
390
- "inputs": [],
391
- "name": "quoteToken",
392
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
350
+ "inputs": [
351
+ { "internalType": "address", "name": "baseToken", "type": "address" },
352
+ { "internalType": "uint256", "name": "quoteAmount", "type": "uint256" }
353
+ ],
354
+ "name": "querySellQuote",
355
+ "outputs": [
356
+ { "internalType": "uint256", "name": "baseAmount", "type": "uint256" }
357
+ ],
393
358
  "stateMutability": "view",
394
359
  "type": "function"
395
360
  },
396
361
  {
397
362
  "inputs": [],
398
- "name": "renounceOwnership",
399
- "outputs": [],
400
- "stateMutability": "nonpayable",
363
+ "name": "quoteToken",
364
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
365
+ "stateMutability": "view",
401
366
  "type": "function"
402
367
  },
403
368
  {
404
369
  "inputs": [
405
- { "internalType": "address", "name": "wantToken", "type": "address" }
370
+ { "internalType": "address", "name": "baseToken", "type": "address" }
406
371
  ],
407
- "name": "repayWeeklyLending",
372
+ "name": "removeBaseToken",
408
373
  "outputs": [],
409
374
  "stateMutability": "nonpayable",
410
375
  "type": "function"
411
376
  },
412
377
  {
413
378
  "inputs": [
414
- { "internalType": "address", "name": "addr", "type": "address" },
415
- { "internalType": "bool", "name": "flag", "type": "bool" }
379
+ { "internalType": "address", "name": "baseToken", "type": "address" },
380
+ { "internalType": "uint256", "name": "baseAmount", "type": "uint256" },
381
+ {
382
+ "internalType": "uint256",
383
+ "name": "minQuoteAmount",
384
+ "type": "uint256"
385
+ },
386
+ { "internalType": "address", "name": "to", "type": "address" },
387
+ { "internalType": "address", "name": "rebateTo", "type": "address" }
416
388
  ],
417
- "name": "setAdmin",
418
- "outputs": [],
419
- "stateMutability": "nonpayable",
420
- "type": "function"
421
- },
422
- {
423
- "inputs": [
424
- { "internalType": "address", "name": "_feeAddr", "type": "address" }
389
+ "name": "sellBase",
390
+ "outputs": [
391
+ { "internalType": "uint256", "name": "quoteAmount", "type": "uint256" }
425
392
  ],
426
- "name": "setFeeAddr",
427
- "outputs": [],
428
393
  "stateMutability": "nonpayable",
429
394
  "type": "function"
430
395
  },
431
396
  {
432
397
  "inputs": [
433
- { "internalType": "address", "name": "token", "type": "address" },
434
- { "internalType": "uint16", "name": "rate", "type": "uint16" }
398
+ { "internalType": "address", "name": "baseToken", "type": "address" },
399
+ { "internalType": "uint256", "name": "quoteAmount", "type": "uint256" },
400
+ { "internalType": "uint256", "name": "minBaseAmount", "type": "uint256" },
401
+ { "internalType": "address", "name": "to", "type": "address" },
402
+ { "internalType": "address", "name": "rebateTo", "type": "address" }
435
403
  ],
436
- "name": "setFeeRate",
437
- "outputs": [],
438
- "stateMutability": "nonpayable",
439
- "type": "function"
440
- },
441
- {
442
- "inputs": [
443
- {
444
- "internalType": "contract IWooLendingManager",
445
- "name": "_lendManager",
446
- "type": "address"
447
- }
404
+ "name": "sellQuote",
405
+ "outputs": [
406
+ { "internalType": "uint256", "name": "baseAmount", "type": "uint256" }
448
407
  ],
449
- "name": "setLendManager",
450
- "outputs": [],
451
408
  "stateMutability": "nonpayable",
452
409
  "type": "function"
453
410
  },
454
411
  {
455
412
  "inputs": [
456
- { "internalType": "address", "name": "_wooracle", "type": "address" }
413
+ { "internalType": "address", "name": "newFeeManager", "type": "address" }
457
414
  ],
458
- "name": "setWooracle",
415
+ "name": "setFeeManager",
459
416
  "outputs": [],
460
417
  "stateMutability": "nonpayable",
461
418
  "type": "function"
462
419
  },
463
420
  {
464
421
  "inputs": [
465
- { "internalType": "address", "name": "token", "type": "address" }
422
+ { "internalType": "string", "name": "newPairsInfo", "type": "string" }
466
423
  ],
467
- "name": "skim",
424
+ "name": "setPairsInfo",
468
425
  "outputs": [],
469
426
  "stateMutability": "nonpayable",
470
427
  "type": "function"
471
428
  },
472
429
  {
473
430
  "inputs": [
474
- { "internalType": "address[]", "name": "tokens", "type": "address[]" }
431
+ { "internalType": "address", "name": "strategist", "type": "address" },
432
+ { "internalType": "bool", "name": "flag", "type": "bool" }
475
433
  ],
476
- "name": "skimMulTokens",
434
+ "name": "setStrategist",
477
435
  "outputs": [],
478
436
  "stateMutability": "nonpayable",
479
437
  "type": "function"
480
438
  },
481
439
  {
482
440
  "inputs": [
483
- { "internalType": "address", "name": "fromToken", "type": "address" },
484
- { "internalType": "address", "name": "toToken", "type": "address" },
485
- { "internalType": "uint256", "name": "fromAmount", "type": "uint256" },
486
- { "internalType": "uint256", "name": "minToAmount", "type": "uint256" },
487
- { "internalType": "address", "name": "to", "type": "address" },
488
- { "internalType": "address", "name": "rebateTo", "type": "address" }
489
- ],
490
- "name": "swap",
491
- "outputs": [
492
- { "internalType": "uint256", "name": "realToAmount", "type": "uint256" }
441
+ { "internalType": "address", "name": "newWooGuardian", "type": "address" }
493
442
  ],
443
+ "name": "setWooGuardian",
444
+ "outputs": [],
494
445
  "stateMutability": "nonpayable",
495
446
  "type": "function"
496
447
  },
497
448
  {
498
449
  "inputs": [
499
- { "internalType": "address", "name": "token", "type": "address" }
450
+ { "internalType": "address", "name": "newWooracle", "type": "address" }
500
451
  ],
501
- "name": "sync",
452
+ "name": "setWooracle",
502
453
  "outputs": [],
503
454
  "stateMutability": "nonpayable",
504
455
  "type": "function"
505
456
  },
506
457
  {
507
458
  "inputs": [{ "internalType": "address", "name": "", "type": "address" }],
508
- "name": "tokenInfos",
459
+ "name": "tokenInfo",
509
460
  "outputs": [
510
- { "internalType": "uint192", "name": "reserve", "type": "uint192" },
511
- { "internalType": "uint16", "name": "feeRate", "type": "uint16" }
461
+ { "internalType": "uint112", "name": "reserve", "type": "uint112" },
462
+ { "internalType": "uint112", "name": "threshold", "type": "uint112" },
463
+ {
464
+ "internalType": "uint32",
465
+ "name": "lastResetTimestamp",
466
+ "type": "uint32"
467
+ },
468
+ { "internalType": "uint64", "name": "R", "type": "uint64" },
469
+ { "internalType": "uint112", "name": "target", "type": "uint112" },
470
+ { "internalType": "bool", "name": "isValid", "type": "bool" }
512
471
  ],
513
472
  "stateMutability": "view",
514
473
  "type": "function"
@@ -524,22 +483,13 @@
524
483
  },
525
484
  {
526
485
  "inputs": [
527
- { "internalType": "address", "name": "fromToken", "type": "address" },
528
- { "internalType": "address", "name": "toToken", "type": "address" },
529
- { "internalType": "uint256", "name": "fromAmount", "type": "uint256" }
530
- ],
531
- "name": "tryQuery",
532
- "outputs": [
533
- { "internalType": "uint256", "name": "toAmount", "type": "uint256" }
486
+ { "internalType": "address", "name": "token", "type": "address" },
487
+ { "internalType": "uint256", "name": "newThreshold", "type": "uint256" },
488
+ { "internalType": "uint256", "name": "newR", "type": "uint256" }
534
489
  ],
535
- "stateMutability": "view",
536
- "type": "function"
537
- },
538
- {
539
- "inputs": [],
540
- "name": "unclaimedFee",
541
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
542
- "stateMutability": "view",
490
+ "name": "tuneParameters",
491
+ "outputs": [],
492
+ "stateMutability": "nonpayable",
543
493
  "type": "function"
544
494
  },
545
495
  {
@@ -552,6 +502,7 @@
552
502
  {
553
503
  "inputs": [
554
504
  { "internalType": "address", "name": "token", "type": "address" },
505
+ { "internalType": "address", "name": "to", "type": "address" },
555
506
  { "internalType": "uint256", "name": "amount", "type": "uint256" }
556
507
  ],
557
508
  "name": "withdraw",
@@ -561,20 +512,37 @@
561
512
  },
562
513
  {
563
514
  "inputs": [
564
- { "internalType": "address", "name": "token", "type": "address" }
515
+ { "internalType": "address", "name": "token", "type": "address" },
516
+ { "internalType": "address", "name": "to", "type": "address" }
565
517
  ],
566
518
  "name": "withdrawAll",
567
519
  "outputs": [],
568
520
  "stateMutability": "nonpayable",
569
521
  "type": "function"
570
522
  },
523
+ {
524
+ "inputs": [
525
+ { "internalType": "address", "name": "token", "type": "address" }
526
+ ],
527
+ "name": "withdrawAllToOwner",
528
+ "outputs": [],
529
+ "stateMutability": "nonpayable",
530
+ "type": "function"
531
+ },
571
532
  {
572
533
  "inputs": [],
573
- "name": "wooracle",
534
+ "name": "wooGuardian",
574
535
  "outputs": [
575
- { "internalType": "contract IWooracleV2", "name": "", "type": "address" }
536
+ { "internalType": "contract IWooGuardian", "name": "", "type": "address" }
576
537
  ],
577
538
  "stateMutability": "view",
578
539
  "type": "function"
540
+ },
541
+ {
542
+ "inputs": [],
543
+ "name": "wooracle",
544
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
545
+ "stateMutability": "view",
546
+ "type": "function"
579
547
  }
580
548
  ]