@paraswap/dex-lib 2.42.30 → 2.42.31

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 (83) hide show
  1. package/build/abi/smardex/smardex-factory.json +185 -0
  2. package/build/abi/smardex/smardex-pool.json +578 -0
  3. package/build/abi/smardex/smardex-router.json +648 -0
  4. package/build/abi/trader-joe-v2_1/FactoryABI.json +0 -0
  5. package/build/abi/trader-joe-v2_1/PairABI.json +1493 -0
  6. package/build/abi/trader-joe-v2_1/RouterABI.json +1489 -0
  7. package/build/abi/wombat/pool-v2.json +1289 -0
  8. package/build/abi/wombat/pool-v3.json +2013 -0
  9. package/build/dex/index.js +2 -2
  10. package/build/dex/index.js.map +1 -1
  11. package/build/dex/smardex/subgraph-queries.d.ts +1 -0
  12. package/build/dex/smardex/subgraph-queries.js +17 -0
  13. package/build/dex/smardex/subgraph-queries.js.map +1 -0
  14. package/build/dex/smardex/usd-reserves.d.ts +23 -0
  15. package/build/dex/smardex/usd-reserves.js +86 -0
  16. package/build/dex/smardex/usd-reserves.js.map +1 -0
  17. package/build/dex/trader-joe-v2-1-2/config.d.ts +4 -0
  18. package/build/dex/trader-joe-v2-1-2/config.js +43 -0
  19. package/build/dex/trader-joe-v2-1-2/config.js.map +1 -0
  20. package/build/dex/trader-joe-v2-1-2/constants.d.ts +17 -0
  21. package/build/dex/trader-joe-v2-1-2/constants.js +19 -0
  22. package/build/dex/trader-joe-v2-1-2/constants.js.map +1 -0
  23. package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2-pool.d.ts +60 -0
  24. package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2-pool.js +199 -0
  25. package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2-pool.js.map +1 -0
  26. package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2.d.ts +49 -0
  27. package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2.js +269 -0
  28. package/build/dex/trader-joe-v2-1-2/trader-joe-v2-1-2.js.map +1 -0
  29. package/build/dex/trader-joe-v2-1-2/types.d.ts +81 -0
  30. package/build/dex/trader-joe-v2-1-2/types.js +9 -0
  31. package/build/dex/trader-joe-v2-1-2/types.js.map +1 -0
  32. package/build/dex/trader-joe-v2_1/config.d.ts +4 -0
  33. package/build/dex/trader-joe-v2_1/config.js +43 -0
  34. package/build/dex/trader-joe-v2_1/config.js.map +1 -0
  35. package/build/dex/trader-joe-v2_1/constants.d.ts +16 -0
  36. package/build/dex/trader-joe-v2_1/constants.js +18 -0
  37. package/build/dex/trader-joe-v2_1/constants.js.map +1 -0
  38. package/build/dex/trader-joe-v2_1/trader-joe-v2.1.d.ts +0 -0
  39. package/build/dex/trader-joe-v2_1/trader-joe-v2.1.js +384 -0
  40. package/build/dex/trader-joe-v2_1/trader-joe-v2.1.js.map +1 -0
  41. package/build/dex/trader-joe-v2_1/types.d.ts +39 -0
  42. package/build/dex/trader-joe-v2_1/types.js +3 -0
  43. package/build/dex/trader-joe-v2_1/types.js.map +1 -0
  44. package/build/dex/wombat/utils.d.ts +1 -0
  45. package/build/dex/wombat/utils.js +14 -1
  46. package/build/dex/wombat/utils.js.map +1 -1
  47. package/build/dex/wombat/wombat-bmw.d.ts +2 -2
  48. package/build/dex/wombat/wombat-bmw.js +8 -25
  49. package/build/dex/wombat/wombat-bmw.js.map +1 -1
  50. package/build/dex/wombat/wombat-pool-poller.d.ts +22 -0
  51. package/build/dex/wombat/wombat-pool-poller.js +164 -0
  52. package/build/dex/wombat/wombat-pool-poller.js.map +1 -0
  53. package/build/dex/wombat/wombat-pool.d.ts +51 -17
  54. package/build/dex/wombat/wombat-pool.js +398 -112
  55. package/build/dex/wombat/wombat-pool.js.map +1 -1
  56. package/build/dex/wombat/wombat.d.ts +1 -1
  57. package/build/dex/wombat/wombat.js +12 -18
  58. package/build/dex/wombat/wombat.js.map +1 -1
  59. package/package.json +1 -1
  60. package/src/abi/wombat/pool-v3.json +2013 -0
  61. package/src/dex/camelot/camelot-pool-discovery.test.ts +149 -0
  62. package/src/dex/index.ts +2 -2
  63. package/src/dex/wombat/utils.ts +20 -0
  64. package/src/dex/wombat/wombat-bmw.ts +8 -31
  65. package/src/dex/wombat/wombat-e2e.test.ts +13 -1
  66. package/src/dex/wombat/wombat-events.test.ts +147 -0
  67. package/src/dex/wombat/wombat-integration.test.ts +70 -111
  68. package/src/dex/wombat/wombat-pool.ts +623 -171
  69. package/src/dex/wombat/wombat.ts +13 -23
  70. package/tests/constants-e2e.ts +11 -1
  71. package/build/abi/algebra/AlgebraPool.abi.json +0 -727
  72. package/build/abi/uniswap-v3/UniswapV3Quoter.abi.json +0 -193
  73. package/build/dex/algebra/algebra-pool.d.ts +0 -46
  74. package/build/dex/algebra/algebra-pool.js +0 -336
  75. package/build/dex/algebra/algebra-pool.js.map +0 -1
  76. package/build/dex/quickswap/camelot-v3.d.ts +0 -6
  77. package/build/dex/quickswap/camelot-v3.js +0 -19
  78. package/build/dex/quickswap/camelot-v3.js.map +0 -1
  79. package/build/dex/quickswap/zyberswap-v3.d.ts +0 -6
  80. package/build/dex/quickswap/zyberswap-v3.js +0 -19
  81. package/build/dex/quickswap/zyberswap-v3.js.map +0 -1
  82. package/build/dex/uniswap-v2/rebase-tokens.json +0 -7
  83. /package/src/abi/wombat/{pool.json → pool-v2.json} +0 -0
@@ -0,0 +1,2013 @@
1
+ [
2
+ {
3
+ "inputs": [],
4
+ "name": "POOL__CREDIT_NOT_ENOUGH",
5
+ "type": "error"
6
+ },
7
+ {
8
+ "inputs": [],
9
+ "name": "POOL__REACH_MAXIMUM_BURNED_CREDIT",
10
+ "type": "error"
11
+ },
12
+ {
13
+ "inputs": [],
14
+ "name": "POOL__REACH_MAXIMUM_MINTED_CREDIT",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "inputs": [],
19
+ "name": "POOL__SWAP_CREDIT_FOR_TOKENS_DISABLED",
20
+ "type": "error"
21
+ },
22
+ {
23
+ "inputs": [],
24
+ "name": "POOL__SWAP_TOKENS_FOR_CREDIT_DISABLED",
25
+ "type": "error"
26
+ },
27
+ {
28
+ "inputs": [],
29
+ "name": "WOMBAT_AMOUNT_TOO_LOW",
30
+ "type": "error"
31
+ },
32
+ {
33
+ "inputs": [],
34
+ "name": "WOMBAT_ASSET_ALREADY_EXIST",
35
+ "type": "error"
36
+ },
37
+ {
38
+ "inputs": [],
39
+ "name": "WOMBAT_ASSET_ALREADY_PAUSED",
40
+ "type": "error"
41
+ },
42
+ {
43
+ "inputs": [],
44
+ "name": "WOMBAT_ASSET_NOT_EXISTS",
45
+ "type": "error"
46
+ },
47
+ {
48
+ "inputs": [],
49
+ "name": "WOMBAT_ASSET_NOT_PAUSED",
50
+ "type": "error"
51
+ },
52
+ {
53
+ "inputs": [],
54
+ "name": "WOMBAT_CASH_NOT_ENOUGH",
55
+ "type": "error"
56
+ },
57
+ {
58
+ "inputs": [],
59
+ "name": "WOMBAT_COV_RATIO_LIMIT_EXCEEDED",
60
+ "type": "error"
61
+ },
62
+ {
63
+ "inputs": [],
64
+ "name": "WOMBAT_EXPIRED",
65
+ "type": "error"
66
+ },
67
+ {
68
+ "inputs": [],
69
+ "name": "WOMBAT_FORBIDDEN",
70
+ "type": "error"
71
+ },
72
+ {
73
+ "inputs": [],
74
+ "name": "WOMBAT_INVALID_VALUE",
75
+ "type": "error"
76
+ },
77
+ {
78
+ "inputs": [],
79
+ "name": "WOMBAT_SAME_ADDRESS",
80
+ "type": "error"
81
+ },
82
+ {
83
+ "inputs": [],
84
+ "name": "WOMBAT_ZERO_ADDRESS",
85
+ "type": "error"
86
+ },
87
+ {
88
+ "inputs": [],
89
+ "name": "WOMBAT_ZERO_AMOUNT",
90
+ "type": "error"
91
+ },
92
+ {
93
+ "inputs": [],
94
+ "name": "WOMBAT_ZERO_CREDIT_AMOUNT",
95
+ "type": "error"
96
+ },
97
+ {
98
+ "inputs": [],
99
+ "name": "WOMBAT_ZERO_LIQUIDITY",
100
+ "type": "error"
101
+ },
102
+ {
103
+ "anonymous": false,
104
+ "inputs": [
105
+ {
106
+ "indexed": true,
107
+ "internalType": "address",
108
+ "name": "token",
109
+ "type": "address"
110
+ },
111
+ {
112
+ "indexed": true,
113
+ "internalType": "address",
114
+ "name": "asset",
115
+ "type": "address"
116
+ }
117
+ ],
118
+ "name": "AssetAdded",
119
+ "type": "event"
120
+ },
121
+ {
122
+ "anonymous": false,
123
+ "inputs": [
124
+ {
125
+ "indexed": true,
126
+ "internalType": "address",
127
+ "name": "token",
128
+ "type": "address"
129
+ },
130
+ {
131
+ "indexed": true,
132
+ "internalType": "address",
133
+ "name": "asset",
134
+ "type": "address"
135
+ }
136
+ ],
137
+ "name": "AssetRemoved",
138
+ "type": "event"
139
+ },
140
+ {
141
+ "anonymous": false,
142
+ "inputs": [
143
+ {
144
+ "indexed": true,
145
+ "internalType": "address",
146
+ "name": "sender",
147
+ "type": "address"
148
+ },
149
+ {
150
+ "indexed": false,
151
+ "internalType": "address",
152
+ "name": "token",
153
+ "type": "address"
154
+ },
155
+ {
156
+ "indexed": false,
157
+ "internalType": "uint256",
158
+ "name": "amount",
159
+ "type": "uint256"
160
+ },
161
+ {
162
+ "indexed": false,
163
+ "internalType": "uint256",
164
+ "name": "liquidity",
165
+ "type": "uint256"
166
+ },
167
+ {
168
+ "indexed": true,
169
+ "internalType": "address",
170
+ "name": "to",
171
+ "type": "address"
172
+ }
173
+ ],
174
+ "name": "Deposit",
175
+ "type": "event"
176
+ },
177
+ {
178
+ "anonymous": false,
179
+ "inputs": [
180
+ {
181
+ "indexed": false,
182
+ "internalType": "address",
183
+ "name": "token",
184
+ "type": "address"
185
+ },
186
+ {
187
+ "indexed": false,
188
+ "internalType": "uint256",
189
+ "name": "amount",
190
+ "type": "uint256"
191
+ }
192
+ ],
193
+ "name": "FillPool",
194
+ "type": "event"
195
+ },
196
+ {
197
+ "anonymous": false,
198
+ "inputs": [
199
+ {
200
+ "indexed": false,
201
+ "internalType": "uint8",
202
+ "name": "version",
203
+ "type": "uint8"
204
+ }
205
+ ],
206
+ "name": "Initialized",
207
+ "type": "event"
208
+ },
209
+ {
210
+ "anonymous": false,
211
+ "inputs": [
212
+ {
213
+ "indexed": true,
214
+ "internalType": "address",
215
+ "name": "receiver",
216
+ "type": "address"
217
+ },
218
+ {
219
+ "indexed": false,
220
+ "internalType": "uint256",
221
+ "name": "creditAmount",
222
+ "type": "uint256"
223
+ }
224
+ ],
225
+ "name": "MintCredit",
226
+ "type": "event"
227
+ },
228
+ {
229
+ "anonymous": false,
230
+ "inputs": [
231
+ {
232
+ "indexed": true,
233
+ "internalType": "address",
234
+ "name": "previousOwner",
235
+ "type": "address"
236
+ },
237
+ {
238
+ "indexed": true,
239
+ "internalType": "address",
240
+ "name": "newOwner",
241
+ "type": "address"
242
+ }
243
+ ],
244
+ "name": "OwnershipTransferred",
245
+ "type": "event"
246
+ },
247
+ {
248
+ "anonymous": false,
249
+ "inputs": [
250
+ {
251
+ "indexed": false,
252
+ "internalType": "address",
253
+ "name": "account",
254
+ "type": "address"
255
+ }
256
+ ],
257
+ "name": "Paused",
258
+ "type": "event"
259
+ },
260
+ {
261
+ "anonymous": false,
262
+ "inputs": [
263
+ {
264
+ "indexed": false,
265
+ "internalType": "address",
266
+ "name": "token",
267
+ "type": "address"
268
+ },
269
+ {
270
+ "indexed": false,
271
+ "internalType": "address",
272
+ "name": "account",
273
+ "type": "address"
274
+ }
275
+ ],
276
+ "name": "PausedAsset",
277
+ "type": "event"
278
+ },
279
+ {
280
+ "anonymous": false,
281
+ "inputs": [
282
+ {
283
+ "indexed": false,
284
+ "internalType": "uint256",
285
+ "name": "value",
286
+ "type": "uint256"
287
+ }
288
+ ],
289
+ "name": "SetAmpFactor",
290
+ "type": "event"
291
+ },
292
+ {
293
+ "anonymous": false,
294
+ "inputs": [
295
+ {
296
+ "indexed": false,
297
+ "internalType": "address",
298
+ "name": "addr",
299
+ "type": "address"
300
+ }
301
+ ],
302
+ "name": "SetDev",
303
+ "type": "event"
304
+ },
305
+ {
306
+ "anonymous": false,
307
+ "inputs": [
308
+ {
309
+ "indexed": false,
310
+ "internalType": "uint256",
311
+ "name": "lpDividendRatio",
312
+ "type": "uint256"
313
+ },
314
+ {
315
+ "indexed": false,
316
+ "internalType": "uint256",
317
+ "name": "retentionRatio",
318
+ "type": "uint256"
319
+ }
320
+ ],
321
+ "name": "SetFee",
322
+ "type": "event"
323
+ },
324
+ {
325
+ "anonymous": false,
326
+ "inputs": [
327
+ {
328
+ "indexed": false,
329
+ "internalType": "address",
330
+ "name": "addr",
331
+ "type": "address"
332
+ }
333
+ ],
334
+ "name": "SetFeeTo",
335
+ "type": "event"
336
+ },
337
+ {
338
+ "anonymous": false,
339
+ "inputs": [
340
+ {
341
+ "indexed": false,
342
+ "internalType": "uint256",
343
+ "name": "value",
344
+ "type": "uint256"
345
+ }
346
+ ],
347
+ "name": "SetHaircutRate",
348
+ "type": "event"
349
+ },
350
+ {
351
+ "anonymous": false,
352
+ "inputs": [
353
+ {
354
+ "indexed": false,
355
+ "internalType": "address",
356
+ "name": "addr",
357
+ "type": "address"
358
+ }
359
+ ],
360
+ "name": "SetMasterWombat",
361
+ "type": "event"
362
+ },
363
+ {
364
+ "anonymous": false,
365
+ "inputs": [
366
+ {
367
+ "indexed": false,
368
+ "internalType": "uint256",
369
+ "name": "value",
370
+ "type": "uint256"
371
+ }
372
+ ],
373
+ "name": "SetMintFeeThreshold",
374
+ "type": "event"
375
+ },
376
+ {
377
+ "anonymous": false,
378
+ "inputs": [
379
+ {
380
+ "indexed": false,
381
+ "internalType": "uint256",
382
+ "name": "value",
383
+ "type": "uint256"
384
+ }
385
+ ],
386
+ "name": "SetWithdrawalHaircutRate",
387
+ "type": "event"
388
+ },
389
+ {
390
+ "anonymous": false,
391
+ "inputs": [
392
+ {
393
+ "indexed": false,
394
+ "internalType": "uint256",
395
+ "name": "creditAmount",
396
+ "type": "uint256"
397
+ },
398
+ {
399
+ "indexed": true,
400
+ "internalType": "address",
401
+ "name": "toToken",
402
+ "type": "address"
403
+ },
404
+ {
405
+ "indexed": false,
406
+ "internalType": "uint256",
407
+ "name": "toAmount",
408
+ "type": "uint256"
409
+ },
410
+ {
411
+ "indexed": false,
412
+ "internalType": "uint256",
413
+ "name": "toTokenFee",
414
+ "type": "uint256"
415
+ },
416
+ {
417
+ "indexed": true,
418
+ "internalType": "address",
419
+ "name": "receiver",
420
+ "type": "address"
421
+ }
422
+ ],
423
+ "name": "SwapCreditForTokens",
424
+ "type": "event"
425
+ },
426
+ {
427
+ "anonymous": false,
428
+ "inputs": [
429
+ {
430
+ "indexed": true,
431
+ "internalType": "address",
432
+ "name": "sender",
433
+ "type": "address"
434
+ },
435
+ {
436
+ "indexed": true,
437
+ "internalType": "address",
438
+ "name": "fromToken",
439
+ "type": "address"
440
+ },
441
+ {
442
+ "indexed": false,
443
+ "internalType": "uint256",
444
+ "name": "fromAmount",
445
+ "type": "uint256"
446
+ },
447
+ {
448
+ "indexed": false,
449
+ "internalType": "uint256",
450
+ "name": "fromTokenFee",
451
+ "type": "uint256"
452
+ },
453
+ {
454
+ "indexed": false,
455
+ "internalType": "uint256",
456
+ "name": "creditAmount",
457
+ "type": "uint256"
458
+ }
459
+ ],
460
+ "name": "SwapTokensForCredit",
461
+ "type": "event"
462
+ },
463
+ {
464
+ "anonymous": false,
465
+ "inputs": [
466
+ {
467
+ "indexed": true,
468
+ "internalType": "address",
469
+ "name": "sender",
470
+ "type": "address"
471
+ },
472
+ {
473
+ "indexed": false,
474
+ "internalType": "address",
475
+ "name": "fromToken",
476
+ "type": "address"
477
+ },
478
+ {
479
+ "indexed": false,
480
+ "internalType": "address",
481
+ "name": "toToken",
482
+ "type": "address"
483
+ },
484
+ {
485
+ "indexed": false,
486
+ "internalType": "uint256",
487
+ "name": "fromAmount",
488
+ "type": "uint256"
489
+ },
490
+ {
491
+ "indexed": false,
492
+ "internalType": "uint256",
493
+ "name": "toAmount",
494
+ "type": "uint256"
495
+ },
496
+ {
497
+ "indexed": false,
498
+ "internalType": "uint256",
499
+ "name": "toTokenFee",
500
+ "type": "uint256"
501
+ },
502
+ {
503
+ "indexed": true,
504
+ "internalType": "address",
505
+ "name": "to",
506
+ "type": "address"
507
+ }
508
+ ],
509
+ "name": "SwapV2",
510
+ "type": "event"
511
+ },
512
+ {
513
+ "anonymous": false,
514
+ "inputs": [
515
+ {
516
+ "indexed": false,
517
+ "internalType": "address",
518
+ "name": "token",
519
+ "type": "address"
520
+ },
521
+ {
522
+ "indexed": false,
523
+ "internalType": "uint256",
524
+ "name": "amount",
525
+ "type": "uint256"
526
+ },
527
+ {
528
+ "indexed": false,
529
+ "internalType": "address",
530
+ "name": "to",
531
+ "type": "address"
532
+ }
533
+ ],
534
+ "name": "TransferTipBucket",
535
+ "type": "event"
536
+ },
537
+ {
538
+ "anonymous": false,
539
+ "inputs": [
540
+ {
541
+ "indexed": false,
542
+ "internalType": "address",
543
+ "name": "account",
544
+ "type": "address"
545
+ }
546
+ ],
547
+ "name": "Unpaused",
548
+ "type": "event"
549
+ },
550
+ {
551
+ "anonymous": false,
552
+ "inputs": [
553
+ {
554
+ "indexed": false,
555
+ "internalType": "address",
556
+ "name": "token",
557
+ "type": "address"
558
+ },
559
+ {
560
+ "indexed": false,
561
+ "internalType": "address",
562
+ "name": "account",
563
+ "type": "address"
564
+ }
565
+ ],
566
+ "name": "UnpausedAsset",
567
+ "type": "event"
568
+ },
569
+ {
570
+ "anonymous": false,
571
+ "inputs": [
572
+ {
573
+ "indexed": true,
574
+ "internalType": "address",
575
+ "name": "sender",
576
+ "type": "address"
577
+ },
578
+ {
579
+ "indexed": false,
580
+ "internalType": "address",
581
+ "name": "token",
582
+ "type": "address"
583
+ },
584
+ {
585
+ "indexed": false,
586
+ "internalType": "uint256",
587
+ "name": "amount",
588
+ "type": "uint256"
589
+ },
590
+ {
591
+ "indexed": false,
592
+ "internalType": "uint256",
593
+ "name": "liquidity",
594
+ "type": "uint256"
595
+ },
596
+ {
597
+ "indexed": true,
598
+ "internalType": "address",
599
+ "name": "to",
600
+ "type": "address"
601
+ }
602
+ ],
603
+ "name": "Withdraw",
604
+ "type": "event"
605
+ },
606
+ {
607
+ "inputs": [],
608
+ "name": "adaptor",
609
+ "outputs": [
610
+ {
611
+ "internalType": "contract IAdaptor",
612
+ "name": "",
613
+ "type": "address"
614
+ }
615
+ ],
616
+ "stateMutability": "view",
617
+ "type": "function"
618
+ },
619
+ {
620
+ "inputs": [
621
+ {
622
+ "internalType": "address",
623
+ "name": "token",
624
+ "type": "address"
625
+ },
626
+ {
627
+ "internalType": "address",
628
+ "name": "asset",
629
+ "type": "address"
630
+ }
631
+ ],
632
+ "name": "addAsset",
633
+ "outputs": [],
634
+ "stateMutability": "nonpayable",
635
+ "type": "function"
636
+ },
637
+ {
638
+ "inputs": [
639
+ {
640
+ "internalType": "address",
641
+ "name": "token",
642
+ "type": "address"
643
+ }
644
+ ],
645
+ "name": "addressOfAsset",
646
+ "outputs": [
647
+ {
648
+ "internalType": "address",
649
+ "name": "",
650
+ "type": "address"
651
+ }
652
+ ],
653
+ "stateMutability": "view",
654
+ "type": "function"
655
+ },
656
+ {
657
+ "inputs": [],
658
+ "name": "ampFactor",
659
+ "outputs": [
660
+ {
661
+ "internalType": "uint256",
662
+ "name": "",
663
+ "type": "uint256"
664
+ }
665
+ ],
666
+ "stateMutability": "view",
667
+ "type": "function"
668
+ },
669
+ {
670
+ "inputs": [
671
+ {
672
+ "internalType": "address",
673
+ "name": "toToken",
674
+ "type": "address"
675
+ },
676
+ {
677
+ "internalType": "uint256",
678
+ "name": "fromAmount",
679
+ "type": "uint256"
680
+ },
681
+ {
682
+ "internalType": "uint256",
683
+ "name": "minimumToAmount",
684
+ "type": "uint256"
685
+ },
686
+ {
687
+ "internalType": "address",
688
+ "name": "receiver",
689
+ "type": "address"
690
+ }
691
+ ],
692
+ "name": "completeSwapCreditForTokens",
693
+ "outputs": [
694
+ {
695
+ "internalType": "uint256",
696
+ "name": "actualToAmount",
697
+ "type": "uint256"
698
+ },
699
+ {
700
+ "internalType": "uint256",
701
+ "name": "toTokenFee",
702
+ "type": "uint256"
703
+ }
704
+ ],
705
+ "stateMutability": "nonpayable",
706
+ "type": "function"
707
+ },
708
+ {
709
+ "inputs": [
710
+ {
711
+ "internalType": "address",
712
+ "name": "",
713
+ "type": "address"
714
+ }
715
+ ],
716
+ "name": "creditBalance",
717
+ "outputs": [
718
+ {
719
+ "internalType": "uint256",
720
+ "name": "",
721
+ "type": "uint256"
722
+ }
723
+ ],
724
+ "stateMutability": "view",
725
+ "type": "function"
726
+ },
727
+ {
728
+ "inputs": [],
729
+ "name": "creditForTokensHaircut",
730
+ "outputs": [
731
+ {
732
+ "internalType": "uint128",
733
+ "name": "",
734
+ "type": "uint128"
735
+ }
736
+ ],
737
+ "stateMutability": "view",
738
+ "type": "function"
739
+ },
740
+ {
741
+ "inputs": [
742
+ {
743
+ "internalType": "address",
744
+ "name": "token",
745
+ "type": "address"
746
+ },
747
+ {
748
+ "internalType": "uint256",
749
+ "name": "amount",
750
+ "type": "uint256"
751
+ },
752
+ {
753
+ "internalType": "uint256",
754
+ "name": "minimumLiquidity",
755
+ "type": "uint256"
756
+ },
757
+ {
758
+ "internalType": "address",
759
+ "name": "to",
760
+ "type": "address"
761
+ },
762
+ {
763
+ "internalType": "uint256",
764
+ "name": "deadline",
765
+ "type": "uint256"
766
+ },
767
+ {
768
+ "internalType": "bool",
769
+ "name": "shouldStake",
770
+ "type": "bool"
771
+ }
772
+ ],
773
+ "name": "deposit",
774
+ "outputs": [
775
+ {
776
+ "internalType": "uint256",
777
+ "name": "liquidity",
778
+ "type": "uint256"
779
+ }
780
+ ],
781
+ "stateMutability": "nonpayable",
782
+ "type": "function"
783
+ },
784
+ {
785
+ "inputs": [],
786
+ "name": "dev",
787
+ "outputs": [
788
+ {
789
+ "internalType": "address",
790
+ "name": "",
791
+ "type": "address"
792
+ }
793
+ ],
794
+ "stateMutability": "view",
795
+ "type": "function"
796
+ },
797
+ {
798
+ "inputs": [],
799
+ "name": "endCovRatio",
800
+ "outputs": [
801
+ {
802
+ "internalType": "uint128",
803
+ "name": "",
804
+ "type": "uint128"
805
+ }
806
+ ],
807
+ "stateMutability": "view",
808
+ "type": "function"
809
+ },
810
+ {
811
+ "inputs": [
812
+ {
813
+ "internalType": "address",
814
+ "name": "token",
815
+ "type": "address"
816
+ }
817
+ ],
818
+ "name": "exchangeRate",
819
+ "outputs": [
820
+ {
821
+ "internalType": "uint256",
822
+ "name": "xr",
823
+ "type": "uint256"
824
+ }
825
+ ],
826
+ "stateMutability": "view",
827
+ "type": "function"
828
+ },
829
+ {
830
+ "inputs": [],
831
+ "name": "feeTo",
832
+ "outputs": [
833
+ {
834
+ "internalType": "address",
835
+ "name": "",
836
+ "type": "address"
837
+ }
838
+ ],
839
+ "stateMutability": "view",
840
+ "type": "function"
841
+ },
842
+ {
843
+ "inputs": [
844
+ {
845
+ "internalType": "address",
846
+ "name": "token",
847
+ "type": "address"
848
+ },
849
+ {
850
+ "internalType": "uint256",
851
+ "name": "amount",
852
+ "type": "uint256"
853
+ }
854
+ ],
855
+ "name": "fillPool",
856
+ "outputs": [],
857
+ "stateMutability": "nonpayable",
858
+ "type": "function"
859
+ },
860
+ {
861
+ "inputs": [],
862
+ "name": "getTokens",
863
+ "outputs": [
864
+ {
865
+ "internalType": "address[]",
866
+ "name": "",
867
+ "type": "address[]"
868
+ }
869
+ ],
870
+ "stateMutability": "view",
871
+ "type": "function"
872
+ },
873
+ {
874
+ "inputs": [],
875
+ "name": "globalEquilCovRatio",
876
+ "outputs": [
877
+ {
878
+ "internalType": "int256",
879
+ "name": "equilCovRatio",
880
+ "type": "int256"
881
+ },
882
+ {
883
+ "internalType": "int256",
884
+ "name": "invariant",
885
+ "type": "int256"
886
+ }
887
+ ],
888
+ "stateMutability": "view",
889
+ "type": "function"
890
+ },
891
+ {
892
+ "inputs": [],
893
+ "name": "globalEquilCovRatioWithCredit",
894
+ "outputs": [
895
+ {
896
+ "internalType": "uint256",
897
+ "name": "equilCovRatio",
898
+ "type": "uint256"
899
+ },
900
+ {
901
+ "internalType": "uint256",
902
+ "name": "invariantInUint",
903
+ "type": "uint256"
904
+ }
905
+ ],
906
+ "stateMutability": "view",
907
+ "type": "function"
908
+ },
909
+ {
910
+ "inputs": [],
911
+ "name": "haircutRate",
912
+ "outputs": [
913
+ {
914
+ "internalType": "uint256",
915
+ "name": "",
916
+ "type": "uint256"
917
+ }
918
+ ],
919
+ "stateMutability": "view",
920
+ "type": "function"
921
+ },
922
+ {
923
+ "inputs": [
924
+ {
925
+ "internalType": "uint256",
926
+ "name": "ampFactor_",
927
+ "type": "uint256"
928
+ },
929
+ {
930
+ "internalType": "uint256",
931
+ "name": "haircutRate_",
932
+ "type": "uint256"
933
+ }
934
+ ],
935
+ "name": "initialize",
936
+ "outputs": [],
937
+ "stateMutability": "nonpayable",
938
+ "type": "function"
939
+ },
940
+ {
941
+ "inputs": [
942
+ {
943
+ "internalType": "address",
944
+ "name": "token",
945
+ "type": "address"
946
+ }
947
+ ],
948
+ "name": "isPaused",
949
+ "outputs": [
950
+ {
951
+ "internalType": "bool",
952
+ "name": "",
953
+ "type": "bool"
954
+ }
955
+ ],
956
+ "stateMutability": "view",
957
+ "type": "function"
958
+ },
959
+ {
960
+ "inputs": [],
961
+ "name": "lpDividendRatio",
962
+ "outputs": [
963
+ {
964
+ "internalType": "uint256",
965
+ "name": "",
966
+ "type": "uint256"
967
+ }
968
+ ],
969
+ "stateMutability": "view",
970
+ "type": "function"
971
+ },
972
+ {
973
+ "inputs": [],
974
+ "name": "masterWombat",
975
+ "outputs": [
976
+ {
977
+ "internalType": "address",
978
+ "name": "",
979
+ "type": "address"
980
+ }
981
+ ],
982
+ "stateMutability": "view",
983
+ "type": "function"
984
+ },
985
+ {
986
+ "inputs": [],
987
+ "name": "maximumInboundCredit",
988
+ "outputs": [
989
+ {
990
+ "internalType": "uint128",
991
+ "name": "",
992
+ "type": "uint128"
993
+ }
994
+ ],
995
+ "stateMutability": "view",
996
+ "type": "function"
997
+ },
998
+ {
999
+ "inputs": [],
1000
+ "name": "maximumOutboundCredit",
1001
+ "outputs": [
1002
+ {
1003
+ "internalType": "uint128",
1004
+ "name": "",
1005
+ "type": "uint128"
1006
+ }
1007
+ ],
1008
+ "stateMutability": "view",
1009
+ "type": "function"
1010
+ },
1011
+ {
1012
+ "inputs": [
1013
+ {
1014
+ "internalType": "uint256",
1015
+ "name": "creditAmount",
1016
+ "type": "uint256"
1017
+ },
1018
+ {
1019
+ "internalType": "address",
1020
+ "name": "receiver",
1021
+ "type": "address"
1022
+ }
1023
+ ],
1024
+ "name": "mintCredit",
1025
+ "outputs": [],
1026
+ "stateMutability": "nonpayable",
1027
+ "type": "function"
1028
+ },
1029
+ {
1030
+ "inputs": [
1031
+ {
1032
+ "internalType": "address",
1033
+ "name": "token",
1034
+ "type": "address"
1035
+ }
1036
+ ],
1037
+ "name": "mintFee",
1038
+ "outputs": [
1039
+ {
1040
+ "internalType": "uint256",
1041
+ "name": "feeCollected",
1042
+ "type": "uint256"
1043
+ }
1044
+ ],
1045
+ "stateMutability": "nonpayable",
1046
+ "type": "function"
1047
+ },
1048
+ {
1049
+ "inputs": [],
1050
+ "name": "mintFeeThreshold",
1051
+ "outputs": [
1052
+ {
1053
+ "internalType": "uint256",
1054
+ "name": "",
1055
+ "type": "uint256"
1056
+ }
1057
+ ],
1058
+ "stateMutability": "view",
1059
+ "type": "function"
1060
+ },
1061
+ {
1062
+ "inputs": [],
1063
+ "name": "owner",
1064
+ "outputs": [
1065
+ {
1066
+ "internalType": "address",
1067
+ "name": "",
1068
+ "type": "address"
1069
+ }
1070
+ ],
1071
+ "stateMutability": "view",
1072
+ "type": "function"
1073
+ },
1074
+ {
1075
+ "inputs": [],
1076
+ "name": "pause",
1077
+ "outputs": [],
1078
+ "stateMutability": "nonpayable",
1079
+ "type": "function"
1080
+ },
1081
+ {
1082
+ "inputs": [
1083
+ {
1084
+ "internalType": "address",
1085
+ "name": "token",
1086
+ "type": "address"
1087
+ }
1088
+ ],
1089
+ "name": "pauseAsset",
1090
+ "outputs": [],
1091
+ "stateMutability": "nonpayable",
1092
+ "type": "function"
1093
+ },
1094
+ {
1095
+ "inputs": [],
1096
+ "name": "paused",
1097
+ "outputs": [
1098
+ {
1099
+ "internalType": "bool",
1100
+ "name": "",
1101
+ "type": "bool"
1102
+ }
1103
+ ],
1104
+ "stateMutability": "view",
1105
+ "type": "function"
1106
+ },
1107
+ {
1108
+ "inputs": [
1109
+ {
1110
+ "internalType": "address",
1111
+ "name": "fromToken",
1112
+ "type": "address"
1113
+ },
1114
+ {
1115
+ "internalType": "address",
1116
+ "name": "toToken",
1117
+ "type": "address"
1118
+ },
1119
+ {
1120
+ "internalType": "int256",
1121
+ "name": "toAmount",
1122
+ "type": "int256"
1123
+ }
1124
+ ],
1125
+ "name": "quoteAmountIn",
1126
+ "outputs": [
1127
+ {
1128
+ "internalType": "uint256",
1129
+ "name": "amountIn",
1130
+ "type": "uint256"
1131
+ },
1132
+ {
1133
+ "internalType": "uint256",
1134
+ "name": "haircut",
1135
+ "type": "uint256"
1136
+ }
1137
+ ],
1138
+ "stateMutability": "view",
1139
+ "type": "function"
1140
+ },
1141
+ {
1142
+ "inputs": [
1143
+ {
1144
+ "internalType": "address",
1145
+ "name": "token",
1146
+ "type": "address"
1147
+ },
1148
+ {
1149
+ "internalType": "uint256",
1150
+ "name": "amount",
1151
+ "type": "uint256"
1152
+ }
1153
+ ],
1154
+ "name": "quotePotentialDeposit",
1155
+ "outputs": [
1156
+ {
1157
+ "internalType": "uint256",
1158
+ "name": "liquidity",
1159
+ "type": "uint256"
1160
+ }
1161
+ ],
1162
+ "stateMutability": "view",
1163
+ "type": "function"
1164
+ },
1165
+ {
1166
+ "inputs": [
1167
+ {
1168
+ "internalType": "address",
1169
+ "name": "fromToken",
1170
+ "type": "address"
1171
+ },
1172
+ {
1173
+ "internalType": "address",
1174
+ "name": "toToken",
1175
+ "type": "address"
1176
+ },
1177
+ {
1178
+ "internalType": "int256",
1179
+ "name": "fromAmount",
1180
+ "type": "int256"
1181
+ }
1182
+ ],
1183
+ "name": "quotePotentialSwap",
1184
+ "outputs": [
1185
+ {
1186
+ "internalType": "uint256",
1187
+ "name": "potentialOutcome",
1188
+ "type": "uint256"
1189
+ },
1190
+ {
1191
+ "internalType": "uint256",
1192
+ "name": "haircut",
1193
+ "type": "uint256"
1194
+ }
1195
+ ],
1196
+ "stateMutability": "view",
1197
+ "type": "function"
1198
+ },
1199
+ {
1200
+ "inputs": [
1201
+ {
1202
+ "internalType": "address",
1203
+ "name": "token",
1204
+ "type": "address"
1205
+ },
1206
+ {
1207
+ "internalType": "uint256",
1208
+ "name": "liquidity",
1209
+ "type": "uint256"
1210
+ }
1211
+ ],
1212
+ "name": "quotePotentialWithdraw",
1213
+ "outputs": [
1214
+ {
1215
+ "internalType": "uint256",
1216
+ "name": "amount",
1217
+ "type": "uint256"
1218
+ }
1219
+ ],
1220
+ "stateMutability": "view",
1221
+ "type": "function"
1222
+ },
1223
+ {
1224
+ "inputs": [
1225
+ {
1226
+ "internalType": "address",
1227
+ "name": "fromToken",
1228
+ "type": "address"
1229
+ },
1230
+ {
1231
+ "internalType": "address",
1232
+ "name": "toToken",
1233
+ "type": "address"
1234
+ },
1235
+ {
1236
+ "internalType": "uint256",
1237
+ "name": "liquidity",
1238
+ "type": "uint256"
1239
+ }
1240
+ ],
1241
+ "name": "quotePotentialWithdrawFromOtherAsset",
1242
+ "outputs": [
1243
+ {
1244
+ "internalType": "uint256",
1245
+ "name": "finalAmount",
1246
+ "type": "uint256"
1247
+ },
1248
+ {
1249
+ "internalType": "uint256",
1250
+ "name": "withdrewAmount",
1251
+ "type": "uint256"
1252
+ }
1253
+ ],
1254
+ "stateMutability": "view",
1255
+ "type": "function"
1256
+ },
1257
+ {
1258
+ "inputs": [
1259
+ {
1260
+ "internalType": "address",
1261
+ "name": "toToken",
1262
+ "type": "address"
1263
+ },
1264
+ {
1265
+ "internalType": "uint256",
1266
+ "name": "fromCreditAmount",
1267
+ "type": "uint256"
1268
+ }
1269
+ ],
1270
+ "name": "quoteSwapCreditForTokens",
1271
+ "outputs": [
1272
+ {
1273
+ "internalType": "uint256",
1274
+ "name": "actualToAmount",
1275
+ "type": "uint256"
1276
+ },
1277
+ {
1278
+ "internalType": "uint256",
1279
+ "name": "toTokenFee",
1280
+ "type": "uint256"
1281
+ }
1282
+ ],
1283
+ "stateMutability": "view",
1284
+ "type": "function"
1285
+ },
1286
+ {
1287
+ "inputs": [
1288
+ {
1289
+ "internalType": "address",
1290
+ "name": "fromToken",
1291
+ "type": "address"
1292
+ },
1293
+ {
1294
+ "internalType": "uint256",
1295
+ "name": "fromAmount",
1296
+ "type": "uint256"
1297
+ }
1298
+ ],
1299
+ "name": "quoteSwapTokensForCredit",
1300
+ "outputs": [
1301
+ {
1302
+ "internalType": "uint256",
1303
+ "name": "creditAmount",
1304
+ "type": "uint256"
1305
+ },
1306
+ {
1307
+ "internalType": "uint256",
1308
+ "name": "fromTokenFee",
1309
+ "type": "uint256"
1310
+ }
1311
+ ],
1312
+ "stateMutability": "view",
1313
+ "type": "function"
1314
+ },
1315
+ {
1316
+ "inputs": [
1317
+ {
1318
+ "internalType": "address",
1319
+ "name": "token",
1320
+ "type": "address"
1321
+ }
1322
+ ],
1323
+ "name": "removeAsset",
1324
+ "outputs": [],
1325
+ "stateMutability": "nonpayable",
1326
+ "type": "function"
1327
+ },
1328
+ {
1329
+ "inputs": [],
1330
+ "name": "renounceOwnership",
1331
+ "outputs": [],
1332
+ "stateMutability": "nonpayable",
1333
+ "type": "function"
1334
+ },
1335
+ {
1336
+ "inputs": [],
1337
+ "name": "retentionRatio",
1338
+ "outputs": [
1339
+ {
1340
+ "internalType": "uint256",
1341
+ "name": "",
1342
+ "type": "uint256"
1343
+ }
1344
+ ],
1345
+ "stateMutability": "view",
1346
+ "type": "function"
1347
+ },
1348
+ {
1349
+ "inputs": [
1350
+ {
1351
+ "internalType": "contract IAdaptor",
1352
+ "name": "_adaptor",
1353
+ "type": "address"
1354
+ }
1355
+ ],
1356
+ "name": "setAdaptorAddr",
1357
+ "outputs": [],
1358
+ "stateMutability": "nonpayable",
1359
+ "type": "function"
1360
+ },
1361
+ {
1362
+ "inputs": [
1363
+ {
1364
+ "internalType": "uint256",
1365
+ "name": "ampFactor_",
1366
+ "type": "uint256"
1367
+ }
1368
+ ],
1369
+ "name": "setAmpFactor",
1370
+ "outputs": [],
1371
+ "stateMutability": "nonpayable",
1372
+ "type": "function"
1373
+ },
1374
+ {
1375
+ "inputs": [
1376
+ {
1377
+ "internalType": "uint128",
1378
+ "name": "startCovRatio_",
1379
+ "type": "uint128"
1380
+ },
1381
+ {
1382
+ "internalType": "uint128",
1383
+ "name": "endCovRatio_",
1384
+ "type": "uint128"
1385
+ }
1386
+ ],
1387
+ "name": "setCovRatioFeeParam",
1388
+ "outputs": [],
1389
+ "stateMutability": "nonpayable",
1390
+ "type": "function"
1391
+ },
1392
+ {
1393
+ "inputs": [
1394
+ {
1395
+ "internalType": "uint128",
1396
+ "name": "_tokensForCreditHaircut",
1397
+ "type": "uint128"
1398
+ },
1399
+ {
1400
+ "internalType": "uint128",
1401
+ "name": "_creditForTokensHaircut",
1402
+ "type": "uint128"
1403
+ }
1404
+ ],
1405
+ "name": "setCrossChainHaircut",
1406
+ "outputs": [],
1407
+ "stateMutability": "nonpayable",
1408
+ "type": "function"
1409
+ },
1410
+ {
1411
+ "inputs": [
1412
+ {
1413
+ "internalType": "address",
1414
+ "name": "dev_",
1415
+ "type": "address"
1416
+ }
1417
+ ],
1418
+ "name": "setDev",
1419
+ "outputs": [],
1420
+ "stateMutability": "nonpayable",
1421
+ "type": "function"
1422
+ },
1423
+ {
1424
+ "inputs": [
1425
+ {
1426
+ "internalType": "uint256",
1427
+ "name": "lpDividendRatio_",
1428
+ "type": "uint256"
1429
+ },
1430
+ {
1431
+ "internalType": "uint256",
1432
+ "name": "retentionRatio_",
1433
+ "type": "uint256"
1434
+ }
1435
+ ],
1436
+ "name": "setFee",
1437
+ "outputs": [],
1438
+ "stateMutability": "nonpayable",
1439
+ "type": "function"
1440
+ },
1441
+ {
1442
+ "inputs": [
1443
+ {
1444
+ "internalType": "address",
1445
+ "name": "feeTo_",
1446
+ "type": "address"
1447
+ }
1448
+ ],
1449
+ "name": "setFeeTo",
1450
+ "outputs": [],
1451
+ "stateMutability": "nonpayable",
1452
+ "type": "function"
1453
+ },
1454
+ {
1455
+ "inputs": [
1456
+ {
1457
+ "internalType": "uint256",
1458
+ "name": "haircutRate_",
1459
+ "type": "uint256"
1460
+ }
1461
+ ],
1462
+ "name": "setHaircutRate",
1463
+ "outputs": [],
1464
+ "stateMutability": "nonpayable",
1465
+ "type": "function"
1466
+ },
1467
+ {
1468
+ "inputs": [
1469
+ {
1470
+ "internalType": "address",
1471
+ "name": "masterWombat_",
1472
+ "type": "address"
1473
+ }
1474
+ ],
1475
+ "name": "setMasterWombat",
1476
+ "outputs": [],
1477
+ "stateMutability": "nonpayable",
1478
+ "type": "function"
1479
+ },
1480
+ {
1481
+ "inputs": [
1482
+ {
1483
+ "internalType": "uint128",
1484
+ "name": "_maximumInboundCredit",
1485
+ "type": "uint128"
1486
+ }
1487
+ ],
1488
+ "name": "setMaximumInboundCredit",
1489
+ "outputs": [],
1490
+ "stateMutability": "nonpayable",
1491
+ "type": "function"
1492
+ },
1493
+ {
1494
+ "inputs": [
1495
+ {
1496
+ "internalType": "uint128",
1497
+ "name": "_maximumOutboundCredit",
1498
+ "type": "uint128"
1499
+ }
1500
+ ],
1501
+ "name": "setMaximumOutboundCredit",
1502
+ "outputs": [],
1503
+ "stateMutability": "nonpayable",
1504
+ "type": "function"
1505
+ },
1506
+ {
1507
+ "inputs": [
1508
+ {
1509
+ "internalType": "uint256",
1510
+ "name": "mintFeeThreshold_",
1511
+ "type": "uint256"
1512
+ }
1513
+ ],
1514
+ "name": "setMintFeeThreshold",
1515
+ "outputs": [],
1516
+ "stateMutability": "nonpayable",
1517
+ "type": "function"
1518
+ },
1519
+ {
1520
+ "inputs": [
1521
+ {
1522
+ "internalType": "bool",
1523
+ "name": "enable",
1524
+ "type": "bool"
1525
+ }
1526
+ ],
1527
+ "name": "setSwapCreditForTokensEnabled",
1528
+ "outputs": [],
1529
+ "stateMutability": "nonpayable",
1530
+ "type": "function"
1531
+ },
1532
+ {
1533
+ "inputs": [
1534
+ {
1535
+ "internalType": "bool",
1536
+ "name": "enable",
1537
+ "type": "bool"
1538
+ }
1539
+ ],
1540
+ "name": "setSwapTokensForCreditEnabled",
1541
+ "outputs": [],
1542
+ "stateMutability": "nonpayable",
1543
+ "type": "function"
1544
+ },
1545
+ {
1546
+ "inputs": [
1547
+ {
1548
+ "internalType": "uint256",
1549
+ "name": "withdrawalHaircutRate_",
1550
+ "type": "uint256"
1551
+ }
1552
+ ],
1553
+ "name": "setWithdrawalHaircutRate",
1554
+ "outputs": [],
1555
+ "stateMutability": "nonpayable",
1556
+ "type": "function"
1557
+ },
1558
+ {
1559
+ "inputs": [],
1560
+ "name": "startCovRatio",
1561
+ "outputs": [
1562
+ {
1563
+ "internalType": "uint128",
1564
+ "name": "",
1565
+ "type": "uint128"
1566
+ }
1567
+ ],
1568
+ "stateMutability": "view",
1569
+ "type": "function"
1570
+ },
1571
+ {
1572
+ "inputs": [
1573
+ {
1574
+ "internalType": "address",
1575
+ "name": "fromToken",
1576
+ "type": "address"
1577
+ },
1578
+ {
1579
+ "internalType": "address",
1580
+ "name": "toToken",
1581
+ "type": "address"
1582
+ },
1583
+ {
1584
+ "internalType": "uint256",
1585
+ "name": "fromAmount",
1586
+ "type": "uint256"
1587
+ },
1588
+ {
1589
+ "internalType": "uint256",
1590
+ "name": "minimumToAmount",
1591
+ "type": "uint256"
1592
+ },
1593
+ {
1594
+ "internalType": "address",
1595
+ "name": "to",
1596
+ "type": "address"
1597
+ },
1598
+ {
1599
+ "internalType": "uint256",
1600
+ "name": "deadline",
1601
+ "type": "uint256"
1602
+ }
1603
+ ],
1604
+ "name": "swap",
1605
+ "outputs": [
1606
+ {
1607
+ "internalType": "uint256",
1608
+ "name": "actualToAmount",
1609
+ "type": "uint256"
1610
+ },
1611
+ {
1612
+ "internalType": "uint256",
1613
+ "name": "haircut",
1614
+ "type": "uint256"
1615
+ }
1616
+ ],
1617
+ "stateMutability": "nonpayable",
1618
+ "type": "function"
1619
+ },
1620
+ {
1621
+ "inputs": [
1622
+ {
1623
+ "internalType": "address",
1624
+ "name": "toToken",
1625
+ "type": "address"
1626
+ },
1627
+ {
1628
+ "internalType": "uint256",
1629
+ "name": "fromAmount",
1630
+ "type": "uint256"
1631
+ },
1632
+ {
1633
+ "internalType": "uint256",
1634
+ "name": "minimumToAmount",
1635
+ "type": "uint256"
1636
+ },
1637
+ {
1638
+ "internalType": "address",
1639
+ "name": "receiver",
1640
+ "type": "address"
1641
+ }
1642
+ ],
1643
+ "name": "swapCreditForTokens",
1644
+ "outputs": [
1645
+ {
1646
+ "internalType": "uint256",
1647
+ "name": "actualToAmount",
1648
+ "type": "uint256"
1649
+ },
1650
+ {
1651
+ "internalType": "uint256",
1652
+ "name": "toTokenFee",
1653
+ "type": "uint256"
1654
+ }
1655
+ ],
1656
+ "stateMutability": "nonpayable",
1657
+ "type": "function"
1658
+ },
1659
+ {
1660
+ "inputs": [
1661
+ {
1662
+ "internalType": "address",
1663
+ "name": "toToken",
1664
+ "type": "address"
1665
+ },
1666
+ {
1667
+ "internalType": "uint256",
1668
+ "name": "toChain",
1669
+ "type": "uint256"
1670
+ },
1671
+ {
1672
+ "internalType": "uint256",
1673
+ "name": "fromAmount",
1674
+ "type": "uint256"
1675
+ },
1676
+ {
1677
+ "internalType": "uint256",
1678
+ "name": "minimumToAmount",
1679
+ "type": "uint256"
1680
+ },
1681
+ {
1682
+ "internalType": "address",
1683
+ "name": "receiver",
1684
+ "type": "address"
1685
+ },
1686
+ {
1687
+ "internalType": "uint256",
1688
+ "name": "receiverValue",
1689
+ "type": "uint256"
1690
+ },
1691
+ {
1692
+ "internalType": "uint256",
1693
+ "name": "deliveryGasLimit",
1694
+ "type": "uint256"
1695
+ }
1696
+ ],
1697
+ "name": "swapCreditForTokensCrossChain",
1698
+ "outputs": [
1699
+ {
1700
+ "internalType": "uint256",
1701
+ "name": "trackingId",
1702
+ "type": "uint256"
1703
+ }
1704
+ ],
1705
+ "stateMutability": "payable",
1706
+ "type": "function"
1707
+ },
1708
+ {
1709
+ "inputs": [],
1710
+ "name": "swapCreditForTokensEnabled",
1711
+ "outputs": [
1712
+ {
1713
+ "internalType": "bool",
1714
+ "name": "",
1715
+ "type": "bool"
1716
+ }
1717
+ ],
1718
+ "stateMutability": "view",
1719
+ "type": "function"
1720
+ },
1721
+ {
1722
+ "inputs": [],
1723
+ "name": "swapTokensForCreditEnabled",
1724
+ "outputs": [
1725
+ {
1726
+ "internalType": "bool",
1727
+ "name": "",
1728
+ "type": "bool"
1729
+ }
1730
+ ],
1731
+ "stateMutability": "view",
1732
+ "type": "function"
1733
+ },
1734
+ {
1735
+ "inputs": [
1736
+ {
1737
+ "internalType": "address",
1738
+ "name": "fromToken",
1739
+ "type": "address"
1740
+ },
1741
+ {
1742
+ "internalType": "address",
1743
+ "name": "toToken",
1744
+ "type": "address"
1745
+ },
1746
+ {
1747
+ "internalType": "uint256",
1748
+ "name": "toChain",
1749
+ "type": "uint256"
1750
+ },
1751
+ {
1752
+ "internalType": "uint256",
1753
+ "name": "fromAmount",
1754
+ "type": "uint256"
1755
+ },
1756
+ {
1757
+ "internalType": "uint256",
1758
+ "name": "minimumCreditAmount",
1759
+ "type": "uint256"
1760
+ },
1761
+ {
1762
+ "internalType": "uint256",
1763
+ "name": "minimumToAmount",
1764
+ "type": "uint256"
1765
+ },
1766
+ {
1767
+ "internalType": "address",
1768
+ "name": "receiver",
1769
+ "type": "address"
1770
+ },
1771
+ {
1772
+ "internalType": "uint256",
1773
+ "name": "receiverValue",
1774
+ "type": "uint256"
1775
+ },
1776
+ {
1777
+ "internalType": "uint256",
1778
+ "name": "deliveryGasLimit",
1779
+ "type": "uint256"
1780
+ }
1781
+ ],
1782
+ "name": "swapTokensForTokensCrossChain",
1783
+ "outputs": [
1784
+ {
1785
+ "internalType": "uint256",
1786
+ "name": "creditAmount",
1787
+ "type": "uint256"
1788
+ },
1789
+ {
1790
+ "internalType": "uint256",
1791
+ "name": "fromTokenFee",
1792
+ "type": "uint256"
1793
+ },
1794
+ {
1795
+ "internalType": "uint256",
1796
+ "name": "sequence",
1797
+ "type": "uint256"
1798
+ }
1799
+ ],
1800
+ "stateMutability": "payable",
1801
+ "type": "function"
1802
+ },
1803
+ {
1804
+ "inputs": [
1805
+ {
1806
+ "internalType": "address",
1807
+ "name": "token",
1808
+ "type": "address"
1809
+ }
1810
+ ],
1811
+ "name": "tipBucketBalance",
1812
+ "outputs": [
1813
+ {
1814
+ "internalType": "uint256",
1815
+ "name": "balance",
1816
+ "type": "uint256"
1817
+ }
1818
+ ],
1819
+ "stateMutability": "view",
1820
+ "type": "function"
1821
+ },
1822
+ {
1823
+ "inputs": [],
1824
+ "name": "tokensForCreditHaircut",
1825
+ "outputs": [
1826
+ {
1827
+ "internalType": "uint128",
1828
+ "name": "",
1829
+ "type": "uint128"
1830
+ }
1831
+ ],
1832
+ "stateMutability": "view",
1833
+ "type": "function"
1834
+ },
1835
+ {
1836
+ "inputs": [],
1837
+ "name": "totalCreditBurned",
1838
+ "outputs": [
1839
+ {
1840
+ "internalType": "uint128",
1841
+ "name": "",
1842
+ "type": "uint128"
1843
+ }
1844
+ ],
1845
+ "stateMutability": "view",
1846
+ "type": "function"
1847
+ },
1848
+ {
1849
+ "inputs": [],
1850
+ "name": "totalCreditMinted",
1851
+ "outputs": [
1852
+ {
1853
+ "internalType": "uint128",
1854
+ "name": "",
1855
+ "type": "uint128"
1856
+ }
1857
+ ],
1858
+ "stateMutability": "view",
1859
+ "type": "function"
1860
+ },
1861
+ {
1862
+ "inputs": [
1863
+ {
1864
+ "internalType": "address",
1865
+ "name": "newOwner",
1866
+ "type": "address"
1867
+ }
1868
+ ],
1869
+ "name": "transferOwnership",
1870
+ "outputs": [],
1871
+ "stateMutability": "nonpayable",
1872
+ "type": "function"
1873
+ },
1874
+ {
1875
+ "inputs": [
1876
+ {
1877
+ "internalType": "address",
1878
+ "name": "token",
1879
+ "type": "address"
1880
+ },
1881
+ {
1882
+ "internalType": "uint256",
1883
+ "name": "amount",
1884
+ "type": "uint256"
1885
+ },
1886
+ {
1887
+ "internalType": "address",
1888
+ "name": "to",
1889
+ "type": "address"
1890
+ }
1891
+ ],
1892
+ "name": "transferTipBucket",
1893
+ "outputs": [],
1894
+ "stateMutability": "nonpayable",
1895
+ "type": "function"
1896
+ },
1897
+ {
1898
+ "inputs": [],
1899
+ "name": "unpause",
1900
+ "outputs": [],
1901
+ "stateMutability": "nonpayable",
1902
+ "type": "function"
1903
+ },
1904
+ {
1905
+ "inputs": [
1906
+ {
1907
+ "internalType": "address",
1908
+ "name": "token",
1909
+ "type": "address"
1910
+ }
1911
+ ],
1912
+ "name": "unpauseAsset",
1913
+ "outputs": [],
1914
+ "stateMutability": "nonpayable",
1915
+ "type": "function"
1916
+ },
1917
+ {
1918
+ "inputs": [
1919
+ {
1920
+ "internalType": "address",
1921
+ "name": "token",
1922
+ "type": "address"
1923
+ },
1924
+ {
1925
+ "internalType": "uint256",
1926
+ "name": "liquidity",
1927
+ "type": "uint256"
1928
+ },
1929
+ {
1930
+ "internalType": "uint256",
1931
+ "name": "minimumAmount",
1932
+ "type": "uint256"
1933
+ },
1934
+ {
1935
+ "internalType": "address",
1936
+ "name": "to",
1937
+ "type": "address"
1938
+ },
1939
+ {
1940
+ "internalType": "uint256",
1941
+ "name": "deadline",
1942
+ "type": "uint256"
1943
+ }
1944
+ ],
1945
+ "name": "withdraw",
1946
+ "outputs": [
1947
+ {
1948
+ "internalType": "uint256",
1949
+ "name": "amount",
1950
+ "type": "uint256"
1951
+ }
1952
+ ],
1953
+ "stateMutability": "nonpayable",
1954
+ "type": "function"
1955
+ },
1956
+ {
1957
+ "inputs": [
1958
+ {
1959
+ "internalType": "address",
1960
+ "name": "fromToken",
1961
+ "type": "address"
1962
+ },
1963
+ {
1964
+ "internalType": "address",
1965
+ "name": "toToken",
1966
+ "type": "address"
1967
+ },
1968
+ {
1969
+ "internalType": "uint256",
1970
+ "name": "liquidity",
1971
+ "type": "uint256"
1972
+ },
1973
+ {
1974
+ "internalType": "uint256",
1975
+ "name": "minimumAmount",
1976
+ "type": "uint256"
1977
+ },
1978
+ {
1979
+ "internalType": "address",
1980
+ "name": "to",
1981
+ "type": "address"
1982
+ },
1983
+ {
1984
+ "internalType": "uint256",
1985
+ "name": "deadline",
1986
+ "type": "uint256"
1987
+ }
1988
+ ],
1989
+ "name": "withdrawFromOtherAsset",
1990
+ "outputs": [
1991
+ {
1992
+ "internalType": "uint256",
1993
+ "name": "toAmount",
1994
+ "type": "uint256"
1995
+ }
1996
+ ],
1997
+ "stateMutability": "nonpayable",
1998
+ "type": "function"
1999
+ },
2000
+ {
2001
+ "inputs": [],
2002
+ "name": "withdrawalHaircutRate",
2003
+ "outputs": [
2004
+ {
2005
+ "internalType": "uint256",
2006
+ "name": "",
2007
+ "type": "uint256"
2008
+ }
2009
+ ],
2010
+ "stateMutability": "view",
2011
+ "type": "function"
2012
+ }
2013
+ ]