@curvefi/llamalend-api 2.0.10 → 2.0.12
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/docs/SUPPORT_LLv2.md +30 -0
- package/lib/constants/abis/ControllerV2.json +523 -508
- package/lib/constants/aliases.js +1 -1
- package/lib/lendMarkets/fetch/fetchFactoryData.js +2 -4
- package/lib/lendMarkets/fetch/fetchLendMarkets.js +1 -1
- package/lib/lendMarkets/interfaces/common/userPosition.d.ts +2 -0
- package/lib/lendMarkets/modules/common/userPosition.d.ts +2 -0
- package/lib/lendMarkets/modules/common/userPosition.js +3 -1
- package/lib/lendMarkets/modules/v2/loanV2.js +1 -1
- package/lib/mintMarkets/MintMarketTemplate.d.ts +1 -0
- package/lib/mintMarkets/MintMarketTemplate.js +1 -0
- package/package.json +1 -1
- package/src/constants/abis/ControllerV2.json +523 -508
- package/src/constants/aliases.ts +1 -1
- package/src/lendMarkets/fetch/fetchFactoryData.ts +2 -4
- package/src/lendMarkets/fetch/fetchLendMarkets.ts +1 -1
- package/src/lendMarkets/interfaces/common/userPosition.ts +2 -2
- package/src/lendMarkets/modules/common/userPosition.ts +5 -3
- package/src/lendMarkets/modules/v2/loanV2.ts +1 -1
- package/src/mintMarkets/MintMarketTemplate.ts +2 -1
|
@@ -1,276 +1,268 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"
|
|
3
|
+
"anonymous": false,
|
|
4
4
|
"inputs": [
|
|
5
5
|
{
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
6
|
+
"indexed": false,
|
|
7
|
+
"name": "loan_discount",
|
|
8
|
+
"type": "uint256"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"indexed": false,
|
|
12
|
+
"name": "liquidation_discount",
|
|
13
|
+
"type": "uint256"
|
|
9
14
|
}
|
|
10
15
|
],
|
|
16
|
+
"name": "SetBorrowingDiscounts",
|
|
17
|
+
"type": "event"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
11
20
|
"anonymous": false,
|
|
21
|
+
"inputs": [
|
|
22
|
+
{
|
|
23
|
+
"indexed": false,
|
|
24
|
+
"name": "view",
|
|
25
|
+
"type": "address"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"name": "SetView",
|
|
12
29
|
"type": "event"
|
|
13
30
|
},
|
|
14
31
|
{
|
|
15
|
-
"
|
|
32
|
+
"anonymous": false,
|
|
16
33
|
"inputs": [
|
|
17
34
|
{
|
|
35
|
+
"indexed": false,
|
|
18
36
|
"name": "user",
|
|
19
|
-
"type": "address"
|
|
20
|
-
"indexed": false
|
|
37
|
+
"type": "address"
|
|
21
38
|
},
|
|
22
39
|
{
|
|
40
|
+
"indexed": false,
|
|
23
41
|
"name": "collateral",
|
|
24
|
-
"type": "uint256"
|
|
25
|
-
"indexed": false
|
|
42
|
+
"type": "uint256"
|
|
26
43
|
},
|
|
27
44
|
{
|
|
45
|
+
"indexed": false,
|
|
28
46
|
"name": "borrowed",
|
|
29
|
-
"type": "uint256"
|
|
30
|
-
"indexed": false
|
|
47
|
+
"type": "uint256"
|
|
31
48
|
},
|
|
32
49
|
{
|
|
50
|
+
"indexed": false,
|
|
33
51
|
"name": "debt",
|
|
34
|
-
"type": "uint256"
|
|
35
|
-
"indexed": false
|
|
52
|
+
"type": "uint256"
|
|
36
53
|
},
|
|
37
54
|
{
|
|
55
|
+
"indexed": false,
|
|
38
56
|
"name": "n1",
|
|
39
|
-
"type": "int256"
|
|
40
|
-
"indexed": false
|
|
57
|
+
"type": "int256"
|
|
41
58
|
},
|
|
42
59
|
{
|
|
60
|
+
"indexed": false,
|
|
43
61
|
"name": "n2",
|
|
44
|
-
"type": "int256"
|
|
45
|
-
"indexed": false
|
|
62
|
+
"type": "int256"
|
|
46
63
|
},
|
|
47
64
|
{
|
|
65
|
+
"indexed": false,
|
|
48
66
|
"name": "liquidation_discount",
|
|
49
|
-
"type": "uint256"
|
|
50
|
-
"indexed": false
|
|
67
|
+
"type": "uint256"
|
|
51
68
|
}
|
|
52
69
|
],
|
|
53
|
-
"
|
|
70
|
+
"name": "UserState",
|
|
54
71
|
"type": "event"
|
|
55
72
|
},
|
|
56
73
|
{
|
|
57
|
-
"
|
|
74
|
+
"anonymous": false,
|
|
58
75
|
"inputs": [
|
|
59
76
|
{
|
|
77
|
+
"indexed": false,
|
|
60
78
|
"name": "user",
|
|
61
|
-
"type": "address"
|
|
62
|
-
"indexed": false
|
|
79
|
+
"type": "address"
|
|
63
80
|
},
|
|
64
81
|
{
|
|
82
|
+
"indexed": false,
|
|
65
83
|
"name": "collateral_increase",
|
|
66
|
-
"type": "uint256"
|
|
67
|
-
"indexed": false
|
|
84
|
+
"type": "uint256"
|
|
68
85
|
},
|
|
69
86
|
{
|
|
87
|
+
"indexed": false,
|
|
70
88
|
"name": "loan_increase",
|
|
71
|
-
"type": "uint256"
|
|
72
|
-
"indexed": false
|
|
89
|
+
"type": "uint256"
|
|
73
90
|
}
|
|
74
91
|
],
|
|
75
|
-
"
|
|
92
|
+
"name": "Borrow",
|
|
76
93
|
"type": "event"
|
|
77
94
|
},
|
|
78
95
|
{
|
|
79
|
-
"
|
|
96
|
+
"anonymous": false,
|
|
80
97
|
"inputs": [
|
|
81
98
|
{
|
|
99
|
+
"indexed": false,
|
|
82
100
|
"name": "user",
|
|
83
|
-
"type": "address"
|
|
84
|
-
"indexed": false
|
|
101
|
+
"type": "address"
|
|
85
102
|
},
|
|
86
103
|
{
|
|
104
|
+
"indexed": false,
|
|
87
105
|
"name": "collateral_decrease",
|
|
88
|
-
"type": "uint256"
|
|
89
|
-
"indexed": false
|
|
106
|
+
"type": "uint256"
|
|
90
107
|
}
|
|
91
108
|
],
|
|
92
|
-
"
|
|
109
|
+
"name": "RemoveCollateral",
|
|
93
110
|
"type": "event"
|
|
94
111
|
},
|
|
95
112
|
{
|
|
96
|
-
"
|
|
113
|
+
"anonymous": false,
|
|
97
114
|
"inputs": [
|
|
98
115
|
{
|
|
116
|
+
"indexed": false,
|
|
99
117
|
"name": "owner",
|
|
100
|
-
"type": "address"
|
|
101
|
-
"indexed": false
|
|
118
|
+
"type": "address"
|
|
102
119
|
},
|
|
103
120
|
{
|
|
121
|
+
"indexed": false,
|
|
104
122
|
"name": "spender",
|
|
105
|
-
"type": "address"
|
|
106
|
-
"indexed": false
|
|
123
|
+
"type": "address"
|
|
107
124
|
},
|
|
108
125
|
{
|
|
126
|
+
"indexed": false,
|
|
109
127
|
"name": "allow",
|
|
110
|
-
"type": "bool"
|
|
111
|
-
"indexed": false
|
|
128
|
+
"type": "bool"
|
|
112
129
|
}
|
|
113
130
|
],
|
|
114
|
-
"
|
|
131
|
+
"name": "Approval",
|
|
115
132
|
"type": "event"
|
|
116
133
|
},
|
|
117
134
|
{
|
|
118
|
-
"
|
|
135
|
+
"anonymous": false,
|
|
119
136
|
"inputs": [
|
|
120
137
|
{
|
|
138
|
+
"indexed": false,
|
|
121
139
|
"name": "user",
|
|
122
|
-
"type": "address"
|
|
123
|
-
"indexed": false
|
|
140
|
+
"type": "address"
|
|
124
141
|
},
|
|
125
142
|
{
|
|
143
|
+
"indexed": false,
|
|
126
144
|
"name": "collateral_decrease",
|
|
127
|
-
"type": "uint256"
|
|
128
|
-
"indexed": false
|
|
145
|
+
"type": "uint256"
|
|
129
146
|
},
|
|
130
147
|
{
|
|
148
|
+
"indexed": false,
|
|
131
149
|
"name": "loan_decrease",
|
|
132
|
-
"type": "uint256"
|
|
133
|
-
"indexed": false
|
|
150
|
+
"type": "uint256"
|
|
134
151
|
}
|
|
135
152
|
],
|
|
136
|
-
"
|
|
153
|
+
"name": "Repay",
|
|
137
154
|
"type": "event"
|
|
138
155
|
},
|
|
139
156
|
{
|
|
140
|
-
"
|
|
157
|
+
"anonymous": false,
|
|
141
158
|
"inputs": [
|
|
142
159
|
{
|
|
160
|
+
"indexed": false,
|
|
143
161
|
"name": "user",
|
|
144
|
-
"type": "address"
|
|
145
|
-
"indexed": false
|
|
162
|
+
"type": "address"
|
|
146
163
|
},
|
|
147
164
|
{
|
|
165
|
+
"indexed": false,
|
|
148
166
|
"name": "health",
|
|
149
|
-
"type": "uint256"
|
|
150
|
-
"indexed": false
|
|
167
|
+
"type": "uint256"
|
|
151
168
|
}
|
|
152
169
|
],
|
|
153
|
-
"
|
|
170
|
+
"name": "SetExtraHealth",
|
|
154
171
|
"type": "event"
|
|
155
172
|
},
|
|
156
173
|
{
|
|
157
|
-
"
|
|
174
|
+
"anonymous": false,
|
|
158
175
|
"inputs": [
|
|
159
176
|
{
|
|
177
|
+
"indexed": false,
|
|
160
178
|
"name": "liquidator",
|
|
161
|
-
"type": "address"
|
|
162
|
-
"indexed": false
|
|
179
|
+
"type": "address"
|
|
163
180
|
},
|
|
164
181
|
{
|
|
182
|
+
"indexed": false,
|
|
165
183
|
"name": "user",
|
|
166
|
-
"type": "address"
|
|
167
|
-
"indexed": false
|
|
184
|
+
"type": "address"
|
|
168
185
|
},
|
|
169
186
|
{
|
|
187
|
+
"indexed": false,
|
|
170
188
|
"name": "collateral_received",
|
|
171
|
-
"type": "uint256"
|
|
172
|
-
"indexed": false
|
|
189
|
+
"type": "uint256"
|
|
173
190
|
},
|
|
174
191
|
{
|
|
192
|
+
"indexed": false,
|
|
175
193
|
"name": "borrowed_received",
|
|
176
|
-
"type": "uint256"
|
|
177
|
-
"indexed": false
|
|
194
|
+
"type": "uint256"
|
|
178
195
|
},
|
|
179
196
|
{
|
|
197
|
+
"indexed": false,
|
|
180
198
|
"name": "debt",
|
|
181
|
-
"type": "uint256"
|
|
182
|
-
"indexed": false
|
|
199
|
+
"type": "uint256"
|
|
183
200
|
}
|
|
184
201
|
],
|
|
185
|
-
"
|
|
202
|
+
"name": "Liquidate",
|
|
186
203
|
"type": "event"
|
|
187
204
|
},
|
|
188
205
|
{
|
|
189
|
-
"
|
|
206
|
+
"anonymous": false,
|
|
190
207
|
"inputs": [
|
|
191
208
|
{
|
|
209
|
+
"indexed": false,
|
|
192
210
|
"name": "amount",
|
|
193
|
-
"type": "uint256"
|
|
194
|
-
"indexed": false
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"name": "new_supply",
|
|
198
|
-
"type": "uint256",
|
|
199
|
-
"indexed": false
|
|
211
|
+
"type": "uint256"
|
|
200
212
|
}
|
|
201
213
|
],
|
|
202
|
-
"
|
|
214
|
+
"name": "CollectFees",
|
|
203
215
|
"type": "event"
|
|
204
216
|
},
|
|
205
217
|
{
|
|
206
|
-
"name": "SetBorrowingDiscounts",
|
|
207
|
-
"inputs": [
|
|
208
|
-
{
|
|
209
|
-
"name": "loan_discount",
|
|
210
|
-
"type": "uint256",
|
|
211
|
-
"indexed": false
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"name": "liquidation_discount",
|
|
215
|
-
"type": "uint256",
|
|
216
|
-
"indexed": false
|
|
217
|
-
}
|
|
218
|
-
],
|
|
219
218
|
"anonymous": false,
|
|
220
|
-
"type": "event"
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
"name": "SetLMCallback",
|
|
224
219
|
"inputs": [
|
|
225
220
|
{
|
|
221
|
+
"indexed": false,
|
|
226
222
|
"name": "callback",
|
|
227
|
-
"type": "address"
|
|
228
|
-
"indexed": false
|
|
223
|
+
"type": "address"
|
|
229
224
|
}
|
|
230
225
|
],
|
|
231
|
-
"
|
|
226
|
+
"name": "SetLMCallback",
|
|
232
227
|
"type": "event"
|
|
233
228
|
},
|
|
234
229
|
{
|
|
235
|
-
"
|
|
230
|
+
"anonymous": false,
|
|
236
231
|
"inputs": [
|
|
237
232
|
{
|
|
233
|
+
"indexed": false,
|
|
238
234
|
"name": "monetary_policy",
|
|
239
|
-
"type": "address"
|
|
240
|
-
"indexed": false
|
|
235
|
+
"type": "address"
|
|
241
236
|
}
|
|
242
237
|
],
|
|
243
|
-
"
|
|
238
|
+
"name": "SetMonetaryPolicy",
|
|
244
239
|
"type": "event"
|
|
245
240
|
},
|
|
246
241
|
{
|
|
247
|
-
"
|
|
242
|
+
"anonymous": false,
|
|
248
243
|
"inputs": [
|
|
249
244
|
{
|
|
245
|
+
"indexed": false,
|
|
250
246
|
"name": "borrow_cap",
|
|
251
|
-
"type": "uint256"
|
|
252
|
-
"indexed": false
|
|
247
|
+
"type": "uint256"
|
|
253
248
|
}
|
|
254
249
|
],
|
|
255
|
-
"
|
|
250
|
+
"name": "SetBorrowCap",
|
|
256
251
|
"type": "event"
|
|
257
252
|
},
|
|
258
253
|
{
|
|
259
|
-
"
|
|
254
|
+
"anonymous": false,
|
|
260
255
|
"inputs": [
|
|
261
256
|
{
|
|
257
|
+
"indexed": false,
|
|
262
258
|
"name": "admin_percentage",
|
|
263
|
-
"type": "uint256"
|
|
264
|
-
"indexed": false
|
|
259
|
+
"type": "uint256"
|
|
265
260
|
}
|
|
266
261
|
],
|
|
267
|
-
"
|
|
262
|
+
"name": "SetAdminPercentage",
|
|
268
263
|
"type": "event"
|
|
269
264
|
},
|
|
270
265
|
{
|
|
271
|
-
"stateMutability": "nonpayable",
|
|
272
|
-
"type": "function",
|
|
273
|
-
"name": "create_loan",
|
|
274
266
|
"inputs": [
|
|
275
267
|
{
|
|
276
268
|
"name": "_collateral",
|
|
@@ -285,12 +277,12 @@
|
|
|
285
277
|
"type": "uint256"
|
|
286
278
|
}
|
|
287
279
|
],
|
|
288
|
-
"
|
|
280
|
+
"name": "create_loan",
|
|
281
|
+
"outputs": [],
|
|
282
|
+
"stateMutability": "nonpayable",
|
|
283
|
+
"type": "function"
|
|
289
284
|
},
|
|
290
285
|
{
|
|
291
|
-
"stateMutability": "nonpayable",
|
|
292
|
-
"type": "function",
|
|
293
|
-
"name": "create_loan",
|
|
294
286
|
"inputs": [
|
|
295
287
|
{
|
|
296
288
|
"name": "_collateral",
|
|
@@ -309,12 +301,12 @@
|
|
|
309
301
|
"type": "address"
|
|
310
302
|
}
|
|
311
303
|
],
|
|
312
|
-
"
|
|
304
|
+
"name": "create_loan",
|
|
305
|
+
"outputs": [],
|
|
306
|
+
"stateMutability": "nonpayable",
|
|
307
|
+
"type": "function"
|
|
313
308
|
},
|
|
314
309
|
{
|
|
315
|
-
"stateMutability": "nonpayable",
|
|
316
|
-
"type": "function",
|
|
317
|
-
"name": "create_loan",
|
|
318
310
|
"inputs": [
|
|
319
311
|
{
|
|
320
312
|
"name": "_collateral",
|
|
@@ -337,12 +329,12 @@
|
|
|
337
329
|
"type": "address"
|
|
338
330
|
}
|
|
339
331
|
],
|
|
340
|
-
"
|
|
332
|
+
"name": "create_loan",
|
|
333
|
+
"outputs": [],
|
|
334
|
+
"stateMutability": "nonpayable",
|
|
335
|
+
"type": "function"
|
|
341
336
|
},
|
|
342
337
|
{
|
|
343
|
-
"stateMutability": "nonpayable",
|
|
344
|
-
"type": "function",
|
|
345
|
-
"name": "create_loan",
|
|
346
338
|
"inputs": [
|
|
347
339
|
{
|
|
348
340
|
"name": "_collateral",
|
|
@@ -369,12 +361,12 @@
|
|
|
369
361
|
"type": "bytes"
|
|
370
362
|
}
|
|
371
363
|
],
|
|
372
|
-
"
|
|
364
|
+
"name": "create_loan",
|
|
365
|
+
"outputs": [],
|
|
366
|
+
"stateMutability": "nonpayable",
|
|
367
|
+
"type": "function"
|
|
373
368
|
},
|
|
374
369
|
{
|
|
375
|
-
"stateMutability": "nonpayable",
|
|
376
|
-
"type": "function",
|
|
377
|
-
"name": "borrow_more",
|
|
378
370
|
"inputs": [
|
|
379
371
|
{
|
|
380
372
|
"name": "_collateral",
|
|
@@ -385,12 +377,12 @@
|
|
|
385
377
|
"type": "uint256"
|
|
386
378
|
}
|
|
387
379
|
],
|
|
388
|
-
"
|
|
380
|
+
"name": "borrow_more",
|
|
381
|
+
"outputs": [],
|
|
382
|
+
"stateMutability": "nonpayable",
|
|
383
|
+
"type": "function"
|
|
389
384
|
},
|
|
390
385
|
{
|
|
391
|
-
"stateMutability": "nonpayable",
|
|
392
|
-
"type": "function",
|
|
393
|
-
"name": "borrow_more",
|
|
394
386
|
"inputs": [
|
|
395
387
|
{
|
|
396
388
|
"name": "_collateral",
|
|
@@ -405,12 +397,12 @@
|
|
|
405
397
|
"type": "address"
|
|
406
398
|
}
|
|
407
399
|
],
|
|
408
|
-
"
|
|
400
|
+
"name": "borrow_more",
|
|
401
|
+
"outputs": [],
|
|
402
|
+
"stateMutability": "nonpayable",
|
|
403
|
+
"type": "function"
|
|
409
404
|
},
|
|
410
405
|
{
|
|
411
|
-
"stateMutability": "nonpayable",
|
|
412
|
-
"type": "function",
|
|
413
|
-
"name": "borrow_more",
|
|
414
406
|
"inputs": [
|
|
415
407
|
{
|
|
416
408
|
"name": "_collateral",
|
|
@@ -429,12 +421,12 @@
|
|
|
429
421
|
"type": "address"
|
|
430
422
|
}
|
|
431
423
|
],
|
|
432
|
-
"
|
|
424
|
+
"name": "borrow_more",
|
|
425
|
+
"outputs": [],
|
|
426
|
+
"stateMutability": "nonpayable",
|
|
427
|
+
"type": "function"
|
|
433
428
|
},
|
|
434
429
|
{
|
|
435
|
-
"stateMutability": "nonpayable",
|
|
436
|
-
"type": "function",
|
|
437
|
-
"name": "borrow_more",
|
|
438
430
|
"inputs": [
|
|
439
431
|
{
|
|
440
432
|
"name": "_collateral",
|
|
@@ -457,24 +449,24 @@
|
|
|
457
449
|
"type": "bytes"
|
|
458
450
|
}
|
|
459
451
|
],
|
|
460
|
-
"
|
|
452
|
+
"name": "borrow_more",
|
|
453
|
+
"outputs": [],
|
|
454
|
+
"stateMutability": "nonpayable",
|
|
455
|
+
"type": "function"
|
|
461
456
|
},
|
|
462
457
|
{
|
|
463
|
-
"stateMutability": "nonpayable",
|
|
464
|
-
"type": "function",
|
|
465
|
-
"name": "add_collateral",
|
|
466
458
|
"inputs": [
|
|
467
459
|
{
|
|
468
460
|
"name": "_collateral",
|
|
469
461
|
"type": "uint256"
|
|
470
462
|
}
|
|
471
463
|
],
|
|
472
|
-
"
|
|
464
|
+
"name": "add_collateral",
|
|
465
|
+
"outputs": [],
|
|
466
|
+
"stateMutability": "nonpayable",
|
|
467
|
+
"type": "function"
|
|
473
468
|
},
|
|
474
469
|
{
|
|
475
|
-
"stateMutability": "nonpayable",
|
|
476
|
-
"type": "function",
|
|
477
|
-
"name": "add_collateral",
|
|
478
470
|
"inputs": [
|
|
479
471
|
{
|
|
480
472
|
"name": "_collateral",
|
|
@@ -485,12 +477,12 @@
|
|
|
485
477
|
"type": "address"
|
|
486
478
|
}
|
|
487
479
|
],
|
|
488
|
-
"
|
|
480
|
+
"name": "add_collateral",
|
|
481
|
+
"outputs": [],
|
|
482
|
+
"stateMutability": "nonpayable",
|
|
483
|
+
"type": "function"
|
|
489
484
|
},
|
|
490
485
|
{
|
|
491
|
-
"stateMutability": "nonpayable",
|
|
492
|
-
"type": "function",
|
|
493
|
-
"name": "approve",
|
|
494
486
|
"inputs": [
|
|
495
487
|
{
|
|
496
488
|
"name": "_spender",
|
|
@@ -501,24 +493,24 @@
|
|
|
501
493
|
"type": "bool"
|
|
502
494
|
}
|
|
503
495
|
],
|
|
504
|
-
"
|
|
496
|
+
"name": "approve",
|
|
497
|
+
"outputs": [],
|
|
498
|
+
"stateMutability": "nonpayable",
|
|
499
|
+
"type": "function"
|
|
505
500
|
},
|
|
506
501
|
{
|
|
507
|
-
"stateMutability": "nonpayable",
|
|
508
|
-
"type": "function",
|
|
509
|
-
"name": "remove_collateral",
|
|
510
502
|
"inputs": [
|
|
511
503
|
{
|
|
512
504
|
"name": "_collateral",
|
|
513
505
|
"type": "uint256"
|
|
514
506
|
}
|
|
515
507
|
],
|
|
516
|
-
"
|
|
508
|
+
"name": "remove_collateral",
|
|
509
|
+
"outputs": [],
|
|
510
|
+
"stateMutability": "nonpayable",
|
|
511
|
+
"type": "function"
|
|
517
512
|
},
|
|
518
513
|
{
|
|
519
|
-
"stateMutability": "nonpayable",
|
|
520
|
-
"type": "function",
|
|
521
|
-
"name": "remove_collateral",
|
|
522
514
|
"inputs": [
|
|
523
515
|
{
|
|
524
516
|
"name": "_collateral",
|
|
@@ -529,24 +521,24 @@
|
|
|
529
521
|
"type": "address"
|
|
530
522
|
}
|
|
531
523
|
],
|
|
532
|
-
"
|
|
524
|
+
"name": "remove_collateral",
|
|
525
|
+
"outputs": [],
|
|
526
|
+
"stateMutability": "nonpayable",
|
|
527
|
+
"type": "function"
|
|
533
528
|
},
|
|
534
529
|
{
|
|
535
|
-
"stateMutability": "nonpayable",
|
|
536
|
-
"type": "function",
|
|
537
|
-
"name": "repay",
|
|
538
530
|
"inputs": [
|
|
539
531
|
{
|
|
540
532
|
"name": "_wallet_d_debt",
|
|
541
533
|
"type": "uint256"
|
|
542
534
|
}
|
|
543
535
|
],
|
|
544
|
-
"
|
|
536
|
+
"name": "repay",
|
|
537
|
+
"outputs": [],
|
|
538
|
+
"stateMutability": "nonpayable",
|
|
539
|
+
"type": "function"
|
|
545
540
|
},
|
|
546
541
|
{
|
|
547
|
-
"stateMutability": "nonpayable",
|
|
548
|
-
"type": "function",
|
|
549
|
-
"name": "repay",
|
|
550
542
|
"inputs": [
|
|
551
543
|
{
|
|
552
544
|
"name": "_wallet_d_debt",
|
|
@@ -557,12 +549,12 @@
|
|
|
557
549
|
"type": "address"
|
|
558
550
|
}
|
|
559
551
|
],
|
|
560
|
-
"
|
|
552
|
+
"name": "repay",
|
|
553
|
+
"outputs": [],
|
|
554
|
+
"stateMutability": "nonpayable",
|
|
555
|
+
"type": "function"
|
|
561
556
|
},
|
|
562
557
|
{
|
|
563
|
-
"stateMutability": "nonpayable",
|
|
564
|
-
"type": "function",
|
|
565
|
-
"name": "repay",
|
|
566
558
|
"inputs": [
|
|
567
559
|
{
|
|
568
560
|
"name": "_wallet_d_debt",
|
|
@@ -577,12 +569,12 @@
|
|
|
577
569
|
"type": "int256"
|
|
578
570
|
}
|
|
579
571
|
],
|
|
580
|
-
"
|
|
572
|
+
"name": "repay",
|
|
573
|
+
"outputs": [],
|
|
574
|
+
"stateMutability": "nonpayable",
|
|
575
|
+
"type": "function"
|
|
581
576
|
},
|
|
582
577
|
{
|
|
583
|
-
"stateMutability": "nonpayable",
|
|
584
|
-
"type": "function",
|
|
585
|
-
"name": "repay",
|
|
586
578
|
"inputs": [
|
|
587
579
|
{
|
|
588
580
|
"name": "_wallet_d_debt",
|
|
@@ -601,12 +593,12 @@
|
|
|
601
593
|
"type": "address"
|
|
602
594
|
}
|
|
603
595
|
],
|
|
604
|
-
"
|
|
596
|
+
"name": "repay",
|
|
597
|
+
"outputs": [],
|
|
598
|
+
"stateMutability": "nonpayable",
|
|
599
|
+
"type": "function"
|
|
605
600
|
},
|
|
606
601
|
{
|
|
607
|
-
"stateMutability": "nonpayable",
|
|
608
|
-
"type": "function",
|
|
609
|
-
"name": "repay",
|
|
610
602
|
"inputs": [
|
|
611
603
|
{
|
|
612
604
|
"name": "_wallet_d_debt",
|
|
@@ -629,12 +621,12 @@
|
|
|
629
621
|
"type": "bytes"
|
|
630
622
|
}
|
|
631
623
|
],
|
|
632
|
-
"
|
|
624
|
+
"name": "repay",
|
|
625
|
+
"outputs": [],
|
|
626
|
+
"stateMutability": "nonpayable",
|
|
627
|
+
"type": "function"
|
|
633
628
|
},
|
|
634
629
|
{
|
|
635
|
-
"stateMutability": "nonpayable",
|
|
636
|
-
"type": "function",
|
|
637
|
-
"name": "repay",
|
|
638
630
|
"inputs": [
|
|
639
631
|
{
|
|
640
632
|
"name": "_wallet_d_debt",
|
|
@@ -661,24 +653,24 @@
|
|
|
661
653
|
"type": "bool"
|
|
662
654
|
}
|
|
663
655
|
],
|
|
664
|
-
"
|
|
656
|
+
"name": "repay",
|
|
657
|
+
"outputs": [],
|
|
658
|
+
"stateMutability": "nonpayable",
|
|
659
|
+
"type": "function"
|
|
665
660
|
},
|
|
666
661
|
{
|
|
667
|
-
"stateMutability": "nonpayable",
|
|
668
|
-
"type": "function",
|
|
669
|
-
"name": "set_extra_health",
|
|
670
662
|
"inputs": [
|
|
671
663
|
{
|
|
672
664
|
"name": "_value",
|
|
673
665
|
"type": "uint256"
|
|
674
666
|
}
|
|
675
667
|
],
|
|
676
|
-
"
|
|
668
|
+
"name": "set_extra_health",
|
|
669
|
+
"outputs": [],
|
|
670
|
+
"stateMutability": "nonpayable",
|
|
671
|
+
"type": "function"
|
|
677
672
|
},
|
|
678
673
|
{
|
|
679
|
-
"stateMutability": "nonpayable",
|
|
680
|
-
"type": "function",
|
|
681
|
-
"name": "liquidate",
|
|
682
674
|
"inputs": [
|
|
683
675
|
{
|
|
684
676
|
"name": "_user",
|
|
@@ -689,12 +681,12 @@
|
|
|
689
681
|
"type": "uint256"
|
|
690
682
|
}
|
|
691
683
|
],
|
|
692
|
-
"
|
|
684
|
+
"name": "liquidate",
|
|
685
|
+
"outputs": [],
|
|
686
|
+
"stateMutability": "nonpayable",
|
|
687
|
+
"type": "function"
|
|
693
688
|
},
|
|
694
689
|
{
|
|
695
|
-
"stateMutability": "nonpayable",
|
|
696
|
-
"type": "function",
|
|
697
|
-
"name": "liquidate",
|
|
698
690
|
"inputs": [
|
|
699
691
|
{
|
|
700
692
|
"name": "_user",
|
|
@@ -709,12 +701,12 @@
|
|
|
709
701
|
"type": "uint256"
|
|
710
702
|
}
|
|
711
703
|
],
|
|
712
|
-
"
|
|
704
|
+
"name": "liquidate",
|
|
705
|
+
"outputs": [],
|
|
706
|
+
"stateMutability": "nonpayable",
|
|
707
|
+
"type": "function"
|
|
713
708
|
},
|
|
714
709
|
{
|
|
715
|
-
"stateMutability": "nonpayable",
|
|
716
|
-
"type": "function",
|
|
717
|
-
"name": "liquidate",
|
|
718
710
|
"inputs": [
|
|
719
711
|
{
|
|
720
712
|
"name": "_user",
|
|
@@ -733,12 +725,12 @@
|
|
|
733
725
|
"type": "address"
|
|
734
726
|
}
|
|
735
727
|
],
|
|
736
|
-
"
|
|
728
|
+
"name": "liquidate",
|
|
729
|
+
"outputs": [],
|
|
730
|
+
"stateMutability": "nonpayable",
|
|
731
|
+
"type": "function"
|
|
737
732
|
},
|
|
738
733
|
{
|
|
739
|
-
"stateMutability": "nonpayable",
|
|
740
|
-
"type": "function",
|
|
741
|
-
"name": "liquidate",
|
|
742
734
|
"inputs": [
|
|
743
735
|
{
|
|
744
736
|
"name": "_user",
|
|
@@ -761,55 +753,55 @@
|
|
|
761
753
|
"type": "bytes"
|
|
762
754
|
}
|
|
763
755
|
],
|
|
764
|
-
"
|
|
756
|
+
"name": "liquidate",
|
|
757
|
+
"outputs": [],
|
|
758
|
+
"stateMutability": "nonpayable",
|
|
759
|
+
"type": "function"
|
|
765
760
|
},
|
|
766
761
|
{
|
|
767
|
-
"stateMutability": "nonpayable",
|
|
768
|
-
"type": "function",
|
|
769
|
-
"name": "save_rate",
|
|
770
762
|
"inputs": [],
|
|
771
|
-
"
|
|
763
|
+
"name": "save_rate",
|
|
764
|
+
"outputs": [],
|
|
765
|
+
"stateMutability": "nonpayable",
|
|
766
|
+
"type": "function"
|
|
772
767
|
},
|
|
773
768
|
{
|
|
774
|
-
"stateMutability": "nonpayable",
|
|
775
|
-
"type": "function",
|
|
776
|
-
"name": "collect_fees",
|
|
777
769
|
"inputs": [],
|
|
770
|
+
"name": "collect_fees",
|
|
778
771
|
"outputs": [
|
|
779
772
|
{
|
|
780
773
|
"name": "",
|
|
781
774
|
"type": "uint256"
|
|
782
775
|
}
|
|
783
|
-
]
|
|
776
|
+
],
|
|
777
|
+
"stateMutability": "nonpayable",
|
|
778
|
+
"type": "function"
|
|
784
779
|
},
|
|
785
780
|
{
|
|
786
|
-
"stateMutability": "view",
|
|
787
|
-
"type": "function",
|
|
788
|
-
"name": "amm",
|
|
789
781
|
"inputs": [],
|
|
782
|
+
"name": "amm",
|
|
790
783
|
"outputs": [
|
|
791
784
|
{
|
|
792
785
|
"name": "",
|
|
793
786
|
"type": "address"
|
|
794
787
|
}
|
|
795
|
-
]
|
|
788
|
+
],
|
|
789
|
+
"stateMutability": "view",
|
|
790
|
+
"type": "function"
|
|
796
791
|
},
|
|
797
792
|
{
|
|
798
|
-
"stateMutability": "view",
|
|
799
|
-
"type": "function",
|
|
800
|
-
"name": "amm_price",
|
|
801
793
|
"inputs": [],
|
|
794
|
+
"name": "amm_price",
|
|
802
795
|
"outputs": [
|
|
803
796
|
{
|
|
804
797
|
"name": "",
|
|
805
798
|
"type": "uint256"
|
|
806
799
|
}
|
|
807
|
-
]
|
|
800
|
+
],
|
|
801
|
+
"stateMutability": "view",
|
|
802
|
+
"type": "function"
|
|
808
803
|
},
|
|
809
804
|
{
|
|
810
|
-
"stateMutability": "view",
|
|
811
|
-
"type": "function",
|
|
812
|
-
"name": "approval",
|
|
813
805
|
"inputs": [
|
|
814
806
|
{
|
|
815
807
|
"name": "arg0",
|
|
@@ -820,29 +812,29 @@
|
|
|
820
812
|
"type": "address"
|
|
821
813
|
}
|
|
822
814
|
],
|
|
815
|
+
"name": "approval",
|
|
823
816
|
"outputs": [
|
|
824
817
|
{
|
|
825
818
|
"name": "",
|
|
826
819
|
"type": "bool"
|
|
827
820
|
}
|
|
828
|
-
]
|
|
821
|
+
],
|
|
822
|
+
"stateMutability": "view",
|
|
823
|
+
"type": "function"
|
|
829
824
|
},
|
|
830
825
|
{
|
|
831
|
-
"stateMutability": "view",
|
|
832
|
-
"type": "function",
|
|
833
|
-
"name": "borrowed_token",
|
|
834
826
|
"inputs": [],
|
|
827
|
+
"name": "borrowed_token",
|
|
835
828
|
"outputs": [
|
|
836
829
|
{
|
|
837
830
|
"name": "",
|
|
838
831
|
"type": "address"
|
|
839
832
|
}
|
|
840
|
-
]
|
|
833
|
+
],
|
|
834
|
+
"stateMutability": "view",
|
|
835
|
+
"type": "function"
|
|
841
836
|
},
|
|
842
837
|
{
|
|
843
|
-
"stateMutability": "view",
|
|
844
|
-
"type": "function",
|
|
845
|
-
"name": "calculate_debt_n1",
|
|
846
838
|
"inputs": [
|
|
847
839
|
{
|
|
848
840
|
"name": "_collateral",
|
|
@@ -855,86 +847,111 @@
|
|
|
855
847
|
{
|
|
856
848
|
"name": "_N",
|
|
857
849
|
"type": "uint256"
|
|
858
|
-
},
|
|
859
|
-
{
|
|
860
|
-
"name": "_user",
|
|
861
|
-
"type": "address"
|
|
862
850
|
}
|
|
863
851
|
],
|
|
852
|
+
"name": "calculate_debt_n1",
|
|
864
853
|
"outputs": [
|
|
865
854
|
{
|
|
866
855
|
"name": "",
|
|
867
856
|
"type": "int256"
|
|
868
857
|
}
|
|
869
|
-
]
|
|
870
|
-
},
|
|
871
|
-
{
|
|
858
|
+
],
|
|
872
859
|
"stateMutability": "view",
|
|
873
|
-
"type": "function"
|
|
874
|
-
"name": "collateral_token",
|
|
875
|
-
"inputs": [],
|
|
876
|
-
"outputs": [
|
|
877
|
-
{
|
|
878
|
-
"name": "",
|
|
879
|
-
"type": "address"
|
|
880
|
-
}
|
|
881
|
-
]
|
|
860
|
+
"type": "function"
|
|
882
861
|
},
|
|
883
862
|
{
|
|
884
|
-
"stateMutability": "view",
|
|
885
|
-
"type": "function",
|
|
886
|
-
"name": "debt",
|
|
887
863
|
"inputs": [
|
|
888
864
|
{
|
|
889
|
-
"name": "
|
|
865
|
+
"name": "_collateral",
|
|
866
|
+
"type": "uint256"
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
"name": "_debt",
|
|
870
|
+
"type": "uint256"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
"name": "_N",
|
|
874
|
+
"type": "uint256"
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
"name": "_user",
|
|
890
878
|
"type": "address"
|
|
891
879
|
}
|
|
892
880
|
],
|
|
881
|
+
"name": "calculate_debt_n1",
|
|
893
882
|
"outputs": [
|
|
894
883
|
{
|
|
895
884
|
"name": "",
|
|
896
|
-
"type": "
|
|
885
|
+
"type": "int256"
|
|
897
886
|
}
|
|
898
|
-
]
|
|
887
|
+
],
|
|
888
|
+
"stateMutability": "view",
|
|
889
|
+
"type": "function"
|
|
899
890
|
},
|
|
900
891
|
{
|
|
892
|
+
"inputs": [],
|
|
893
|
+
"name": "collateral_token",
|
|
894
|
+
"outputs": [
|
|
895
|
+
{
|
|
896
|
+
"name": "",
|
|
897
|
+
"type": "address"
|
|
898
|
+
}
|
|
899
|
+
],
|
|
901
900
|
"stateMutability": "view",
|
|
902
|
-
"type": "function"
|
|
903
|
-
|
|
901
|
+
"type": "function"
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
904
|
"inputs": [
|
|
905
905
|
{
|
|
906
|
-
"name": "
|
|
906
|
+
"name": "_user",
|
|
907
907
|
"type": "address"
|
|
908
908
|
}
|
|
909
909
|
],
|
|
910
|
+
"name": "debt",
|
|
910
911
|
"outputs": [
|
|
911
912
|
{
|
|
912
913
|
"name": "",
|
|
913
914
|
"type": "uint256"
|
|
914
915
|
}
|
|
915
|
-
]
|
|
916
|
+
],
|
|
917
|
+
"stateMutability": "view",
|
|
918
|
+
"type": "function"
|
|
916
919
|
},
|
|
917
920
|
{
|
|
921
|
+
"inputs": [
|
|
922
|
+
{
|
|
923
|
+
"name": "arg0",
|
|
924
|
+
"type": "address"
|
|
925
|
+
}
|
|
926
|
+
],
|
|
927
|
+
"name": "extra_health",
|
|
928
|
+
"outputs": [
|
|
929
|
+
{
|
|
930
|
+
"name": "",
|
|
931
|
+
"type": "uint256"
|
|
932
|
+
}
|
|
933
|
+
],
|
|
918
934
|
"stateMutability": "view",
|
|
919
|
-
"type": "function"
|
|
920
|
-
|
|
935
|
+
"type": "function"
|
|
936
|
+
},
|
|
937
|
+
{
|
|
921
938
|
"inputs": [
|
|
922
939
|
{
|
|
923
940
|
"name": "_user",
|
|
924
941
|
"type": "address"
|
|
925
942
|
}
|
|
926
943
|
],
|
|
944
|
+
"name": "health",
|
|
927
945
|
"outputs": [
|
|
928
946
|
{
|
|
929
947
|
"name": "",
|
|
930
948
|
"type": "int256"
|
|
931
949
|
}
|
|
932
|
-
]
|
|
950
|
+
],
|
|
951
|
+
"stateMutability": "view",
|
|
952
|
+
"type": "function"
|
|
933
953
|
},
|
|
934
954
|
{
|
|
935
|
-
"stateMutability": "view",
|
|
936
|
-
"type": "function",
|
|
937
|
-
"name": "health",
|
|
938
955
|
"inputs": [
|
|
939
956
|
{
|
|
940
957
|
"name": "_user",
|
|
@@ -945,17 +962,17 @@
|
|
|
945
962
|
"type": "bool"
|
|
946
963
|
}
|
|
947
964
|
],
|
|
965
|
+
"name": "health",
|
|
948
966
|
"outputs": [
|
|
949
967
|
{
|
|
950
968
|
"name": "",
|
|
951
969
|
"type": "int256"
|
|
952
970
|
}
|
|
953
|
-
]
|
|
971
|
+
],
|
|
972
|
+
"stateMutability": "view",
|
|
973
|
+
"type": "function"
|
|
954
974
|
},
|
|
955
975
|
{
|
|
956
|
-
"stateMutability": "view",
|
|
957
|
-
"type": "function",
|
|
958
|
-
"name": "create_loan_health_preview",
|
|
959
976
|
"inputs": [
|
|
960
977
|
{
|
|
961
978
|
"name": "_collateral",
|
|
@@ -969,22 +986,26 @@
|
|
|
969
986
|
"name": "_N",
|
|
970
987
|
"type": "uint256"
|
|
971
988
|
},
|
|
989
|
+
{
|
|
990
|
+
"name": "_for",
|
|
991
|
+
"type": "address"
|
|
992
|
+
},
|
|
972
993
|
{
|
|
973
994
|
"name": "_full",
|
|
974
995
|
"type": "bool"
|
|
975
996
|
}
|
|
976
997
|
],
|
|
998
|
+
"name": "create_loan_health_preview",
|
|
977
999
|
"outputs": [
|
|
978
1000
|
{
|
|
979
1001
|
"name": "",
|
|
980
1002
|
"type": "int256"
|
|
981
1003
|
}
|
|
982
|
-
]
|
|
1004
|
+
],
|
|
1005
|
+
"stateMutability": "view",
|
|
1006
|
+
"type": "function"
|
|
983
1007
|
},
|
|
984
1008
|
{
|
|
985
|
-
"stateMutability": "view",
|
|
986
|
-
"type": "function",
|
|
987
|
-
"name": "add_collateral_health_preview",
|
|
988
1009
|
"inputs": [
|
|
989
1010
|
{
|
|
990
1011
|
"name": "_collateral",
|
|
@@ -1003,17 +1024,17 @@
|
|
|
1003
1024
|
"type": "bool"
|
|
1004
1025
|
}
|
|
1005
1026
|
],
|
|
1027
|
+
"name": "add_collateral_health_preview",
|
|
1006
1028
|
"outputs": [
|
|
1007
1029
|
{
|
|
1008
1030
|
"name": "",
|
|
1009
1031
|
"type": "int256"
|
|
1010
1032
|
}
|
|
1011
|
-
]
|
|
1033
|
+
],
|
|
1034
|
+
"stateMutability": "view",
|
|
1035
|
+
"type": "function"
|
|
1012
1036
|
},
|
|
1013
1037
|
{
|
|
1014
|
-
"stateMutability": "view",
|
|
1015
|
-
"type": "function",
|
|
1016
|
-
"name": "remove_collateral_health_preview",
|
|
1017
1038
|
"inputs": [
|
|
1018
1039
|
{
|
|
1019
1040
|
"name": "_collateral",
|
|
@@ -1028,17 +1049,17 @@
|
|
|
1028
1049
|
"type": "bool"
|
|
1029
1050
|
}
|
|
1030
1051
|
],
|
|
1052
|
+
"name": "remove_collateral_health_preview",
|
|
1031
1053
|
"outputs": [
|
|
1032
1054
|
{
|
|
1033
1055
|
"name": "",
|
|
1034
1056
|
"type": "int256"
|
|
1035
1057
|
}
|
|
1036
|
-
]
|
|
1058
|
+
],
|
|
1059
|
+
"stateMutability": "view",
|
|
1060
|
+
"type": "function"
|
|
1037
1061
|
},
|
|
1038
1062
|
{
|
|
1039
|
-
"stateMutability": "view",
|
|
1040
|
-
"type": "function",
|
|
1041
|
-
"name": "borrow_more_health_preview",
|
|
1042
1063
|
"inputs": [
|
|
1043
1064
|
{
|
|
1044
1065
|
"name": "_collateral",
|
|
@@ -1057,17 +1078,17 @@
|
|
|
1057
1078
|
"type": "bool"
|
|
1058
1079
|
}
|
|
1059
1080
|
],
|
|
1081
|
+
"name": "borrow_more_health_preview",
|
|
1060
1082
|
"outputs": [
|
|
1061
1083
|
{
|
|
1062
1084
|
"name": "",
|
|
1063
1085
|
"type": "int256"
|
|
1064
1086
|
}
|
|
1065
|
-
]
|
|
1087
|
+
],
|
|
1088
|
+
"stateMutability": "view",
|
|
1089
|
+
"type": "function"
|
|
1066
1090
|
},
|
|
1067
1091
|
{
|
|
1068
|
-
"stateMutability": "view",
|
|
1069
|
-
"type": "function",
|
|
1070
|
-
"name": "repay_health_preview",
|
|
1071
1092
|
"inputs": [
|
|
1072
1093
|
{
|
|
1073
1094
|
"name": "_d_collateral",
|
|
@@ -1094,17 +1115,17 @@
|
|
|
1094
1115
|
"type": "bool"
|
|
1095
1116
|
}
|
|
1096
1117
|
],
|
|
1118
|
+
"name": "repay_health_preview",
|
|
1097
1119
|
"outputs": [
|
|
1098
1120
|
{
|
|
1099
1121
|
"name": "",
|
|
1100
1122
|
"type": "int256"
|
|
1101
1123
|
}
|
|
1102
|
-
]
|
|
1124
|
+
],
|
|
1125
|
+
"stateMutability": "view",
|
|
1126
|
+
"type": "function"
|
|
1103
1127
|
},
|
|
1104
1128
|
{
|
|
1105
|
-
"stateMutability": "view",
|
|
1106
|
-
"type": "function",
|
|
1107
|
-
"name": "liquidate_health_preview",
|
|
1108
1129
|
"inputs": [
|
|
1109
1130
|
{
|
|
1110
1131
|
"name": "_user",
|
|
@@ -1123,150 +1144,150 @@
|
|
|
1123
1144
|
"type": "bool"
|
|
1124
1145
|
}
|
|
1125
1146
|
],
|
|
1147
|
+
"name": "liquidate_health_preview",
|
|
1126
1148
|
"outputs": [
|
|
1127
1149
|
{
|
|
1128
1150
|
"name": "",
|
|
1129
1151
|
"type": "int256"
|
|
1130
1152
|
}
|
|
1131
|
-
]
|
|
1153
|
+
],
|
|
1154
|
+
"stateMutability": "view",
|
|
1155
|
+
"type": "function"
|
|
1132
1156
|
},
|
|
1133
1157
|
{
|
|
1134
|
-
"stateMutability": "view",
|
|
1135
|
-
"type": "function",
|
|
1136
|
-
"name": "liquidation_discount",
|
|
1137
1158
|
"inputs": [],
|
|
1159
|
+
"name": "liquidation_discount",
|
|
1138
1160
|
"outputs": [
|
|
1139
1161
|
{
|
|
1140
1162
|
"name": "",
|
|
1141
1163
|
"type": "uint256"
|
|
1142
1164
|
}
|
|
1143
|
-
]
|
|
1165
|
+
],
|
|
1166
|
+
"stateMutability": "view",
|
|
1167
|
+
"type": "function"
|
|
1144
1168
|
},
|
|
1145
1169
|
{
|
|
1146
|
-
"stateMutability": "view",
|
|
1147
|
-
"type": "function",
|
|
1148
|
-
"name": "liquidation_discounts",
|
|
1149
1170
|
"inputs": [
|
|
1150
1171
|
{
|
|
1151
1172
|
"name": "arg0",
|
|
1152
1173
|
"type": "address"
|
|
1153
1174
|
}
|
|
1154
1175
|
],
|
|
1176
|
+
"name": "liquidation_discounts",
|
|
1155
1177
|
"outputs": [
|
|
1156
1178
|
{
|
|
1157
1179
|
"name": "",
|
|
1158
1180
|
"type": "uint256"
|
|
1159
1181
|
}
|
|
1160
|
-
]
|
|
1182
|
+
],
|
|
1183
|
+
"stateMutability": "view",
|
|
1184
|
+
"type": "function"
|
|
1161
1185
|
},
|
|
1162
1186
|
{
|
|
1163
|
-
"stateMutability": "view",
|
|
1164
|
-
"type": "function",
|
|
1165
|
-
"name": "loan_discount",
|
|
1166
1187
|
"inputs": [],
|
|
1188
|
+
"name": "loan_discount",
|
|
1167
1189
|
"outputs": [
|
|
1168
1190
|
{
|
|
1169
1191
|
"name": "",
|
|
1170
1192
|
"type": "uint256"
|
|
1171
1193
|
}
|
|
1172
|
-
]
|
|
1194
|
+
],
|
|
1195
|
+
"stateMutability": "view",
|
|
1196
|
+
"type": "function"
|
|
1173
1197
|
},
|
|
1174
1198
|
{
|
|
1175
|
-
"stateMutability": "view",
|
|
1176
|
-
"type": "function",
|
|
1177
|
-
"name": "loan_exists",
|
|
1178
1199
|
"inputs": [
|
|
1179
1200
|
{
|
|
1180
1201
|
"name": "_user",
|
|
1181
1202
|
"type": "address"
|
|
1182
1203
|
}
|
|
1183
1204
|
],
|
|
1205
|
+
"name": "loan_exists",
|
|
1184
1206
|
"outputs": [
|
|
1185
1207
|
{
|
|
1186
1208
|
"name": "",
|
|
1187
1209
|
"type": "bool"
|
|
1188
1210
|
}
|
|
1189
|
-
]
|
|
1211
|
+
],
|
|
1212
|
+
"stateMutability": "view",
|
|
1213
|
+
"type": "function"
|
|
1190
1214
|
},
|
|
1191
1215
|
{
|
|
1192
|
-
"stateMutability": "view",
|
|
1193
|
-
"type": "function",
|
|
1194
|
-
"name": "loan_ix",
|
|
1195
1216
|
"inputs": [
|
|
1196
1217
|
{
|
|
1197
1218
|
"name": "arg0",
|
|
1198
1219
|
"type": "address"
|
|
1199
1220
|
}
|
|
1200
1221
|
],
|
|
1222
|
+
"name": "loan_ix",
|
|
1201
1223
|
"outputs": [
|
|
1202
1224
|
{
|
|
1203
1225
|
"name": "",
|
|
1204
1226
|
"type": "uint256"
|
|
1205
1227
|
}
|
|
1206
|
-
]
|
|
1228
|
+
],
|
|
1229
|
+
"stateMutability": "view",
|
|
1230
|
+
"type": "function"
|
|
1207
1231
|
},
|
|
1208
1232
|
{
|
|
1209
|
-
"stateMutability": "view",
|
|
1210
|
-
"type": "function",
|
|
1211
|
-
"name": "loans",
|
|
1212
1233
|
"inputs": [
|
|
1213
1234
|
{
|
|
1214
1235
|
"name": "arg0",
|
|
1215
1236
|
"type": "uint256"
|
|
1216
1237
|
}
|
|
1217
1238
|
],
|
|
1239
|
+
"name": "loans",
|
|
1218
1240
|
"outputs": [
|
|
1219
1241
|
{
|
|
1220
1242
|
"name": "",
|
|
1221
1243
|
"type": "address"
|
|
1222
1244
|
}
|
|
1223
|
-
]
|
|
1245
|
+
],
|
|
1246
|
+
"stateMutability": "view",
|
|
1247
|
+
"type": "function"
|
|
1224
1248
|
},
|
|
1225
1249
|
{
|
|
1226
|
-
"stateMutability": "view",
|
|
1227
|
-
"type": "function",
|
|
1228
|
-
"name": "monetary_policy",
|
|
1229
1250
|
"inputs": [],
|
|
1251
|
+
"name": "monetary_policy",
|
|
1230
1252
|
"outputs": [
|
|
1231
1253
|
{
|
|
1232
1254
|
"name": "",
|
|
1233
1255
|
"type": "address"
|
|
1234
1256
|
}
|
|
1235
|
-
]
|
|
1257
|
+
],
|
|
1258
|
+
"stateMutability": "view",
|
|
1259
|
+
"type": "function"
|
|
1236
1260
|
},
|
|
1237
1261
|
{
|
|
1238
|
-
"stateMutability": "view",
|
|
1239
|
-
"type": "function",
|
|
1240
|
-
"name": "n_loans",
|
|
1241
1262
|
"inputs": [],
|
|
1263
|
+
"name": "n_loans",
|
|
1242
1264
|
"outputs": [
|
|
1243
1265
|
{
|
|
1244
1266
|
"name": "",
|
|
1245
1267
|
"type": "uint256"
|
|
1246
1268
|
}
|
|
1247
|
-
]
|
|
1269
|
+
],
|
|
1270
|
+
"stateMutability": "view",
|
|
1271
|
+
"type": "function"
|
|
1248
1272
|
},
|
|
1249
1273
|
{
|
|
1250
|
-
"stateMutability": "view",
|
|
1251
|
-
"type": "function",
|
|
1252
|
-
"name": "tokens_to_liquidate",
|
|
1253
1274
|
"inputs": [
|
|
1254
1275
|
{
|
|
1255
1276
|
"name": "_user",
|
|
1256
1277
|
"type": "address"
|
|
1257
1278
|
}
|
|
1258
1279
|
],
|
|
1280
|
+
"name": "tokens_to_liquidate",
|
|
1259
1281
|
"outputs": [
|
|
1260
1282
|
{
|
|
1261
1283
|
"name": "",
|
|
1262
1284
|
"type": "uint256"
|
|
1263
1285
|
}
|
|
1264
|
-
]
|
|
1286
|
+
],
|
|
1287
|
+
"stateMutability": "view",
|
|
1288
|
+
"type": "function"
|
|
1265
1289
|
},
|
|
1266
1290
|
{
|
|
1267
|
-
"stateMutability": "view",
|
|
1268
|
-
"type": "function",
|
|
1269
|
-
"name": "tokens_to_liquidate",
|
|
1270
1291
|
"inputs": [
|
|
1271
1292
|
{
|
|
1272
1293
|
"name": "_user",
|
|
@@ -1277,106 +1298,127 @@
|
|
|
1277
1298
|
"type": "uint256"
|
|
1278
1299
|
}
|
|
1279
1300
|
],
|
|
1301
|
+
"name": "tokens_to_liquidate",
|
|
1280
1302
|
"outputs": [
|
|
1281
1303
|
{
|
|
1282
1304
|
"name": "",
|
|
1283
1305
|
"type": "uint256"
|
|
1284
1306
|
}
|
|
1285
|
-
]
|
|
1307
|
+
],
|
|
1308
|
+
"stateMutability": "view",
|
|
1309
|
+
"type": "function"
|
|
1286
1310
|
},
|
|
1287
1311
|
{
|
|
1288
|
-
"stateMutability": "view",
|
|
1289
|
-
"type": "function",
|
|
1290
|
-
"name": "tokens_to_shrink",
|
|
1291
1312
|
"inputs": [
|
|
1292
1313
|
{
|
|
1293
1314
|
"name": "_user",
|
|
1294
1315
|
"type": "address"
|
|
1295
1316
|
}
|
|
1296
1317
|
],
|
|
1318
|
+
"name": "tokens_to_shrink",
|
|
1297
1319
|
"outputs": [
|
|
1298
1320
|
{
|
|
1299
1321
|
"name": "",
|
|
1300
1322
|
"type": "uint256"
|
|
1301
1323
|
}
|
|
1302
|
-
]
|
|
1324
|
+
],
|
|
1325
|
+
"stateMutability": "view",
|
|
1326
|
+
"type": "function"
|
|
1303
1327
|
},
|
|
1304
1328
|
{
|
|
1329
|
+
"inputs": [
|
|
1330
|
+
{
|
|
1331
|
+
"name": "_user",
|
|
1332
|
+
"type": "address"
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
"name": "_d_collateral",
|
|
1336
|
+
"type": "uint256"
|
|
1337
|
+
}
|
|
1338
|
+
],
|
|
1339
|
+
"name": "tokens_to_shrink",
|
|
1340
|
+
"outputs": [
|
|
1341
|
+
{
|
|
1342
|
+
"name": "",
|
|
1343
|
+
"type": "uint256"
|
|
1344
|
+
}
|
|
1345
|
+
],
|
|
1305
1346
|
"stateMutability": "view",
|
|
1306
|
-
"type": "function"
|
|
1307
|
-
|
|
1347
|
+
"type": "function"
|
|
1348
|
+
},
|
|
1349
|
+
{
|
|
1308
1350
|
"inputs": [],
|
|
1351
|
+
"name": "total_debt",
|
|
1309
1352
|
"outputs": [
|
|
1310
1353
|
{
|
|
1311
1354
|
"name": "",
|
|
1312
1355
|
"type": "uint256"
|
|
1313
1356
|
}
|
|
1314
|
-
]
|
|
1357
|
+
],
|
|
1358
|
+
"stateMutability": "view",
|
|
1359
|
+
"type": "function"
|
|
1315
1360
|
},
|
|
1316
1361
|
{
|
|
1317
|
-
"stateMutability": "view",
|
|
1318
|
-
"type": "function",
|
|
1319
|
-
"name": "factory",
|
|
1320
1362
|
"inputs": [],
|
|
1363
|
+
"name": "factory",
|
|
1321
1364
|
"outputs": [
|
|
1322
1365
|
{
|
|
1323
1366
|
"name": "",
|
|
1324
1367
|
"type": "address"
|
|
1325
1368
|
}
|
|
1326
|
-
]
|
|
1369
|
+
],
|
|
1370
|
+
"stateMutability": "view",
|
|
1371
|
+
"type": "function"
|
|
1327
1372
|
},
|
|
1328
1373
|
{
|
|
1329
|
-
"stateMutability": "view",
|
|
1330
|
-
"type": "function",
|
|
1331
|
-
"name": "admin_fees",
|
|
1332
1374
|
"inputs": [],
|
|
1375
|
+
"name": "admin_fees",
|
|
1333
1376
|
"outputs": [
|
|
1334
1377
|
{
|
|
1335
1378
|
"name": "",
|
|
1336
1379
|
"type": "uint256"
|
|
1337
1380
|
}
|
|
1338
|
-
]
|
|
1381
|
+
],
|
|
1382
|
+
"stateMutability": "view",
|
|
1383
|
+
"type": "function"
|
|
1339
1384
|
},
|
|
1340
1385
|
{
|
|
1341
|
-
"stateMutability": "view",
|
|
1342
|
-
"type": "function",
|
|
1343
|
-
"name": "admin_percentage",
|
|
1344
1386
|
"inputs": [],
|
|
1387
|
+
"name": "admin_percentage",
|
|
1345
1388
|
"outputs": [
|
|
1346
1389
|
{
|
|
1347
1390
|
"name": "",
|
|
1348
1391
|
"type": "uint256"
|
|
1349
1392
|
}
|
|
1350
|
-
]
|
|
1393
|
+
],
|
|
1394
|
+
"stateMutability": "view",
|
|
1395
|
+
"type": "function"
|
|
1351
1396
|
},
|
|
1352
1397
|
{
|
|
1353
|
-
"stateMutability": "nonpayable",
|
|
1354
|
-
"type": "function",
|
|
1355
|
-
"name": "set_view",
|
|
1356
1398
|
"inputs": [
|
|
1357
1399
|
{
|
|
1358
1400
|
"name": "_view_impl",
|
|
1359
1401
|
"type": "address"
|
|
1360
1402
|
}
|
|
1361
1403
|
],
|
|
1362
|
-
"
|
|
1404
|
+
"name": "set_view",
|
|
1405
|
+
"outputs": [],
|
|
1406
|
+
"stateMutability": "nonpayable",
|
|
1407
|
+
"type": "function"
|
|
1363
1408
|
},
|
|
1364
1409
|
{
|
|
1365
|
-
"stateMutability": "nonpayable",
|
|
1366
|
-
"type": "function",
|
|
1367
|
-
"name": "set_amm_fee",
|
|
1368
1410
|
"inputs": [
|
|
1369
1411
|
{
|
|
1370
1412
|
"name": "_fee",
|
|
1371
1413
|
"type": "uint256"
|
|
1372
1414
|
}
|
|
1373
1415
|
],
|
|
1374
|
-
"
|
|
1416
|
+
"name": "set_amm_fee",
|
|
1417
|
+
"outputs": [],
|
|
1418
|
+
"stateMutability": "nonpayable",
|
|
1419
|
+
"type": "function"
|
|
1375
1420
|
},
|
|
1376
1421
|
{
|
|
1377
|
-
"stateMutability": "nonpayable",
|
|
1378
|
-
"type": "function",
|
|
1379
|
-
"name": "set_borrowing_discounts",
|
|
1380
1422
|
"inputs": [
|
|
1381
1423
|
{
|
|
1382
1424
|
"name": "_loan_discount",
|
|
@@ -1387,36 +1429,36 @@
|
|
|
1387
1429
|
"type": "uint256"
|
|
1388
1430
|
}
|
|
1389
1431
|
],
|
|
1390
|
-
"
|
|
1432
|
+
"name": "set_borrowing_discounts",
|
|
1433
|
+
"outputs": [],
|
|
1434
|
+
"stateMutability": "nonpayable",
|
|
1435
|
+
"type": "function"
|
|
1391
1436
|
},
|
|
1392
1437
|
{
|
|
1393
|
-
"stateMutability": "nonpayable",
|
|
1394
|
-
"type": "function",
|
|
1395
|
-
"name": "set_callback",
|
|
1396
1438
|
"inputs": [
|
|
1397
1439
|
{
|
|
1398
1440
|
"name": "_cb",
|
|
1399
1441
|
"type": "address"
|
|
1400
1442
|
}
|
|
1401
1443
|
],
|
|
1402
|
-
"
|
|
1444
|
+
"name": "set_callback",
|
|
1445
|
+
"outputs": [],
|
|
1446
|
+
"stateMutability": "nonpayable",
|
|
1447
|
+
"type": "function"
|
|
1403
1448
|
},
|
|
1404
1449
|
{
|
|
1405
|
-
"stateMutability": "nonpayable",
|
|
1406
|
-
"type": "function",
|
|
1407
|
-
"name": "set_monetary_policy",
|
|
1408
1450
|
"inputs": [
|
|
1409
1451
|
{
|
|
1410
1452
|
"name": "_monetary_policy",
|
|
1411
1453
|
"type": "address"
|
|
1412
1454
|
}
|
|
1413
1455
|
],
|
|
1414
|
-
"
|
|
1456
|
+
"name": "set_monetary_policy",
|
|
1457
|
+
"outputs": [],
|
|
1458
|
+
"stateMutability": "nonpayable",
|
|
1459
|
+
"type": "function"
|
|
1415
1460
|
},
|
|
1416
1461
|
{
|
|
1417
|
-
"stateMutability": "nonpayable",
|
|
1418
|
-
"type": "function",
|
|
1419
|
-
"name": "set_price_oracle",
|
|
1420
1462
|
"inputs": [
|
|
1421
1463
|
{
|
|
1422
1464
|
"name": "_price_oracle",
|
|
@@ -1427,51 +1469,50 @@
|
|
|
1427
1469
|
"type": "uint256"
|
|
1428
1470
|
}
|
|
1429
1471
|
],
|
|
1430
|
-
"
|
|
1472
|
+
"name": "set_price_oracle",
|
|
1473
|
+
"outputs": [],
|
|
1474
|
+
"stateMutability": "nonpayable",
|
|
1475
|
+
"type": "function"
|
|
1431
1476
|
},
|
|
1432
1477
|
{
|
|
1433
|
-
"stateMutability": "view",
|
|
1434
|
-
"type": "function",
|
|
1435
|
-
"name": "user_prices",
|
|
1436
1478
|
"inputs": [
|
|
1437
1479
|
{
|
|
1438
1480
|
"name": "_user",
|
|
1439
1481
|
"type": "address"
|
|
1440
1482
|
}
|
|
1441
1483
|
],
|
|
1484
|
+
"name": "user_prices",
|
|
1442
1485
|
"outputs": [
|
|
1443
1486
|
{
|
|
1444
1487
|
"name": "",
|
|
1445
1488
|
"type": "uint256[2]"
|
|
1446
1489
|
}
|
|
1447
|
-
]
|
|
1490
|
+
],
|
|
1491
|
+
"stateMutability": "view",
|
|
1492
|
+
"type": "function"
|
|
1448
1493
|
},
|
|
1449
1494
|
{
|
|
1450
|
-
"stateMutability": "view",
|
|
1451
|
-
"type": "function",
|
|
1452
|
-
"name": "user_state",
|
|
1453
1495
|
"inputs": [
|
|
1454
1496
|
{
|
|
1455
1497
|
"name": "_user",
|
|
1456
1498
|
"type": "address"
|
|
1457
1499
|
}
|
|
1458
1500
|
],
|
|
1501
|
+
"name": "user_state",
|
|
1459
1502
|
"outputs": [
|
|
1460
1503
|
{
|
|
1461
1504
|
"name": "",
|
|
1462
1505
|
"type": "uint256[4]"
|
|
1463
1506
|
}
|
|
1464
|
-
]
|
|
1507
|
+
],
|
|
1508
|
+
"stateMutability": "view",
|
|
1509
|
+
"type": "function"
|
|
1465
1510
|
},
|
|
1466
1511
|
{
|
|
1467
|
-
"stateMutability": "view",
|
|
1468
|
-
"type": "function",
|
|
1469
|
-
"name": "users_to_liquidate",
|
|
1470
1512
|
"inputs": [],
|
|
1513
|
+
"name": "users_to_liquidate",
|
|
1471
1514
|
"outputs": [
|
|
1472
1515
|
{
|
|
1473
|
-
"name": "",
|
|
1474
|
-
"type": "tuple[]",
|
|
1475
1516
|
"components": [
|
|
1476
1517
|
{
|
|
1477
1518
|
"name": "user",
|
|
@@ -1493,24 +1534,24 @@
|
|
|
1493
1534
|
"name": "health",
|
|
1494
1535
|
"type": "int256"
|
|
1495
1536
|
}
|
|
1496
|
-
]
|
|
1537
|
+
],
|
|
1538
|
+
"name": "",
|
|
1539
|
+
"type": "tuple[]"
|
|
1497
1540
|
}
|
|
1498
|
-
]
|
|
1541
|
+
],
|
|
1542
|
+
"stateMutability": "view",
|
|
1543
|
+
"type": "function"
|
|
1499
1544
|
},
|
|
1500
1545
|
{
|
|
1501
|
-
"stateMutability": "view",
|
|
1502
|
-
"type": "function",
|
|
1503
|
-
"name": "users_to_liquidate",
|
|
1504
1546
|
"inputs": [
|
|
1505
1547
|
{
|
|
1506
1548
|
"name": "_from",
|
|
1507
1549
|
"type": "uint256"
|
|
1508
1550
|
}
|
|
1509
1551
|
],
|
|
1552
|
+
"name": "users_to_liquidate",
|
|
1510
1553
|
"outputs": [
|
|
1511
1554
|
{
|
|
1512
|
-
"name": "",
|
|
1513
|
-
"type": "tuple[]",
|
|
1514
1555
|
"components": [
|
|
1515
1556
|
{
|
|
1516
1557
|
"name": "user",
|
|
@@ -1532,14 +1573,15 @@
|
|
|
1532
1573
|
"name": "health",
|
|
1533
1574
|
"type": "int256"
|
|
1534
1575
|
}
|
|
1535
|
-
]
|
|
1576
|
+
],
|
|
1577
|
+
"name": "",
|
|
1578
|
+
"type": "tuple[]"
|
|
1536
1579
|
}
|
|
1537
|
-
]
|
|
1580
|
+
],
|
|
1581
|
+
"stateMutability": "view",
|
|
1582
|
+
"type": "function"
|
|
1538
1583
|
},
|
|
1539
1584
|
{
|
|
1540
|
-
"stateMutability": "view",
|
|
1541
|
-
"type": "function",
|
|
1542
|
-
"name": "users_to_liquidate",
|
|
1543
1585
|
"inputs": [
|
|
1544
1586
|
{
|
|
1545
1587
|
"name": "_from",
|
|
@@ -1550,10 +1592,9 @@
|
|
|
1550
1592
|
"type": "uint256"
|
|
1551
1593
|
}
|
|
1552
1594
|
],
|
|
1595
|
+
"name": "users_to_liquidate",
|
|
1553
1596
|
"outputs": [
|
|
1554
1597
|
{
|
|
1555
|
-
"name": "",
|
|
1556
|
-
"type": "tuple[]",
|
|
1557
1598
|
"components": [
|
|
1558
1599
|
{
|
|
1559
1600
|
"name": "user",
|
|
@@ -1575,14 +1616,15 @@
|
|
|
1575
1616
|
"name": "health",
|
|
1576
1617
|
"type": "int256"
|
|
1577
1618
|
}
|
|
1578
|
-
]
|
|
1619
|
+
],
|
|
1620
|
+
"name": "",
|
|
1621
|
+
"type": "tuple[]"
|
|
1579
1622
|
}
|
|
1580
|
-
]
|
|
1623
|
+
],
|
|
1624
|
+
"stateMutability": "view",
|
|
1625
|
+
"type": "function"
|
|
1581
1626
|
},
|
|
1582
1627
|
{
|
|
1583
|
-
"stateMutability": "view",
|
|
1584
|
-
"type": "function",
|
|
1585
|
-
"name": "min_collateral",
|
|
1586
1628
|
"inputs": [
|
|
1587
1629
|
{
|
|
1588
1630
|
"name": "_debt",
|
|
@@ -1593,17 +1635,17 @@
|
|
|
1593
1635
|
"type": "uint256"
|
|
1594
1636
|
}
|
|
1595
1637
|
],
|
|
1638
|
+
"name": "min_collateral",
|
|
1596
1639
|
"outputs": [
|
|
1597
1640
|
{
|
|
1598
1641
|
"name": "",
|
|
1599
1642
|
"type": "uint256"
|
|
1600
1643
|
}
|
|
1601
|
-
]
|
|
1644
|
+
],
|
|
1645
|
+
"stateMutability": "view",
|
|
1646
|
+
"type": "function"
|
|
1602
1647
|
},
|
|
1603
1648
|
{
|
|
1604
|
-
"stateMutability": "view",
|
|
1605
|
-
"type": "function",
|
|
1606
|
-
"name": "min_collateral",
|
|
1607
1649
|
"inputs": [
|
|
1608
1650
|
{
|
|
1609
1651
|
"name": "_debt",
|
|
@@ -1618,41 +1660,20 @@
|
|
|
1618
1660
|
"type": "address"
|
|
1619
1661
|
}
|
|
1620
1662
|
],
|
|
1663
|
+
"name": "min_collateral",
|
|
1621
1664
|
"outputs": [
|
|
1622
1665
|
{
|
|
1623
1666
|
"name": "",
|
|
1624
1667
|
"type": "uint256"
|
|
1625
1668
|
}
|
|
1626
|
-
]
|
|
1627
|
-
},
|
|
1628
|
-
{
|
|
1629
|
-
"stateMutability": "view",
|
|
1630
|
-
"type": "function",
|
|
1631
|
-
"name": "max_borrowable",
|
|
1632
|
-
"inputs": [
|
|
1633
|
-
{
|
|
1634
|
-
"name": "_collateral",
|
|
1635
|
-
"type": "uint256"
|
|
1636
|
-
},
|
|
1637
|
-
{
|
|
1638
|
-
"name": "_N",
|
|
1639
|
-
"type": "uint256"
|
|
1640
|
-
}
|
|
1641
1669
|
],
|
|
1642
|
-
"
|
|
1643
|
-
|
|
1644
|
-
"name": "",
|
|
1645
|
-
"type": "uint256"
|
|
1646
|
-
}
|
|
1647
|
-
]
|
|
1670
|
+
"stateMutability": "view",
|
|
1671
|
+
"type": "function"
|
|
1648
1672
|
},
|
|
1649
1673
|
{
|
|
1650
|
-
"stateMutability": "view",
|
|
1651
|
-
"type": "function",
|
|
1652
|
-
"name": "max_borrowable",
|
|
1653
1674
|
"inputs": [
|
|
1654
1675
|
{
|
|
1655
|
-
"name": "
|
|
1676
|
+
"name": "_d_collateral",
|
|
1656
1677
|
"type": "uint256"
|
|
1657
1678
|
},
|
|
1658
1679
|
{
|
|
@@ -1660,173 +1681,165 @@
|
|
|
1660
1681
|
"type": "uint256"
|
|
1661
1682
|
},
|
|
1662
1683
|
{
|
|
1663
|
-
"name": "
|
|
1664
|
-
"type": "
|
|
1684
|
+
"name": "_user",
|
|
1685
|
+
"type": "address"
|
|
1665
1686
|
}
|
|
1666
1687
|
],
|
|
1688
|
+
"name": "max_borrowable",
|
|
1667
1689
|
"outputs": [
|
|
1668
1690
|
{
|
|
1669
1691
|
"name": "",
|
|
1670
1692
|
"type": "uint256"
|
|
1671
1693
|
}
|
|
1672
|
-
]
|
|
1694
|
+
],
|
|
1695
|
+
"stateMutability": "view",
|
|
1696
|
+
"type": "function"
|
|
1673
1697
|
},
|
|
1674
1698
|
{
|
|
1675
|
-
"
|
|
1676
|
-
"
|
|
1677
|
-
"name": "max_borrowable",
|
|
1678
|
-
"inputs": [
|
|
1679
|
-
{
|
|
1680
|
-
"name": "_collateral",
|
|
1681
|
-
"type": "uint256"
|
|
1682
|
-
},
|
|
1683
|
-
{
|
|
1684
|
-
"name": "_N",
|
|
1685
|
-
"type": "uint256"
|
|
1686
|
-
},
|
|
1687
|
-
{
|
|
1688
|
-
"name": "_current_debt",
|
|
1689
|
-
"type": "uint256"
|
|
1690
|
-
},
|
|
1691
|
-
{
|
|
1692
|
-
"name": "_user",
|
|
1693
|
-
"type": "address"
|
|
1694
|
-
}
|
|
1695
|
-
],
|
|
1699
|
+
"inputs": [],
|
|
1700
|
+
"name": "available_balance",
|
|
1696
1701
|
"outputs": [
|
|
1697
1702
|
{
|
|
1698
1703
|
"name": "",
|
|
1699
1704
|
"type": "uint256"
|
|
1700
1705
|
}
|
|
1701
|
-
]
|
|
1706
|
+
],
|
|
1707
|
+
"stateMutability": "view",
|
|
1708
|
+
"type": "function"
|
|
1702
1709
|
},
|
|
1703
1710
|
{
|
|
1704
|
-
"stateMutability": "view",
|
|
1705
|
-
"type": "function",
|
|
1706
|
-
"name": "vault",
|
|
1707
1711
|
"inputs": [],
|
|
1712
|
+
"name": "vault",
|
|
1708
1713
|
"outputs": [
|
|
1709
1714
|
{
|
|
1710
1715
|
"name": "",
|
|
1711
1716
|
"type": "address"
|
|
1712
1717
|
}
|
|
1713
|
-
]
|
|
1718
|
+
],
|
|
1719
|
+
"stateMutability": "view",
|
|
1720
|
+
"type": "function"
|
|
1714
1721
|
},
|
|
1715
1722
|
{
|
|
1716
|
-
"stateMutability": "view",
|
|
1717
|
-
"type": "function",
|
|
1718
|
-
"name": "version",
|
|
1719
1723
|
"inputs": [],
|
|
1724
|
+
"name": "version",
|
|
1720
1725
|
"outputs": [
|
|
1721
1726
|
{
|
|
1722
1727
|
"name": "",
|
|
1723
1728
|
"type": "string"
|
|
1724
1729
|
}
|
|
1725
|
-
]
|
|
1730
|
+
],
|
|
1731
|
+
"stateMutability": "view",
|
|
1732
|
+
"type": "function"
|
|
1726
1733
|
},
|
|
1727
1734
|
{
|
|
1728
|
-
"
|
|
1729
|
-
"type": "function",
|
|
1730
|
-
"name": "available_balance",
|
|
1731
|
-
"inputs": [],
|
|
1732
|
-
"outputs": [
|
|
1735
|
+
"inputs": [
|
|
1733
1736
|
{
|
|
1734
|
-
"name": "",
|
|
1737
|
+
"name": "_borrow_cap",
|
|
1735
1738
|
"type": "uint256"
|
|
1736
1739
|
}
|
|
1737
|
-
]
|
|
1740
|
+
],
|
|
1741
|
+
"name": "set_borrow_cap",
|
|
1742
|
+
"outputs": [],
|
|
1743
|
+
"stateMutability": "nonpayable",
|
|
1744
|
+
"type": "function"
|
|
1738
1745
|
},
|
|
1739
1746
|
{
|
|
1740
|
-
"stateMutability": "nonpayable",
|
|
1741
|
-
"type": "function",
|
|
1742
|
-
"name": "set_borrow_cap",
|
|
1743
1747
|
"inputs": [
|
|
1744
1748
|
{
|
|
1745
|
-
"name": "
|
|
1749
|
+
"name": "_admin_percentage",
|
|
1746
1750
|
"type": "uint256"
|
|
1747
1751
|
}
|
|
1748
1752
|
],
|
|
1749
|
-
"
|
|
1753
|
+
"name": "set_admin_percentage",
|
|
1754
|
+
"outputs": [],
|
|
1755
|
+
"stateMutability": "nonpayable",
|
|
1756
|
+
"type": "function"
|
|
1750
1757
|
},
|
|
1751
1758
|
{
|
|
1752
|
-
"stateMutability": "nonpayable",
|
|
1753
|
-
"type": "function",
|
|
1754
|
-
"name": "set_admin_percentage",
|
|
1755
1759
|
"inputs": [
|
|
1756
1760
|
{
|
|
1757
|
-
"name": "
|
|
1761
|
+
"name": "_amount",
|
|
1758
1762
|
"type": "uint256"
|
|
1759
1763
|
}
|
|
1760
1764
|
],
|
|
1761
|
-
"
|
|
1765
|
+
"name": "on_borrowed_token_transfer_in",
|
|
1766
|
+
"outputs": [],
|
|
1767
|
+
"stateMutability": "nonpayable",
|
|
1768
|
+
"type": "function"
|
|
1762
1769
|
},
|
|
1763
1770
|
{
|
|
1764
|
-
"stateMutability": "nonpayable",
|
|
1765
|
-
"type": "function",
|
|
1766
|
-
"name": "_on_debt_increased",
|
|
1767
1771
|
"inputs": [
|
|
1768
1772
|
{
|
|
1769
|
-
"name": "
|
|
1773
|
+
"name": "_amount",
|
|
1770
1774
|
"type": "uint256"
|
|
1771
|
-
}
|
|
1775
|
+
}
|
|
1776
|
+
],
|
|
1777
|
+
"name": "on_borrowed_token_transfer_out",
|
|
1778
|
+
"outputs": [],
|
|
1779
|
+
"stateMutability": "nonpayable",
|
|
1780
|
+
"type": "function"
|
|
1781
|
+
},
|
|
1782
|
+
{
|
|
1783
|
+
"inputs": [
|
|
1772
1784
|
{
|
|
1773
1785
|
"name": "_total_debt",
|
|
1774
1786
|
"type": "uint256"
|
|
1775
1787
|
}
|
|
1776
1788
|
],
|
|
1777
|
-
"
|
|
1789
|
+
"name": "_on_debt_increased",
|
|
1790
|
+
"outputs": [],
|
|
1791
|
+
"stateMutability": "nonpayable",
|
|
1792
|
+
"type": "function"
|
|
1778
1793
|
},
|
|
1779
1794
|
{
|
|
1780
|
-
"stateMutability": "view",
|
|
1781
|
-
"type": "function",
|
|
1782
|
-
"name": "lent",
|
|
1783
1795
|
"inputs": [],
|
|
1796
|
+
"name": "lent",
|
|
1784
1797
|
"outputs": [
|
|
1785
1798
|
{
|
|
1786
1799
|
"name": "",
|
|
1787
1800
|
"type": "uint256"
|
|
1788
1801
|
}
|
|
1789
|
-
]
|
|
1802
|
+
],
|
|
1803
|
+
"stateMutability": "view",
|
|
1804
|
+
"type": "function"
|
|
1790
1805
|
},
|
|
1791
1806
|
{
|
|
1792
|
-
"stateMutability": "view",
|
|
1793
|
-
"type": "function",
|
|
1794
|
-
"name": "repaid",
|
|
1795
1807
|
"inputs": [],
|
|
1808
|
+
"name": "repaid",
|
|
1796
1809
|
"outputs": [
|
|
1797
1810
|
{
|
|
1798
1811
|
"name": "",
|
|
1799
1812
|
"type": "uint256"
|
|
1800
1813
|
}
|
|
1801
|
-
]
|
|
1814
|
+
],
|
|
1815
|
+
"stateMutability": "view",
|
|
1816
|
+
"type": "function"
|
|
1802
1817
|
},
|
|
1803
1818
|
{
|
|
1804
|
-
"stateMutability": "view",
|
|
1805
|
-
"type": "function",
|
|
1806
|
-
"name": "collected",
|
|
1807
1819
|
"inputs": [],
|
|
1820
|
+
"name": "collected",
|
|
1808
1821
|
"outputs": [
|
|
1809
1822
|
{
|
|
1810
1823
|
"name": "",
|
|
1811
1824
|
"type": "uint256"
|
|
1812
1825
|
}
|
|
1813
|
-
]
|
|
1826
|
+
],
|
|
1827
|
+
"stateMutability": "view",
|
|
1828
|
+
"type": "function"
|
|
1814
1829
|
},
|
|
1815
1830
|
{
|
|
1816
|
-
"stateMutability": "view",
|
|
1817
|
-
"type": "function",
|
|
1818
|
-
"name": "borrow_cap",
|
|
1819
1831
|
"inputs": [],
|
|
1832
|
+
"name": "borrow_cap",
|
|
1820
1833
|
"outputs": [
|
|
1821
1834
|
{
|
|
1822
1835
|
"name": "",
|
|
1823
1836
|
"type": "uint256"
|
|
1824
1837
|
}
|
|
1825
|
-
]
|
|
1838
|
+
],
|
|
1839
|
+
"stateMutability": "view",
|
|
1840
|
+
"type": "function"
|
|
1826
1841
|
},
|
|
1827
1842
|
{
|
|
1828
|
-
"stateMutability": "nonpayable",
|
|
1829
|
-
"type": "constructor",
|
|
1830
1843
|
"inputs": [
|
|
1831
1844
|
{
|
|
1832
1845
|
"name": "_vault",
|
|
@@ -1861,6 +1874,8 @@
|
|
|
1861
1874
|
"type": "address"
|
|
1862
1875
|
}
|
|
1863
1876
|
],
|
|
1864
|
-
"outputs": []
|
|
1877
|
+
"outputs": [],
|
|
1878
|
+
"stateMutability": "nonpayable",
|
|
1879
|
+
"type": "constructor"
|
|
1865
1880
|
}
|
|
1866
1881
|
]
|