@morpho-org/blue-sdk 2.0.0-test.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +46 -26
- package/lib/addresses.d.ts +59 -55
- package/lib/addresses.js +42 -43
- package/lib/chain.d.ts +1 -1
- package/lib/chain.js +3 -3
- package/lib/constants.d.ts +0 -9
- package/lib/constants.js +1 -10
- package/lib/errors.d.ts +7 -8
- package/lib/errors.js +21 -19
- package/lib/holding/AssetBalances.d.ts +3 -3
- package/lib/holding/Holding.d.ts +10 -5
- package/lib/holding/Holding.js +14 -4
- package/lib/holding/index.d.ts +2 -2
- package/lib/holding/index.js +2 -2
- package/lib/index.d.ts +12 -25
- package/lib/index.js +12 -38
- package/lib/market/Market.d.ts +48 -34
- package/lib/market/Market.js +76 -57
- package/lib/market/{MarketConfig.d.ts → MarketParams.d.ts} +8 -7
- package/lib/market/{MarketConfig.js → MarketParams.js} +20 -21
- package/lib/market/MarketUtils.d.ts +94 -42
- package/lib/market/MarketUtils.js +145 -67
- package/lib/market/index.d.ts +3 -3
- package/lib/market/index.js +3 -3
- package/lib/{maths → math}/AdaptiveCurveIrmLib.d.ts +1 -1
- package/lib/{maths → math}/AdaptiveCurveIrmLib.js +20 -20
- package/lib/{maths → math}/MathLib.d.ts +24 -42
- package/lib/{maths → math}/MathLib.js +41 -54
- package/lib/{maths → math}/SharesMath.d.ts +2 -2
- package/lib/{maths → math}/SharesMath.js +3 -3
- package/lib/math/index.d.ts +3 -0
- package/lib/{helpers/format → math}/index.js +3 -1
- package/lib/position/Position.d.ts +35 -25
- package/lib/position/Position.js +46 -44
- package/lib/position/index.d.ts +1 -1
- package/lib/position/index.js +1 -1
- package/lib/token/ConstantWrappedToken.d.ts +6 -7
- package/lib/token/ConstantWrappedToken.js +8 -10
- package/lib/token/ExchangeRateWrappedToken.d.ts +5 -5
- package/lib/token/ExchangeRateWrappedToken.js +5 -5
- package/lib/token/Token.d.ts +18 -18
- package/lib/token/Token.js +24 -27
- package/lib/token/VaultToken.d.ts +20 -11
- package/lib/token/VaultToken.js +15 -7
- package/lib/token/WrappedToken.d.ts +4 -4
- package/lib/token/WrappedToken.js +7 -7
- package/lib/token/index.d.ts +5 -5
- package/lib/token/index.js +5 -5
- package/lib/types.d.ts +3 -6
- package/lib/user/User.d.ts +1 -1
- package/lib/user/index.d.ts +1 -1
- package/lib/user/index.js +1 -1
- package/lib/vault/Vault.d.ts +22 -28
- package/lib/vault/Vault.js +43 -51
- package/lib/vault/VaultConfig.d.ts +6 -7
- package/lib/vault/VaultConfig.js +5 -5
- package/lib/vault/VaultMarketAllocation.d.ts +8 -8
- package/lib/vault/VaultMarketAllocation.js +3 -3
- package/lib/vault/VaultMarketConfig.d.ts +10 -10
- package/lib/vault/VaultMarketPublicAllocatorConfig.d.ts +6 -6
- package/lib/vault/VaultUser.d.ts +26 -0
- package/lib/vault/VaultUser.js +28 -0
- package/lib/vault/VaultUtils.d.ts +4 -6
- package/lib/vault/VaultUtils.js +6 -6
- package/lib/vault/index.d.ts +7 -6
- package/lib/vault/index.js +7 -6
- package/package.json +25 -56
- package/lib/chain.test.d.ts +0 -1
- package/lib/chain.test.js +0 -21
- package/lib/helpers/format/format.d.ts +0 -122
- package/lib/helpers/format/format.js +0 -286
- package/lib/helpers/format/format.test.d.ts +0 -1
- package/lib/helpers/format/format.test.js +0 -255
- package/lib/helpers/format/index.d.ts +0 -1
- package/lib/helpers/index.d.ts +0 -2
- package/lib/helpers/index.js +0 -18
- package/lib/helpers/locale.d.ts +0 -46
- package/lib/helpers/locale.js +0 -96
- package/lib/market/MarketUtils.test.d.ts +0 -1
- package/lib/market/MarketUtils.test.js +0 -38
- package/lib/maths/index.d.ts +0 -3
- package/lib/maths/index.js +0 -19
- package/lib/tests/mocks/markets.d.ts +0 -19
- package/lib/tests/mocks/markets.js +0 -121
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const format_1 = require("./format");
|
|
4
|
-
describe("format", () => {
|
|
5
|
-
const number = 12345.6789;
|
|
6
|
-
const bigint = 123456789n;
|
|
7
|
-
const decimals = 4;
|
|
8
|
-
describe("hex", () => {
|
|
9
|
-
describe("should properly format number in hex format", () => {
|
|
10
|
-
it("without option", () => {
|
|
11
|
-
expect(format_1.format.hex.of(number)).toEqual((123456789).toString(16));
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
describe("should properly format bigint in hex format", () => {
|
|
15
|
-
it("without option", () => {
|
|
16
|
-
expect(format_1.format.hex.of(bigint, decimals)).toEqual((123456789).toString(16));
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
describe("number", () => {
|
|
21
|
-
describe("should properly format number in number format", () => {
|
|
22
|
-
it("without option", () => {
|
|
23
|
-
expect(format_1.format.number.of(number)).toEqual("12345.6789");
|
|
24
|
-
});
|
|
25
|
-
it("with digits", () => {
|
|
26
|
-
expect(format_1.format.number.digits(2).of(number)).toEqual("12345.67");
|
|
27
|
-
});
|
|
28
|
-
it("with min", () => {
|
|
29
|
-
expect(format_1.format.number.min(20000).of(number)).toEqual("< 20000.0000");
|
|
30
|
-
});
|
|
31
|
-
it("with max", () => {
|
|
32
|
-
expect(format_1.format.number.max(10000).of(number)).toEqual("> 10000.0000");
|
|
33
|
-
});
|
|
34
|
-
it("with sign", () => {
|
|
35
|
-
expect(format_1.format.number.sign().of(number)).toEqual("+12345.6789");
|
|
36
|
-
});
|
|
37
|
-
it("with unit", () => {
|
|
38
|
-
expect(format_1.format.number.unit("$").of(number)).toEqual("$12345.6789");
|
|
39
|
-
});
|
|
40
|
-
it("without trailing zeros", () => {
|
|
41
|
-
expect(format_1.format.number.digits(6).of(number)).toEqual("12345.678900");
|
|
42
|
-
expect(format_1.format.number.digits(6).removeTrailingZero().of(number)).toEqual("12345.6789");
|
|
43
|
-
});
|
|
44
|
-
it("with locale", () => {
|
|
45
|
-
expect(format_1.format.number.locale("fr-FR").of(number)).toEqual("12345,6789");
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
describe("should properly format bigint in number format", () => {
|
|
49
|
-
it("without option", () => {
|
|
50
|
-
expect(format_1.format.number.of(bigint, decimals)).toEqual("12345.6789");
|
|
51
|
-
});
|
|
52
|
-
it("with digits", () => {
|
|
53
|
-
expect(format_1.format.number.digits(2).of(bigint, decimals)).toEqual("12345.67");
|
|
54
|
-
});
|
|
55
|
-
it("with min", () => {
|
|
56
|
-
expect(format_1.format.number.min(20000).of(bigint, decimals)).toEqual("< 20000.0000");
|
|
57
|
-
});
|
|
58
|
-
it("with max", () => {
|
|
59
|
-
expect(format_1.format.number.max(10000).of(bigint, decimals)).toEqual("> 10000.0000");
|
|
60
|
-
});
|
|
61
|
-
it("with sign", () => {
|
|
62
|
-
expect(format_1.format.number.sign().of(bigint, decimals)).toEqual("+12345.6789");
|
|
63
|
-
});
|
|
64
|
-
it("with unit", () => {
|
|
65
|
-
expect(format_1.format.number.unit("$").of(bigint, decimals)).toEqual("$12345.6789");
|
|
66
|
-
});
|
|
67
|
-
it("without trailing zeros", () => {
|
|
68
|
-
expect(format_1.format.number.digits(6).of(bigint, decimals)).toEqual("12345.678900");
|
|
69
|
-
expect(format_1.format.number.digits(6).removeTrailingZero().of(bigint, decimals)).toEqual("12345.6789");
|
|
70
|
-
});
|
|
71
|
-
it("with locale", () => {
|
|
72
|
-
expect(format_1.format.number.locale("fr-FR").of(bigint, decimals)).toEqual("12345,6789");
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
describe("short", () => {
|
|
77
|
-
describe("should properly format number in short format", () => {
|
|
78
|
-
it("without option", () => {
|
|
79
|
-
expect(format_1.format.short.of(number)).toEqual("12.3456789k");
|
|
80
|
-
});
|
|
81
|
-
it("with digits", () => {
|
|
82
|
-
expect(format_1.format.short.digits(2).of(number)).toEqual("12.34k");
|
|
83
|
-
});
|
|
84
|
-
it("with min", () => {
|
|
85
|
-
expect(format_1.format.short.min(20000).of(number)).toEqual("< 20.0000000k");
|
|
86
|
-
});
|
|
87
|
-
it("with max", () => {
|
|
88
|
-
expect(format_1.format.short.max(10000).of(number)).toEqual("> 10.0000000k");
|
|
89
|
-
});
|
|
90
|
-
it("with sign", () => {
|
|
91
|
-
expect(format_1.format.short.sign().of(number)).toEqual("+12.3456789k");
|
|
92
|
-
});
|
|
93
|
-
it("with unit", () => {
|
|
94
|
-
expect(format_1.format.short.unit("€").of(number)).toEqual("12.3456789k €");
|
|
95
|
-
});
|
|
96
|
-
it("without trailing zeros", () => {
|
|
97
|
-
expect(format_1.format.short.digits(8).of(number)).toEqual("12.34567890k");
|
|
98
|
-
expect(format_1.format.short.digits(8).removeTrailingZero().of(number)).toEqual("12.3456789k");
|
|
99
|
-
});
|
|
100
|
-
it("with small numbers with commas", () => {
|
|
101
|
-
expect(format_1.format.short.smallValuesWithCommas().of(number / 10)).toEqual("1,234.56789");
|
|
102
|
-
});
|
|
103
|
-
it("with locale", () => {
|
|
104
|
-
expect(format_1.format.short.locale("fr-FR").of(number)).toEqual("12,3456789k");
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
describe("should properly format bigint in short format", () => {
|
|
108
|
-
it("without option", () => {
|
|
109
|
-
expect(format_1.format.short.of(bigint, decimals)).toEqual("12.3456789k");
|
|
110
|
-
});
|
|
111
|
-
it("with digits", () => {
|
|
112
|
-
expect(format_1.format.short.digits(2).of(bigint, decimals)).toEqual("12.34k");
|
|
113
|
-
});
|
|
114
|
-
it("with min", () => {
|
|
115
|
-
expect(format_1.format.short.min(20000).of(bigint, decimals)).toEqual("< 20.0000000k");
|
|
116
|
-
});
|
|
117
|
-
it("with max", () => {
|
|
118
|
-
expect(format_1.format.short.max(10000).of(bigint, decimals)).toEqual("> 10.0000000k");
|
|
119
|
-
});
|
|
120
|
-
it("with sign", () => {
|
|
121
|
-
expect(format_1.format.short.sign().of(bigint, decimals)).toEqual("+12.3456789k");
|
|
122
|
-
});
|
|
123
|
-
it("with unit", () => {
|
|
124
|
-
expect(format_1.format.short.unit("€").of(bigint, decimals)).toEqual("12.3456789k €");
|
|
125
|
-
});
|
|
126
|
-
it("without trailing zeros", () => {
|
|
127
|
-
expect(format_1.format.short.digits(8).of(bigint, decimals)).toEqual("12.34567890k");
|
|
128
|
-
expect(format_1.format.short.digits(8).removeTrailingZero().of(bigint, decimals)).toEqual("12.3456789k");
|
|
129
|
-
});
|
|
130
|
-
it("with locale", () => {
|
|
131
|
-
expect(format_1.format.short.locale("fr-FR").of(bigint, decimals)).toEqual("12,3456789k");
|
|
132
|
-
});
|
|
133
|
-
it("with small numbers with commas", () => {
|
|
134
|
-
expect(format_1.format.short.smallValuesWithCommas().of(bigint, decimals + 1)).toEqual("1,234.56789");
|
|
135
|
-
});
|
|
136
|
-
it("with small numbers with commas with locale", () => {
|
|
137
|
-
expect(format_1.format.short
|
|
138
|
-
.smallValuesWithCommas()
|
|
139
|
-
.locale("fr-FR")
|
|
140
|
-
.of(bigint, decimals + 1)).toEqual("1\u202F234,56789");
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
describe("commas", () => {
|
|
145
|
-
describe("should properly format number in commas format", () => {
|
|
146
|
-
it("without option", () => {
|
|
147
|
-
expect(format_1.format.commas.of(number)).toEqual("12,345.6789");
|
|
148
|
-
});
|
|
149
|
-
it("with digits", () => {
|
|
150
|
-
expect(format_1.format.commas.digits(2).of(number)).toEqual("12,345.67");
|
|
151
|
-
});
|
|
152
|
-
it("with min", () => {
|
|
153
|
-
expect(format_1.format.commas.min(20000).of(number)).toEqual("< 20,000.0000");
|
|
154
|
-
});
|
|
155
|
-
it("with max", () => {
|
|
156
|
-
expect(format_1.format.commas.max(10000).of(number)).toEqual("> 10,000.0000");
|
|
157
|
-
});
|
|
158
|
-
it("with sign", () => {
|
|
159
|
-
expect(format_1.format.commas.sign().of(number)).toEqual("+12,345.6789");
|
|
160
|
-
});
|
|
161
|
-
it("with unit", () => {
|
|
162
|
-
expect(format_1.format.commas.unit("ETH").of(number)).toEqual("12,345.6789 ETH");
|
|
163
|
-
});
|
|
164
|
-
it("without trailing zeros", () => {
|
|
165
|
-
expect(format_1.format.commas.digits(6).of(number)).toEqual("12,345.678900");
|
|
166
|
-
expect(format_1.format.commas.digits(6).removeTrailingZero().of(number)).toEqual("12,345.6789");
|
|
167
|
-
});
|
|
168
|
-
it("with locale", () => {
|
|
169
|
-
expect(format_1.format.commas.locale("fr-FR").of(number)).toEqual("12\u202F345,6789");
|
|
170
|
-
});
|
|
171
|
-
});
|
|
172
|
-
describe("should properly format bigint in commas format", () => {
|
|
173
|
-
it("without option", () => {
|
|
174
|
-
expect(format_1.format.commas.of(bigint, decimals)).toEqual("12,345.6789");
|
|
175
|
-
});
|
|
176
|
-
it("with digits", () => {
|
|
177
|
-
expect(format_1.format.commas.digits(2).of(bigint, decimals)).toEqual("12,345.67");
|
|
178
|
-
});
|
|
179
|
-
it("with min", () => {
|
|
180
|
-
expect(format_1.format.commas.min(20000).of(bigint, decimals)).toEqual("< 20,000.0000");
|
|
181
|
-
});
|
|
182
|
-
it("with max", () => {
|
|
183
|
-
expect(format_1.format.commas.max(10000).of(bigint, decimals)).toEqual("> 10,000.0000");
|
|
184
|
-
});
|
|
185
|
-
it("with sign", () => {
|
|
186
|
-
expect(format_1.format.commas.sign().of(bigint, decimals)).toEqual("+12,345.6789");
|
|
187
|
-
});
|
|
188
|
-
it("with unit", () => {
|
|
189
|
-
expect(format_1.format.commas.unit("ETH").of(bigint, decimals)).toEqual("12,345.6789 ETH");
|
|
190
|
-
});
|
|
191
|
-
it("without trailing zeros", () => {
|
|
192
|
-
expect(format_1.format.commas.digits(6).of(bigint, decimals)).toEqual("12,345.678900");
|
|
193
|
-
expect(format_1.format.commas.digits(6).removeTrailingZero().of(bigint, decimals)).toEqual("12,345.6789");
|
|
194
|
-
});
|
|
195
|
-
it("with locale", () => {
|
|
196
|
-
// the correct space in fr-FR is narrow no-break space (U+202F)
|
|
197
|
-
expect(format_1.format.commas.locale("fr-FR").of(bigint, decimals)).toEqual("12\u202F345,6789");
|
|
198
|
-
});
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
describe("percent", () => {
|
|
202
|
-
describe("should properly format number in percent format", () => {
|
|
203
|
-
it("without option", () => {
|
|
204
|
-
expect(format_1.format.percent.of(number)).toEqual("1234567.8900");
|
|
205
|
-
});
|
|
206
|
-
it("with digits", () => {
|
|
207
|
-
expect(format_1.format.percent.digits(1).of(number)).toEqual("1234567.8");
|
|
208
|
-
});
|
|
209
|
-
it("with min", () => {
|
|
210
|
-
expect(format_1.format.percent.min(20000).of(number)).toEqual("< 2000000.0000");
|
|
211
|
-
});
|
|
212
|
-
it("with max", () => {
|
|
213
|
-
expect(format_1.format.percent.max(10000).of(number)).toEqual("> 1000000.0000");
|
|
214
|
-
});
|
|
215
|
-
it("with sign", () => {
|
|
216
|
-
expect(format_1.format.percent.sign().of(number)).toEqual("+1234567.8900");
|
|
217
|
-
});
|
|
218
|
-
it("with unit", () => {
|
|
219
|
-
expect(format_1.format.percent.unit("%").of(number)).toEqual("1234567.8900%");
|
|
220
|
-
});
|
|
221
|
-
it("without trailing zeros", () => {
|
|
222
|
-
expect(format_1.format.percent.removeTrailingZero().of(number)).toEqual("1234567.89");
|
|
223
|
-
});
|
|
224
|
-
it("with locale", () => {
|
|
225
|
-
expect(format_1.format.percent.locale("fr-FR").of(number)).toEqual("1234567,8900");
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
describe("should properly format bigint in percent format", () => {
|
|
229
|
-
it("without option", () => {
|
|
230
|
-
expect(format_1.format.percent.of(bigint, decimals)).toEqual("1234567.8900");
|
|
231
|
-
});
|
|
232
|
-
it("with digits", () => {
|
|
233
|
-
expect(format_1.format.percent.digits(1).of(bigint, decimals)).toEqual("1234567.8");
|
|
234
|
-
});
|
|
235
|
-
it("with min", () => {
|
|
236
|
-
expect(format_1.format.percent.min(20000).of(bigint, decimals)).toEqual("< 2000000.0000");
|
|
237
|
-
});
|
|
238
|
-
it("with max", () => {
|
|
239
|
-
expect(format_1.format.percent.max(10000).of(bigint, decimals)).toEqual("> 1000000.0000");
|
|
240
|
-
});
|
|
241
|
-
it("with sign", () => {
|
|
242
|
-
expect(format_1.format.percent.sign().of(bigint, decimals)).toEqual("+1234567.8900");
|
|
243
|
-
});
|
|
244
|
-
it("with unit", () => {
|
|
245
|
-
expect(format_1.format.percent.unit("%").of(bigint, decimals)).toEqual("1234567.8900%");
|
|
246
|
-
});
|
|
247
|
-
it("without trailing zeros", () => {
|
|
248
|
-
expect(format_1.format.percent.removeTrailingZero().of(bigint, decimals)).toEqual("1234567.89");
|
|
249
|
-
});
|
|
250
|
-
it("with locale", () => {
|
|
251
|
-
expect(format_1.format.percent.locale("fr-FR").of(bigint, decimals)).toEqual("1234567,8900");
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./format";
|
package/lib/helpers/index.d.ts
DELETED
package/lib/helpers/index.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./locale"), exports);
|
|
18
|
-
__exportStar(require("./format"), exports);
|
package/lib/helpers/locale.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
type LocaleSymbols = {
|
|
2
|
-
decimalSymbol: string;
|
|
3
|
-
groupSymbol: string;
|
|
4
|
-
locale: string;
|
|
5
|
-
};
|
|
6
|
-
export type LocaleParts = LocaleSymbols & {
|
|
7
|
-
value: string;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* @returns the locale symbols for the given locale defaulting to en-US
|
|
11
|
-
*
|
|
12
|
-
* @deprecated Import from `@morpho-org/morpho-ts`
|
|
13
|
-
*/
|
|
14
|
-
export declare const getLocaleSymbols: (locale: string) => LocaleSymbols;
|
|
15
|
-
/**
|
|
16
|
-
* @returns the effective browser locale
|
|
17
|
-
*
|
|
18
|
-
* @deprecated Import from `@morpho-org/morpho-ts`
|
|
19
|
-
*/
|
|
20
|
-
export declare const getEffectiveLocale: () => string;
|
|
21
|
-
/**
|
|
22
|
-
* @returns the value as a string with the given locale symbols
|
|
23
|
-
* @param numStr the number as a string in the "from" locale (e.g. "1,2345.6" for en-US)
|
|
24
|
-
* @param from the locale the numStr is in (e.g. "en-US")
|
|
25
|
-
* @param to the locale to convert to (e.g. "fr-FR")
|
|
26
|
-
*
|
|
27
|
-
* @deprecated Import from `@morpho-org/morpho-ts`
|
|
28
|
-
*/
|
|
29
|
-
export declare const convertNumStrToLocal: (numStr: string, from: string, to: string) => string;
|
|
30
|
-
/**
|
|
31
|
-
* @returns the value as a string in the effective browser locale
|
|
32
|
-
* @param numStr the number as a string in the effective browser locale (e.g. "1,2345.6" for en-US)
|
|
33
|
-
* @param to the locale to use (e.g. "fr-FR")
|
|
34
|
-
*
|
|
35
|
-
* @deprecated Import from `@morpho-org/morpho-ts`
|
|
36
|
-
*/
|
|
37
|
-
export declare const convertNumStrFromEffectiveTo: (numStr: string, to: string) => string;
|
|
38
|
-
/**
|
|
39
|
-
* @returns the value as a string with the given locale symbols either from the given locale or the effective browser locale
|
|
40
|
-
* @param numStr the number as a string in english format (e.g. "1,2345.6")
|
|
41
|
-
* @param locale optional - the locale to use (e.g. "fr-FR")
|
|
42
|
-
*
|
|
43
|
-
* @deprecated Import from `@morpho-org/morpho-ts`
|
|
44
|
-
*/
|
|
45
|
-
export declare const getEnUSNumberToLocalParts: (numStr: string, locale?: string) => LocaleParts;
|
|
46
|
-
export {};
|
package/lib/helpers/locale.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEnUSNumberToLocalParts = exports.convertNumStrFromEffectiveTo = exports.convertNumStrToLocal = exports.getEffectiveLocale = exports.getLocaleSymbols = void 0;
|
|
4
|
-
const _convertEnNumStrToLocale = (numStr, localSymbols) => {
|
|
5
|
-
return numStr
|
|
6
|
-
.replaceAll(",", "#TEMP#")
|
|
7
|
-
.replaceAll(".", localSymbols.decimalSymbol)
|
|
8
|
-
.replaceAll("#TEMP#", localSymbols.groupSymbol);
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* @returns the locale symbols for the given locale defaulting to en-US
|
|
12
|
-
*
|
|
13
|
-
* @deprecated Import from `@morpho-org/morpho-ts`
|
|
14
|
-
*/
|
|
15
|
-
const getLocaleSymbols = (locale) => {
|
|
16
|
-
let formatter;
|
|
17
|
-
const formatterOptions = {
|
|
18
|
-
useGrouping: true,
|
|
19
|
-
maximumFractionDigits: 1,
|
|
20
|
-
minimumFractionDigits: 1,
|
|
21
|
-
};
|
|
22
|
-
try {
|
|
23
|
-
formatter = new Intl.NumberFormat(locale, formatterOptions);
|
|
24
|
-
}
|
|
25
|
-
catch {
|
|
26
|
-
formatter = new Intl.NumberFormat("en-US", formatterOptions);
|
|
27
|
-
}
|
|
28
|
-
const parts = formatter.formatToParts(12345.6);
|
|
29
|
-
const decimalSymbol = parts.find((part) => part.type === "decimal").value;
|
|
30
|
-
const groupSymbol = parts.find((part) => part.type === "group").value;
|
|
31
|
-
return { decimalSymbol, groupSymbol, locale };
|
|
32
|
-
};
|
|
33
|
-
exports.getLocaleSymbols = getLocaleSymbols;
|
|
34
|
-
/**
|
|
35
|
-
* @returns the effective browser locale
|
|
36
|
-
*
|
|
37
|
-
* @deprecated Import from `@morpho-org/morpho-ts`
|
|
38
|
-
*/
|
|
39
|
-
const getEffectiveLocale = () => {
|
|
40
|
-
if (typeof window !== "undefined") {
|
|
41
|
-
try {
|
|
42
|
-
const locale = navigator?.language || document?.documentElement?.lang || "en-US";
|
|
43
|
-
new Intl.NumberFormat(locale);
|
|
44
|
-
return locale;
|
|
45
|
-
}
|
|
46
|
-
catch {
|
|
47
|
-
return "en-US";
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return "en-US";
|
|
51
|
-
};
|
|
52
|
-
exports.getEffectiveLocale = getEffectiveLocale;
|
|
53
|
-
/**
|
|
54
|
-
* @returns the value as a string with the given locale symbols
|
|
55
|
-
* @param numStr the number as a string in the "from" locale (e.g. "1,2345.6" for en-US)
|
|
56
|
-
* @param from the locale the numStr is in (e.g. "en-US")
|
|
57
|
-
* @param to the locale to convert to (e.g. "fr-FR")
|
|
58
|
-
*
|
|
59
|
-
* @deprecated Import from `@morpho-org/morpho-ts`
|
|
60
|
-
*/
|
|
61
|
-
const convertNumStrToLocal = (numStr, from, to) => {
|
|
62
|
-
const fromSymbols = (0, exports.getLocaleSymbols)(from);
|
|
63
|
-
const toSymbols = (0, exports.getLocaleSymbols)(to);
|
|
64
|
-
return numStr
|
|
65
|
-
.replaceAll(fromSymbols.groupSymbol, "#GROUP#")
|
|
66
|
-
.replaceAll(fromSymbols.decimalSymbol, "#DECIMAL#")
|
|
67
|
-
.replaceAll("#GROUP#", toSymbols.groupSymbol)
|
|
68
|
-
.replaceAll("#DECIMAL#", toSymbols.decimalSymbol);
|
|
69
|
-
};
|
|
70
|
-
exports.convertNumStrToLocal = convertNumStrToLocal;
|
|
71
|
-
/**
|
|
72
|
-
* @returns the value as a string in the effective browser locale
|
|
73
|
-
* @param numStr the number as a string in the effective browser locale (e.g. "1,2345.6" for en-US)
|
|
74
|
-
* @param to the locale to use (e.g. "fr-FR")
|
|
75
|
-
*
|
|
76
|
-
* @deprecated Import from `@morpho-org/morpho-ts`
|
|
77
|
-
*/
|
|
78
|
-
const convertNumStrFromEffectiveTo = (numStr, to) => {
|
|
79
|
-
const from = (0, exports.getEffectiveLocale)();
|
|
80
|
-
return (0, exports.convertNumStrToLocal)(numStr, from, to);
|
|
81
|
-
};
|
|
82
|
-
exports.convertNumStrFromEffectiveTo = convertNumStrFromEffectiveTo;
|
|
83
|
-
/**
|
|
84
|
-
* @returns the value as a string with the given locale symbols either from the given locale or the effective browser locale
|
|
85
|
-
* @param numStr the number as a string in english format (e.g. "1,2345.6")
|
|
86
|
-
* @param locale optional - the locale to use (e.g. "fr-FR")
|
|
87
|
-
*
|
|
88
|
-
* @deprecated Import from `@morpho-org/morpho-ts`
|
|
89
|
-
*/
|
|
90
|
-
const getEnUSNumberToLocalParts = (numStr, locale) => {
|
|
91
|
-
const _locale = locale || (0, exports.getEffectiveLocale)();
|
|
92
|
-
const localSymbols = (0, exports.getLocaleSymbols)(_locale);
|
|
93
|
-
const value = _convertEnNumStrToLocale(numStr, localSymbols);
|
|
94
|
-
return { ...localSymbols, value };
|
|
95
|
-
};
|
|
96
|
-
exports.getEnUSNumberToLocalParts = getEnUSNumberToLocalParts;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const maths_1 = require("../maths");
|
|
4
|
-
const MarketUtils_1 = require("./MarketUtils");
|
|
5
|
-
const market = {
|
|
6
|
-
loanToken: "0x0000000000000000000000000000000000000001",
|
|
7
|
-
collateralToken: "0x0000000000000000000000000000000000000002",
|
|
8
|
-
oracle: "0x0000000000000000000000000000000000000003",
|
|
9
|
-
irm: "0x0000000000000000000000000000000000000004",
|
|
10
|
-
lltv: 860000000000000000n,
|
|
11
|
-
};
|
|
12
|
-
describe("MarketUtils", () => {
|
|
13
|
-
it("should calculate the correct market id", () => {
|
|
14
|
-
expect(MarketUtils_1.MarketUtils.getMarketId(market)).toEqual("0x625e29dff74826b71c1f4c74b208a896109cc8ac9910192ce2927a982b0809e6");
|
|
15
|
-
});
|
|
16
|
-
it("should calculate the correct liquidation incentive factor", () => {
|
|
17
|
-
expect(MarketUtils_1.MarketUtils.getLiquidationIncentiveFactor(market)).toEqual(1043841336116910229n);
|
|
18
|
-
});
|
|
19
|
-
it("should calculate the supply volume to reach utilization", () => {
|
|
20
|
-
expect(MarketUtils_1.MarketUtils.getSupplyToUtilization({ totalSupplyAssets: maths_1.MathLib.WAD, totalBorrowAssets: maths_1.MathLib.WAD }, 900000000000000000n)).toEqual(111111111111111112n);
|
|
21
|
-
expect(MarketUtils_1.MarketUtils.getSupplyToUtilization({ totalSupplyAssets: maths_1.MathLib.WAD, totalBorrowAssets: 0n }, 900000000000000000n)).toEqual(0n);
|
|
22
|
-
expect(MarketUtils_1.MarketUtils.getSupplyToUtilization({ totalSupplyAssets: maths_1.MathLib.WAD, totalBorrowAssets: 0n }, 0n)).toEqual(0n);
|
|
23
|
-
expect(MarketUtils_1.MarketUtils.getSupplyToUtilization({ totalSupplyAssets: maths_1.MathLib.WAD, totalBorrowAssets: 1n }, 0n)).toEqual(maths_1.MathLib.MAX_UINT_256);
|
|
24
|
-
});
|
|
25
|
-
it("should calculate the withdraw volume to reach utilization", () => {
|
|
26
|
-
expect(MarketUtils_1.MarketUtils.getWithdrawToUtilization({ totalSupplyAssets: maths_1.MathLib.WAD, totalBorrowAssets: maths_1.MathLib.WAD }, 900000000000000000n)).toEqual(0n);
|
|
27
|
-
expect(MarketUtils_1.MarketUtils.getWithdrawToUtilization({ totalSupplyAssets: 2n * maths_1.MathLib.WAD, totalBorrowAssets: maths_1.MathLib.WAD }, 900000000000000000n)).toEqual(888888888888888888n);
|
|
28
|
-
expect(MarketUtils_1.MarketUtils.getWithdrawToUtilization({ totalSupplyAssets: maths_1.MathLib.WAD, totalBorrowAssets: 0n }, 900000000000000000n)).toEqual(maths_1.MathLib.WAD);
|
|
29
|
-
});
|
|
30
|
-
it("should calculate the borrow volume to reach utilization", () => {
|
|
31
|
-
expect(MarketUtils_1.MarketUtils.getBorrowToUtilization({ totalSupplyAssets: maths_1.MathLib.WAD, totalBorrowAssets: maths_1.MathLib.WAD }, 900000000000000000n)).toEqual(0n);
|
|
32
|
-
expect(MarketUtils_1.MarketUtils.getBorrowToUtilization({ totalSupplyAssets: maths_1.MathLib.WAD, totalBorrowAssets: 0n }, 900000000000000000n)).toEqual(900000000000000000n);
|
|
33
|
-
});
|
|
34
|
-
it("should calculate the repay volume to reach utilization", () => {
|
|
35
|
-
expect(MarketUtils_1.MarketUtils.getRepayToUtilization({ totalSupplyAssets: maths_1.MathLib.WAD, totalBorrowAssets: maths_1.MathLib.WAD }, 900000000000000000n)).toEqual(100000000000000000n);
|
|
36
|
-
expect(MarketUtils_1.MarketUtils.getRepayToUtilization({ totalSupplyAssets: maths_1.MathLib.WAD, totalBorrowAssets: 0n }, 900000000000000000n)).toEqual(0n);
|
|
37
|
-
});
|
|
38
|
-
});
|
package/lib/maths/index.d.ts
DELETED
package/lib/maths/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./MathLib"), exports);
|
|
18
|
-
__exportStar(require("./SharesMath"), exports);
|
|
19
|
-
__exportStar(require("./AdaptiveCurveIrmLib"), exports);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { MarketConfig } from "../../market";
|
|
2
|
-
export declare const MAINNET_MARKETS: {
|
|
3
|
-
eth_wstEth: MarketConfig;
|
|
4
|
-
eth_wstEth_2: MarketConfig;
|
|
5
|
-
eth_rEth: MarketConfig;
|
|
6
|
-
usdt_wbtc: MarketConfig;
|
|
7
|
-
usdt_wstEth: MarketConfig;
|
|
8
|
-
usdc_wbtc: MarketConfig;
|
|
9
|
-
usdc_wstEth: MarketConfig;
|
|
10
|
-
usdc_sDai: MarketConfig;
|
|
11
|
-
idle_usdc: MarketConfig;
|
|
12
|
-
crvUsd_stkcvxcrvUSDTWBTCWETH: MarketConfig;
|
|
13
|
-
crvUsd_stkcvxcrvUSDCWBTCWETH: MarketConfig;
|
|
14
|
-
crvUsd_stkcvxcrvCRVUSDTBTCWSTETH: MarketConfig;
|
|
15
|
-
crvUsd_stkcvxTryLSD: MarketConfig;
|
|
16
|
-
crvUsd_stkcvxcrvUSDETHCRV: MarketConfig;
|
|
17
|
-
"crvUsd_stkcvx2BTC-f": MarketConfig;
|
|
18
|
-
usda_re7Eth: MarketConfig;
|
|
19
|
-
};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MAINNET_MARKETS = void 0;
|
|
4
|
-
const market_1 = require("../../market");
|
|
5
|
-
exports.MAINNET_MARKETS = {
|
|
6
|
-
eth_wstEth: new market_1.MarketConfig({
|
|
7
|
-
loanToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
8
|
-
collateralToken: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
|
|
9
|
-
oracle: "0x2a01EB9496094dA03c4E364Def50f5aD1280AD72",
|
|
10
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
11
|
-
lltv: 945000000000000000n,
|
|
12
|
-
}),
|
|
13
|
-
eth_wstEth_2: new market_1.MarketConfig({
|
|
14
|
-
loanToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
15
|
-
collateralToken: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
|
|
16
|
-
oracle: "0xbD60A6770b27E084E8617335ddE769241B0e71D8",
|
|
17
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
18
|
-
lltv: 945000000000000000n,
|
|
19
|
-
}),
|
|
20
|
-
eth_rEth: new market_1.MarketConfig({
|
|
21
|
-
loanToken: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
22
|
-
collateralToken: "0xae78736Cd615f374D3085123A210448E74Fc6393",
|
|
23
|
-
oracle: "0x1b4A3F92e5Fffd1d35A98751c9FE4472483579bB",
|
|
24
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
25
|
-
lltv: 945000000000000000n,
|
|
26
|
-
}),
|
|
27
|
-
usdt_wbtc: new market_1.MarketConfig({
|
|
28
|
-
loanToken: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
|
29
|
-
collateralToken: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
|
|
30
|
-
oracle: "0x008bF4B1cDA0cc9f0e882E0697f036667652E1ef",
|
|
31
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
32
|
-
lltv: 860000000000000000n,
|
|
33
|
-
}),
|
|
34
|
-
usdt_wstEth: new market_1.MarketConfig({
|
|
35
|
-
loanToken: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
|
36
|
-
collateralToken: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
|
|
37
|
-
oracle: "0x95DB30fAb9A3754e42423000DF27732CB2396992",
|
|
38
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
39
|
-
lltv: 860000000000000000n,
|
|
40
|
-
}),
|
|
41
|
-
usdc_wbtc: new market_1.MarketConfig({
|
|
42
|
-
// USDC(wBTC, 86%, Chainlink, AdaptiveCurve)
|
|
43
|
-
loanToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
44
|
-
collateralToken: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
|
|
45
|
-
oracle: "0xDddd770BADd886dF3864029e4B377B5F6a2B6b83",
|
|
46
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
47
|
-
lltv: 860000000000000000n,
|
|
48
|
-
}),
|
|
49
|
-
usdc_wstEth: new market_1.MarketConfig({
|
|
50
|
-
// USDC(wstETH, 86%, Chainlink, AdaptiveCurve)
|
|
51
|
-
loanToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
52
|
-
collateralToken: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
|
|
53
|
-
oracle: "0x48F7E36EB6B826B2dF4B2E630B62Cd25e89E40e2",
|
|
54
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
55
|
-
lltv: 860000000000000000n,
|
|
56
|
-
}),
|
|
57
|
-
usdc_sDai: new market_1.MarketConfig({
|
|
58
|
-
// USDC(wstETH, 86%, Chainlink, AdaptiveCurve)
|
|
59
|
-
loanToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
60
|
-
collateralToken: "0x83F20F44975D03b1b09e64809B757c47f942BEeA",
|
|
61
|
-
oracle: "0x6CAFE228eC0B0bC2D076577d56D35Fe704318f6d",
|
|
62
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
63
|
-
lltv: 96500000000000000000n,
|
|
64
|
-
}),
|
|
65
|
-
idle_usdc: new market_1.MarketConfig({
|
|
66
|
-
loanToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
67
|
-
collateralToken: "0x0000000000000000000000000000000000000000",
|
|
68
|
-
oracle: "0x0000000000000000000000000000000000000000",
|
|
69
|
-
irm: "0x0000000000000000000000000000000000000000",
|
|
70
|
-
lltv: 0n,
|
|
71
|
-
}),
|
|
72
|
-
crvUsd_stkcvxcrvUSDTWBTCWETH: new market_1.MarketConfig({
|
|
73
|
-
loanToken: "0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E",
|
|
74
|
-
collateralToken: "0xb0Ce26C88e4e7DCa51968b6047f44646f5064278",
|
|
75
|
-
oracle: "0x077Af6c2D4A75D4145d141F9e9421864C3940CB3",
|
|
76
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
77
|
-
lltv: 860000000000000000n,
|
|
78
|
-
}),
|
|
79
|
-
crvUsd_stkcvxcrvUSDCWBTCWETH: new market_1.MarketConfig({
|
|
80
|
-
loanToken: "0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E",
|
|
81
|
-
collateralToken: "0x0ea1a65A2c255f24Ee8D81eA6AaC54Decd9d269e",
|
|
82
|
-
oracle: "0xd2F7C3B2fC97cC7b6AfDd76D163394680EFc35b9",
|
|
83
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
84
|
-
lltv: 860000000000000000n,
|
|
85
|
-
}),
|
|
86
|
-
crvUsd_stkcvxcrvCRVUSDTBTCWSTETH: new market_1.MarketConfig({
|
|
87
|
-
loanToken: "0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E",
|
|
88
|
-
collateralToken: "0x3ce8Ec9f3d89aD0A2DdbCC3FDB8991BD241Fc82E",
|
|
89
|
-
oracle: "0xa9f7900476F43C45Ebf56cEa669B9c960C176112",
|
|
90
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
91
|
-
lltv: 860000000000000000n,
|
|
92
|
-
}),
|
|
93
|
-
crvUsd_stkcvxTryLSD: new market_1.MarketConfig({
|
|
94
|
-
loanToken: "0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E",
|
|
95
|
-
collateralToken: "0x6BA072F0d22806F2C52e9792AF47f2D59103BEBE",
|
|
96
|
-
oracle: "0x18B0d7311a97c5377445C80c768ab5201Bb27B5a",
|
|
97
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
98
|
-
lltv: 860000000000000000n,
|
|
99
|
-
}),
|
|
100
|
-
crvUsd_stkcvxcrvUSDETHCRV: new market_1.MarketConfig({
|
|
101
|
-
loanToken: "0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E",
|
|
102
|
-
collateralToken: "0xAc904BAfBb5FB04Deb2b6198FdCEedE75a78Ce5a",
|
|
103
|
-
oracle: "0xad7e157815df05029125B568E39d5402550d60bb",
|
|
104
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
105
|
-
lltv: 860000000000000000n,
|
|
106
|
-
}),
|
|
107
|
-
"crvUsd_stkcvx2BTC-f": new market_1.MarketConfig({
|
|
108
|
-
loanToken: "0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E",
|
|
109
|
-
collateralToken: "0x385E12cf4040543Bc8C18e05C1298Be5B04f3f5e",
|
|
110
|
-
oracle: "0x20c4fA59f032bEC6de1905B7201CB88DFD968abA",
|
|
111
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
112
|
-
lltv: 860000000000000000n,
|
|
113
|
-
}),
|
|
114
|
-
usda_re7Eth: new market_1.MarketConfig({
|
|
115
|
-
loanToken: "0x0000206329b97DB379d5E1Bf586BbDB969C63274",
|
|
116
|
-
collateralToken: "0x78Fc2c2eD1A4cDb5402365934aE5648aDAd094d0",
|
|
117
|
-
oracle: "0x76052A2A28fDCB8124f4686C63C68355b142de3B",
|
|
118
|
-
irm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
|
|
119
|
-
lltv: 860000000000000000n,
|
|
120
|
-
}),
|
|
121
|
-
};
|