@jup-ag/lend 0.0.5 → 0.0.7

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.
@@ -1,3325 +0,0 @@
1
- {
2
- "address": "5uDkCoM96pwGYhAUucvCzLfm5UcjVRuxz6gH81RnRBmL",
3
- "metadata": {
4
- "name": "liquidity",
5
- "version": "0.1.0",
6
- "spec": "0.1.0",
7
- "description": "Created with Anchor"
8
- },
9
- "instructions": [
10
- {
11
- "name": "change_status",
12
- "discriminator": [
13
- 236,
14
- 145,
15
- 131,
16
- 228,
17
- 227,
18
- 17,
19
- 192,
20
- 255
21
- ],
22
- "accounts": [
23
- {
24
- "name": "authority",
25
- "signer": true
26
- },
27
- {
28
- "name": "liquidity",
29
- "writable": true
30
- },
31
- {
32
- "name": "auth_list"
33
- }
34
- ],
35
- "args": [
36
- {
37
- "name": "status",
38
- "type": "bool"
39
- }
40
- ]
41
- },
42
- {
43
- "name": "claim",
44
- "discriminator": [
45
- 62,
46
- 198,
47
- 214,
48
- 193,
49
- 213,
50
- 159,
51
- 108,
52
- 210
53
- ],
54
- "accounts": [
55
- {
56
- "name": "user",
57
- "signer": true,
58
- "relations": [
59
- "claim_account"
60
- ]
61
- },
62
- {
63
- "name": "liquidity"
64
- },
65
- {
66
- "name": "token_reserve",
67
- "writable": true
68
- },
69
- {
70
- "name": "mint",
71
- "relations": [
72
- "token_reserve",
73
- "claim_account"
74
- ]
75
- },
76
- {
77
- "name": "recipient_token_account",
78
- "writable": true,
79
- "pda": {
80
- "seeds": [
81
- {
82
- "kind": "arg",
83
- "path": "recipient"
84
- },
85
- {
86
- "kind": "account",
87
- "path": "token_program"
88
- },
89
- {
90
- "kind": "account",
91
- "path": "mint"
92
- }
93
- ],
94
- "program": {
95
- "kind": "const",
96
- "value": [
97
- 140,
98
- 151,
99
- 37,
100
- 143,
101
- 78,
102
- 36,
103
- 137,
104
- 241,
105
- 187,
106
- 61,
107
- 16,
108
- 41,
109
- 20,
110
- 142,
111
- 13,
112
- 131,
113
- 11,
114
- 90,
115
- 19,
116
- 153,
117
- 218,
118
- 255,
119
- 16,
120
- 132,
121
- 4,
122
- 142,
123
- 123,
124
- 216,
125
- 219,
126
- 233,
127
- 248,
128
- 89
129
- ]
130
- }
131
- }
132
- },
133
- {
134
- "name": "vault",
135
- "writable": true,
136
- "pda": {
137
- "seeds": [
138
- {
139
- "kind": "account",
140
- "path": "liquidity"
141
- },
142
- {
143
- "kind": "account",
144
- "path": "token_program"
145
- },
146
- {
147
- "kind": "account",
148
- "path": "mint"
149
- }
150
- ],
151
- "program": {
152
- "kind": "const",
153
- "value": [
154
- 140,
155
- 151,
156
- 37,
157
- 143,
158
- 78,
159
- 36,
160
- 137,
161
- 241,
162
- 187,
163
- 61,
164
- 16,
165
- 41,
166
- 20,
167
- 142,
168
- 13,
169
- 131,
170
- 11,
171
- 90,
172
- 19,
173
- 153,
174
- 218,
175
- 255,
176
- 16,
177
- 132,
178
- 4,
179
- 142,
180
- 123,
181
- 216,
182
- 219,
183
- 233,
184
- 248,
185
- 89
186
- ]
187
- }
188
- },
189
- "relations": [
190
- "token_reserve"
191
- ]
192
- },
193
- {
194
- "name": "claim_account",
195
- "writable": true
196
- },
197
- {
198
- "name": "token_program"
199
- },
200
- {
201
- "name": "associated_token_program",
202
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
203
- }
204
- ],
205
- "args": [
206
- {
207
- "name": "recipient",
208
- "type": "pubkey"
209
- }
210
- ]
211
- },
212
- {
213
- "name": "close_claim_account",
214
- "discriminator": [
215
- 241,
216
- 146,
217
- 203,
218
- 216,
219
- 58,
220
- 222,
221
- 91,
222
- 118
223
- ],
224
- "accounts": [
225
- {
226
- "name": "user",
227
- "writable": true,
228
- "signer": true,
229
- "relations": [
230
- "claim_account"
231
- ]
232
- },
233
- {
234
- "name": "claim_account",
235
- "writable": true
236
- },
237
- {
238
- "name": "system_program",
239
- "address": "11111111111111111111111111111111"
240
- }
241
- ],
242
- "args": [
243
- {
244
- "name": "_mint",
245
- "type": "pubkey"
246
- }
247
- ]
248
- },
249
- {
250
- "name": "collect_revenue",
251
- "discriminator": [
252
- 87,
253
- 96,
254
- 211,
255
- 36,
256
- 240,
257
- 43,
258
- 246,
259
- 87
260
- ],
261
- "accounts": [
262
- {
263
- "name": "authority",
264
- "writable": true,
265
- "signer": true
266
- },
267
- {
268
- "name": "liquidity"
269
- },
270
- {
271
- "name": "auth_list"
272
- },
273
- {
274
- "name": "mint",
275
- "relations": [
276
- "token_reserve"
277
- ]
278
- },
279
- {
280
- "name": "revenue_collector_account",
281
- "writable": true,
282
- "pda": {
283
- "seeds": [
284
- {
285
- "kind": "account",
286
- "path": "revenue_collector"
287
- },
288
- {
289
- "kind": "account",
290
- "path": "token_program"
291
- },
292
- {
293
- "kind": "account",
294
- "path": "mint"
295
- }
296
- ],
297
- "program": {
298
- "kind": "const",
299
- "value": [
300
- 140,
301
- 151,
302
- 37,
303
- 143,
304
- 78,
305
- 36,
306
- 137,
307
- 241,
308
- 187,
309
- 61,
310
- 16,
311
- 41,
312
- 20,
313
- 142,
314
- 13,
315
- 131,
316
- 11,
317
- 90,
318
- 19,
319
- 153,
320
- 218,
321
- 255,
322
- 16,
323
- 132,
324
- 4,
325
- 142,
326
- 123,
327
- 216,
328
- 219,
329
- 233,
330
- 248,
331
- 89
332
- ]
333
- }
334
- }
335
- },
336
- {
337
- "name": "revenue_collector"
338
- },
339
- {
340
- "name": "token_reserve",
341
- "writable": true
342
- },
343
- {
344
- "name": "vault",
345
- "writable": true,
346
- "pda": {
347
- "seeds": [
348
- {
349
- "kind": "account",
350
- "path": "liquidity"
351
- },
352
- {
353
- "kind": "account",
354
- "path": "token_program"
355
- },
356
- {
357
- "kind": "account",
358
- "path": "mint"
359
- }
360
- ],
361
- "program": {
362
- "kind": "const",
363
- "value": [
364
- 140,
365
- 151,
366
- 37,
367
- 143,
368
- 78,
369
- 36,
370
- 137,
371
- 241,
372
- 187,
373
- 61,
374
- 16,
375
- 41,
376
- 20,
377
- 142,
378
- 13,
379
- 131,
380
- 11,
381
- 90,
382
- 19,
383
- 153,
384
- 218,
385
- 255,
386
- 16,
387
- 132,
388
- 4,
389
- 142,
390
- 123,
391
- 216,
392
- 219,
393
- 233,
394
- 248,
395
- 89
396
- ]
397
- }
398
- },
399
- "relations": [
400
- "token_reserve"
401
- ]
402
- },
403
- {
404
- "name": "token_program"
405
- },
406
- {
407
- "name": "associated_token_program",
408
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
409
- },
410
- {
411
- "name": "system_program",
412
- "address": "11111111111111111111111111111111"
413
- }
414
- ],
415
- "args": []
416
- },
417
- {
418
- "name": "init_claim_account",
419
- "discriminator": [
420
- 112,
421
- 141,
422
- 47,
423
- 170,
424
- 42,
425
- 99,
426
- 144,
427
- 145
428
- ],
429
- "accounts": [
430
- {
431
- "name": "signer",
432
- "writable": true,
433
- "signer": true
434
- },
435
- {
436
- "name": "claim_account",
437
- "writable": true,
438
- "pda": {
439
- "seeds": [
440
- {
441
- "kind": "const",
442
- "value": [
443
- 117,
444
- 115,
445
- 101,
446
- 114,
447
- 95,
448
- 99,
449
- 108,
450
- 97,
451
- 105,
452
- 109
453
- ]
454
- },
455
- {
456
- "kind": "arg",
457
- "path": "user"
458
- },
459
- {
460
- "kind": "arg",
461
- "path": "mint"
462
- }
463
- ]
464
- }
465
- },
466
- {
467
- "name": "system_program",
468
- "address": "11111111111111111111111111111111"
469
- }
470
- ],
471
- "args": [
472
- {
473
- "name": "mint",
474
- "type": "pubkey"
475
- },
476
- {
477
- "name": "user",
478
- "type": "pubkey"
479
- }
480
- ]
481
- },
482
- {
483
- "name": "init_liquidity",
484
- "discriminator": [
485
- 95,
486
- 189,
487
- 216,
488
- 183,
489
- 188,
490
- 62,
491
- 244,
492
- 108
493
- ],
494
- "accounts": [
495
- {
496
- "name": "signer",
497
- "writable": true,
498
- "signer": true
499
- },
500
- {
501
- "name": "liquidity",
502
- "writable": true,
503
- "pda": {
504
- "seeds": [
505
- {
506
- "kind": "const",
507
- "value": [
508
- 108,
509
- 105,
510
- 113,
511
- 117,
512
- 105,
513
- 100,
514
- 105,
515
- 116,
516
- 121
517
- ]
518
- }
519
- ]
520
- }
521
- },
522
- {
523
- "name": "auth_list",
524
- "writable": true,
525
- "pda": {
526
- "seeds": [
527
- {
528
- "kind": "const",
529
- "value": [
530
- 97,
531
- 117,
532
- 116,
533
- 104,
534
- 95,
535
- 108,
536
- 105,
537
- 115,
538
- 116
539
- ]
540
- }
541
- ]
542
- }
543
- },
544
- {
545
- "name": "system_program",
546
- "address": "11111111111111111111111111111111"
547
- }
548
- ],
549
- "args": [
550
- {
551
- "name": "authority",
552
- "type": "pubkey"
553
- },
554
- {
555
- "name": "revenue_collector",
556
- "type": "pubkey"
557
- }
558
- ]
559
- },
560
- {
561
- "name": "init_new_protocol",
562
- "discriminator": [
563
- 193,
564
- 147,
565
- 5,
566
- 32,
567
- 138,
568
- 135,
569
- 213,
570
- 158
571
- ],
572
- "accounts": [
573
- {
574
- "name": "authority",
575
- "writable": true,
576
- "signer": true
577
- },
578
- {
579
- "name": "auth_list"
580
- },
581
- {
582
- "name": "user_supply_position",
583
- "writable": true,
584
- "pda": {
585
- "seeds": [
586
- {
587
- "kind": "const",
588
- "value": [
589
- 117,
590
- 115,
591
- 101,
592
- 114,
593
- 95,
594
- 115,
595
- 117,
596
- 112,
597
- 112,
598
- 108,
599
- 121,
600
- 95,
601
- 112,
602
- 111,
603
- 115,
604
- 105,
605
- 116,
606
- 105,
607
- 111,
608
- 110
609
- ]
610
- },
611
- {
612
- "kind": "arg",
613
- "path": "supply_mint"
614
- },
615
- {
616
- "kind": "arg",
617
- "path": "protocol"
618
- }
619
- ]
620
- }
621
- },
622
- {
623
- "name": "user_borrow_position",
624
- "writable": true,
625
- "pda": {
626
- "seeds": [
627
- {
628
- "kind": "const",
629
- "value": [
630
- 117,
631
- 115,
632
- 101,
633
- 114,
634
- 95,
635
- 98,
636
- 111,
637
- 114,
638
- 114,
639
- 111,
640
- 119,
641
- 95,
642
- 112,
643
- 111,
644
- 115,
645
- 105,
646
- 116,
647
- 105,
648
- 111,
649
- 110
650
- ]
651
- },
652
- {
653
- "kind": "arg",
654
- "path": "borrow_mint"
655
- },
656
- {
657
- "kind": "arg",
658
- "path": "protocol"
659
- }
660
- ]
661
- }
662
- },
663
- {
664
- "name": "system_program",
665
- "address": "11111111111111111111111111111111"
666
- }
667
- ],
668
- "args": [
669
- {
670
- "name": "supply_mint",
671
- "type": "pubkey"
672
- },
673
- {
674
- "name": "borrow_mint",
675
- "type": "pubkey"
676
- },
677
- {
678
- "name": "protocol",
679
- "type": "pubkey"
680
- }
681
- ]
682
- },
683
- {
684
- "name": "init_token_reserve",
685
- "discriminator": [
686
- 228,
687
- 235,
688
- 65,
689
- 129,
690
- 159,
691
- 15,
692
- 6,
693
- 84
694
- ],
695
- "accounts": [
696
- {
697
- "name": "authority",
698
- "writable": true,
699
- "signer": true
700
- },
701
- {
702
- "name": "liquidity"
703
- },
704
- {
705
- "name": "auth_list"
706
- },
707
- {
708
- "name": "mint"
709
- },
710
- {
711
- "name": "vault",
712
- "writable": true,
713
- "pda": {
714
- "seeds": [
715
- {
716
- "kind": "account",
717
- "path": "liquidity"
718
- },
719
- {
720
- "kind": "account",
721
- "path": "token_program"
722
- },
723
- {
724
- "kind": "account",
725
- "path": "mint"
726
- }
727
- ],
728
- "program": {
729
- "kind": "const",
730
- "value": [
731
- 140,
732
- 151,
733
- 37,
734
- 143,
735
- 78,
736
- 36,
737
- 137,
738
- 241,
739
- 187,
740
- 61,
741
- 16,
742
- 41,
743
- 20,
744
- 142,
745
- 13,
746
- 131,
747
- 11,
748
- 90,
749
- 19,
750
- 153,
751
- 218,
752
- 255,
753
- 16,
754
- 132,
755
- 4,
756
- 142,
757
- 123,
758
- 216,
759
- 219,
760
- 233,
761
- 248,
762
- 89
763
- ]
764
- }
765
- }
766
- },
767
- {
768
- "name": "rate_model",
769
- "writable": true,
770
- "pda": {
771
- "seeds": [
772
- {
773
- "kind": "const",
774
- "value": [
775
- 114,
776
- 97,
777
- 116,
778
- 101,
779
- 95,
780
- 109,
781
- 111,
782
- 100,
783
- 101,
784
- 108
785
- ]
786
- },
787
- {
788
- "kind": "account",
789
- "path": "mint"
790
- }
791
- ]
792
- }
793
- },
794
- {
795
- "name": "token_reserve",
796
- "writable": true,
797
- "pda": {
798
- "seeds": [
799
- {
800
- "kind": "const",
801
- "value": [
802
- 114,
803
- 101,
804
- 115,
805
- 101,
806
- 114,
807
- 118,
808
- 101
809
- ]
810
- },
811
- {
812
- "kind": "account",
813
- "path": "mint"
814
- }
815
- ]
816
- }
817
- },
818
- {
819
- "name": "token_program"
820
- },
821
- {
822
- "name": "associated_token_program",
823
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
824
- },
825
- {
826
- "name": "system_program",
827
- "address": "11111111111111111111111111111111"
828
- }
829
- ],
830
- "args": []
831
- },
832
- {
833
- "name": "operate",
834
- "discriminator": [
835
- 217,
836
- 106,
837
- 208,
838
- 99,
839
- 116,
840
- 151,
841
- 42,
842
- 135
843
- ],
844
- "accounts": [
845
- {
846
- "name": "protocol",
847
- "signer": true,
848
- "relations": [
849
- "user_supply_position",
850
- "user_borrow_position"
851
- ]
852
- },
853
- {
854
- "name": "liquidity"
855
- },
856
- {
857
- "name": "token_reserve",
858
- "writable": true
859
- },
860
- {
861
- "name": "mint",
862
- "relations": [
863
- "token_reserve",
864
- "rate_model",
865
- "borrow_claim_account",
866
- "withdraw_claim_account"
867
- ]
868
- },
869
- {
870
- "name": "vault",
871
- "writable": true,
872
- "pda": {
873
- "seeds": [
874
- {
875
- "kind": "account",
876
- "path": "liquidity"
877
- },
878
- {
879
- "kind": "account",
880
- "path": "token_program"
881
- },
882
- {
883
- "kind": "account",
884
- "path": "mint"
885
- }
886
- ],
887
- "program": {
888
- "kind": "const",
889
- "value": [
890
- 140,
891
- 151,
892
- 37,
893
- 143,
894
- 78,
895
- 36,
896
- 137,
897
- 241,
898
- 187,
899
- 61,
900
- 16,
901
- 41,
902
- 20,
903
- 142,
904
- 13,
905
- 131,
906
- 11,
907
- 90,
908
- 19,
909
- 153,
910
- 218,
911
- 255,
912
- 16,
913
- 132,
914
- 4,
915
- 142,
916
- 123,
917
- 216,
918
- 219,
919
- 233,
920
- 248,
921
- 89
922
- ]
923
- }
924
- },
925
- "relations": [
926
- "token_reserve"
927
- ]
928
- },
929
- {
930
- "name": "user_supply_position",
931
- "writable": true,
932
- "optional": true
933
- },
934
- {
935
- "name": "user_borrow_position",
936
- "writable": true,
937
- "optional": true
938
- },
939
- {
940
- "name": "rate_model"
941
- },
942
- {
943
- "name": "withdraw_to_account",
944
- "writable": true,
945
- "optional": true,
946
- "pda": {
947
- "seeds": [
948
- {
949
- "kind": "arg",
950
- "path": "withdraw_to"
951
- },
952
- {
953
- "kind": "account",
954
- "path": "token_program"
955
- },
956
- {
957
- "kind": "account",
958
- "path": "mint"
959
- }
960
- ],
961
- "program": {
962
- "kind": "const",
963
- "value": [
964
- 140,
965
- 151,
966
- 37,
967
- 143,
968
- 78,
969
- 36,
970
- 137,
971
- 241,
972
- 187,
973
- 61,
974
- 16,
975
- 41,
976
- 20,
977
- 142,
978
- 13,
979
- 131,
980
- 11,
981
- 90,
982
- 19,
983
- 153,
984
- 218,
985
- 255,
986
- 16,
987
- 132,
988
- 4,
989
- 142,
990
- 123,
991
- 216,
992
- 219,
993
- 233,
994
- 248,
995
- 89
996
- ]
997
- }
998
- }
999
- },
1000
- {
1001
- "name": "borrow_to_account",
1002
- "writable": true,
1003
- "optional": true,
1004
- "pda": {
1005
- "seeds": [
1006
- {
1007
- "kind": "arg",
1008
- "path": "borrow_to"
1009
- },
1010
- {
1011
- "kind": "account",
1012
- "path": "token_program"
1013
- },
1014
- {
1015
- "kind": "account",
1016
- "path": "mint"
1017
- }
1018
- ],
1019
- "program": {
1020
- "kind": "const",
1021
- "value": [
1022
- 140,
1023
- 151,
1024
- 37,
1025
- 143,
1026
- 78,
1027
- 36,
1028
- 137,
1029
- 241,
1030
- 187,
1031
- 61,
1032
- 16,
1033
- 41,
1034
- 20,
1035
- 142,
1036
- 13,
1037
- 131,
1038
- 11,
1039
- 90,
1040
- 19,
1041
- 153,
1042
- 218,
1043
- 255,
1044
- 16,
1045
- 132,
1046
- 4,
1047
- 142,
1048
- 123,
1049
- 216,
1050
- 219,
1051
- 233,
1052
- 248,
1053
- 89
1054
- ]
1055
- }
1056
- }
1057
- },
1058
- {
1059
- "name": "borrow_claim_account",
1060
- "writable": true,
1061
- "optional": true
1062
- },
1063
- {
1064
- "name": "withdraw_claim_account",
1065
- "writable": true,
1066
- "optional": true
1067
- },
1068
- {
1069
- "name": "token_program"
1070
- },
1071
- {
1072
- "name": "associated_token_program",
1073
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1074
- }
1075
- ],
1076
- "args": [
1077
- {
1078
- "name": "supply_amount",
1079
- "type": "i128"
1080
- },
1081
- {
1082
- "name": "borrow_amount",
1083
- "type": "i128"
1084
- },
1085
- {
1086
- "name": "withdraw_to",
1087
- "type": "pubkey"
1088
- },
1089
- {
1090
- "name": "borrow_to",
1091
- "type": "pubkey"
1092
- },
1093
- {
1094
- "name": "transfer_type",
1095
- "type": {
1096
- "defined": {
1097
- "name": "TransferType"
1098
- }
1099
- }
1100
- }
1101
- ]
1102
- },
1103
- {
1104
- "name": "pause_user",
1105
- "discriminator": [
1106
- 18,
1107
- 63,
1108
- 43,
1109
- 94,
1110
- 239,
1111
- 53,
1112
- 101,
1113
- 14
1114
- ],
1115
- "accounts": [
1116
- {
1117
- "name": "authority",
1118
- "signer": true
1119
- },
1120
- {
1121
- "name": "auth_list"
1122
- },
1123
- {
1124
- "name": "user_supply_position",
1125
- "writable": true
1126
- },
1127
- {
1128
- "name": "user_borrow_position",
1129
- "writable": true
1130
- }
1131
- ],
1132
- "args": [
1133
- {
1134
- "name": "protocol",
1135
- "type": "pubkey"
1136
- },
1137
- {
1138
- "name": "supply_mint",
1139
- "type": "pubkey"
1140
- },
1141
- {
1142
- "name": "borrow_mint",
1143
- "type": "pubkey"
1144
- },
1145
- {
1146
- "name": "supply_status",
1147
- "type": {
1148
- "option": "u8"
1149
- }
1150
- },
1151
- {
1152
- "name": "borrow_status",
1153
- "type": {
1154
- "option": "u8"
1155
- }
1156
- }
1157
- ]
1158
- },
1159
- {
1160
- "name": "pre_operate",
1161
- "discriminator": [
1162
- 129,
1163
- 205,
1164
- 158,
1165
- 155,
1166
- 198,
1167
- 155,
1168
- 72,
1169
- 133
1170
- ],
1171
- "accounts": [
1172
- {
1173
- "name": "protocol",
1174
- "signer": true,
1175
- "relations": [
1176
- "user_supply_position",
1177
- "user_borrow_position"
1178
- ]
1179
- },
1180
- {
1181
- "name": "liquidity"
1182
- },
1183
- {
1184
- "name": "user_supply_position"
1185
- },
1186
- {
1187
- "name": "user_borrow_position",
1188
- "optional": true
1189
- },
1190
- {
1191
- "name": "vault",
1192
- "pda": {
1193
- "seeds": [
1194
- {
1195
- "kind": "account",
1196
- "path": "liquidity"
1197
- },
1198
- {
1199
- "kind": "account",
1200
- "path": "token_program"
1201
- },
1202
- {
1203
- "kind": "arg",
1204
- "path": "mint"
1205
- }
1206
- ],
1207
- "program": {
1208
- "kind": "const",
1209
- "value": [
1210
- 140,
1211
- 151,
1212
- 37,
1213
- 143,
1214
- 78,
1215
- 36,
1216
- 137,
1217
- 241,
1218
- 187,
1219
- 61,
1220
- 16,
1221
- 41,
1222
- 20,
1223
- 142,
1224
- 13,
1225
- 131,
1226
- 11,
1227
- 90,
1228
- 19,
1229
- 153,
1230
- 218,
1231
- 255,
1232
- 16,
1233
- 132,
1234
- 4,
1235
- 142,
1236
- 123,
1237
- 216,
1238
- 219,
1239
- 233,
1240
- 248,
1241
- 89
1242
- ]
1243
- }
1244
- },
1245
- "relations": [
1246
- "token_reserve"
1247
- ]
1248
- },
1249
- {
1250
- "name": "token_reserve",
1251
- "writable": true
1252
- },
1253
- {
1254
- "name": "associated_token_program",
1255
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1256
- },
1257
- {
1258
- "name": "token_program"
1259
- }
1260
- ],
1261
- "args": [
1262
- {
1263
- "name": "mint",
1264
- "type": "pubkey"
1265
- }
1266
- ]
1267
- },
1268
- {
1269
- "name": "unpause_user",
1270
- "discriminator": [
1271
- 71,
1272
- 115,
1273
- 128,
1274
- 252,
1275
- 182,
1276
- 126,
1277
- 234,
1278
- 62
1279
- ],
1280
- "accounts": [
1281
- {
1282
- "name": "authority",
1283
- "signer": true
1284
- },
1285
- {
1286
- "name": "auth_list"
1287
- },
1288
- {
1289
- "name": "user_supply_position",
1290
- "writable": true
1291
- },
1292
- {
1293
- "name": "user_borrow_position",
1294
- "writable": true
1295
- }
1296
- ],
1297
- "args": [
1298
- {
1299
- "name": "protocol",
1300
- "type": "pubkey"
1301
- },
1302
- {
1303
- "name": "supply_mint",
1304
- "type": "pubkey"
1305
- },
1306
- {
1307
- "name": "borrow_mint",
1308
- "type": "pubkey"
1309
- },
1310
- {
1311
- "name": "supply_status",
1312
- "type": {
1313
- "option": "u8"
1314
- }
1315
- },
1316
- {
1317
- "name": "borrow_status",
1318
- "type": {
1319
- "option": "u8"
1320
- }
1321
- }
1322
- ]
1323
- },
1324
- {
1325
- "name": "update_auths",
1326
- "discriminator": [
1327
- 93,
1328
- 96,
1329
- 178,
1330
- 156,
1331
- 57,
1332
- 117,
1333
- 253,
1334
- 209
1335
- ],
1336
- "accounts": [
1337
- {
1338
- "name": "authority",
1339
- "signer": true
1340
- },
1341
- {
1342
- "name": "liquidity"
1343
- },
1344
- {
1345
- "name": "auth_list",
1346
- "writable": true
1347
- }
1348
- ],
1349
- "args": [
1350
- {
1351
- "name": "auth_status",
1352
- "type": {
1353
- "vec": {
1354
- "defined": {
1355
- "name": "AddressBool"
1356
- }
1357
- }
1358
- }
1359
- }
1360
- ]
1361
- },
1362
- {
1363
- "name": "update_exchange_price",
1364
- "discriminator": [
1365
- 239,
1366
- 244,
1367
- 10,
1368
- 248,
1369
- 116,
1370
- 25,
1371
- 53,
1372
- 150
1373
- ],
1374
- "accounts": [
1375
- {
1376
- "name": "token_reserve",
1377
- "writable": true
1378
- },
1379
- {
1380
- "name": "rate_model",
1381
- "writable": true
1382
- }
1383
- ],
1384
- "args": [
1385
- {
1386
- "name": "_mint",
1387
- "type": "pubkey"
1388
- }
1389
- ]
1390
- },
1391
- {
1392
- "name": "update_guardians",
1393
- "discriminator": [
1394
- 43,
1395
- 62,
1396
- 250,
1397
- 138,
1398
- 141,
1399
- 117,
1400
- 132,
1401
- 97
1402
- ],
1403
- "accounts": [
1404
- {
1405
- "name": "authority",
1406
- "signer": true
1407
- },
1408
- {
1409
- "name": "liquidity"
1410
- },
1411
- {
1412
- "name": "auth_list",
1413
- "writable": true
1414
- }
1415
- ],
1416
- "args": [
1417
- {
1418
- "name": "guardian_status",
1419
- "type": {
1420
- "vec": {
1421
- "defined": {
1422
- "name": "AddressBool"
1423
- }
1424
- }
1425
- }
1426
- }
1427
- ]
1428
- },
1429
- {
1430
- "name": "update_rate_data_v1",
1431
- "discriminator": [
1432
- 6,
1433
- 20,
1434
- 34,
1435
- 122,
1436
- 22,
1437
- 150,
1438
- 180,
1439
- 22
1440
- ],
1441
- "accounts": [
1442
- {
1443
- "name": "authority",
1444
- "signer": true
1445
- },
1446
- {
1447
- "name": "auth_list"
1448
- },
1449
- {
1450
- "name": "rate_model",
1451
- "writable": true
1452
- },
1453
- {
1454
- "name": "mint",
1455
- "relations": [
1456
- "rate_model",
1457
- "token_reserve"
1458
- ]
1459
- },
1460
- {
1461
- "name": "token_reserve",
1462
- "writable": true
1463
- }
1464
- ],
1465
- "args": [
1466
- {
1467
- "name": "rate_data",
1468
- "type": {
1469
- "defined": {
1470
- "name": "RateDataV1Params"
1471
- }
1472
- }
1473
- }
1474
- ]
1475
- },
1476
- {
1477
- "name": "update_rate_data_v2",
1478
- "discriminator": [
1479
- 116,
1480
- 73,
1481
- 53,
1482
- 146,
1483
- 216,
1484
- 45,
1485
- 228,
1486
- 124
1487
- ],
1488
- "accounts": [
1489
- {
1490
- "name": "authority",
1491
- "signer": true
1492
- },
1493
- {
1494
- "name": "auth_list"
1495
- },
1496
- {
1497
- "name": "rate_model",
1498
- "writable": true
1499
- },
1500
- {
1501
- "name": "mint",
1502
- "relations": [
1503
- "rate_model",
1504
- "token_reserve"
1505
- ]
1506
- },
1507
- {
1508
- "name": "token_reserve",
1509
- "writable": true
1510
- }
1511
- ],
1512
- "args": [
1513
- {
1514
- "name": "rate_data",
1515
- "type": {
1516
- "defined": {
1517
- "name": "RateDataV2Params"
1518
- }
1519
- }
1520
- }
1521
- ]
1522
- },
1523
- {
1524
- "name": "update_revenue_collector",
1525
- "discriminator": [
1526
- 167,
1527
- 142,
1528
- 124,
1529
- 240,
1530
- 220,
1531
- 113,
1532
- 141,
1533
- 59
1534
- ],
1535
- "accounts": [
1536
- {
1537
- "name": "authority",
1538
- "signer": true
1539
- },
1540
- {
1541
- "name": "liquidity",
1542
- "writable": true
1543
- }
1544
- ],
1545
- "args": [
1546
- {
1547
- "name": "revenue_collector",
1548
- "type": "pubkey"
1549
- }
1550
- ]
1551
- },
1552
- {
1553
- "name": "update_token_config",
1554
- "discriminator": [
1555
- 231,
1556
- 122,
1557
- 181,
1558
- 79,
1559
- 255,
1560
- 79,
1561
- 144,
1562
- 167
1563
- ],
1564
- "accounts": [
1565
- {
1566
- "name": "authority",
1567
- "signer": true
1568
- },
1569
- {
1570
- "name": "auth_list"
1571
- },
1572
- {
1573
- "name": "rate_model",
1574
- "writable": true
1575
- },
1576
- {
1577
- "name": "mint",
1578
- "relations": [
1579
- "rate_model",
1580
- "token_reserve"
1581
- ]
1582
- },
1583
- {
1584
- "name": "token_reserve",
1585
- "writable": true
1586
- }
1587
- ],
1588
- "args": [
1589
- {
1590
- "name": "token_config",
1591
- "type": {
1592
- "defined": {
1593
- "name": "TokenConfig"
1594
- }
1595
- }
1596
- }
1597
- ]
1598
- },
1599
- {
1600
- "name": "update_user_borrow_config",
1601
- "discriminator": [
1602
- 100,
1603
- 176,
1604
- 201,
1605
- 174,
1606
- 247,
1607
- 2,
1608
- 54,
1609
- 168
1610
- ],
1611
- "accounts": [
1612
- {
1613
- "name": "authority",
1614
- "signer": true
1615
- },
1616
- {
1617
- "name": "protocol",
1618
- "relations": [
1619
- "user_borrow_position"
1620
- ]
1621
- },
1622
- {
1623
- "name": "auth_list"
1624
- },
1625
- {
1626
- "name": "rate_model"
1627
- },
1628
- {
1629
- "name": "mint",
1630
- "relations": [
1631
- "rate_model",
1632
- "token_reserve",
1633
- "user_borrow_position"
1634
- ]
1635
- },
1636
- {
1637
- "name": "token_reserve",
1638
- "writable": true
1639
- },
1640
- {
1641
- "name": "user_borrow_position",
1642
- "writable": true
1643
- }
1644
- ],
1645
- "args": [
1646
- {
1647
- "name": "user_borrow_config",
1648
- "type": {
1649
- "defined": {
1650
- "name": "UserBorrowConfig"
1651
- }
1652
- }
1653
- }
1654
- ]
1655
- },
1656
- {
1657
- "name": "update_user_class",
1658
- "discriminator": [
1659
- 12,
1660
- 206,
1661
- 68,
1662
- 135,
1663
- 63,
1664
- 212,
1665
- 48,
1666
- 119
1667
- ],
1668
- "accounts": [
1669
- {
1670
- "name": "authority",
1671
- "signer": true
1672
- },
1673
- {
1674
- "name": "auth_list",
1675
- "writable": true
1676
- }
1677
- ],
1678
- "args": [
1679
- {
1680
- "name": "user_class",
1681
- "type": {
1682
- "vec": {
1683
- "defined": {
1684
- "name": "AddressU8"
1685
- }
1686
- }
1687
- }
1688
- }
1689
- ]
1690
- },
1691
- {
1692
- "name": "update_user_supply_config",
1693
- "discriminator": [
1694
- 217,
1695
- 239,
1696
- 225,
1697
- 218,
1698
- 33,
1699
- 49,
1700
- 234,
1701
- 183
1702
- ],
1703
- "accounts": [
1704
- {
1705
- "name": "authority",
1706
- "signer": true
1707
- },
1708
- {
1709
- "name": "protocol",
1710
- "relations": [
1711
- "user_supply_position"
1712
- ]
1713
- },
1714
- {
1715
- "name": "auth_list"
1716
- },
1717
- {
1718
- "name": "rate_model"
1719
- },
1720
- {
1721
- "name": "mint",
1722
- "relations": [
1723
- "rate_model",
1724
- "token_reserve",
1725
- "user_supply_position"
1726
- ]
1727
- },
1728
- {
1729
- "name": "token_reserve",
1730
- "writable": true
1731
- },
1732
- {
1733
- "name": "user_supply_position",
1734
- "writable": true
1735
- }
1736
- ],
1737
- "args": [
1738
- {
1739
- "name": "user_supply_config",
1740
- "type": {
1741
- "defined": {
1742
- "name": "UserSupplyConfig"
1743
- }
1744
- }
1745
- }
1746
- ]
1747
- },
1748
- {
1749
- "name": "update_user_withdrawal_limit",
1750
- "discriminator": [
1751
- 162,
1752
- 9,
1753
- 186,
1754
- 9,
1755
- 213,
1756
- 30,
1757
- 173,
1758
- 78
1759
- ],
1760
- "accounts": [
1761
- {
1762
- "name": "authority",
1763
- "signer": true
1764
- },
1765
- {
1766
- "name": "auth_list"
1767
- },
1768
- {
1769
- "name": "user_supply_position",
1770
- "writable": true
1771
- }
1772
- ],
1773
- "args": [
1774
- {
1775
- "name": "new_limit",
1776
- "type": "u128"
1777
- },
1778
- {
1779
- "name": "protocol",
1780
- "type": "pubkey"
1781
- },
1782
- {
1783
- "name": "mint",
1784
- "type": "pubkey"
1785
- }
1786
- ]
1787
- }
1788
- ],
1789
- "accounts": [
1790
- {
1791
- "name": "AuthorizationList",
1792
- "discriminator": [
1793
- 19,
1794
- 157,
1795
- 117,
1796
- 43,
1797
- 236,
1798
- 167,
1799
- 251,
1800
- 69
1801
- ]
1802
- },
1803
- {
1804
- "name": "Liquidity",
1805
- "discriminator": [
1806
- 54,
1807
- 252,
1808
- 249,
1809
- 226,
1810
- 137,
1811
- 172,
1812
- 121,
1813
- 58
1814
- ]
1815
- },
1816
- {
1817
- "name": "RateModel",
1818
- "discriminator": [
1819
- 94,
1820
- 3,
1821
- 203,
1822
- 219,
1823
- 107,
1824
- 137,
1825
- 4,
1826
- 162
1827
- ]
1828
- },
1829
- {
1830
- "name": "TokenReserve",
1831
- "discriminator": [
1832
- 21,
1833
- 18,
1834
- 59,
1835
- 135,
1836
- 120,
1837
- 20,
1838
- 31,
1839
- 12
1840
- ]
1841
- },
1842
- {
1843
- "name": "UserBorrowPosition",
1844
- "discriminator": [
1845
- 73,
1846
- 126,
1847
- 65,
1848
- 123,
1849
- 220,
1850
- 126,
1851
- 197,
1852
- 24
1853
- ]
1854
- },
1855
- {
1856
- "name": "UserClaim",
1857
- "discriminator": [
1858
- 228,
1859
- 142,
1860
- 195,
1861
- 181,
1862
- 228,
1863
- 147,
1864
- 32,
1865
- 209
1866
- ]
1867
- },
1868
- {
1869
- "name": "UserSupplyPosition",
1870
- "discriminator": [
1871
- 202,
1872
- 219,
1873
- 136,
1874
- 118,
1875
- 61,
1876
- 177,
1877
- 21,
1878
- 146
1879
- ]
1880
- }
1881
- ],
1882
- "events": [
1883
- {
1884
- "name": "LogBorrowRateCap",
1885
- "discriminator": [
1886
- 156,
1887
- 131,
1888
- 232,
1889
- 94,
1890
- 254,
1891
- 156,
1892
- 14,
1893
- 117
1894
- ]
1895
- },
1896
- {
1897
- "name": "LogChangeStatus",
1898
- "discriminator": [
1899
- 89,
1900
- 77,
1901
- 37,
1902
- 172,
1903
- 141,
1904
- 31,
1905
- 74,
1906
- 42
1907
- ]
1908
- },
1909
- {
1910
- "name": "LogClaim",
1911
- "discriminator": [
1912
- 238,
1913
- 50,
1914
- 157,
1915
- 85,
1916
- 151,
1917
- 58,
1918
- 231,
1919
- 45
1920
- ]
1921
- },
1922
- {
1923
- "name": "LogCollectRevenue",
1924
- "discriminator": [
1925
- 64,
1926
- 198,
1927
- 22,
1928
- 194,
1929
- 123,
1930
- 87,
1931
- 166,
1932
- 82
1933
- ]
1934
- },
1935
- {
1936
- "name": "LogOperate",
1937
- "discriminator": [
1938
- 180,
1939
- 8,
1940
- 81,
1941
- 71,
1942
- 19,
1943
- 132,
1944
- 173,
1945
- 8
1946
- ]
1947
- },
1948
- {
1949
- "name": "LogPauseUser",
1950
- "discriminator": [
1951
- 100,
1952
- 17,
1953
- 114,
1954
- 224,
1955
- 180,
1956
- 30,
1957
- 52,
1958
- 170
1959
- ]
1960
- },
1961
- {
1962
- "name": "LogUnpauseUser",
1963
- "discriminator": [
1964
- 170,
1965
- 91,
1966
- 132,
1967
- 96,
1968
- 179,
1969
- 77,
1970
- 168,
1971
- 26
1972
- ]
1973
- },
1974
- {
1975
- "name": "LogUpdateAuths",
1976
- "discriminator": [
1977
- 88,
1978
- 80,
1979
- 109,
1980
- 48,
1981
- 111,
1982
- 203,
1983
- 76,
1984
- 251
1985
- ]
1986
- },
1987
- {
1988
- "name": "LogUpdateExchangePrices",
1989
- "discriminator": [
1990
- 190,
1991
- 194,
1992
- 69,
1993
- 204,
1994
- 30,
1995
- 86,
1996
- 181,
1997
- 163
1998
- ]
1999
- },
2000
- {
2001
- "name": "LogUpdateGuardians",
2002
- "discriminator": [
2003
- 231,
2004
- 28,
2005
- 191,
2006
- 51,
2007
- 53,
2008
- 140,
2009
- 79,
2010
- 142
2011
- ]
2012
- },
2013
- {
2014
- "name": "LogUpdateRateDataV1",
2015
- "discriminator": [
2016
- 30,
2017
- 102,
2018
- 131,
2019
- 192,
2020
- 0,
2021
- 30,
2022
- 85,
2023
- 223
2024
- ]
2025
- },
2026
- {
2027
- "name": "LogUpdateRateDataV2",
2028
- "discriminator": [
2029
- 206,
2030
- 53,
2031
- 195,
2032
- 70,
2033
- 113,
2034
- 211,
2035
- 92,
2036
- 129
2037
- ]
2038
- },
2039
- {
2040
- "name": "LogUpdateRevenueCollector",
2041
- "discriminator": [
2042
- 44,
2043
- 143,
2044
- 80,
2045
- 250,
2046
- 211,
2047
- 147,
2048
- 180,
2049
- 159
2050
- ]
2051
- },
2052
- {
2053
- "name": "LogUpdateTokenConfigs",
2054
- "discriminator": [
2055
- 24,
2056
- 205,
2057
- 191,
2058
- 130,
2059
- 47,
2060
- 40,
2061
- 233,
2062
- 218
2063
- ]
2064
- },
2065
- {
2066
- "name": "LogUpdateUserBorrowConfigs",
2067
- "discriminator": [
2068
- 210,
2069
- 251,
2070
- 242,
2071
- 159,
2072
- 205,
2073
- 33,
2074
- 154,
2075
- 74
2076
- ]
2077
- },
2078
- {
2079
- "name": "LogUpdateUserClass",
2080
- "discriminator": [
2081
- 185,
2082
- 193,
2083
- 106,
2084
- 248,
2085
- 11,
2086
- 53,
2087
- 0,
2088
- 136
2089
- ]
2090
- },
2091
- {
2092
- "name": "LogUpdateUserSupplyConfigs",
2093
- "discriminator": [
2094
- 142,
2095
- 160,
2096
- 21,
2097
- 90,
2098
- 87,
2099
- 88,
2100
- 18,
2101
- 51
2102
- ]
2103
- },
2104
- {
2105
- "name": "LogUpdateUserWithdrawalLimit",
2106
- "discriminator": [
2107
- 114,
2108
- 131,
2109
- 152,
2110
- 189,
2111
- 120,
2112
- 253,
2113
- 88,
2114
- 105
2115
- ]
2116
- }
2117
- ],
2118
- "errors": [
2119
- {
2120
- "code": 6000,
2121
- "name": "UserClassNotPausable",
2122
- "msg": "ADMIN_MODULE_USER_CLASS_NOT_PAUSABLE"
2123
- },
2124
- {
2125
- "code": 6001,
2126
- "name": "UserClassNotFound",
2127
- "msg": "ADMIN_MODULE_USER_CLASS_NOT_FOUND"
2128
- },
2129
- {
2130
- "code": 6002,
2131
- "name": "UserAlreadyPaused",
2132
- "msg": "ADMIN_MODULE_USER_ALREADY_PAUSED"
2133
- },
2134
- {
2135
- "code": 6003,
2136
- "name": "UserAlreadyUnpaused",
2137
- "msg": "ADMIN_MODULE_USER_ALREADY_UNPAUSED"
2138
- },
2139
- {
2140
- "code": 6004,
2141
- "name": "OnlyLiquidityAuthority",
2142
- "msg": "ADMIN_MODULE_ONLY_LIQUIDITY_AUTHORITY"
2143
- },
2144
- {
2145
- "code": 6005,
2146
- "name": "OnlyAuth",
2147
- "msg": "ADMIN_MODULE_ONLY_AUTH"
2148
- },
2149
- {
2150
- "code": 6006,
2151
- "name": "OnlyGuardians",
2152
- "msg": "ADMIN_MODULE_ONLY_GUARDIANS"
2153
- },
2154
- {
2155
- "code": 6007,
2156
- "name": "InvalidParams",
2157
- "msg": "ADMIN_MODULE_INVALID_PARAMS"
2158
- },
2159
- {
2160
- "code": 6008,
2161
- "name": "StatusAlreadySet",
2162
- "msg": "ADMIN_MODULE_STATUS_ALREADY_SET"
2163
- },
2164
- {
2165
- "code": 6009,
2166
- "name": "LimitsCannotBeZero",
2167
- "msg": "ADMIN_MODULE_LIMITS_CAN_NOT_BE_ZERO"
2168
- },
2169
- {
2170
- "code": 6010,
2171
- "name": "MaxAuthCountReached",
2172
- "msg": "ADMIN_MODULE_MAX_AUTH_COUNT"
2173
- },
2174
- {
2175
- "code": 6011,
2176
- "name": "MaxUserClassesReached",
2177
- "msg": "ADMIN_MODULE_MAX_USER_CLASSES"
2178
- },
2179
- {
2180
- "code": 6012,
2181
- "name": "InsufficientBalance",
2182
- "msg": "USER_MODULE_INSUFFICIENT_BALANCE"
2183
- },
2184
- {
2185
- "code": 6013,
2186
- "name": "UserSupplyPositionRequired",
2187
- "msg": "USER_MODULE_USER_SUPPLY_POSITION_REQUIRED"
2188
- },
2189
- {
2190
- "code": 6014,
2191
- "name": "UserBorrowPositionRequired",
2192
- "msg": "USER_MODULE_USER_BORROW_POSITION_REQUIRED"
2193
- },
2194
- {
2195
- "code": 6015,
2196
- "name": "ClaimAccountRequired",
2197
- "msg": "USER_MODULE_CLAIM_ACCOUNT_REQUIRED"
2198
- },
2199
- {
2200
- "code": 6016,
2201
- "name": "WithdrawToAccountRequired",
2202
- "msg": "USER_MODULE_WITHDRAW_TO_ACCOUNT_REQUIRED"
2203
- },
2204
- {
2205
- "code": 6017,
2206
- "name": "BorrowToAccountRequired",
2207
- "msg": "USER_MODULE_BORROW_TO_ACCOUNT_REQUIRED"
2208
- },
2209
- {
2210
- "code": 6018,
2211
- "name": "InvalidClaimAmount",
2212
- "msg": "USER_MODULE_INVALID_CLAIM_AMOUNT"
2213
- },
2214
- {
2215
- "code": 6019,
2216
- "name": "NoAmountToClaim",
2217
- "msg": "USER_MODULE_NO_AMOUNT_TO_CLAIM"
2218
- },
2219
- {
2220
- "code": 6020,
2221
- "name": "AmountNotZero",
2222
- "msg": "USER_MODULE_AMOUNT_NOT_ZERO"
2223
- },
2224
- {
2225
- "code": 6021,
2226
- "name": "InvalidTransferType",
2227
- "msg": "USER_MODULE_INVALID_TRANSFER_TYPE"
2228
- },
2229
- {
2230
- "code": 6022,
2231
- "name": "MintMismatch",
2232
- "msg": "USER_MODULE_MINT_MISMATCH"
2233
- },
2234
- {
2235
- "code": 6023,
2236
- "name": "UserNotDefined",
2237
- "msg": "USER_MODULE_USER_NOT_DEFINED"
2238
- },
2239
- {
2240
- "code": 6024,
2241
- "name": "InvalidUserClaim",
2242
- "msg": "USER_MODULE_INVALID_USER_CLAIM"
2243
- },
2244
- {
2245
- "code": 6025,
2246
- "name": "UserPaused",
2247
- "msg": "USER_MODULE_USER_PAUSED"
2248
- },
2249
- {
2250
- "code": 6026,
2251
- "name": "WithdrawalLimitReached",
2252
- "msg": "USER_MODULE_WITHDRAWAL_LIMIT_REACHED"
2253
- },
2254
- {
2255
- "code": 6027,
2256
- "name": "BorrowLimitReached",
2257
- "msg": "USER_MODULE_BORROW_LIMIT_REACHED"
2258
- },
2259
- {
2260
- "code": 6028,
2261
- "name": "OperateAmountsNearlyZero",
2262
- "msg": "USER_MODULE_OPERATE_AMOUNTS_ZERO"
2263
- },
2264
- {
2265
- "code": 6029,
2266
- "name": "TransferAmountOutOfBounds",
2267
- "msg": "USER_MODULE_TRANSFER_AMOUNT_OUT_OF_BOUNDS"
2268
- },
2269
- {
2270
- "code": 6030,
2271
- "name": "ForbiddenOperateCall",
2272
- "msg": "FORBIDDEN_OPERATE_CALL"
2273
- },
2274
- {
2275
- "code": 6031,
2276
- "name": "MaxUtilizationReached",
2277
- "msg": "USER_MODULE_MAX_UTILIZATION_REACHED"
2278
- },
2279
- {
2280
- "code": 6032,
2281
- "name": "ValueOverflowTotalSupply",
2282
- "msg": "USER_MODULE_VALUE_OVERFLOW_TOTAL_SUPPLY"
2283
- },
2284
- {
2285
- "code": 6033,
2286
- "name": "ValueOverflowTotalBorrow",
2287
- "msg": "USER_MODULE_VALUE_OVERFLOW_TOTAL_BORROW"
2288
- },
2289
- {
2290
- "code": 6034,
2291
- "name": "DepositExpected",
2292
- "msg": "USER_MODULE_DEPOSIT_EXPECTED"
2293
- },
2294
- {
2295
- "code": 6035,
2296
- "name": "ExchangePriceZero",
2297
- "msg": "LIQUIDITY_CALCS_EXCHANGE_PRICE_ZERO"
2298
- },
2299
- {
2300
- "code": 6036,
2301
- "name": "UnsupportedRateVersion",
2302
- "msg": "LIQUIDITY_CALCS_UNSUPPORTED_RATE_VERSION"
2303
- },
2304
- {
2305
- "code": 6037,
2306
- "name": "BorrowRateNegative",
2307
- "msg": "LIQUIDITY_CALCS_BORROW_RATE_NEGATIVE"
2308
- },
2309
- {
2310
- "code": 6038,
2311
- "name": "ProtocolLockdown",
2312
- "msg": "PROTOCOL_LOCKDOWN"
2313
- }
2314
- ],
2315
- "types": [
2316
- {
2317
- "name": "AddressBool",
2318
- "type": {
2319
- "kind": "struct",
2320
- "fields": [
2321
- {
2322
- "name": "addr",
2323
- "type": "pubkey"
2324
- },
2325
- {
2326
- "name": "value",
2327
- "type": "bool"
2328
- }
2329
- ]
2330
- }
2331
- },
2332
- {
2333
- "name": "AddressU8",
2334
- "type": {
2335
- "kind": "struct",
2336
- "fields": [
2337
- {
2338
- "name": "addr",
2339
- "type": "pubkey"
2340
- },
2341
- {
2342
- "name": "value",
2343
- "type": "u8"
2344
- }
2345
- ]
2346
- }
2347
- },
2348
- {
2349
- "name": "AuthorizationList",
2350
- "type": {
2351
- "kind": "struct",
2352
- "fields": [
2353
- {
2354
- "name": "auth_users",
2355
- "type": {
2356
- "vec": "pubkey"
2357
- }
2358
- },
2359
- {
2360
- "name": "guardians",
2361
- "type": {
2362
- "vec": "pubkey"
2363
- }
2364
- },
2365
- {
2366
- "name": "user_classes",
2367
- "type": {
2368
- "vec": {
2369
- "defined": {
2370
- "name": "UserClass"
2371
- }
2372
- }
2373
- }
2374
- }
2375
- ]
2376
- }
2377
- },
2378
- {
2379
- "name": "Liquidity",
2380
- "type": {
2381
- "kind": "struct",
2382
- "fields": [
2383
- {
2384
- "name": "authority",
2385
- "type": "pubkey"
2386
- },
2387
- {
2388
- "name": "revenue_collector",
2389
- "type": "pubkey"
2390
- },
2391
- {
2392
- "name": "status",
2393
- "type": "bool"
2394
- },
2395
- {
2396
- "name": "bump",
2397
- "type": "u8"
2398
- }
2399
- ]
2400
- }
2401
- },
2402
- {
2403
- "name": "LogBorrowRateCap",
2404
- "type": {
2405
- "kind": "struct",
2406
- "fields": [
2407
- {
2408
- "name": "token",
2409
- "type": "pubkey"
2410
- }
2411
- ]
2412
- }
2413
- },
2414
- {
2415
- "name": "LogChangeStatus",
2416
- "type": {
2417
- "kind": "struct",
2418
- "fields": [
2419
- {
2420
- "name": "new_status",
2421
- "type": "bool"
2422
- }
2423
- ]
2424
- }
2425
- },
2426
- {
2427
- "name": "LogClaim",
2428
- "type": {
2429
- "kind": "struct",
2430
- "fields": [
2431
- {
2432
- "name": "user",
2433
- "type": "pubkey"
2434
- },
2435
- {
2436
- "name": "token",
2437
- "type": "pubkey"
2438
- },
2439
- {
2440
- "name": "recipient",
2441
- "type": "pubkey"
2442
- },
2443
- {
2444
- "name": "amount",
2445
- "type": "u64"
2446
- }
2447
- ]
2448
- }
2449
- },
2450
- {
2451
- "name": "LogCollectRevenue",
2452
- "type": {
2453
- "kind": "struct",
2454
- "fields": [
2455
- {
2456
- "name": "token",
2457
- "type": "pubkey"
2458
- },
2459
- {
2460
- "name": "revenue_amount",
2461
- "type": "u128"
2462
- }
2463
- ]
2464
- }
2465
- },
2466
- {
2467
- "name": "LogOperate",
2468
- "type": {
2469
- "kind": "struct",
2470
- "fields": [
2471
- {
2472
- "name": "user",
2473
- "type": "pubkey"
2474
- },
2475
- {
2476
- "name": "token",
2477
- "type": "pubkey"
2478
- },
2479
- {
2480
- "name": "supply_amount",
2481
- "type": "i128"
2482
- },
2483
- {
2484
- "name": "borrow_amount",
2485
- "type": "i128"
2486
- },
2487
- {
2488
- "name": "withdraw_to",
2489
- "type": "pubkey"
2490
- },
2491
- {
2492
- "name": "borrow_to",
2493
- "type": "pubkey"
2494
- },
2495
- {
2496
- "name": "supply_exchange_price",
2497
- "type": "u64"
2498
- },
2499
- {
2500
- "name": "borrow_exchange_price",
2501
- "type": "u64"
2502
- }
2503
- ]
2504
- }
2505
- },
2506
- {
2507
- "name": "LogPauseUser",
2508
- "type": {
2509
- "kind": "struct",
2510
- "fields": [
2511
- {
2512
- "name": "user",
2513
- "type": "pubkey"
2514
- },
2515
- {
2516
- "name": "mint",
2517
- "type": "pubkey"
2518
- },
2519
- {
2520
- "name": "status",
2521
- "type": "u8"
2522
- }
2523
- ]
2524
- }
2525
- },
2526
- {
2527
- "name": "LogUnpauseUser",
2528
- "type": {
2529
- "kind": "struct",
2530
- "fields": [
2531
- {
2532
- "name": "user",
2533
- "type": "pubkey"
2534
- },
2535
- {
2536
- "name": "mint",
2537
- "type": "pubkey"
2538
- },
2539
- {
2540
- "name": "status",
2541
- "type": "u8"
2542
- }
2543
- ]
2544
- }
2545
- },
2546
- {
2547
- "name": "LogUpdateAuths",
2548
- "type": {
2549
- "kind": "struct",
2550
- "fields": [
2551
- {
2552
- "name": "auth_status",
2553
- "type": {
2554
- "vec": {
2555
- "defined": {
2556
- "name": "AddressBool"
2557
- }
2558
- }
2559
- }
2560
- }
2561
- ]
2562
- }
2563
- },
2564
- {
2565
- "name": "LogUpdateExchangePrices",
2566
- "type": {
2567
- "kind": "struct",
2568
- "fields": [
2569
- {
2570
- "name": "token",
2571
- "type": "pubkey"
2572
- },
2573
- {
2574
- "name": "supply_exchange_price",
2575
- "type": "u128"
2576
- },
2577
- {
2578
- "name": "borrow_exchange_price",
2579
- "type": "u128"
2580
- },
2581
- {
2582
- "name": "borrow_rate",
2583
- "type": "u16"
2584
- },
2585
- {
2586
- "name": "utilization",
2587
- "type": "u16"
2588
- }
2589
- ]
2590
- }
2591
- },
2592
- {
2593
- "name": "LogUpdateGuardians",
2594
- "type": {
2595
- "kind": "struct",
2596
- "fields": [
2597
- {
2598
- "name": "guardian_status",
2599
- "type": {
2600
- "vec": {
2601
- "defined": {
2602
- "name": "AddressBool"
2603
- }
2604
- }
2605
- }
2606
- }
2607
- ]
2608
- }
2609
- },
2610
- {
2611
- "name": "LogUpdateRateDataV1",
2612
- "type": {
2613
- "kind": "struct",
2614
- "fields": [
2615
- {
2616
- "name": "token",
2617
- "type": "pubkey"
2618
- },
2619
- {
2620
- "name": "rate_data",
2621
- "type": {
2622
- "defined": {
2623
- "name": "RateDataV1Params"
2624
- }
2625
- }
2626
- }
2627
- ]
2628
- }
2629
- },
2630
- {
2631
- "name": "LogUpdateRateDataV2",
2632
- "type": {
2633
- "kind": "struct",
2634
- "fields": [
2635
- {
2636
- "name": "token",
2637
- "type": "pubkey"
2638
- },
2639
- {
2640
- "name": "rate_data",
2641
- "type": {
2642
- "defined": {
2643
- "name": "RateDataV2Params"
2644
- }
2645
- }
2646
- }
2647
- ]
2648
- }
2649
- },
2650
- {
2651
- "name": "LogUpdateRevenueCollector",
2652
- "type": {
2653
- "kind": "struct",
2654
- "fields": [
2655
- {
2656
- "name": "revenue_collector",
2657
- "type": "pubkey"
2658
- }
2659
- ]
2660
- }
2661
- },
2662
- {
2663
- "name": "LogUpdateTokenConfigs",
2664
- "type": {
2665
- "kind": "struct",
2666
- "fields": [
2667
- {
2668
- "name": "token_config",
2669
- "type": {
2670
- "defined": {
2671
- "name": "TokenConfig"
2672
- }
2673
- }
2674
- }
2675
- ]
2676
- }
2677
- },
2678
- {
2679
- "name": "LogUpdateUserBorrowConfigs",
2680
- "type": {
2681
- "kind": "struct",
2682
- "fields": [
2683
- {
2684
- "name": "user",
2685
- "type": "pubkey"
2686
- },
2687
- {
2688
- "name": "token",
2689
- "type": "pubkey"
2690
- },
2691
- {
2692
- "name": "user_borrow_config",
2693
- "type": {
2694
- "defined": {
2695
- "name": "UserBorrowConfig"
2696
- }
2697
- }
2698
- }
2699
- ]
2700
- }
2701
- },
2702
- {
2703
- "name": "LogUpdateUserClass",
2704
- "type": {
2705
- "kind": "struct",
2706
- "fields": [
2707
- {
2708
- "name": "user_class",
2709
- "type": {
2710
- "vec": {
2711
- "defined": {
2712
- "name": "AddressU8"
2713
- }
2714
- }
2715
- }
2716
- }
2717
- ]
2718
- }
2719
- },
2720
- {
2721
- "name": "LogUpdateUserSupplyConfigs",
2722
- "type": {
2723
- "kind": "struct",
2724
- "fields": [
2725
- {
2726
- "name": "user",
2727
- "type": "pubkey"
2728
- },
2729
- {
2730
- "name": "token",
2731
- "type": "pubkey"
2732
- },
2733
- {
2734
- "name": "user_supply_config",
2735
- "type": {
2736
- "defined": {
2737
- "name": "UserSupplyConfig"
2738
- }
2739
- }
2740
- }
2741
- ]
2742
- }
2743
- },
2744
- {
2745
- "name": "LogUpdateUserWithdrawalLimit",
2746
- "type": {
2747
- "kind": "struct",
2748
- "fields": [
2749
- {
2750
- "name": "user",
2751
- "type": "pubkey"
2752
- },
2753
- {
2754
- "name": "token",
2755
- "type": "pubkey"
2756
- },
2757
- {
2758
- "name": "new_limit",
2759
- "type": "u128"
2760
- }
2761
- ]
2762
- }
2763
- },
2764
- {
2765
- "name": "RateDataV1Params",
2766
- "docs": [
2767
- "@notice struct to set borrow rate data for version 1"
2768
- ],
2769
- "type": {
2770
- "kind": "struct",
2771
- "fields": [
2772
- {
2773
- "name": "kink",
2774
- "docs": [
2775
- "",
2776
- "@param kink in borrow rate. in 1e2: 100% = 10_000; 1% = 100"
2777
- ],
2778
- "type": "u128"
2779
- },
2780
- {
2781
- "name": "rate_at_utilization_zero",
2782
- "docs": [
2783
- "",
2784
- "@param rateAtUtilizationZero desired borrow rate when utilization is zero. in 1e2: 100% = 10_000; 1% = 100",
2785
- "i.e. constant minimum borrow rate",
2786
- "e.g. at utilization = 0.01% rate could still be at least 4% (rateAtUtilizationZero would be 400 then)"
2787
- ],
2788
- "type": "u128"
2789
- },
2790
- {
2791
- "name": "rate_at_utilization_kink",
2792
- "docs": [
2793
- "",
2794
- "@param rateAtUtilizationKink borrow rate when utilization is at kink. in 1e2: 100% = 10_000; 1% = 100",
2795
- "e.g. when rate should be 7% at kink then rateAtUtilizationKink would be 700"
2796
- ],
2797
- "type": "u128"
2798
- },
2799
- {
2800
- "name": "rate_at_utilization_max",
2801
- "docs": [
2802
- "",
2803
- "@param rateAtUtilizationMax borrow rate when utilization is maximum at 100%. in 1e2: 100% = 10_000; 1% = 100",
2804
- "e.g. when rate should be 125% at 100% then rateAtUtilizationMax would be 12_500"
2805
- ],
2806
- "type": "u128"
2807
- }
2808
- ]
2809
- }
2810
- },
2811
- {
2812
- "name": "RateDataV2Params",
2813
- "docs": [
2814
- "@notice struct to set borrow rate data for version 2"
2815
- ],
2816
- "type": {
2817
- "kind": "struct",
2818
- "fields": [
2819
- {
2820
- "name": "kink1",
2821
- "docs": [
2822
- "",
2823
- "@param kink1 first kink in borrow rate. in 1e2: 100% = 10_000; 1% = 100",
2824
- "utilization below kink 1 usually means slow increase in rate, once utilization is above kink 1 borrow rate increases faster"
2825
- ],
2826
- "type": "u128"
2827
- },
2828
- {
2829
- "name": "kink2",
2830
- "docs": [
2831
- "",
2832
- "@param kink2 second kink in borrow rate. in 1e2: 100% = 10_000; 1% = 100",
2833
- "utilization below kink 2 usually means slow / medium increase in rate, once utilization is above kink 2 borrow rate increases fast"
2834
- ],
2835
- "type": "u128"
2836
- },
2837
- {
2838
- "name": "rate_at_utilization_zero",
2839
- "docs": [
2840
- "",
2841
- "@param rateAtUtilizationZero desired borrow rate when utilization is zero. in 1e2: 100% = 10_000; 1% = 100",
2842
- "i.e. constant minimum borrow rate",
2843
- "e.g. at utilization = 0.01% rate could still be at least 4% (rateAtUtilizationZero would be 400 then)"
2844
- ],
2845
- "type": "u128"
2846
- },
2847
- {
2848
- "name": "rate_at_utilization_kink1",
2849
- "docs": [
2850
- "",
2851
- "@param rateAtUtilizationKink1 desired borrow rate when utilization is at first kink. in 1e2: 100% = 10_000; 1% = 100",
2852
- "e.g. when rate should be 7% at first kink then rateAtUtilizationKink would be 700"
2853
- ],
2854
- "type": "u128"
2855
- },
2856
- {
2857
- "name": "rate_at_utilization_kink2",
2858
- "docs": [
2859
- "",
2860
- "@param rateAtUtilizationKink2 desired borrow rate when utilization is at second kink. in 1e2: 100% = 10_000; 1% = 100",
2861
- "e.g. when rate should be 7% at second kink then rateAtUtilizationKink would be 1_200"
2862
- ],
2863
- "type": "u128"
2864
- },
2865
- {
2866
- "name": "rate_at_utilization_max",
2867
- "docs": [
2868
- "",
2869
- "@param rateAtUtilizationMax desired borrow rate when utilization is maximum at 100%. in 1e2: 100% = 10_000; 1% = 100",
2870
- "e.g. when rate should be 125% at 100% then rateAtUtilizationMax would be 12_500"
2871
- ],
2872
- "type": "u128"
2873
- }
2874
- ]
2875
- }
2876
- },
2877
- {
2878
- "name": "RateModel",
2879
- "docs": [
2880
- "Interest rate model data"
2881
- ],
2882
- "serialization": "bytemuck",
2883
- "repr": {
2884
- "kind": "c",
2885
- "packed": true
2886
- },
2887
- "type": {
2888
- "kind": "struct",
2889
- "fields": [
2890
- {
2891
- "name": "mint",
2892
- "type": "pubkey"
2893
- },
2894
- {
2895
- "name": "version",
2896
- "type": "u8"
2897
- },
2898
- {
2899
- "name": "rate_at_zero",
2900
- "type": "u16"
2901
- },
2902
- {
2903
- "name": "kink1_utilization",
2904
- "type": "u16"
2905
- },
2906
- {
2907
- "name": "rate_at_kink1",
2908
- "type": "u16"
2909
- },
2910
- {
2911
- "name": "rate_at_max",
2912
- "type": "u16"
2913
- },
2914
- {
2915
- "name": "kink2_utilization",
2916
- "type": "u16"
2917
- },
2918
- {
2919
- "name": "rate_at_kink2",
2920
- "type": "u16"
2921
- }
2922
- ]
2923
- }
2924
- },
2925
- {
2926
- "name": "TokenConfig",
2927
- "docs": [
2928
- "@notice struct to set token config"
2929
- ],
2930
- "type": {
2931
- "kind": "struct",
2932
- "fields": [
2933
- {
2934
- "name": "token",
2935
- "docs": [
2936
- "",
2937
- "@param token address"
2938
- ],
2939
- "type": "pubkey"
2940
- },
2941
- {
2942
- "name": "fee",
2943
- "docs": [
2944
- "",
2945
- "@param fee charges on borrower's interest. in 1e2: 100% = 10_000; 1% = 100"
2946
- ],
2947
- "type": "u128"
2948
- },
2949
- {
2950
- "name": "max_utilization",
2951
- "docs": [
2952
- "",
2953
- "@param maxUtilization maximum allowed utilization. in 1e2: 100% = 10_000; 1% = 100",
2954
- "set to 100% to disable and have default limit of 100% (avoiding SLOAD)."
2955
- ],
2956
- "type": "u128"
2957
- }
2958
- ]
2959
- }
2960
- },
2961
- {
2962
- "name": "TokenReserve",
2963
- "docs": [
2964
- "Token configuration and exchange prices"
2965
- ],
2966
- "serialization": "bytemuck",
2967
- "repr": {
2968
- "kind": "c",
2969
- "packed": true
2970
- },
2971
- "type": {
2972
- "kind": "struct",
2973
- "fields": [
2974
- {
2975
- "name": "mint",
2976
- "type": "pubkey"
2977
- },
2978
- {
2979
- "name": "vault",
2980
- "type": "pubkey"
2981
- },
2982
- {
2983
- "name": "borrow_rate",
2984
- "type": "u16"
2985
- },
2986
- {
2987
- "name": "fee_on_interest",
2988
- "type": "u16"
2989
- },
2990
- {
2991
- "name": "last_utilization",
2992
- "type": "u16"
2993
- },
2994
- {
2995
- "name": "last_update_timestamp",
2996
- "type": "u64"
2997
- },
2998
- {
2999
- "name": "supply_exchange_price",
3000
- "type": "u64"
3001
- },
3002
- {
3003
- "name": "borrow_exchange_price",
3004
- "type": "u64"
3005
- },
3006
- {
3007
- "name": "max_utilization",
3008
- "type": "u16"
3009
- },
3010
- {
3011
- "name": "total_supply_with_interest",
3012
- "type": "u64"
3013
- },
3014
- {
3015
- "name": "total_supply_interest_free",
3016
- "type": "u64"
3017
- },
3018
- {
3019
- "name": "total_borrow_with_interest",
3020
- "type": "u64"
3021
- },
3022
- {
3023
- "name": "total_borrow_interest_free",
3024
- "type": "u64"
3025
- },
3026
- {
3027
- "name": "total_claim_amount",
3028
- "type": "u64"
3029
- },
3030
- {
3031
- "name": "interacting_protocol",
3032
- "type": "pubkey"
3033
- },
3034
- {
3035
- "name": "interacting_timestamp",
3036
- "type": "u64"
3037
- },
3038
- {
3039
- "name": "interacting_balance",
3040
- "type": "u64"
3041
- }
3042
- ]
3043
- }
3044
- },
3045
- {
3046
- "name": "TransferType",
3047
- "type": {
3048
- "kind": "enum",
3049
- "variants": [
3050
- {
3051
- "name": "SKIP"
3052
- },
3053
- {
3054
- "name": "DIRECT"
3055
- },
3056
- {
3057
- "name": "CLAIM"
3058
- }
3059
- ]
3060
- }
3061
- },
3062
- {
3063
- "name": "UserBorrowConfig",
3064
- "docs": [
3065
- "@notice struct to set user borrow & payback config"
3066
- ],
3067
- "type": {
3068
- "kind": "struct",
3069
- "fields": [
3070
- {
3071
- "name": "mode",
3072
- "docs": [
3073
- "",
3074
- "@param mode: 0 = without interest. 1 = with interest"
3075
- ],
3076
- "type": "u8"
3077
- },
3078
- {
3079
- "name": "expand_percent",
3080
- "docs": [
3081
- "",
3082
- "@param expandPercent debt limit expand percent. in 1e2: 100% = 10_000; 1% = 100",
3083
- "Also used to calculate rate at which debt limit should decrease (instant)."
3084
- ],
3085
- "type": "u128"
3086
- },
3087
- {
3088
- "name": "expand_duration",
3089
- "docs": [
3090
- "",
3091
- "@param expandDuration debt limit expand duration in seconds.",
3092
- "used to calculate rate together with expandPercent"
3093
- ],
3094
- "type": "u128"
3095
- },
3096
- {
3097
- "name": "base_debt_ceiling",
3098
- "docs": [
3099
- "",
3100
- "@param baseDebtCeiling base borrow limit. until here, borrow limit remains as baseDebtCeiling",
3101
- "(user can borrow until this point at once without stepped expansion). Above this, automated limit comes in place.",
3102
- "amount in raw (to be multiplied with exchange price) or normal depends on configured mode in user config for the token:",
3103
- "with interest -> raw, without interest -> normal"
3104
- ],
3105
- "type": "u128"
3106
- },
3107
- {
3108
- "name": "max_debt_ceiling",
3109
- "docs": [
3110
- "",
3111
- "@param maxDebtCeiling max borrow ceiling, maximum amount the user can borrow.",
3112
- "amount in raw (to be multiplied with exchange price) or normal depends on configured mode in user config for the token:",
3113
- "with interest -> raw, without interest -> normal"
3114
- ],
3115
- "type": "u128"
3116
- }
3117
- ]
3118
- }
3119
- },
3120
- {
3121
- "name": "UserBorrowPosition",
3122
- "docs": [
3123
- "User borrow position"
3124
- ],
3125
- "serialization": "bytemuck",
3126
- "repr": {
3127
- "kind": "c",
3128
- "packed": true
3129
- },
3130
- "type": {
3131
- "kind": "struct",
3132
- "fields": [
3133
- {
3134
- "name": "protocol",
3135
- "type": "pubkey"
3136
- },
3137
- {
3138
- "name": "mint",
3139
- "type": "pubkey"
3140
- },
3141
- {
3142
- "name": "with_interest",
3143
- "type": "u8"
3144
- },
3145
- {
3146
- "name": "amount",
3147
- "type": "u64"
3148
- },
3149
- {
3150
- "name": "debt_ceiling",
3151
- "type": "u64"
3152
- },
3153
- {
3154
- "name": "last_update",
3155
- "type": "u64"
3156
- },
3157
- {
3158
- "name": "expand_pct",
3159
- "type": "u16"
3160
- },
3161
- {
3162
- "name": "expand_duration",
3163
- "type": "u32"
3164
- },
3165
- {
3166
- "name": "base_debt_ceiling",
3167
- "type": "u64"
3168
- },
3169
- {
3170
- "name": "max_debt_ceiling",
3171
- "type": "u64"
3172
- },
3173
- {
3174
- "name": "status",
3175
- "type": "u8"
3176
- }
3177
- ]
3178
- }
3179
- },
3180
- {
3181
- "name": "UserClaim",
3182
- "serialization": "bytemuck",
3183
- "repr": {
3184
- "kind": "c",
3185
- "packed": true
3186
- },
3187
- "type": {
3188
- "kind": "struct",
3189
- "fields": [
3190
- {
3191
- "name": "user",
3192
- "type": "pubkey"
3193
- },
3194
- {
3195
- "name": "amount",
3196
- "type": "u64"
3197
- },
3198
- {
3199
- "name": "mint",
3200
- "type": "pubkey"
3201
- }
3202
- ]
3203
- }
3204
- },
3205
- {
3206
- "name": "UserClass",
3207
- "type": {
3208
- "kind": "struct",
3209
- "fields": [
3210
- {
3211
- "name": "addr",
3212
- "type": "pubkey"
3213
- },
3214
- {
3215
- "name": "class",
3216
- "type": "u8"
3217
- }
3218
- ]
3219
- }
3220
- },
3221
- {
3222
- "name": "UserSupplyConfig",
3223
- "docs": [
3224
- "@notice struct to set user supply & withdrawal config"
3225
- ],
3226
- "type": {
3227
- "kind": "struct",
3228
- "fields": [
3229
- {
3230
- "name": "mode",
3231
- "docs": [
3232
- "",
3233
- "@param mode: 0 = without interest. 1 = with interest"
3234
- ],
3235
- "type": "u8"
3236
- },
3237
- {
3238
- "name": "expand_percent",
3239
- "docs": [
3240
- "",
3241
- "@param expandPercent withdrawal limit expand percent. in 1e2: 100% = 10_000; 1% = 100",
3242
- "Also used to calculate rate at which withdrawal limit should decrease (instant)."
3243
- ],
3244
- "type": "u128"
3245
- },
3246
- {
3247
- "name": "expand_duration",
3248
- "docs": [
3249
- "",
3250
- "@param expandDuration withdrawal limit expand duration in seconds.",
3251
- "used to calculate rate together with expandPercent"
3252
- ],
3253
- "type": "u128"
3254
- },
3255
- {
3256
- "name": "base_withdrawal_limit",
3257
- "docs": [
3258
- "",
3259
- "@param baseWithdrawalLimit base limit, below this, user can withdraw the entire amount.",
3260
- "amount in raw (to be multiplied with exchange price) or normal depends on configured mode in user config for the token:",
3261
- "with interest -> raw, without interest -> normal"
3262
- ],
3263
- "type": "u128"
3264
- }
3265
- ]
3266
- }
3267
- },
3268
- {
3269
- "name": "UserSupplyPosition",
3270
- "docs": [
3271
- "User supply position"
3272
- ],
3273
- "serialization": "bytemuck",
3274
- "repr": {
3275
- "kind": "c",
3276
- "packed": true
3277
- },
3278
- "type": {
3279
- "kind": "struct",
3280
- "fields": [
3281
- {
3282
- "name": "protocol",
3283
- "type": "pubkey"
3284
- },
3285
- {
3286
- "name": "mint",
3287
- "type": "pubkey"
3288
- },
3289
- {
3290
- "name": "with_interest",
3291
- "type": "u8"
3292
- },
3293
- {
3294
- "name": "amount",
3295
- "type": "u64"
3296
- },
3297
- {
3298
- "name": "withdrawal_limit",
3299
- "type": "u128"
3300
- },
3301
- {
3302
- "name": "last_update",
3303
- "type": "u64"
3304
- },
3305
- {
3306
- "name": "expand_pct",
3307
- "type": "u16"
3308
- },
3309
- {
3310
- "name": "expand_duration",
3311
- "type": "u64"
3312
- },
3313
- {
3314
- "name": "base_withdrawal_limit",
3315
- "type": "u64"
3316
- },
3317
- {
3318
- "name": "status",
3319
- "type": "u8"
3320
- }
3321
- ]
3322
- }
3323
- }
3324
- ]
3325
- }