@scalecrx/sdk 0.4.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.
@@ -0,0 +1,1425 @@
1
+ {
2
+ "address": "SCALEWoRSpVZpMRqHEcDfNvBh3nUSe34jDr9r689gLa",
3
+ "metadata": {
4
+ "name": "scale_vmm",
5
+ "version": "0.1.0",
6
+ "spec": "0.1.0"
7
+ },
8
+ "instructions": [
9
+ {
10
+ "name": "buy",
11
+ "discriminator": [
12
+ 102,
13
+ 6,
14
+ 61,
15
+ 18,
16
+ 1,
17
+ 218,
18
+ 235,
19
+ 234
20
+ ],
21
+ "accounts": [
22
+ {
23
+ "name": "pair",
24
+ "writable": true,
25
+ "pda": {
26
+ "seeds": [
27
+ {
28
+ "kind": "const",
29
+ "value": [
30
+ 115,
31
+ 116,
32
+ 97,
33
+ 116,
34
+ 101
35
+ ]
36
+ },
37
+ {
38
+ "kind": "account",
39
+ "path": "mint_a"
40
+ },
41
+ {
42
+ "kind": "account",
43
+ "path": "mint_b"
44
+ }
45
+ ]
46
+ }
47
+ },
48
+ {
49
+ "name": "user",
50
+ "writable": true,
51
+ "signer": true
52
+ },
53
+ {
54
+ "name": "mint_a",
55
+ "writable": true
56
+ },
57
+ {
58
+ "name": "mint_b"
59
+ },
60
+ {
61
+ "name": "user_ta_a",
62
+ "writable": true
63
+ },
64
+ {
65
+ "name": "user_ta_b",
66
+ "writable": true
67
+ },
68
+ {
69
+ "name": "vault_a",
70
+ "writable": true,
71
+ "pda": {
72
+ "seeds": [
73
+ {
74
+ "kind": "account",
75
+ "path": "pair"
76
+ },
77
+ {
78
+ "kind": "account",
79
+ "path": "mint_a"
80
+ }
81
+ ]
82
+ }
83
+ },
84
+ {
85
+ "name": "vault_b",
86
+ "writable": true,
87
+ "pda": {
88
+ "seeds": [
89
+ {
90
+ "kind": "account",
91
+ "path": "pair"
92
+ },
93
+ {
94
+ "kind": "account",
95
+ "path": "mint_b"
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ {
101
+ "name": "platform_fee_ta_a",
102
+ "writable": true
103
+ },
104
+ {
105
+ "name": "token_program_a"
106
+ },
107
+ {
108
+ "name": "token_program_b"
109
+ },
110
+ {
111
+ "name": "system_program",
112
+ "address": "11111111111111111111111111111111"
113
+ },
114
+ {
115
+ "name": "config",
116
+ "pda": {
117
+ "seeds": [
118
+ {
119
+ "kind": "const",
120
+ "value": [
121
+ 99,
122
+ 111,
123
+ 110,
124
+ 102,
125
+ 105,
126
+ 103
127
+ ]
128
+ }
129
+ ]
130
+ }
131
+ },
132
+ {
133
+ "name": "amm_program",
134
+ "address": "SCALEwAvEK5gtkdHiFzXfPgtk2YwJxPDzaV3aDmR7tA"
135
+ },
136
+ {
137
+ "name": "amm_pool",
138
+ "writable": true
139
+ },
140
+ {
141
+ "name": "amm_vault_a",
142
+ "writable": true
143
+ },
144
+ {
145
+ "name": "amm_vault_b",
146
+ "writable": true
147
+ },
148
+ {
149
+ "name": "amm_config"
150
+ }
151
+ ],
152
+ "args": [
153
+ {
154
+ "name": "params",
155
+ "type": {
156
+ "defined": {
157
+ "name": "SwapParams"
158
+ }
159
+ }
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ "name": "create",
165
+ "discriminator": [
166
+ 24,
167
+ 30,
168
+ 200,
169
+ 40,
170
+ 5,
171
+ 28,
172
+ 7,
173
+ 119
174
+ ],
175
+ "accounts": [
176
+ {
177
+ "name": "payer",
178
+ "writable": true,
179
+ "signer": true
180
+ },
181
+ {
182
+ "name": "token_wallet_authority",
183
+ "docs": [
184
+ "Token account authority for funding token B."
185
+ ],
186
+ "signer": true
187
+ },
188
+ {
189
+ "name": "mint_a"
190
+ },
191
+ {
192
+ "name": "mint_b"
193
+ },
194
+ {
195
+ "name": "token_wallet_b",
196
+ "writable": true
197
+ },
198
+ {
199
+ "name": "pair",
200
+ "writable": true,
201
+ "pda": {
202
+ "seeds": [
203
+ {
204
+ "kind": "const",
205
+ "value": [
206
+ 115,
207
+ 116,
208
+ 97,
209
+ 116,
210
+ 101
211
+ ]
212
+ },
213
+ {
214
+ "kind": "account",
215
+ "path": "mint_a"
216
+ },
217
+ {
218
+ "kind": "account",
219
+ "path": "mint_b"
220
+ }
221
+ ]
222
+ }
223
+ },
224
+ {
225
+ "name": "vault_a",
226
+ "writable": true,
227
+ "pda": {
228
+ "seeds": [
229
+ {
230
+ "kind": "account",
231
+ "path": "pair"
232
+ },
233
+ {
234
+ "kind": "account",
235
+ "path": "mint_a"
236
+ }
237
+ ]
238
+ }
239
+ },
240
+ {
241
+ "name": "vault_b",
242
+ "writable": true,
243
+ "pda": {
244
+ "seeds": [
245
+ {
246
+ "kind": "account",
247
+ "path": "pair"
248
+ },
249
+ {
250
+ "kind": "account",
251
+ "path": "mint_b"
252
+ }
253
+ ]
254
+ }
255
+ },
256
+ {
257
+ "name": "token_program_a"
258
+ },
259
+ {
260
+ "name": "token_program_b"
261
+ },
262
+ {
263
+ "name": "system_program",
264
+ "address": "11111111111111111111111111111111"
265
+ },
266
+ {
267
+ "name": "config",
268
+ "pda": {
269
+ "seeds": [
270
+ {
271
+ "kind": "const",
272
+ "value": [
273
+ 99,
274
+ 111,
275
+ 110,
276
+ 102,
277
+ 105,
278
+ 103
279
+ ]
280
+ }
281
+ ]
282
+ }
283
+ }
284
+ ],
285
+ "args": [
286
+ {
287
+ "name": "params",
288
+ "type": {
289
+ "defined": {
290
+ "name": "CreateParams"
291
+ }
292
+ }
293
+ }
294
+ ]
295
+ },
296
+ {
297
+ "name": "get_platform_config",
298
+ "discriminator": [
299
+ 114,
300
+ 136,
301
+ 38,
302
+ 81,
303
+ 204,
304
+ 245,
305
+ 250,
306
+ 146
307
+ ],
308
+ "accounts": [
309
+ {
310
+ "name": "config",
311
+ "pda": {
312
+ "seeds": [
313
+ {
314
+ "kind": "const",
315
+ "value": [
316
+ 99,
317
+ 111,
318
+ 110,
319
+ 102,
320
+ 105,
321
+ 103
322
+ ]
323
+ }
324
+ ]
325
+ }
326
+ }
327
+ ],
328
+ "args": [],
329
+ "returns": {
330
+ "defined": {
331
+ "name": "PlatformConfigView"
332
+ }
333
+ }
334
+ },
335
+ {
336
+ "name": "quote_buy",
337
+ "discriminator": [
338
+ 83,
339
+ 9,
340
+ 231,
341
+ 110,
342
+ 146,
343
+ 31,
344
+ 40,
345
+ 12
346
+ ],
347
+ "accounts": [
348
+ {
349
+ "name": "pair",
350
+ "pda": {
351
+ "seeds": [
352
+ {
353
+ "kind": "const",
354
+ "value": [
355
+ 115,
356
+ 116,
357
+ 97,
358
+ 116,
359
+ 101
360
+ ]
361
+ },
362
+ {
363
+ "kind": "account",
364
+ "path": "mint_a"
365
+ },
366
+ {
367
+ "kind": "account",
368
+ "path": "mint_b"
369
+ }
370
+ ]
371
+ }
372
+ },
373
+ {
374
+ "name": "mint_a"
375
+ },
376
+ {
377
+ "name": "mint_b"
378
+ },
379
+ {
380
+ "name": "config",
381
+ "pda": {
382
+ "seeds": [
383
+ {
384
+ "kind": "const",
385
+ "value": [
386
+ 99,
387
+ 111,
388
+ 110,
389
+ 102,
390
+ 105,
391
+ 103
392
+ ]
393
+ }
394
+ ]
395
+ }
396
+ }
397
+ ],
398
+ "args": [
399
+ {
400
+ "name": "params",
401
+ "type": {
402
+ "defined": {
403
+ "name": "SwapParams"
404
+ }
405
+ }
406
+ }
407
+ ],
408
+ "returns": {
409
+ "defined": {
410
+ "name": "SwapResult"
411
+ }
412
+ }
413
+ },
414
+ {
415
+ "name": "quote_sell",
416
+ "discriminator": [
417
+ 5,
418
+ 178,
419
+ 49,
420
+ 206,
421
+ 140,
422
+ 231,
423
+ 131,
424
+ 145
425
+ ],
426
+ "accounts": [
427
+ {
428
+ "name": "pair",
429
+ "pda": {
430
+ "seeds": [
431
+ {
432
+ "kind": "const",
433
+ "value": [
434
+ 115,
435
+ 116,
436
+ 97,
437
+ 116,
438
+ 101
439
+ ]
440
+ },
441
+ {
442
+ "kind": "account",
443
+ "path": "mint_a"
444
+ },
445
+ {
446
+ "kind": "account",
447
+ "path": "mint_b"
448
+ }
449
+ ]
450
+ }
451
+ },
452
+ {
453
+ "name": "mint_a"
454
+ },
455
+ {
456
+ "name": "mint_b"
457
+ },
458
+ {
459
+ "name": "config",
460
+ "pda": {
461
+ "seeds": [
462
+ {
463
+ "kind": "const",
464
+ "value": [
465
+ 99,
466
+ 111,
467
+ 110,
468
+ 102,
469
+ 105,
470
+ 103
471
+ ]
472
+ }
473
+ ]
474
+ }
475
+ }
476
+ ],
477
+ "args": [
478
+ {
479
+ "name": "params",
480
+ "type": {
481
+ "defined": {
482
+ "name": "SwapParams"
483
+ }
484
+ }
485
+ }
486
+ ],
487
+ "returns": {
488
+ "defined": {
489
+ "name": "SwapResult"
490
+ }
491
+ }
492
+ },
493
+ {
494
+ "name": "sell",
495
+ "discriminator": [
496
+ 51,
497
+ 230,
498
+ 133,
499
+ 164,
500
+ 1,
501
+ 127,
502
+ 131,
503
+ 173
504
+ ],
505
+ "accounts": [
506
+ {
507
+ "name": "pair",
508
+ "writable": true,
509
+ "pda": {
510
+ "seeds": [
511
+ {
512
+ "kind": "const",
513
+ "value": [
514
+ 115,
515
+ 116,
516
+ 97,
517
+ 116,
518
+ 101
519
+ ]
520
+ },
521
+ {
522
+ "kind": "account",
523
+ "path": "mint_a"
524
+ },
525
+ {
526
+ "kind": "account",
527
+ "path": "mint_b"
528
+ }
529
+ ]
530
+ }
531
+ },
532
+ {
533
+ "name": "user",
534
+ "writable": true,
535
+ "signer": true
536
+ },
537
+ {
538
+ "name": "mint_a",
539
+ "writable": true
540
+ },
541
+ {
542
+ "name": "mint_b"
543
+ },
544
+ {
545
+ "name": "user_ta_a",
546
+ "writable": true
547
+ },
548
+ {
549
+ "name": "user_ta_b",
550
+ "writable": true
551
+ },
552
+ {
553
+ "name": "vault_a",
554
+ "writable": true,
555
+ "pda": {
556
+ "seeds": [
557
+ {
558
+ "kind": "account",
559
+ "path": "pair"
560
+ },
561
+ {
562
+ "kind": "account",
563
+ "path": "mint_a"
564
+ }
565
+ ]
566
+ }
567
+ },
568
+ {
569
+ "name": "vault_b",
570
+ "writable": true,
571
+ "pda": {
572
+ "seeds": [
573
+ {
574
+ "kind": "account",
575
+ "path": "pair"
576
+ },
577
+ {
578
+ "kind": "account",
579
+ "path": "mint_b"
580
+ }
581
+ ]
582
+ }
583
+ },
584
+ {
585
+ "name": "platform_fee_ta_a",
586
+ "writable": true
587
+ },
588
+ {
589
+ "name": "token_program_a"
590
+ },
591
+ {
592
+ "name": "token_program_b"
593
+ },
594
+ {
595
+ "name": "system_program",
596
+ "address": "11111111111111111111111111111111"
597
+ },
598
+ {
599
+ "name": "config",
600
+ "pda": {
601
+ "seeds": [
602
+ {
603
+ "kind": "const",
604
+ "value": [
605
+ 99,
606
+ 111,
607
+ 110,
608
+ 102,
609
+ 105,
610
+ 103
611
+ ]
612
+ }
613
+ ]
614
+ }
615
+ },
616
+ {
617
+ "name": "amm_program",
618
+ "address": "SCALEwAvEK5gtkdHiFzXfPgtk2YwJxPDzaV3aDmR7tA"
619
+ },
620
+ {
621
+ "name": "amm_pool",
622
+ "writable": true
623
+ },
624
+ {
625
+ "name": "amm_vault_a",
626
+ "writable": true
627
+ },
628
+ {
629
+ "name": "amm_vault_b",
630
+ "writable": true
631
+ },
632
+ {
633
+ "name": "amm_config"
634
+ }
635
+ ],
636
+ "args": [
637
+ {
638
+ "name": "params",
639
+ "type": {
640
+ "defined": {
641
+ "name": "SwapParams"
642
+ }
643
+ }
644
+ }
645
+ ]
646
+ },
647
+ {
648
+ "name": "set_fee_beneficiary",
649
+ "discriminator": [
650
+ 74,
651
+ 105,
652
+ 83,
653
+ 74,
654
+ 154,
655
+ 205,
656
+ 249,
657
+ 217
658
+ ],
659
+ "accounts": [
660
+ {
661
+ "name": "authority",
662
+ "writable": true,
663
+ "signer": true
664
+ },
665
+ {
666
+ "name": "config",
667
+ "writable": true,
668
+ "pda": {
669
+ "seeds": [
670
+ {
671
+ "kind": "const",
672
+ "value": [
673
+ 99,
674
+ 111,
675
+ 110,
676
+ 102,
677
+ 105,
678
+ 103
679
+ ]
680
+ }
681
+ ]
682
+ }
683
+ }
684
+ ],
685
+ "args": [
686
+ {
687
+ "name": "beneficiary",
688
+ "type": "pubkey"
689
+ }
690
+ ]
691
+ },
692
+ {
693
+ "name": "set_graduation_threshold",
694
+ "discriminator": [
695
+ 221,
696
+ 151,
697
+ 101,
698
+ 206,
699
+ 50,
700
+ 192,
701
+ 31,
702
+ 12
703
+ ],
704
+ "accounts": [
705
+ {
706
+ "name": "authority",
707
+ "writable": true,
708
+ "signer": true
709
+ },
710
+ {
711
+ "name": "config",
712
+ "writable": true,
713
+ "pda": {
714
+ "seeds": [
715
+ {
716
+ "kind": "const",
717
+ "value": [
718
+ 99,
719
+ 111,
720
+ 110,
721
+ 102,
722
+ 105,
723
+ 103
724
+ ]
725
+ }
726
+ ]
727
+ }
728
+ }
729
+ ],
730
+ "args": [
731
+ {
732
+ "name": "threshold",
733
+ "type": "u64"
734
+ }
735
+ ]
736
+ },
737
+ {
738
+ "name": "set_platform_base_token",
739
+ "discriminator": [
740
+ 157,
741
+ 110,
742
+ 249,
743
+ 237,
744
+ 128,
745
+ 5,
746
+ 212,
747
+ 233
748
+ ],
749
+ "accounts": [
750
+ {
751
+ "name": "authority",
752
+ "writable": true,
753
+ "signer": true
754
+ },
755
+ {
756
+ "name": "config",
757
+ "writable": true,
758
+ "pda": {
759
+ "seeds": [
760
+ {
761
+ "kind": "const",
762
+ "value": [
763
+ 99,
764
+ 111,
765
+ 110,
766
+ 102,
767
+ 105,
768
+ 103
769
+ ]
770
+ }
771
+ ]
772
+ }
773
+ },
774
+ {
775
+ "name": "system_program",
776
+ "address": "11111111111111111111111111111111"
777
+ },
778
+ {
779
+ "name": "program_data"
780
+ }
781
+ ],
782
+ "args": [
783
+ {
784
+ "name": "base_token",
785
+ "type": "pubkey"
786
+ }
787
+ ]
788
+ },
789
+ {
790
+ "name": "set_platform_fee",
791
+ "discriminator": [
792
+ 19,
793
+ 70,
794
+ 111,
795
+ 182,
796
+ 156,
797
+ 58,
798
+ 208,
799
+ 203
800
+ ],
801
+ "accounts": [
802
+ {
803
+ "name": "authority",
804
+ "writable": true,
805
+ "signer": true
806
+ },
807
+ {
808
+ "name": "config",
809
+ "writable": true,
810
+ "pda": {
811
+ "seeds": [
812
+ {
813
+ "kind": "const",
814
+ "value": [
815
+ 99,
816
+ 111,
817
+ 110,
818
+ 102,
819
+ 105,
820
+ 103
821
+ ]
822
+ }
823
+ ]
824
+ }
825
+ }
826
+ ],
827
+ "args": [
828
+ {
829
+ "name": "fee_bps",
830
+ "type": "u16"
831
+ }
832
+ ]
833
+ },
834
+ {
835
+ "name": "transfer_authority",
836
+ "discriminator": [
837
+ 48,
838
+ 169,
839
+ 76,
840
+ 72,
841
+ 229,
842
+ 180,
843
+ 55,
844
+ 161
845
+ ],
846
+ "accounts": [
847
+ {
848
+ "name": "authority",
849
+ "writable": true,
850
+ "signer": true
851
+ },
852
+ {
853
+ "name": "config",
854
+ "writable": true,
855
+ "pda": {
856
+ "seeds": [
857
+ {
858
+ "kind": "const",
859
+ "value": [
860
+ 99,
861
+ 111,
862
+ 110,
863
+ 102,
864
+ 105,
865
+ 103
866
+ ]
867
+ }
868
+ ]
869
+ }
870
+ }
871
+ ],
872
+ "args": [
873
+ {
874
+ "name": "new_authority",
875
+ "type": "pubkey"
876
+ }
877
+ ]
878
+ }
879
+ ],
880
+ "accounts": [
881
+ {
882
+ "name": "PairState",
883
+ "discriminator": [
884
+ 229,
885
+ 212,
886
+ 222,
887
+ 222,
888
+ 191,
889
+ 128,
890
+ 176,
891
+ 235
892
+ ]
893
+ },
894
+ {
895
+ "name": "PlatformConfig",
896
+ "discriminator": [
897
+ 160,
898
+ 78,
899
+ 128,
900
+ 0,
901
+ 248,
902
+ 83,
903
+ 230,
904
+ 160
905
+ ]
906
+ }
907
+ ],
908
+ "events": [
909
+ {
910
+ "name": "BuyEvent",
911
+ "discriminator": [
912
+ 103,
913
+ 244,
914
+ 82,
915
+ 31,
916
+ 44,
917
+ 245,
918
+ 119,
919
+ 119
920
+ ]
921
+ },
922
+ {
923
+ "name": "PairCreated",
924
+ "discriminator": [
925
+ 173,
926
+ 73,
927
+ 77,
928
+ 43,
929
+ 235,
930
+ 157,
931
+ 56,
932
+ 30
933
+ ]
934
+ },
935
+ {
936
+ "name": "PairGraduated",
937
+ "discriminator": [
938
+ 204,
939
+ 30,
940
+ 104,
941
+ 104,
942
+ 11,
943
+ 1,
944
+ 171,
945
+ 176
946
+ ]
947
+ },
948
+ {
949
+ "name": "SellEvent",
950
+ "discriminator": [
951
+ 62,
952
+ 47,
953
+ 55,
954
+ 10,
955
+ 165,
956
+ 3,
957
+ 220,
958
+ 42
959
+ ]
960
+ }
961
+ ],
962
+ "errors": [
963
+ {
964
+ "code": 6000,
965
+ "name": "PairDisabled",
966
+ "msg": "Pair Disabled"
967
+ },
968
+ {
969
+ "code": 6001,
970
+ "name": "PairGraduated",
971
+ "msg": "Pair already graduated"
972
+ },
973
+ {
974
+ "code": 6002,
975
+ "name": "InvalidMint",
976
+ "msg": "Invalid Mint"
977
+ },
978
+ {
979
+ "code": 6003,
980
+ "name": "InvalidTokenAccount",
981
+ "msg": "Invalid Token Account"
982
+ },
983
+ {
984
+ "code": 6004,
985
+ "name": "InvalidInitialTokenReserves",
986
+ "msg": "Initial token reserves must be greater than 0"
987
+ },
988
+ {
989
+ "code": 6005,
990
+ "name": "InvalidShift",
991
+ "msg": "Shift must be greater than 0"
992
+ },
993
+ {
994
+ "code": 6006,
995
+ "name": "InvalidFees",
996
+ "msg": "Fees must be between 0 and 10000 basis points"
997
+ },
998
+ {
999
+ "code": 6007,
1000
+ "name": "MathOverflow",
1001
+ "msg": "Math overflow"
1002
+ },
1003
+ {
1004
+ "code": 6008,
1005
+ "name": "InsufficientOutput",
1006
+ "msg": "Insufficient output"
1007
+ },
1008
+ {
1009
+ "code": 6009,
1010
+ "name": "InsufficientInput",
1011
+ "msg": "Insufficient input"
1012
+ },
1013
+ {
1014
+ "code": 6010,
1015
+ "name": "PoolEmpty",
1016
+ "msg": "Pool Empty"
1017
+ },
1018
+ {
1019
+ "code": 6011,
1020
+ "name": "InvalidCurve",
1021
+ "msg": "Invalid curve type"
1022
+ },
1023
+ {
1024
+ "code": 6012,
1025
+ "name": "InvalidBeneficiary",
1026
+ "msg": "Invalid fee beneficiary"
1027
+ },
1028
+ {
1029
+ "code": 6013,
1030
+ "name": "MissingBeneficiaryAccount",
1031
+ "msg": "Missing beneficiary accounts"
1032
+ },
1033
+ {
1034
+ "code": 6014,
1035
+ "name": "UnauthorizedAuthority",
1036
+ "msg": "Unauthorized authority"
1037
+ },
1038
+ {
1039
+ "code": 6015,
1040
+ "name": "InvalidPlatformBaseToken",
1041
+ "msg": "Pair base token is restricted by platform config"
1042
+ },
1043
+ {
1044
+ "code": 6016,
1045
+ "name": "InvalidPlatformFee",
1046
+ "msg": "Invalid platform fee"
1047
+ },
1048
+ {
1049
+ "code": 6017,
1050
+ "name": "InvalidGraduationThreshold",
1051
+ "msg": "Invalid graduation threshold"
1052
+ }
1053
+ ],
1054
+ "types": [
1055
+ {
1056
+ "name": "BuyEvent",
1057
+ "type": {
1058
+ "kind": "struct",
1059
+ "fields": [
1060
+ {
1061
+ "name": "pair",
1062
+ "type": "pubkey"
1063
+ },
1064
+ {
1065
+ "name": "user",
1066
+ "type": "pubkey"
1067
+ },
1068
+ {
1069
+ "name": "amount_a",
1070
+ "type": "u64"
1071
+ },
1072
+ {
1073
+ "name": "amount_b",
1074
+ "type": "u64"
1075
+ },
1076
+ {
1077
+ "name": "new_reserves_a",
1078
+ "type": "u128"
1079
+ },
1080
+ {
1081
+ "name": "new_reserves_b",
1082
+ "type": "u128"
1083
+ },
1084
+ {
1085
+ "name": "fee_a",
1086
+ "type": "u64"
1087
+ }
1088
+ ]
1089
+ }
1090
+ },
1091
+ {
1092
+ "name": "CreateParams",
1093
+ "type": {
1094
+ "kind": "struct",
1095
+ "fields": [
1096
+ {
1097
+ "name": "shift",
1098
+ "type": "u128"
1099
+ },
1100
+ {
1101
+ "name": "initial_token_b_reserves",
1102
+ "type": "u64"
1103
+ },
1104
+ {
1105
+ "name": "curve",
1106
+ "type": {
1107
+ "defined": {
1108
+ "name": "CurveType"
1109
+ }
1110
+ }
1111
+ },
1112
+ {
1113
+ "name": "fee_beneficiaries",
1114
+ "type": {
1115
+ "vec": {
1116
+ "defined": {
1117
+ "name": "FeeBeneficiary"
1118
+ }
1119
+ }
1120
+ }
1121
+ }
1122
+ ]
1123
+ }
1124
+ },
1125
+ {
1126
+ "name": "CurveType",
1127
+ "type": {
1128
+ "kind": "enum",
1129
+ "variants": [
1130
+ {
1131
+ "name": "ConstantProduct"
1132
+ },
1133
+ {
1134
+ "name": "Exponential"
1135
+ }
1136
+ ]
1137
+ }
1138
+ },
1139
+ {
1140
+ "name": "FeeBeneficiary",
1141
+ "type": {
1142
+ "kind": "struct",
1143
+ "fields": [
1144
+ {
1145
+ "name": "wallet",
1146
+ "type": "pubkey"
1147
+ },
1148
+ {
1149
+ "name": "share_bps",
1150
+ "type": "u16"
1151
+ }
1152
+ ]
1153
+ }
1154
+ },
1155
+ {
1156
+ "name": "PairCreated",
1157
+ "type": {
1158
+ "kind": "struct",
1159
+ "fields": [
1160
+ {
1161
+ "name": "pair",
1162
+ "type": "pubkey"
1163
+ },
1164
+ {
1165
+ "name": "mint_a",
1166
+ "type": "pubkey"
1167
+ },
1168
+ {
1169
+ "name": "mint_b",
1170
+ "type": "pubkey"
1171
+ },
1172
+ {
1173
+ "name": "initial_token_reserves",
1174
+ "type": "u64"
1175
+ },
1176
+ {
1177
+ "name": "shift",
1178
+ "type": "u128"
1179
+ },
1180
+ {
1181
+ "name": "curve",
1182
+ "type": {
1183
+ "defined": {
1184
+ "name": "CurveType"
1185
+ }
1186
+ }
1187
+ }
1188
+ ]
1189
+ }
1190
+ },
1191
+ {
1192
+ "name": "PairGraduated",
1193
+ "type": {
1194
+ "kind": "struct",
1195
+ "fields": [
1196
+ {
1197
+ "name": "pair",
1198
+ "type": "pubkey"
1199
+ },
1200
+ {
1201
+ "name": "amm_pool",
1202
+ "type": "pubkey"
1203
+ },
1204
+ {
1205
+ "name": "token_a_reserves",
1206
+ "type": "u128"
1207
+ },
1208
+ {
1209
+ "name": "token_b_reserves",
1210
+ "type": "u128"
1211
+ }
1212
+ ]
1213
+ }
1214
+ },
1215
+ {
1216
+ "name": "PairState",
1217
+ "type": {
1218
+ "kind": "struct",
1219
+ "fields": [
1220
+ {
1221
+ "name": "enabled",
1222
+ "type": "bool"
1223
+ },
1224
+ {
1225
+ "name": "graduated",
1226
+ "type": "bool"
1227
+ },
1228
+ {
1229
+ "name": "mint_a",
1230
+ "type": "pubkey"
1231
+ },
1232
+ {
1233
+ "name": "mint_b",
1234
+ "type": "pubkey"
1235
+ },
1236
+ {
1237
+ "name": "token_a_reserves",
1238
+ "type": "u128"
1239
+ },
1240
+ {
1241
+ "name": "token_b_reserves",
1242
+ "type": "u128"
1243
+ },
1244
+ {
1245
+ "name": "shift",
1246
+ "type": "u128"
1247
+ },
1248
+ {
1249
+ "name": "curve",
1250
+ "type": {
1251
+ "defined": {
1252
+ "name": "CurveType"
1253
+ }
1254
+ }
1255
+ },
1256
+ {
1257
+ "name": "fee_beneficiary_count",
1258
+ "type": "u8"
1259
+ },
1260
+ {
1261
+ "name": "fee_beneficiaries",
1262
+ "type": {
1263
+ "array": [
1264
+ {
1265
+ "defined": {
1266
+ "name": "FeeBeneficiary"
1267
+ }
1268
+ },
1269
+ 5
1270
+ ]
1271
+ }
1272
+ },
1273
+ {
1274
+ "name": "amm_pool",
1275
+ "type": "pubkey"
1276
+ },
1277
+ {
1278
+ "name": "bump",
1279
+ "type": "u8"
1280
+ }
1281
+ ]
1282
+ }
1283
+ },
1284
+ {
1285
+ "name": "PlatformConfig",
1286
+ "type": {
1287
+ "kind": "struct",
1288
+ "fields": [
1289
+ {
1290
+ "name": "authority",
1291
+ "type": "pubkey"
1292
+ },
1293
+ {
1294
+ "name": "fee_beneficiary",
1295
+ "type": "pubkey"
1296
+ },
1297
+ {
1298
+ "name": "base_token",
1299
+ "type": "pubkey"
1300
+ },
1301
+ {
1302
+ "name": "platform_fee_bps",
1303
+ "type": "u16"
1304
+ },
1305
+ {
1306
+ "name": "graduation_threshold",
1307
+ "type": "u64"
1308
+ },
1309
+ {
1310
+ "name": "bump",
1311
+ "type": "u8"
1312
+ }
1313
+ ]
1314
+ }
1315
+ },
1316
+ {
1317
+ "name": "PlatformConfigView",
1318
+ "type": {
1319
+ "kind": "struct",
1320
+ "fields": [
1321
+ {
1322
+ "name": "authority",
1323
+ "type": "pubkey"
1324
+ },
1325
+ {
1326
+ "name": "fee_beneficiary",
1327
+ "type": "pubkey"
1328
+ },
1329
+ {
1330
+ "name": "base_token",
1331
+ "type": "pubkey"
1332
+ },
1333
+ {
1334
+ "name": "platform_fee_bps",
1335
+ "type": "u16"
1336
+ },
1337
+ {
1338
+ "name": "graduation_threshold",
1339
+ "type": "u64"
1340
+ }
1341
+ ]
1342
+ }
1343
+ },
1344
+ {
1345
+ "name": "SellEvent",
1346
+ "type": {
1347
+ "kind": "struct",
1348
+ "fields": [
1349
+ {
1350
+ "name": "pair",
1351
+ "type": "pubkey"
1352
+ },
1353
+ {
1354
+ "name": "user",
1355
+ "type": "pubkey"
1356
+ },
1357
+ {
1358
+ "name": "amount_a",
1359
+ "type": "u64"
1360
+ },
1361
+ {
1362
+ "name": "amount_b",
1363
+ "type": "u64"
1364
+ },
1365
+ {
1366
+ "name": "new_reserves_a",
1367
+ "type": "u128"
1368
+ },
1369
+ {
1370
+ "name": "new_reserves_b",
1371
+ "type": "u128"
1372
+ },
1373
+ {
1374
+ "name": "fee_a",
1375
+ "type": "u64"
1376
+ }
1377
+ ]
1378
+ }
1379
+ },
1380
+ {
1381
+ "name": "SwapParams",
1382
+ "type": {
1383
+ "kind": "struct",
1384
+ "fields": [
1385
+ {
1386
+ "name": "amount",
1387
+ "type": "u64"
1388
+ },
1389
+ {
1390
+ "name": "limit",
1391
+ "type": "u64"
1392
+ }
1393
+ ]
1394
+ }
1395
+ },
1396
+ {
1397
+ "name": "SwapResult",
1398
+ "type": {
1399
+ "kind": "struct",
1400
+ "fields": [
1401
+ {
1402
+ "name": "new_reserves_a",
1403
+ "type": "u128"
1404
+ },
1405
+ {
1406
+ "name": "new_reserves_b",
1407
+ "type": "u128"
1408
+ },
1409
+ {
1410
+ "name": "amount_a",
1411
+ "type": "u64"
1412
+ },
1413
+ {
1414
+ "name": "amount_b",
1415
+ "type": "u64"
1416
+ },
1417
+ {
1418
+ "name": "fee_a",
1419
+ "type": "u64"
1420
+ }
1421
+ ]
1422
+ }
1423
+ }
1424
+ ]
1425
+ }