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