-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathLendingPoolDictionary.ts
More file actions
96 lines (90 loc) · 2.09 KB
/
LendingPoolDictionary.ts
File metadata and controls
96 lines (90 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import { LendingPool } from './LendingPool';
import { COMMON_SYMBOLS } from './asset';
export class LendingPoolDictionary {
public static pools: Map<string, LendingPool> = new Map<string, LendingPool>([
[
COMMON_SYMBOLS.DLLR,
new LendingPool(
COMMON_SYMBOLS.DLLR,
[COMMON_SYMBOLS.BTC, 'BPRO', COMMON_SYMBOLS.SOV, COMMON_SYMBOLS.BOS],
false,
false,
),
],
[
COMMON_SYMBOLS.BTC,
new LendingPool(
COMMON_SYMBOLS.BTC,
[
COMMON_SYMBOLS.DLLR,
COMMON_SYMBOLS.XUSD,
COMMON_SYMBOLS.SOV,
'BPRO',
COMMON_SYMBOLS.DOC,
COMMON_SYMBOLS.BOS,
],
false,
false,
),
],
[
COMMON_SYMBOLS.XUSD,
new LendingPool(
COMMON_SYMBOLS.XUSD,
[COMMON_SYMBOLS.BTC, 'BPRO', COMMON_SYMBOLS.SOV, COMMON_SYMBOLS.BOS],
true,
false,
),
],
[
COMMON_SYMBOLS.DOC,
new LendingPool(
COMMON_SYMBOLS.DOC,
[
COMMON_SYMBOLS.BTC,
COMMON_SYMBOLS.XUSD,
'BPRO',
COMMON_SYMBOLS.SOV,
COMMON_SYMBOLS.BOS,
],
false,
false,
),
],
[
COMMON_SYMBOLS.RUSDT,
new LendingPool(COMMON_SYMBOLS.RUSDT, [], false, true),
],
[
'BPRO',
new LendingPool(
'BPRO',
[
COMMON_SYMBOLS.DLLR,
COMMON_SYMBOLS.BTC,
COMMON_SYMBOLS.XUSD,
COMMON_SYMBOLS.DOC,
COMMON_SYMBOLS.SOV,
COMMON_SYMBOLS.BOS,
],
false,
false,
),
],
]);
public static get(asset: string): LendingPool {
return this.pools.get(asset) as LendingPool;
}
public static list(): Array<LendingPool> {
return Array.from(this.pools.values());
}
public static assetList(): Array<string> {
return Array.from(this.pools.keys());
}
public static find(assets: Array<string>): Array<LendingPool> {
return assets.map(asset => this.get(asset));
}
public static entries() {
return Array.from(this.pools.entries());
}
}