@ripe-finance/sdk 1.7.1 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1517 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /* @ts-nocheck */
5
+ import { singleQuery, mutate } from '@dappql/async';
6
+ export const abi = [
7
+ {
8
+ "inputs": [],
9
+ "stateMutability": "nonpayable",
10
+ "type": "constructor"
11
+ },
12
+ {
13
+ "inputs": [],
14
+ "name": "BelowMinimumK",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "inputs": [],
19
+ "name": "DepositsNotEqual",
20
+ "type": "error"
21
+ },
22
+ {
23
+ "inputs": [],
24
+ "name": "FactoryAlreadySet",
25
+ "type": "error"
26
+ },
27
+ {
28
+ "inputs": [],
29
+ "name": "InsufficientInputAmount",
30
+ "type": "error"
31
+ },
32
+ {
33
+ "inputs": [],
34
+ "name": "InsufficientLiquidity",
35
+ "type": "error"
36
+ },
37
+ {
38
+ "inputs": [],
39
+ "name": "InsufficientLiquidityBurned",
40
+ "type": "error"
41
+ },
42
+ {
43
+ "inputs": [],
44
+ "name": "InsufficientLiquidityMinted",
45
+ "type": "error"
46
+ },
47
+ {
48
+ "inputs": [],
49
+ "name": "InsufficientOutputAmount",
50
+ "type": "error"
51
+ },
52
+ {
53
+ "inputs": [],
54
+ "name": "InvalidTo",
55
+ "type": "error"
56
+ },
57
+ {
58
+ "inputs": [],
59
+ "name": "IsPaused",
60
+ "type": "error"
61
+ },
62
+ {
63
+ "inputs": [],
64
+ "name": "K",
65
+ "type": "error"
66
+ },
67
+ {
68
+ "inputs": [],
69
+ "name": "NotEmergencyCouncil",
70
+ "type": "error"
71
+ },
72
+ {
73
+ "inputs": [
74
+ {
75
+ "internalType": "string",
76
+ "name": "str",
77
+ "type": "string"
78
+ }
79
+ ],
80
+ "name": "StringTooLong",
81
+ "type": "error"
82
+ },
83
+ {
84
+ "anonymous": false,
85
+ "inputs": [
86
+ {
87
+ "indexed": true,
88
+ "internalType": "address",
89
+ "name": "owner",
90
+ "type": "address"
91
+ },
92
+ {
93
+ "indexed": true,
94
+ "internalType": "address",
95
+ "name": "spender",
96
+ "type": "address"
97
+ },
98
+ {
99
+ "indexed": false,
100
+ "internalType": "uint256",
101
+ "name": "value",
102
+ "type": "uint256"
103
+ }
104
+ ],
105
+ "name": "Approval",
106
+ "type": "event"
107
+ },
108
+ {
109
+ "anonymous": false,
110
+ "inputs": [
111
+ {
112
+ "indexed": true,
113
+ "internalType": "address",
114
+ "name": "sender",
115
+ "type": "address"
116
+ },
117
+ {
118
+ "indexed": true,
119
+ "internalType": "address",
120
+ "name": "to",
121
+ "type": "address"
122
+ },
123
+ {
124
+ "indexed": false,
125
+ "internalType": "uint256",
126
+ "name": "amount0",
127
+ "type": "uint256"
128
+ },
129
+ {
130
+ "indexed": false,
131
+ "internalType": "uint256",
132
+ "name": "amount1",
133
+ "type": "uint256"
134
+ }
135
+ ],
136
+ "name": "Burn",
137
+ "type": "event"
138
+ },
139
+ {
140
+ "anonymous": false,
141
+ "inputs": [
142
+ {
143
+ "indexed": true,
144
+ "internalType": "address",
145
+ "name": "sender",
146
+ "type": "address"
147
+ },
148
+ {
149
+ "indexed": true,
150
+ "internalType": "address",
151
+ "name": "recipient",
152
+ "type": "address"
153
+ },
154
+ {
155
+ "indexed": false,
156
+ "internalType": "uint256",
157
+ "name": "amount0",
158
+ "type": "uint256"
159
+ },
160
+ {
161
+ "indexed": false,
162
+ "internalType": "uint256",
163
+ "name": "amount1",
164
+ "type": "uint256"
165
+ }
166
+ ],
167
+ "name": "Claim",
168
+ "type": "event"
169
+ },
170
+ {
171
+ "anonymous": false,
172
+ "inputs": [],
173
+ "name": "EIP712DomainChanged",
174
+ "type": "event"
175
+ },
176
+ {
177
+ "anonymous": false,
178
+ "inputs": [
179
+ {
180
+ "indexed": true,
181
+ "internalType": "address",
182
+ "name": "sender",
183
+ "type": "address"
184
+ },
185
+ {
186
+ "indexed": false,
187
+ "internalType": "uint256",
188
+ "name": "amount0",
189
+ "type": "uint256"
190
+ },
191
+ {
192
+ "indexed": false,
193
+ "internalType": "uint256",
194
+ "name": "amount1",
195
+ "type": "uint256"
196
+ }
197
+ ],
198
+ "name": "Fees",
199
+ "type": "event"
200
+ },
201
+ {
202
+ "anonymous": false,
203
+ "inputs": [
204
+ {
205
+ "indexed": true,
206
+ "internalType": "address",
207
+ "name": "sender",
208
+ "type": "address"
209
+ },
210
+ {
211
+ "indexed": false,
212
+ "internalType": "uint256",
213
+ "name": "amount0",
214
+ "type": "uint256"
215
+ },
216
+ {
217
+ "indexed": false,
218
+ "internalType": "uint256",
219
+ "name": "amount1",
220
+ "type": "uint256"
221
+ }
222
+ ],
223
+ "name": "Mint",
224
+ "type": "event"
225
+ },
226
+ {
227
+ "anonymous": false,
228
+ "inputs": [
229
+ {
230
+ "indexed": true,
231
+ "internalType": "address",
232
+ "name": "sender",
233
+ "type": "address"
234
+ },
235
+ {
236
+ "indexed": true,
237
+ "internalType": "address",
238
+ "name": "to",
239
+ "type": "address"
240
+ },
241
+ {
242
+ "indexed": false,
243
+ "internalType": "uint256",
244
+ "name": "amount0In",
245
+ "type": "uint256"
246
+ },
247
+ {
248
+ "indexed": false,
249
+ "internalType": "uint256",
250
+ "name": "amount1In",
251
+ "type": "uint256"
252
+ },
253
+ {
254
+ "indexed": false,
255
+ "internalType": "uint256",
256
+ "name": "amount0Out",
257
+ "type": "uint256"
258
+ },
259
+ {
260
+ "indexed": false,
261
+ "internalType": "uint256",
262
+ "name": "amount1Out",
263
+ "type": "uint256"
264
+ }
265
+ ],
266
+ "name": "Swap",
267
+ "type": "event"
268
+ },
269
+ {
270
+ "anonymous": false,
271
+ "inputs": [
272
+ {
273
+ "indexed": false,
274
+ "internalType": "uint256",
275
+ "name": "reserve0",
276
+ "type": "uint256"
277
+ },
278
+ {
279
+ "indexed": false,
280
+ "internalType": "uint256",
281
+ "name": "reserve1",
282
+ "type": "uint256"
283
+ }
284
+ ],
285
+ "name": "Sync",
286
+ "type": "event"
287
+ },
288
+ {
289
+ "anonymous": false,
290
+ "inputs": [
291
+ {
292
+ "indexed": true,
293
+ "internalType": "address",
294
+ "name": "from",
295
+ "type": "address"
296
+ },
297
+ {
298
+ "indexed": true,
299
+ "internalType": "address",
300
+ "name": "to",
301
+ "type": "address"
302
+ },
303
+ {
304
+ "indexed": false,
305
+ "internalType": "uint256",
306
+ "name": "value",
307
+ "type": "uint256"
308
+ }
309
+ ],
310
+ "name": "Transfer",
311
+ "type": "event"
312
+ },
313
+ {
314
+ "inputs": [],
315
+ "name": "DOMAIN_SEPARATOR",
316
+ "outputs": [
317
+ {
318
+ "internalType": "bytes32",
319
+ "name": "",
320
+ "type": "bytes32"
321
+ }
322
+ ],
323
+ "stateMutability": "view",
324
+ "type": "function"
325
+ },
326
+ {
327
+ "inputs": [
328
+ {
329
+ "internalType": "address",
330
+ "name": "owner",
331
+ "type": "address"
332
+ },
333
+ {
334
+ "internalType": "address",
335
+ "name": "spender",
336
+ "type": "address"
337
+ }
338
+ ],
339
+ "name": "allowance",
340
+ "outputs": [
341
+ {
342
+ "internalType": "uint256",
343
+ "name": "",
344
+ "type": "uint256"
345
+ }
346
+ ],
347
+ "stateMutability": "view",
348
+ "type": "function"
349
+ },
350
+ {
351
+ "inputs": [
352
+ {
353
+ "internalType": "address",
354
+ "name": "spender",
355
+ "type": "address"
356
+ },
357
+ {
358
+ "internalType": "uint256",
359
+ "name": "amount",
360
+ "type": "uint256"
361
+ }
362
+ ],
363
+ "name": "approve",
364
+ "outputs": [
365
+ {
366
+ "internalType": "bool",
367
+ "name": "",
368
+ "type": "bool"
369
+ }
370
+ ],
371
+ "stateMutability": "nonpayable",
372
+ "type": "function"
373
+ },
374
+ {
375
+ "inputs": [
376
+ {
377
+ "internalType": "address",
378
+ "name": "account",
379
+ "type": "address"
380
+ }
381
+ ],
382
+ "name": "balanceOf",
383
+ "outputs": [
384
+ {
385
+ "internalType": "uint256",
386
+ "name": "",
387
+ "type": "uint256"
388
+ }
389
+ ],
390
+ "stateMutability": "view",
391
+ "type": "function"
392
+ },
393
+ {
394
+ "inputs": [],
395
+ "name": "blockTimestampLast",
396
+ "outputs": [
397
+ {
398
+ "internalType": "uint256",
399
+ "name": "",
400
+ "type": "uint256"
401
+ }
402
+ ],
403
+ "stateMutability": "view",
404
+ "type": "function"
405
+ },
406
+ {
407
+ "inputs": [
408
+ {
409
+ "internalType": "address",
410
+ "name": "to",
411
+ "type": "address"
412
+ }
413
+ ],
414
+ "name": "burn",
415
+ "outputs": [
416
+ {
417
+ "internalType": "uint256",
418
+ "name": "amount0",
419
+ "type": "uint256"
420
+ },
421
+ {
422
+ "internalType": "uint256",
423
+ "name": "amount1",
424
+ "type": "uint256"
425
+ }
426
+ ],
427
+ "stateMutability": "nonpayable",
428
+ "type": "function"
429
+ },
430
+ {
431
+ "inputs": [],
432
+ "name": "claimFees",
433
+ "outputs": [
434
+ {
435
+ "internalType": "uint256",
436
+ "name": "claimed0",
437
+ "type": "uint256"
438
+ },
439
+ {
440
+ "internalType": "uint256",
441
+ "name": "claimed1",
442
+ "type": "uint256"
443
+ }
444
+ ],
445
+ "stateMutability": "nonpayable",
446
+ "type": "function"
447
+ },
448
+ {
449
+ "inputs": [
450
+ {
451
+ "internalType": "address",
452
+ "name": "",
453
+ "type": "address"
454
+ }
455
+ ],
456
+ "name": "claimable0",
457
+ "outputs": [
458
+ {
459
+ "internalType": "uint256",
460
+ "name": "",
461
+ "type": "uint256"
462
+ }
463
+ ],
464
+ "stateMutability": "view",
465
+ "type": "function"
466
+ },
467
+ {
468
+ "inputs": [
469
+ {
470
+ "internalType": "address",
471
+ "name": "",
472
+ "type": "address"
473
+ }
474
+ ],
475
+ "name": "claimable1",
476
+ "outputs": [
477
+ {
478
+ "internalType": "uint256",
479
+ "name": "",
480
+ "type": "uint256"
481
+ }
482
+ ],
483
+ "stateMutability": "view",
484
+ "type": "function"
485
+ },
486
+ {
487
+ "inputs": [],
488
+ "name": "currentCumulativePrices",
489
+ "outputs": [
490
+ {
491
+ "internalType": "uint256",
492
+ "name": "reserve0Cumulative",
493
+ "type": "uint256"
494
+ },
495
+ {
496
+ "internalType": "uint256",
497
+ "name": "reserve1Cumulative",
498
+ "type": "uint256"
499
+ },
500
+ {
501
+ "internalType": "uint256",
502
+ "name": "blockTimestamp",
503
+ "type": "uint256"
504
+ }
505
+ ],
506
+ "stateMutability": "view",
507
+ "type": "function"
508
+ },
509
+ {
510
+ "inputs": [],
511
+ "name": "decimals",
512
+ "outputs": [
513
+ {
514
+ "internalType": "uint8",
515
+ "name": "",
516
+ "type": "uint8"
517
+ }
518
+ ],
519
+ "stateMutability": "view",
520
+ "type": "function"
521
+ },
522
+ {
523
+ "inputs": [
524
+ {
525
+ "internalType": "address",
526
+ "name": "spender",
527
+ "type": "address"
528
+ },
529
+ {
530
+ "internalType": "uint256",
531
+ "name": "subtractedValue",
532
+ "type": "uint256"
533
+ }
534
+ ],
535
+ "name": "decreaseAllowance",
536
+ "outputs": [
537
+ {
538
+ "internalType": "bool",
539
+ "name": "",
540
+ "type": "bool"
541
+ }
542
+ ],
543
+ "stateMutability": "nonpayable",
544
+ "type": "function"
545
+ },
546
+ {
547
+ "inputs": [],
548
+ "name": "eip712Domain",
549
+ "outputs": [
550
+ {
551
+ "internalType": "bytes1",
552
+ "name": "fields",
553
+ "type": "bytes1"
554
+ },
555
+ {
556
+ "internalType": "string",
557
+ "name": "name",
558
+ "type": "string"
559
+ },
560
+ {
561
+ "internalType": "string",
562
+ "name": "version",
563
+ "type": "string"
564
+ },
565
+ {
566
+ "internalType": "uint256",
567
+ "name": "chainId",
568
+ "type": "uint256"
569
+ },
570
+ {
571
+ "internalType": "address",
572
+ "name": "verifyingContract",
573
+ "type": "address"
574
+ },
575
+ {
576
+ "internalType": "bytes32",
577
+ "name": "salt",
578
+ "type": "bytes32"
579
+ },
580
+ {
581
+ "internalType": "uint256[]",
582
+ "name": "extensions",
583
+ "type": "uint256[]"
584
+ }
585
+ ],
586
+ "stateMutability": "view",
587
+ "type": "function"
588
+ },
589
+ {
590
+ "inputs": [],
591
+ "name": "factory",
592
+ "outputs": [
593
+ {
594
+ "internalType": "address",
595
+ "name": "",
596
+ "type": "address"
597
+ }
598
+ ],
599
+ "stateMutability": "view",
600
+ "type": "function"
601
+ },
602
+ {
603
+ "inputs": [
604
+ {
605
+ "internalType": "uint256",
606
+ "name": "amountIn",
607
+ "type": "uint256"
608
+ },
609
+ {
610
+ "internalType": "address",
611
+ "name": "tokenIn",
612
+ "type": "address"
613
+ }
614
+ ],
615
+ "name": "getAmountOut",
616
+ "outputs": [
617
+ {
618
+ "internalType": "uint256",
619
+ "name": "",
620
+ "type": "uint256"
621
+ }
622
+ ],
623
+ "stateMutability": "view",
624
+ "type": "function"
625
+ },
626
+ {
627
+ "inputs": [],
628
+ "name": "getK",
629
+ "outputs": [
630
+ {
631
+ "internalType": "uint256",
632
+ "name": "",
633
+ "type": "uint256"
634
+ }
635
+ ],
636
+ "stateMutability": "nonpayable",
637
+ "type": "function"
638
+ },
639
+ {
640
+ "inputs": [],
641
+ "name": "getReserves",
642
+ "outputs": [
643
+ {
644
+ "internalType": "uint256",
645
+ "name": "_reserve0",
646
+ "type": "uint256"
647
+ },
648
+ {
649
+ "internalType": "uint256",
650
+ "name": "_reserve1",
651
+ "type": "uint256"
652
+ },
653
+ {
654
+ "internalType": "uint256",
655
+ "name": "_blockTimestampLast",
656
+ "type": "uint256"
657
+ }
658
+ ],
659
+ "stateMutability": "view",
660
+ "type": "function"
661
+ },
662
+ {
663
+ "inputs": [
664
+ {
665
+ "internalType": "address",
666
+ "name": "spender",
667
+ "type": "address"
668
+ },
669
+ {
670
+ "internalType": "uint256",
671
+ "name": "addedValue",
672
+ "type": "uint256"
673
+ }
674
+ ],
675
+ "name": "increaseAllowance",
676
+ "outputs": [
677
+ {
678
+ "internalType": "bool",
679
+ "name": "",
680
+ "type": "bool"
681
+ }
682
+ ],
683
+ "stateMutability": "nonpayable",
684
+ "type": "function"
685
+ },
686
+ {
687
+ "inputs": [],
688
+ "name": "index0",
689
+ "outputs": [
690
+ {
691
+ "internalType": "uint256",
692
+ "name": "",
693
+ "type": "uint256"
694
+ }
695
+ ],
696
+ "stateMutability": "view",
697
+ "type": "function"
698
+ },
699
+ {
700
+ "inputs": [],
701
+ "name": "index1",
702
+ "outputs": [
703
+ {
704
+ "internalType": "uint256",
705
+ "name": "",
706
+ "type": "uint256"
707
+ }
708
+ ],
709
+ "stateMutability": "view",
710
+ "type": "function"
711
+ },
712
+ {
713
+ "inputs": [
714
+ {
715
+ "internalType": "address",
716
+ "name": "_token0",
717
+ "type": "address"
718
+ },
719
+ {
720
+ "internalType": "address",
721
+ "name": "_token1",
722
+ "type": "address"
723
+ },
724
+ {
725
+ "internalType": "bool",
726
+ "name": "_stable",
727
+ "type": "bool"
728
+ }
729
+ ],
730
+ "name": "initialize",
731
+ "outputs": [],
732
+ "stateMutability": "nonpayable",
733
+ "type": "function"
734
+ },
735
+ {
736
+ "inputs": [],
737
+ "name": "lastObservation",
738
+ "outputs": [
739
+ {
740
+ "components": [
741
+ {
742
+ "internalType": "uint256",
743
+ "name": "timestamp",
744
+ "type": "uint256"
745
+ },
746
+ {
747
+ "internalType": "uint256",
748
+ "name": "reserve0Cumulative",
749
+ "type": "uint256"
750
+ },
751
+ {
752
+ "internalType": "uint256",
753
+ "name": "reserve1Cumulative",
754
+ "type": "uint256"
755
+ }
756
+ ],
757
+ "internalType": "struct IPool.Observation",
758
+ "name": "",
759
+ "type": "tuple"
760
+ }
761
+ ],
762
+ "stateMutability": "view",
763
+ "type": "function"
764
+ },
765
+ {
766
+ "inputs": [],
767
+ "name": "metadata",
768
+ "outputs": [
769
+ {
770
+ "internalType": "uint256",
771
+ "name": "dec0",
772
+ "type": "uint256"
773
+ },
774
+ {
775
+ "internalType": "uint256",
776
+ "name": "dec1",
777
+ "type": "uint256"
778
+ },
779
+ {
780
+ "internalType": "uint256",
781
+ "name": "r0",
782
+ "type": "uint256"
783
+ },
784
+ {
785
+ "internalType": "uint256",
786
+ "name": "r1",
787
+ "type": "uint256"
788
+ },
789
+ {
790
+ "internalType": "bool",
791
+ "name": "st",
792
+ "type": "bool"
793
+ },
794
+ {
795
+ "internalType": "address",
796
+ "name": "t0",
797
+ "type": "address"
798
+ },
799
+ {
800
+ "internalType": "address",
801
+ "name": "t1",
802
+ "type": "address"
803
+ }
804
+ ],
805
+ "stateMutability": "view",
806
+ "type": "function"
807
+ },
808
+ {
809
+ "inputs": [
810
+ {
811
+ "internalType": "address",
812
+ "name": "to",
813
+ "type": "address"
814
+ }
815
+ ],
816
+ "name": "mint",
817
+ "outputs": [
818
+ {
819
+ "internalType": "uint256",
820
+ "name": "liquidity",
821
+ "type": "uint256"
822
+ }
823
+ ],
824
+ "stateMutability": "nonpayable",
825
+ "type": "function"
826
+ },
827
+ {
828
+ "inputs": [],
829
+ "name": "name",
830
+ "outputs": [
831
+ {
832
+ "internalType": "string",
833
+ "name": "",
834
+ "type": "string"
835
+ }
836
+ ],
837
+ "stateMutability": "view",
838
+ "type": "function"
839
+ },
840
+ {
841
+ "inputs": [
842
+ {
843
+ "internalType": "address",
844
+ "name": "owner",
845
+ "type": "address"
846
+ }
847
+ ],
848
+ "name": "nonces",
849
+ "outputs": [
850
+ {
851
+ "internalType": "uint256",
852
+ "name": "",
853
+ "type": "uint256"
854
+ }
855
+ ],
856
+ "stateMutability": "view",
857
+ "type": "function"
858
+ },
859
+ {
860
+ "inputs": [],
861
+ "name": "observationLength",
862
+ "outputs": [
863
+ {
864
+ "internalType": "uint256",
865
+ "name": "",
866
+ "type": "uint256"
867
+ }
868
+ ],
869
+ "stateMutability": "view",
870
+ "type": "function"
871
+ },
872
+ {
873
+ "inputs": [
874
+ {
875
+ "internalType": "uint256",
876
+ "name": "",
877
+ "type": "uint256"
878
+ }
879
+ ],
880
+ "name": "observations",
881
+ "outputs": [
882
+ {
883
+ "internalType": "uint256",
884
+ "name": "timestamp",
885
+ "type": "uint256"
886
+ },
887
+ {
888
+ "internalType": "uint256",
889
+ "name": "reserve0Cumulative",
890
+ "type": "uint256"
891
+ },
892
+ {
893
+ "internalType": "uint256",
894
+ "name": "reserve1Cumulative",
895
+ "type": "uint256"
896
+ }
897
+ ],
898
+ "stateMutability": "view",
899
+ "type": "function"
900
+ },
901
+ {
902
+ "inputs": [],
903
+ "name": "periodSize",
904
+ "outputs": [
905
+ {
906
+ "internalType": "uint256",
907
+ "name": "",
908
+ "type": "uint256"
909
+ }
910
+ ],
911
+ "stateMutability": "view",
912
+ "type": "function"
913
+ },
914
+ {
915
+ "inputs": [
916
+ {
917
+ "internalType": "address",
918
+ "name": "owner",
919
+ "type": "address"
920
+ },
921
+ {
922
+ "internalType": "address",
923
+ "name": "spender",
924
+ "type": "address"
925
+ },
926
+ {
927
+ "internalType": "uint256",
928
+ "name": "value",
929
+ "type": "uint256"
930
+ },
931
+ {
932
+ "internalType": "uint256",
933
+ "name": "deadline",
934
+ "type": "uint256"
935
+ },
936
+ {
937
+ "internalType": "uint8",
938
+ "name": "v",
939
+ "type": "uint8"
940
+ },
941
+ {
942
+ "internalType": "bytes32",
943
+ "name": "r",
944
+ "type": "bytes32"
945
+ },
946
+ {
947
+ "internalType": "bytes32",
948
+ "name": "s",
949
+ "type": "bytes32"
950
+ }
951
+ ],
952
+ "name": "permit",
953
+ "outputs": [],
954
+ "stateMutability": "nonpayable",
955
+ "type": "function"
956
+ },
957
+ {
958
+ "inputs": [],
959
+ "name": "poolFees",
960
+ "outputs": [
961
+ {
962
+ "internalType": "address",
963
+ "name": "",
964
+ "type": "address"
965
+ }
966
+ ],
967
+ "stateMutability": "view",
968
+ "type": "function"
969
+ },
970
+ {
971
+ "inputs": [
972
+ {
973
+ "internalType": "address",
974
+ "name": "tokenIn",
975
+ "type": "address"
976
+ },
977
+ {
978
+ "internalType": "uint256",
979
+ "name": "amountIn",
980
+ "type": "uint256"
981
+ },
982
+ {
983
+ "internalType": "uint256",
984
+ "name": "points",
985
+ "type": "uint256"
986
+ }
987
+ ],
988
+ "name": "prices",
989
+ "outputs": [
990
+ {
991
+ "internalType": "uint256[]",
992
+ "name": "",
993
+ "type": "uint256[]"
994
+ }
995
+ ],
996
+ "stateMutability": "view",
997
+ "type": "function"
998
+ },
999
+ {
1000
+ "inputs": [
1001
+ {
1002
+ "internalType": "address",
1003
+ "name": "tokenIn",
1004
+ "type": "address"
1005
+ },
1006
+ {
1007
+ "internalType": "uint256",
1008
+ "name": "amountIn",
1009
+ "type": "uint256"
1010
+ },
1011
+ {
1012
+ "internalType": "uint256",
1013
+ "name": "granularity",
1014
+ "type": "uint256"
1015
+ }
1016
+ ],
1017
+ "name": "quote",
1018
+ "outputs": [
1019
+ {
1020
+ "internalType": "uint256",
1021
+ "name": "amountOut",
1022
+ "type": "uint256"
1023
+ }
1024
+ ],
1025
+ "stateMutability": "view",
1026
+ "type": "function"
1027
+ },
1028
+ {
1029
+ "inputs": [],
1030
+ "name": "reserve0",
1031
+ "outputs": [
1032
+ {
1033
+ "internalType": "uint256",
1034
+ "name": "",
1035
+ "type": "uint256"
1036
+ }
1037
+ ],
1038
+ "stateMutability": "view",
1039
+ "type": "function"
1040
+ },
1041
+ {
1042
+ "inputs": [],
1043
+ "name": "reserve0CumulativeLast",
1044
+ "outputs": [
1045
+ {
1046
+ "internalType": "uint256",
1047
+ "name": "",
1048
+ "type": "uint256"
1049
+ }
1050
+ ],
1051
+ "stateMutability": "view",
1052
+ "type": "function"
1053
+ },
1054
+ {
1055
+ "inputs": [],
1056
+ "name": "reserve1",
1057
+ "outputs": [
1058
+ {
1059
+ "internalType": "uint256",
1060
+ "name": "",
1061
+ "type": "uint256"
1062
+ }
1063
+ ],
1064
+ "stateMutability": "view",
1065
+ "type": "function"
1066
+ },
1067
+ {
1068
+ "inputs": [],
1069
+ "name": "reserve1CumulativeLast",
1070
+ "outputs": [
1071
+ {
1072
+ "internalType": "uint256",
1073
+ "name": "",
1074
+ "type": "uint256"
1075
+ }
1076
+ ],
1077
+ "stateMutability": "view",
1078
+ "type": "function"
1079
+ },
1080
+ {
1081
+ "inputs": [
1082
+ {
1083
+ "internalType": "address",
1084
+ "name": "tokenIn",
1085
+ "type": "address"
1086
+ },
1087
+ {
1088
+ "internalType": "uint256",
1089
+ "name": "amountIn",
1090
+ "type": "uint256"
1091
+ },
1092
+ {
1093
+ "internalType": "uint256",
1094
+ "name": "points",
1095
+ "type": "uint256"
1096
+ },
1097
+ {
1098
+ "internalType": "uint256",
1099
+ "name": "window",
1100
+ "type": "uint256"
1101
+ }
1102
+ ],
1103
+ "name": "sample",
1104
+ "outputs": [
1105
+ {
1106
+ "internalType": "uint256[]",
1107
+ "name": "",
1108
+ "type": "uint256[]"
1109
+ }
1110
+ ],
1111
+ "stateMutability": "view",
1112
+ "type": "function"
1113
+ },
1114
+ {
1115
+ "inputs": [
1116
+ {
1117
+ "internalType": "string",
1118
+ "name": "__name",
1119
+ "type": "string"
1120
+ }
1121
+ ],
1122
+ "name": "setName",
1123
+ "outputs": [],
1124
+ "stateMutability": "nonpayable",
1125
+ "type": "function"
1126
+ },
1127
+ {
1128
+ "inputs": [
1129
+ {
1130
+ "internalType": "string",
1131
+ "name": "__symbol",
1132
+ "type": "string"
1133
+ }
1134
+ ],
1135
+ "name": "setSymbol",
1136
+ "outputs": [],
1137
+ "stateMutability": "nonpayable",
1138
+ "type": "function"
1139
+ },
1140
+ {
1141
+ "inputs": [
1142
+ {
1143
+ "internalType": "address",
1144
+ "name": "to",
1145
+ "type": "address"
1146
+ }
1147
+ ],
1148
+ "name": "skim",
1149
+ "outputs": [],
1150
+ "stateMutability": "nonpayable",
1151
+ "type": "function"
1152
+ },
1153
+ {
1154
+ "inputs": [],
1155
+ "name": "stable",
1156
+ "outputs": [
1157
+ {
1158
+ "internalType": "bool",
1159
+ "name": "",
1160
+ "type": "bool"
1161
+ }
1162
+ ],
1163
+ "stateMutability": "view",
1164
+ "type": "function"
1165
+ },
1166
+ {
1167
+ "inputs": [
1168
+ {
1169
+ "internalType": "address",
1170
+ "name": "",
1171
+ "type": "address"
1172
+ }
1173
+ ],
1174
+ "name": "supplyIndex0",
1175
+ "outputs": [
1176
+ {
1177
+ "internalType": "uint256",
1178
+ "name": "",
1179
+ "type": "uint256"
1180
+ }
1181
+ ],
1182
+ "stateMutability": "view",
1183
+ "type": "function"
1184
+ },
1185
+ {
1186
+ "inputs": [
1187
+ {
1188
+ "internalType": "address",
1189
+ "name": "",
1190
+ "type": "address"
1191
+ }
1192
+ ],
1193
+ "name": "supplyIndex1",
1194
+ "outputs": [
1195
+ {
1196
+ "internalType": "uint256",
1197
+ "name": "",
1198
+ "type": "uint256"
1199
+ }
1200
+ ],
1201
+ "stateMutability": "view",
1202
+ "type": "function"
1203
+ },
1204
+ {
1205
+ "inputs": [
1206
+ {
1207
+ "internalType": "uint256",
1208
+ "name": "amount0Out",
1209
+ "type": "uint256"
1210
+ },
1211
+ {
1212
+ "internalType": "uint256",
1213
+ "name": "amount1Out",
1214
+ "type": "uint256"
1215
+ },
1216
+ {
1217
+ "internalType": "address",
1218
+ "name": "to",
1219
+ "type": "address"
1220
+ },
1221
+ {
1222
+ "internalType": "bytes",
1223
+ "name": "data",
1224
+ "type": "bytes"
1225
+ }
1226
+ ],
1227
+ "name": "swap",
1228
+ "outputs": [],
1229
+ "stateMutability": "nonpayable",
1230
+ "type": "function"
1231
+ },
1232
+ {
1233
+ "inputs": [],
1234
+ "name": "symbol",
1235
+ "outputs": [
1236
+ {
1237
+ "internalType": "string",
1238
+ "name": "",
1239
+ "type": "string"
1240
+ }
1241
+ ],
1242
+ "stateMutability": "view",
1243
+ "type": "function"
1244
+ },
1245
+ {
1246
+ "inputs": [],
1247
+ "name": "sync",
1248
+ "outputs": [],
1249
+ "stateMutability": "nonpayable",
1250
+ "type": "function"
1251
+ },
1252
+ {
1253
+ "inputs": [],
1254
+ "name": "token0",
1255
+ "outputs": [
1256
+ {
1257
+ "internalType": "address",
1258
+ "name": "",
1259
+ "type": "address"
1260
+ }
1261
+ ],
1262
+ "stateMutability": "view",
1263
+ "type": "function"
1264
+ },
1265
+ {
1266
+ "inputs": [],
1267
+ "name": "token1",
1268
+ "outputs": [
1269
+ {
1270
+ "internalType": "address",
1271
+ "name": "",
1272
+ "type": "address"
1273
+ }
1274
+ ],
1275
+ "stateMutability": "view",
1276
+ "type": "function"
1277
+ },
1278
+ {
1279
+ "inputs": [],
1280
+ "name": "tokens",
1281
+ "outputs": [
1282
+ {
1283
+ "internalType": "address",
1284
+ "name": "",
1285
+ "type": "address"
1286
+ },
1287
+ {
1288
+ "internalType": "address",
1289
+ "name": "",
1290
+ "type": "address"
1291
+ }
1292
+ ],
1293
+ "stateMutability": "view",
1294
+ "type": "function"
1295
+ },
1296
+ {
1297
+ "inputs": [],
1298
+ "name": "totalSupply",
1299
+ "outputs": [
1300
+ {
1301
+ "internalType": "uint256",
1302
+ "name": "",
1303
+ "type": "uint256"
1304
+ }
1305
+ ],
1306
+ "stateMutability": "view",
1307
+ "type": "function"
1308
+ },
1309
+ {
1310
+ "inputs": [
1311
+ {
1312
+ "internalType": "address",
1313
+ "name": "to",
1314
+ "type": "address"
1315
+ },
1316
+ {
1317
+ "internalType": "uint256",
1318
+ "name": "amount",
1319
+ "type": "uint256"
1320
+ }
1321
+ ],
1322
+ "name": "transfer",
1323
+ "outputs": [
1324
+ {
1325
+ "internalType": "bool",
1326
+ "name": "",
1327
+ "type": "bool"
1328
+ }
1329
+ ],
1330
+ "stateMutability": "nonpayable",
1331
+ "type": "function"
1332
+ },
1333
+ {
1334
+ "inputs": [
1335
+ {
1336
+ "internalType": "address",
1337
+ "name": "from",
1338
+ "type": "address"
1339
+ },
1340
+ {
1341
+ "internalType": "address",
1342
+ "name": "to",
1343
+ "type": "address"
1344
+ },
1345
+ {
1346
+ "internalType": "uint256",
1347
+ "name": "amount",
1348
+ "type": "uint256"
1349
+ }
1350
+ ],
1351
+ "name": "transferFrom",
1352
+ "outputs": [
1353
+ {
1354
+ "internalType": "bool",
1355
+ "name": "",
1356
+ "type": "bool"
1357
+ }
1358
+ ],
1359
+ "stateMutability": "nonpayable",
1360
+ "type": "function"
1361
+ }
1362
+ ];
1363
+ export const deployAddress = '0x765824aD2eD0ECB70ECc25B0Cf285832b335d6A9';
1364
+ function getRequest(method, args, contractAddressOrOptions) {
1365
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
1366
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
1367
+ const call = {
1368
+ contractName: 'RipePoolAero',
1369
+ method,
1370
+ args,
1371
+ address,
1372
+ deployAddress,
1373
+ defaultValue,
1374
+ getAbi: () => abi,
1375
+ with: (options) => {
1376
+ call.address = options.contractAddress;
1377
+ call.defaultValue = options.defaultValue;
1378
+ return call;
1379
+ },
1380
+ defaultTo: (defaultValue) => {
1381
+ call.defaultValue = defaultValue;
1382
+ return call;
1383
+ },
1384
+ at: (address) => {
1385
+ call.address = address;
1386
+ return call;
1387
+ },
1388
+ };
1389
+ return call;
1390
+ }
1391
+ export const call = {
1392
+ DOMAIN_SEPARATOR: (...args) => getRequest('DOMAIN_SEPARATOR', args),
1393
+ allowance: (...args) => getRequest('allowance', args),
1394
+ balanceOf: (...args) => getRequest('balanceOf', args),
1395
+ blockTimestampLast: (...args) => getRequest('blockTimestampLast', args),
1396
+ claimable0: (...args) => getRequest('claimable0', args),
1397
+ claimable1: (...args) => getRequest('claimable1', args),
1398
+ currentCumulativePrices: (...args) => getRequest('currentCumulativePrices', args),
1399
+ decimals: (...args) => getRequest('decimals', args),
1400
+ eip712Domain: (...args) => getRequest('eip712Domain', args),
1401
+ factory: (...args) => getRequest('factory', args),
1402
+ getAmountOut: (...args) => getRequest('getAmountOut', args),
1403
+ getReserves: (...args) => getRequest('getReserves', args),
1404
+ index0: (...args) => getRequest('index0', args),
1405
+ index1: (...args) => getRequest('index1', args),
1406
+ lastObservation: (...args) => getRequest('lastObservation', args),
1407
+ metadata: (...args) => getRequest('metadata', args),
1408
+ name: (...args) => getRequest('name', args),
1409
+ nonces: (...args) => getRequest('nonces', args),
1410
+ observationLength: (...args) => getRequest('observationLength', args),
1411
+ observations: (...args) => getRequest('observations', args),
1412
+ periodSize: (...args) => getRequest('periodSize', args),
1413
+ poolFees: (...args) => getRequest('poolFees', args),
1414
+ prices: (...args) => getRequest('prices', args),
1415
+ quote: (...args) => getRequest('quote', args),
1416
+ reserve0: (...args) => getRequest('reserve0', args),
1417
+ reserve0CumulativeLast: (...args) => getRequest('reserve0CumulativeLast', args),
1418
+ reserve1: (...args) => getRequest('reserve1', args),
1419
+ reserve1CumulativeLast: (...args) => getRequest('reserve1CumulativeLast', args),
1420
+ sample: (...args) => getRequest('sample', args),
1421
+ stable: (...args) => getRequest('stable', args),
1422
+ supplyIndex0: (...args) => getRequest('supplyIndex0', args),
1423
+ supplyIndex1: (...args) => getRequest('supplyIndex1', args),
1424
+ symbol: (...args) => getRequest('symbol', args),
1425
+ token0: (...args) => getRequest('token0', args),
1426
+ token1: (...args) => getRequest('token1', args),
1427
+ tokens: (...args) => getRequest('tokens', args),
1428
+ totalSupply: (...args) => getRequest('totalSupply', args),
1429
+ };
1430
+ function getMutation(functionName) {
1431
+ return {
1432
+ contractName: 'RipePoolAero',
1433
+ functionName,
1434
+ deployAddress,
1435
+ argsType: undefined,
1436
+ getAbi: () => abi,
1437
+ };
1438
+ }
1439
+ export const mutation = {
1440
+ approve: getMutation('approve'),
1441
+ burn: getMutation('burn'),
1442
+ claimFees: getMutation('claimFees'),
1443
+ decreaseAllowance: getMutation('decreaseAllowance'),
1444
+ getK: getMutation('getK'),
1445
+ increaseAllowance: getMutation('increaseAllowance'),
1446
+ initialize: getMutation('initialize'),
1447
+ mint: getMutation('mint'),
1448
+ permit: getMutation('permit'),
1449
+ setName: getMutation('setName'),
1450
+ setSymbol: getMutation('setSymbol'),
1451
+ skim: getMutation('skim'),
1452
+ swap: getMutation('swap'),
1453
+ sync: getMutation('sync'),
1454
+ transfer: getMutation('transfer'),
1455
+ transferFrom: getMutation('transferFrom'),
1456
+ };
1457
+ export function toSdk(publicClient, walletClient) {
1458
+ return {
1459
+ deployAddress,
1460
+ abi,
1461
+ // Queries
1462
+ DOMAIN_SEPARATOR: (...args) => singleQuery(publicClient, call.DOMAIN_SEPARATOR(...args)),
1463
+ allowance: (...args) => singleQuery(publicClient, call.allowance(...args)),
1464
+ balanceOf: (...args) => singleQuery(publicClient, call.balanceOf(...args)),
1465
+ blockTimestampLast: (...args) => singleQuery(publicClient, call.blockTimestampLast(...args)),
1466
+ claimable0: (...args) => singleQuery(publicClient, call.claimable0(...args)),
1467
+ claimable1: (...args) => singleQuery(publicClient, call.claimable1(...args)),
1468
+ currentCumulativePrices: (...args) => singleQuery(publicClient, call.currentCumulativePrices(...args)),
1469
+ decimals: (...args) => singleQuery(publicClient, call.decimals(...args)),
1470
+ eip712Domain: (...args) => singleQuery(publicClient, call.eip712Domain(...args)),
1471
+ factory: (...args) => singleQuery(publicClient, call.factory(...args)),
1472
+ getAmountOut: (...args) => singleQuery(publicClient, call.getAmountOut(...args)),
1473
+ getReserves: (...args) => singleQuery(publicClient, call.getReserves(...args)),
1474
+ index0: (...args) => singleQuery(publicClient, call.index0(...args)),
1475
+ index1: (...args) => singleQuery(publicClient, call.index1(...args)),
1476
+ lastObservation: (...args) => singleQuery(publicClient, call.lastObservation(...args)),
1477
+ metadata: (...args) => singleQuery(publicClient, call.metadata(...args)),
1478
+ name: (...args) => singleQuery(publicClient, call.name(...args)),
1479
+ nonces: (...args) => singleQuery(publicClient, call.nonces(...args)),
1480
+ observationLength: (...args) => singleQuery(publicClient, call.observationLength(...args)),
1481
+ observations: (...args) => singleQuery(publicClient, call.observations(...args)),
1482
+ periodSize: (...args) => singleQuery(publicClient, call.periodSize(...args)),
1483
+ poolFees: (...args) => singleQuery(publicClient, call.poolFees(...args)),
1484
+ prices: (...args) => singleQuery(publicClient, call.prices(...args)),
1485
+ quote: (...args) => singleQuery(publicClient, call.quote(...args)),
1486
+ reserve0: (...args) => singleQuery(publicClient, call.reserve0(...args)),
1487
+ reserve0CumulativeLast: (...args) => singleQuery(publicClient, call.reserve0CumulativeLast(...args)),
1488
+ reserve1: (...args) => singleQuery(publicClient, call.reserve1(...args)),
1489
+ reserve1CumulativeLast: (...args) => singleQuery(publicClient, call.reserve1CumulativeLast(...args)),
1490
+ sample: (...args) => singleQuery(publicClient, call.sample(...args)),
1491
+ stable: (...args) => singleQuery(publicClient, call.stable(...args)),
1492
+ supplyIndex0: (...args) => singleQuery(publicClient, call.supplyIndex0(...args)),
1493
+ supplyIndex1: (...args) => singleQuery(publicClient, call.supplyIndex1(...args)),
1494
+ symbol: (...args) => singleQuery(publicClient, call.symbol(...args)),
1495
+ token0: (...args) => singleQuery(publicClient, call.token0(...args)),
1496
+ token1: (...args) => singleQuery(publicClient, call.token1(...args)),
1497
+ tokens: (...args) => singleQuery(publicClient, call.tokens(...args)),
1498
+ totalSupply: (...args) => singleQuery(publicClient, call.totalSupply(...args)),
1499
+ // Mutations
1500
+ approve: (...args) => mutate(walletClient, mutation.approve)(...args),
1501
+ burn: (...args) => mutate(walletClient, mutation.burn)(...args),
1502
+ claimFees: (...args) => mutate(walletClient, mutation.claimFees)(...args),
1503
+ decreaseAllowance: (...args) => mutate(walletClient, mutation.decreaseAllowance)(...args),
1504
+ getK: (...args) => mutate(walletClient, mutation.getK)(...args),
1505
+ increaseAllowance: (...args) => mutate(walletClient, mutation.increaseAllowance)(...args),
1506
+ initialize: (...args) => mutate(walletClient, mutation.initialize)(...args),
1507
+ mint: (...args) => mutate(walletClient, mutation.mint)(...args),
1508
+ permit: (...args) => mutate(walletClient, mutation.permit)(...args),
1509
+ setName: (...args) => mutate(walletClient, mutation.setName)(...args),
1510
+ setSymbol: (...args) => mutate(walletClient, mutation.setSymbol)(...args),
1511
+ skim: (...args) => mutate(walletClient, mutation.skim)(...args),
1512
+ swap: (...args) => mutate(walletClient, mutation.swap)(...args),
1513
+ sync: (...args) => mutate(walletClient, mutation.sync)(...args),
1514
+ transfer: (...args) => mutate(walletClient, mutation.transfer)(...args),
1515
+ transferFrom: (...args) => mutate(walletClient, mutation.transferFrom)(...args),
1516
+ };
1517
+ }