@kleo-protocol/kleo-sdk 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +4 -4
  2. package/dist/src/client.d.ts +1 -3
  3. package/dist/src/client.d.ts.map +1 -1
  4. package/dist/src/client.js +14 -44
  5. package/dist/src/client.js.map +1 -1
  6. package/dist/src/dedot.client.d.ts.map +1 -1
  7. package/dist/src/dedot.client.js +2 -1
  8. package/dist/src/dedot.client.js.map +1 -1
  9. package/dist/src/metadata/config.json +1080 -0
  10. package/dist/src/metadata/index.d.ts +1260 -0
  11. package/dist/src/metadata/index.d.ts.map +1 -0
  12. package/dist/src/metadata/index.js +21 -0
  13. package/dist/src/metadata/index.js.map +1 -0
  14. package/dist/src/metadata/lending_pool.json +1307 -0
  15. package/dist/src/metadata/reputation.json +1041 -0
  16. package/dist/src/metadata/vouch.json +1387 -0
  17. package/dist/src/services/lending.service.d.ts.map +1 -1
  18. package/dist/src/services/lending.service.js +2 -6
  19. package/dist/src/services/lending.service.js.map +1 -1
  20. package/dist/src/services/pool.service.d.ts.map +1 -1
  21. package/dist/src/services/pool.service.js +0 -3
  22. package/dist/src/services/pool.service.js.map +1 -1
  23. package/dist/src/services/profile.service.js +1 -1
  24. package/dist/src/services/profile.service.js.map +1 -1
  25. package/dist/src/services/reputation.service.d.ts.map +1 -1
  26. package/dist/src/services/reputation.service.js +6 -17
  27. package/dist/src/services/reputation.service.js.map +1 -1
  28. package/dist/src/services/vouch.service.d.ts.map +1 -1
  29. package/dist/src/services/vouch.service.js +2 -8
  30. package/dist/src/services/vouch.service.js.map +1 -1
  31. package/dist/src/supabase.client.d.ts +2 -2
  32. package/dist/src/supabase.client.d.ts.map +1 -1
  33. package/dist/src/supabase.client.js +8 -2
  34. package/dist/src/supabase.client.js.map +1 -1
  35. package/dist/src/utils/contract-helpers.d.ts +0 -6
  36. package/dist/src/utils/contract-helpers.d.ts.map +1 -1
  37. package/dist/src/utils/contract-helpers.js.map +1 -1
  38. package/dist/types/types.d.ts +2 -0
  39. package/dist/types/types.d.ts.map +1 -1
  40. package/package.json +10 -4
@@ -0,0 +1,1307 @@
1
+ {
2
+ "source": {
3
+ "hash": "0xd7452687fbb5807b5d1158d51491d0c0bfba88000064b9ad69998b53e1502c5b",
4
+ "language": "ink! 6.0.0-beta.1",
5
+ "compiler": "rustc 1.91.1",
6
+ "build_info": {
7
+ "rust_toolchain": "stable-aarch64-apple-darwin",
8
+ "cargo_contract_version": "6.0.0-beta.1",
9
+ "build_mode": "Release"
10
+ }
11
+ },
12
+ "contract": {
13
+ "name": "lending_pool",
14
+ "version": "0.1.0",
15
+ "authors": [
16
+ "Fabian Sanchez <fabiansanchezd@outlook.com>"
17
+ ]
18
+ },
19
+ "image": null,
20
+ "version": 6,
21
+ "types": [
22
+ {
23
+ "id": 0,
24
+ "type": {
25
+ "path": [
26
+ "primitive_types",
27
+ "H160"
28
+ ],
29
+ "def": {
30
+ "composite": {
31
+ "fields": [
32
+ {
33
+ "type": 1,
34
+ "typeName": "[u8; 20]"
35
+ }
36
+ ]
37
+ }
38
+ }
39
+ }
40
+ },
41
+ {
42
+ "id": 1,
43
+ "type": {
44
+ "def": {
45
+ "array": {
46
+ "len": 20,
47
+ "type": 2
48
+ }
49
+ }
50
+ }
51
+ },
52
+ {
53
+ "id": 2,
54
+ "type": {
55
+ "def": {
56
+ "primitive": "u8"
57
+ }
58
+ }
59
+ },
60
+ {
61
+ "id": 3,
62
+ "type": {
63
+ "def": {
64
+ "primitive": "u128"
65
+ }
66
+ }
67
+ },
68
+ {
69
+ "id": 4,
70
+ "type": {
71
+ "path": [
72
+ "ink_storage",
73
+ "lazy",
74
+ "Lazy"
75
+ ],
76
+ "params": [
77
+ {
78
+ "name": "V",
79
+ "type": 3
80
+ },
81
+ {
82
+ "name": "KeyType",
83
+ "type": 5
84
+ }
85
+ ],
86
+ "def": {
87
+ "composite": {}
88
+ }
89
+ }
90
+ },
91
+ {
92
+ "id": 5,
93
+ "type": {
94
+ "path": [
95
+ "ink_storage_traits",
96
+ "impls",
97
+ "ResolverKey"
98
+ ],
99
+ "params": [
100
+ {
101
+ "name": "L",
102
+ "type": 6
103
+ },
104
+ {
105
+ "name": "R",
106
+ "type": 7
107
+ }
108
+ ],
109
+ "def": {
110
+ "composite": {}
111
+ }
112
+ }
113
+ },
114
+ {
115
+ "id": 6,
116
+ "type": {
117
+ "path": [
118
+ "ink_storage_traits",
119
+ "impls",
120
+ "AutoKey"
121
+ ],
122
+ "def": {
123
+ "composite": {}
124
+ }
125
+ }
126
+ },
127
+ {
128
+ "id": 7,
129
+ "type": {
130
+ "path": [
131
+ "ink_storage_traits",
132
+ "impls",
133
+ "ManualKey"
134
+ ],
135
+ "params": [
136
+ {
137
+ "name": "ParentKey",
138
+ "type": 8
139
+ }
140
+ ],
141
+ "def": {
142
+ "composite": {}
143
+ }
144
+ }
145
+ },
146
+ {
147
+ "id": 8,
148
+ "type": {
149
+ "def": {
150
+ "tuple": []
151
+ }
152
+ }
153
+ },
154
+ {
155
+ "id": 9,
156
+ "type": {
157
+ "path": [
158
+ "ink_storage",
159
+ "lazy",
160
+ "Lazy"
161
+ ],
162
+ "params": [
163
+ {
164
+ "name": "V",
165
+ "type": 3
166
+ },
167
+ {
168
+ "name": "KeyType",
169
+ "type": 10
170
+ }
171
+ ],
172
+ "def": {
173
+ "composite": {}
174
+ }
175
+ }
176
+ },
177
+ {
178
+ "id": 10,
179
+ "type": {
180
+ "path": [
181
+ "ink_storage_traits",
182
+ "impls",
183
+ "ResolverKey"
184
+ ],
185
+ "params": [
186
+ {
187
+ "name": "L",
188
+ "type": 6
189
+ },
190
+ {
191
+ "name": "R",
192
+ "type": 11
193
+ }
194
+ ],
195
+ "def": {
196
+ "composite": {}
197
+ }
198
+ }
199
+ },
200
+ {
201
+ "id": 11,
202
+ "type": {
203
+ "path": [
204
+ "ink_storage_traits",
205
+ "impls",
206
+ "ManualKey"
207
+ ],
208
+ "params": [
209
+ {
210
+ "name": "ParentKey",
211
+ "type": 8
212
+ }
213
+ ],
214
+ "def": {
215
+ "composite": {}
216
+ }
217
+ }
218
+ },
219
+ {
220
+ "id": 12,
221
+ "type": {
222
+ "path": [
223
+ "ink_storage",
224
+ "lazy",
225
+ "Lazy"
226
+ ],
227
+ "params": [
228
+ {
229
+ "name": "V",
230
+ "type": 3
231
+ },
232
+ {
233
+ "name": "KeyType",
234
+ "type": 13
235
+ }
236
+ ],
237
+ "def": {
238
+ "composite": {}
239
+ }
240
+ }
241
+ },
242
+ {
243
+ "id": 13,
244
+ "type": {
245
+ "path": [
246
+ "ink_storage_traits",
247
+ "impls",
248
+ "ResolverKey"
249
+ ],
250
+ "params": [
251
+ {
252
+ "name": "L",
253
+ "type": 6
254
+ },
255
+ {
256
+ "name": "R",
257
+ "type": 14
258
+ }
259
+ ],
260
+ "def": {
261
+ "composite": {}
262
+ }
263
+ }
264
+ },
265
+ {
266
+ "id": 14,
267
+ "type": {
268
+ "path": [
269
+ "ink_storage_traits",
270
+ "impls",
271
+ "ManualKey"
272
+ ],
273
+ "params": [
274
+ {
275
+ "name": "ParentKey",
276
+ "type": 8
277
+ }
278
+ ],
279
+ "def": {
280
+ "composite": {}
281
+ }
282
+ }
283
+ },
284
+ {
285
+ "id": 15,
286
+ "type": {
287
+ "path": [
288
+ "ink_storage",
289
+ "lazy",
290
+ "mapping",
291
+ "Mapping"
292
+ ],
293
+ "params": [
294
+ {
295
+ "name": "K",
296
+ "type": 16
297
+ },
298
+ {
299
+ "name": "V",
300
+ "type": 3
301
+ },
302
+ {
303
+ "name": "KeyType",
304
+ "type": 18
305
+ }
306
+ ],
307
+ "def": {
308
+ "composite": {}
309
+ }
310
+ }
311
+ },
312
+ {
313
+ "id": 16,
314
+ "type": {
315
+ "path": [
316
+ "ink_primitives",
317
+ "types",
318
+ "AccountId"
319
+ ],
320
+ "def": {
321
+ "composite": {
322
+ "fields": [
323
+ {
324
+ "type": 17,
325
+ "typeName": "[u8; 32]"
326
+ }
327
+ ]
328
+ }
329
+ }
330
+ }
331
+ },
332
+ {
333
+ "id": 17,
334
+ "type": {
335
+ "def": {
336
+ "array": {
337
+ "len": 32,
338
+ "type": 2
339
+ }
340
+ }
341
+ }
342
+ },
343
+ {
344
+ "id": 18,
345
+ "type": {
346
+ "path": [
347
+ "ink_storage_traits",
348
+ "impls",
349
+ "ResolverKey"
350
+ ],
351
+ "params": [
352
+ {
353
+ "name": "L",
354
+ "type": 6
355
+ },
356
+ {
357
+ "name": "R",
358
+ "type": 19
359
+ }
360
+ ],
361
+ "def": {
362
+ "composite": {}
363
+ }
364
+ }
365
+ },
366
+ {
367
+ "id": 19,
368
+ "type": {
369
+ "path": [
370
+ "ink_storage_traits",
371
+ "impls",
372
+ "ManualKey"
373
+ ],
374
+ "params": [
375
+ {
376
+ "name": "ParentKey",
377
+ "type": 8
378
+ }
379
+ ],
380
+ "def": {
381
+ "composite": {}
382
+ }
383
+ }
384
+ },
385
+ {
386
+ "id": 20,
387
+ "type": {
388
+ "def": {
389
+ "primitive": "u64"
390
+ }
391
+ }
392
+ },
393
+ {
394
+ "id": 21,
395
+ "type": {
396
+ "path": [
397
+ "ink_storage",
398
+ "lazy",
399
+ "Lazy"
400
+ ],
401
+ "params": [
402
+ {
403
+ "name": "V",
404
+ "type": 20
405
+ },
406
+ {
407
+ "name": "KeyType",
408
+ "type": 22
409
+ }
410
+ ],
411
+ "def": {
412
+ "composite": {}
413
+ }
414
+ }
415
+ },
416
+ {
417
+ "id": 22,
418
+ "type": {
419
+ "path": [
420
+ "ink_storage_traits",
421
+ "impls",
422
+ "ResolverKey"
423
+ ],
424
+ "params": [
425
+ {
426
+ "name": "L",
427
+ "type": 6
428
+ },
429
+ {
430
+ "name": "R",
431
+ "type": 23
432
+ }
433
+ ],
434
+ "def": {
435
+ "composite": {}
436
+ }
437
+ }
438
+ },
439
+ {
440
+ "id": 23,
441
+ "type": {
442
+ "path": [
443
+ "ink_storage_traits",
444
+ "impls",
445
+ "ManualKey"
446
+ ],
447
+ "params": [
448
+ {
449
+ "name": "ParentKey",
450
+ "type": 8
451
+ }
452
+ ],
453
+ "def": {
454
+ "composite": {}
455
+ }
456
+ }
457
+ },
458
+ {
459
+ "id": 24,
460
+ "type": {
461
+ "path": [
462
+ "lending_pool",
463
+ "lending_pool",
464
+ "LendingPool"
465
+ ],
466
+ "def": {
467
+ "composite": {
468
+ "fields": [
469
+ {
470
+ "name": "config",
471
+ "type": 0,
472
+ "typeName": "<ConfigRef as::ink::storage::traits::AutoStorableHint<::ink::\nstorage::traits::ManualKey<3673240951u32, ()>,>>::Type"
473
+ },
474
+ {
475
+ "name": "total_liquidity",
476
+ "type": 4,
477
+ "typeName": "<Lazy<Balance> as::ink::storage::traits::AutoStorableHint<::ink\n::storage::traits::ManualKey<1201920899u32, ()>,>>::Type"
478
+ },
479
+ {
480
+ "name": "total_borrowed",
481
+ "type": 9,
482
+ "typeName": "<Lazy<Balance> as::ink::storage::traits::AutoStorableHint<::ink\n::storage::traits::ManualKey<3565383195u32, ()>,>>::Type"
483
+ },
484
+ {
485
+ "name": "reserved_funds",
486
+ "type": 12,
487
+ "typeName": "<Lazy<Balance> as::ink::storage::traits::AutoStorableHint<::ink\n::storage::traits::ManualKey<1123778503u32, ()>,>>::Type"
488
+ },
489
+ {
490
+ "name": "user_deposits",
491
+ "type": 15,
492
+ "typeName": "<Mapping<AccountId, Balance> as::ink::storage::traits::\nAutoStorableHint<::ink::storage::traits::ManualKey<2471691496u32,\n()>,>>::Type"
493
+ },
494
+ {
495
+ "name": "last_update",
496
+ "type": 21,
497
+ "typeName": "<Lazy<Timestamp> as::ink::storage::traits::AutoStorableHint<::\nink::storage::traits::ManualKey<1812172973u32, ()>,>>::Type"
498
+ }
499
+ ]
500
+ }
501
+ }
502
+ }
503
+ },
504
+ {
505
+ "id": 25,
506
+ "type": {
507
+ "path": [
508
+ "Result"
509
+ ],
510
+ "params": [
511
+ {
512
+ "name": "T",
513
+ "type": 8
514
+ },
515
+ {
516
+ "name": "E",
517
+ "type": 26
518
+ }
519
+ ],
520
+ "def": {
521
+ "variant": {
522
+ "variants": [
523
+ {
524
+ "name": "Ok",
525
+ "fields": [
526
+ {
527
+ "type": 8
528
+ }
529
+ ],
530
+ "index": 0
531
+ },
532
+ {
533
+ "name": "Err",
534
+ "fields": [
535
+ {
536
+ "type": 26
537
+ }
538
+ ],
539
+ "index": 1
540
+ }
541
+ ]
542
+ }
543
+ }
544
+ }
545
+ },
546
+ {
547
+ "id": 26,
548
+ "type": {
549
+ "path": [
550
+ "ink_primitives",
551
+ "LangError"
552
+ ],
553
+ "def": {
554
+ "variant": {
555
+ "variants": [
556
+ {
557
+ "name": "CouldNotReadInput",
558
+ "index": 1
559
+ }
560
+ ]
561
+ }
562
+ }
563
+ }
564
+ },
565
+ {
566
+ "id": 27,
567
+ "type": {
568
+ "path": [
569
+ "Result"
570
+ ],
571
+ "params": [
572
+ {
573
+ "name": "T",
574
+ "type": 28
575
+ },
576
+ {
577
+ "name": "E",
578
+ "type": 26
579
+ }
580
+ ],
581
+ "def": {
582
+ "variant": {
583
+ "variants": [
584
+ {
585
+ "name": "Ok",
586
+ "fields": [
587
+ {
588
+ "type": 28
589
+ }
590
+ ],
591
+ "index": 0
592
+ },
593
+ {
594
+ "name": "Err",
595
+ "fields": [
596
+ {
597
+ "type": 26
598
+ }
599
+ ],
600
+ "index": 1
601
+ }
602
+ ]
603
+ }
604
+ }
605
+ }
606
+ },
607
+ {
608
+ "id": 28,
609
+ "type": {
610
+ "path": [
611
+ "Result"
612
+ ],
613
+ "params": [
614
+ {
615
+ "name": "T",
616
+ "type": 8
617
+ },
618
+ {
619
+ "name": "E",
620
+ "type": 29
621
+ }
622
+ ],
623
+ "def": {
624
+ "variant": {
625
+ "variants": [
626
+ {
627
+ "name": "Ok",
628
+ "fields": [
629
+ {
630
+ "type": 8
631
+ }
632
+ ],
633
+ "index": 0
634
+ },
635
+ {
636
+ "name": "Err",
637
+ "fields": [
638
+ {
639
+ "type": 29
640
+ }
641
+ ],
642
+ "index": 1
643
+ }
644
+ ]
645
+ }
646
+ }
647
+ }
648
+ },
649
+ {
650
+ "id": 29,
651
+ "type": {
652
+ "path": [
653
+ "lending_pool",
654
+ "lending_pool",
655
+ "Error"
656
+ ],
657
+ "def": {
658
+ "variant": {
659
+ "variants": [
660
+ {
661
+ "name": "ZeroAmount",
662
+ "index": 0
663
+ },
664
+ {
665
+ "name": "NegativeAmount",
666
+ "index": 1
667
+ },
668
+ {
669
+ "name": "Overflow",
670
+ "index": 2
671
+ },
672
+ {
673
+ "name": "UnavailableFunds",
674
+ "index": 3
675
+ },
676
+ {
677
+ "name": "TransactionFailed",
678
+ "index": 4
679
+ },
680
+ {
681
+ "name": "AmountMismatch",
682
+ "index": 5
683
+ }
684
+ ]
685
+ }
686
+ }
687
+ }
688
+ },
689
+ {
690
+ "id": 30,
691
+ "type": {
692
+ "path": [
693
+ "Result"
694
+ ],
695
+ "params": [
696
+ {
697
+ "name": "T",
698
+ "type": 20
699
+ },
700
+ {
701
+ "name": "E",
702
+ "type": 26
703
+ }
704
+ ],
705
+ "def": {
706
+ "variant": {
707
+ "variants": [
708
+ {
709
+ "name": "Ok",
710
+ "fields": [
711
+ {
712
+ "type": 20
713
+ }
714
+ ],
715
+ "index": 0
716
+ },
717
+ {
718
+ "name": "Err",
719
+ "fields": [
720
+ {
721
+ "type": 26
722
+ }
723
+ ],
724
+ "index": 1
725
+ }
726
+ ]
727
+ }
728
+ }
729
+ }
730
+ },
731
+ {
732
+ "id": 31,
733
+ "type": {
734
+ "path": [
735
+ "Result"
736
+ ],
737
+ "params": [
738
+ {
739
+ "name": "T",
740
+ "type": 3
741
+ },
742
+ {
743
+ "name": "E",
744
+ "type": 26
745
+ }
746
+ ],
747
+ "def": {
748
+ "variant": {
749
+ "variants": [
750
+ {
751
+ "name": "Ok",
752
+ "fields": [
753
+ {
754
+ "type": 3
755
+ }
756
+ ],
757
+ "index": 0
758
+ },
759
+ {
760
+ "name": "Err",
761
+ "fields": [
762
+ {
763
+ "type": 26
764
+ }
765
+ ],
766
+ "index": 1
767
+ }
768
+ ]
769
+ }
770
+ }
771
+ }
772
+ },
773
+ {
774
+ "id": 32,
775
+ "type": {
776
+ "path": [
777
+ "ink_primitives",
778
+ "types",
779
+ "Hash"
780
+ ],
781
+ "def": {
782
+ "composite": {
783
+ "fields": [
784
+ {
785
+ "type": 17,
786
+ "typeName": "[u8; 32]"
787
+ }
788
+ ]
789
+ }
790
+ }
791
+ }
792
+ },
793
+ {
794
+ "id": 33,
795
+ "type": {
796
+ "def": {
797
+ "primitive": "u32"
798
+ }
799
+ }
800
+ }
801
+ ],
802
+ "storage": {
803
+ "root": {
804
+ "root_key": "0x00000000",
805
+ "layout": {
806
+ "struct": {
807
+ "name": "LendingPool",
808
+ "fields": [
809
+ {
810
+ "name": "config",
811
+ "layout": {
812
+ "struct": {
813
+ "name": "ConfigRefFor",
814
+ "fields": [
815
+ {
816
+ "name": "inner",
817
+ "layout": {
818
+ "struct": {
819
+ "name": "CallBuilder",
820
+ "fields": [
821
+ {
822
+ "name": "addr",
823
+ "layout": {
824
+ "leaf": {
825
+ "key": "0x00000000",
826
+ "ty": 0
827
+ }
828
+ }
829
+ }
830
+ ]
831
+ }
832
+ }
833
+ }
834
+ ]
835
+ }
836
+ }
837
+ },
838
+ {
839
+ "name": "total_liquidity",
840
+ "layout": {
841
+ "root": {
842
+ "root_key": "0x83dba347",
843
+ "layout": {
844
+ "leaf": {
845
+ "key": "0x83dba347",
846
+ "ty": 3
847
+ }
848
+ },
849
+ "ty": 4
850
+ }
851
+ }
852
+ },
853
+ {
854
+ "name": "total_borrowed",
855
+ "layout": {
856
+ "root": {
857
+ "root_key": "0x1b6e83d4",
858
+ "layout": {
859
+ "leaf": {
860
+ "key": "0x1b6e83d4",
861
+ "ty": 3
862
+ }
863
+ },
864
+ "ty": 9
865
+ }
866
+ }
867
+ },
868
+ {
869
+ "name": "reserved_funds",
870
+ "layout": {
871
+ "root": {
872
+ "root_key": "0xc77ffb42",
873
+ "layout": {
874
+ "leaf": {
875
+ "key": "0xc77ffb42",
876
+ "ty": 3
877
+ }
878
+ },
879
+ "ty": 12
880
+ }
881
+ }
882
+ },
883
+ {
884
+ "name": "user_deposits",
885
+ "layout": {
886
+ "root": {
887
+ "root_key": "0xe8045393",
888
+ "layout": {
889
+ "leaf": {
890
+ "key": "0xe8045393",
891
+ "ty": 3
892
+ }
893
+ },
894
+ "ty": 15
895
+ }
896
+ }
897
+ },
898
+ {
899
+ "name": "last_update",
900
+ "layout": {
901
+ "root": {
902
+ "root_key": "0xad90036c",
903
+ "layout": {
904
+ "leaf": {
905
+ "key": "0xad90036c",
906
+ "ty": 20
907
+ }
908
+ },
909
+ "ty": 21
910
+ }
911
+ }
912
+ }
913
+ ]
914
+ }
915
+ },
916
+ "ty": 24
917
+ }
918
+ },
919
+ "spec": {
920
+ "constructors": [
921
+ {
922
+ "label": "new",
923
+ "selector": "0x9bae9d5e",
924
+ "payable": false,
925
+ "args": [
926
+ {
927
+ "label": "config_address",
928
+ "type": {
929
+ "type": 0,
930
+ "displayName": [
931
+ "Address"
932
+ ]
933
+ }
934
+ }
935
+ ],
936
+ "returnType": {
937
+ "type": 25,
938
+ "displayName": [
939
+ "ink_primitives",
940
+ "ConstructorResult"
941
+ ]
942
+ },
943
+ "docs": [],
944
+ "default": false
945
+ }
946
+ ],
947
+ "messages": [
948
+ {
949
+ "label": "deposit",
950
+ "selector": "0x2d10c9bd",
951
+ "mutates": true,
952
+ "payable": true,
953
+ "args": [],
954
+ "returnType": {
955
+ "type": 27,
956
+ "displayName": [
957
+ "ink",
958
+ "MessageResult"
959
+ ]
960
+ },
961
+ "docs": [
962
+ " Deposits to the lending pool"
963
+ ],
964
+ "default": false
965
+ },
966
+ {
967
+ "label": "withdraw",
968
+ "selector": "0x410fcc9d",
969
+ "mutates": true,
970
+ "payable": false,
971
+ "args": [
972
+ {
973
+ "label": "amount",
974
+ "type": {
975
+ "type": 3,
976
+ "displayName": [
977
+ "Balance"
978
+ ]
979
+ }
980
+ }
981
+ ],
982
+ "returnType": {
983
+ "type": 27,
984
+ "displayName": [
985
+ "ink",
986
+ "MessageResult"
987
+ ]
988
+ },
989
+ "docs": [
990
+ " Withdraw funds from the lending pool"
991
+ ],
992
+ "default": false
993
+ },
994
+ {
995
+ "label": "get_current_rate",
996
+ "selector": "0x133e6c7c",
997
+ "mutates": false,
998
+ "payable": false,
999
+ "args": [],
1000
+ "returnType": {
1001
+ "type": 30,
1002
+ "displayName": [
1003
+ "ink",
1004
+ "MessageResult"
1005
+ ]
1006
+ },
1007
+ "docs": [],
1008
+ "default": false
1009
+ },
1010
+ {
1011
+ "label": "get_user_yield",
1012
+ "selector": "0xdb8df080",
1013
+ "mutates": true,
1014
+ "payable": false,
1015
+ "args": [],
1016
+ "returnType": {
1017
+ "type": 31,
1018
+ "displayName": [
1019
+ "ink",
1020
+ "MessageResult"
1021
+ ]
1022
+ },
1023
+ "docs": [
1024
+ " Get user's accrued yield"
1025
+ ],
1026
+ "default": false
1027
+ },
1028
+ {
1029
+ "label": "get_user_deposit",
1030
+ "selector": "0x3ebb50fa",
1031
+ "mutates": false,
1032
+ "payable": false,
1033
+ "args": [
1034
+ {
1035
+ "label": "user",
1036
+ "type": {
1037
+ "type": 16,
1038
+ "displayName": [
1039
+ "AccountId"
1040
+ ]
1041
+ }
1042
+ }
1043
+ ],
1044
+ "returnType": {
1045
+ "type": 31,
1046
+ "displayName": [
1047
+ "ink",
1048
+ "MessageResult"
1049
+ ]
1050
+ },
1051
+ "docs": [
1052
+ " Get user's deposit balance"
1053
+ ],
1054
+ "default": false
1055
+ },
1056
+ {
1057
+ "label": "get_total_liquidity",
1058
+ "selector": "0xddd7e6c3",
1059
+ "mutates": false,
1060
+ "payable": false,
1061
+ "args": [],
1062
+ "returnType": {
1063
+ "type": 31,
1064
+ "displayName": [
1065
+ "ink",
1066
+ "MessageResult"
1067
+ ]
1068
+ },
1069
+ "docs": [],
1070
+ "default": false
1071
+ },
1072
+ {
1073
+ "label": "disburse",
1074
+ "selector": "0x28217c4a",
1075
+ "mutates": true,
1076
+ "payable": false,
1077
+ "args": [
1078
+ {
1079
+ "label": "amount",
1080
+ "type": {
1081
+ "type": 3,
1082
+ "displayName": [
1083
+ "Balance"
1084
+ ]
1085
+ }
1086
+ },
1087
+ {
1088
+ "label": "to",
1089
+ "type": {
1090
+ "type": 16,
1091
+ "displayName": [
1092
+ "AccountId"
1093
+ ]
1094
+ }
1095
+ }
1096
+ ],
1097
+ "returnType": {
1098
+ "type": 27,
1099
+ "displayName": [
1100
+ "ink",
1101
+ "MessageResult"
1102
+ ]
1103
+ },
1104
+ "docs": [
1105
+ " Disburse part of liquidity (add a borrow basically)"
1106
+ ],
1107
+ "default": false
1108
+ },
1109
+ {
1110
+ "label": "receive_repayment",
1111
+ "selector": "0x72874674",
1112
+ "mutates": true,
1113
+ "payable": true,
1114
+ "args": [
1115
+ {
1116
+ "label": "amount",
1117
+ "type": {
1118
+ "type": 3,
1119
+ "displayName": [
1120
+ "Balance"
1121
+ ]
1122
+ }
1123
+ }
1124
+ ],
1125
+ "returnType": {
1126
+ "type": 27,
1127
+ "displayName": [
1128
+ "ink",
1129
+ "MessageResult"
1130
+ ]
1131
+ },
1132
+ "docs": [
1133
+ " Repay a loan (reduce borrowed amount)"
1134
+ ],
1135
+ "default": false
1136
+ },
1137
+ {
1138
+ "label": "slash_stake",
1139
+ "selector": "0xd6170b15",
1140
+ "mutates": true,
1141
+ "payable": false,
1142
+ "args": [
1143
+ {
1144
+ "label": "user",
1145
+ "type": {
1146
+ "type": 16,
1147
+ "displayName": [
1148
+ "AccountId"
1149
+ ]
1150
+ }
1151
+ },
1152
+ {
1153
+ "label": "amount",
1154
+ "type": {
1155
+ "type": 3,
1156
+ "displayName": [
1157
+ "Balance"
1158
+ ]
1159
+ }
1160
+ }
1161
+ ],
1162
+ "returnType": {
1163
+ "type": 27,
1164
+ "displayName": [
1165
+ "ink",
1166
+ "MessageResult"
1167
+ ]
1168
+ },
1169
+ "docs": [
1170
+ " Slash part of the position of a voucher"
1171
+ ],
1172
+ "default": false
1173
+ }
1174
+ ],
1175
+ "events": [
1176
+ {
1177
+ "label": "RepaymentReceived",
1178
+ "module_path": "lending_pool::lending_pool",
1179
+ "signature_topic": "0x654b646a1cd4aa283b63883350204bf2108d445e09b97e4ff732aecd8fb07d2b",
1180
+ "args": [
1181
+ {
1182
+ "label": "amount",
1183
+ "indexed": false,
1184
+ "type": {
1185
+ "type": 3,
1186
+ "displayName": [
1187
+ "Balance"
1188
+ ]
1189
+ },
1190
+ "docs": []
1191
+ }
1192
+ ],
1193
+ "docs": []
1194
+ },
1195
+ {
1196
+ "label": "Deposit",
1197
+ "module_path": "lending_pool::lending_pool",
1198
+ "signature_topic": "0xcec721a438a262e1d7866c1b39464ad44a551ab736f11d09127d0b9ac849a16b",
1199
+ "args": [
1200
+ {
1201
+ "label": "depositor",
1202
+ "indexed": false,
1203
+ "type": {
1204
+ "type": 16,
1205
+ "displayName": [
1206
+ "AccountId"
1207
+ ]
1208
+ },
1209
+ "docs": []
1210
+ },
1211
+ {
1212
+ "label": "amount",
1213
+ "indexed": false,
1214
+ "type": {
1215
+ "type": 3,
1216
+ "displayName": [
1217
+ "Balance"
1218
+ ]
1219
+ },
1220
+ "docs": []
1221
+ }
1222
+ ],
1223
+ "docs": [
1224
+ "Events for lending pool actions"
1225
+ ]
1226
+ },
1227
+ {
1228
+ "label": "Withdraw",
1229
+ "module_path": "lending_pool::lending_pool",
1230
+ "signature_topic": "0x246a5b254e2e059ff24e5b754b864041f6e1a0fecc5946a65c1aa051cf8c0148",
1231
+ "args": [
1232
+ {
1233
+ "label": "withdrawer",
1234
+ "indexed": false,
1235
+ "type": {
1236
+ "type": 16,
1237
+ "displayName": [
1238
+ "AccountId"
1239
+ ]
1240
+ },
1241
+ "docs": []
1242
+ },
1243
+ {
1244
+ "label": "amount",
1245
+ "indexed": false,
1246
+ "type": {
1247
+ "type": 3,
1248
+ "displayName": [
1249
+ "Balance"
1250
+ ]
1251
+ },
1252
+ "docs": []
1253
+ }
1254
+ ],
1255
+ "docs": []
1256
+ }
1257
+ ],
1258
+ "docs": [
1259
+ " The lending pool contract is used to manage the pool with auto rate in accruals.",
1260
+ " As Kleo uses a loan manager contract to handle loans, this contract will mainly",
1261
+ " provide the pool where the contracts are created from, and handle certain calculations."
1262
+ ],
1263
+ "lang_error": {
1264
+ "type": 26,
1265
+ "displayName": [
1266
+ "ink",
1267
+ "LangError"
1268
+ ]
1269
+ },
1270
+ "environment": {
1271
+ "accountId": {
1272
+ "type": 16,
1273
+ "displayName": [
1274
+ "AccountId"
1275
+ ]
1276
+ },
1277
+ "balance": {
1278
+ "type": 3,
1279
+ "displayName": [
1280
+ "Balance"
1281
+ ]
1282
+ },
1283
+ "hash": {
1284
+ "type": 32,
1285
+ "displayName": [
1286
+ "Hash"
1287
+ ]
1288
+ },
1289
+ "timestamp": {
1290
+ "type": 20,
1291
+ "displayName": [
1292
+ "Timestamp"
1293
+ ]
1294
+ },
1295
+ "blockNumber": {
1296
+ "type": 33,
1297
+ "displayName": [
1298
+ "BlockNumber"
1299
+ ]
1300
+ },
1301
+ "nativeToEthRatio": 100000000,
1302
+ "trustBackedAssetsPrecompileIndex": 288,
1303
+ "poolAssetsPrecompileIndex": 800,
1304
+ "staticBufferSize": 16384
1305
+ }
1306
+ }
1307
+ }