@nexusmutual/sdk 0.1.11 → 0.2.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.
@@ -5,6 +5,11 @@
5
5
  "internalType": "address",
6
6
  "name": "_quotationData",
7
7
  "type": "address"
8
+ },
9
+ {
10
+ "internalType": "address",
11
+ "name": "_tokenAddress",
12
+ "type": "address"
8
13
  }
9
14
  ],
10
15
  "stateMutability": "nonpayable",
@@ -15,6 +15,11 @@
15
15
  "internalType": "address",
16
16
  "name": "stakingNFTAddress",
17
17
  "type": "address"
18
+ },
19
+ {
20
+ "internalType": "address",
21
+ "name": "_tokenAddress",
22
+ "type": "address"
18
23
  }
19
24
  ],
20
25
  "stateMutability": "nonpayable",
@@ -5,6 +5,11 @@
5
5
  "internalType": "address",
6
6
  "name": "masterAddress",
7
7
  "type": "address"
8
+ },
9
+ {
10
+ "internalType": "uint256",
11
+ "name": "mcrUpdateDeadline",
12
+ "type": "uint256"
8
13
  }
9
14
  ],
10
15
  "stateMutability": "nonpayable",
@@ -47,6 +52,45 @@
47
52
  "name": "MCRUpdated",
48
53
  "type": "event"
49
54
  },
55
+ {
56
+ "inputs": [],
57
+ "name": "BASIS_PRECISION",
58
+ "outputs": [
59
+ {
60
+ "internalType": "uint256",
61
+ "name": "",
62
+ "type": "uint256"
63
+ }
64
+ ],
65
+ "stateMutability": "view",
66
+ "type": "function"
67
+ },
68
+ {
69
+ "inputs": [],
70
+ "name": "MAX_MCR_ADJUSTMENT",
71
+ "outputs": [
72
+ {
73
+ "internalType": "uint256",
74
+ "name": "",
75
+ "type": "uint256"
76
+ }
77
+ ],
78
+ "stateMutability": "view",
79
+ "type": "function"
80
+ },
81
+ {
82
+ "inputs": [],
83
+ "name": "MCR_UPDATE_DEADLINE",
84
+ "outputs": [
85
+ {
86
+ "internalType": "uint256",
87
+ "name": "",
88
+ "type": "uint256"
89
+ }
90
+ ],
91
+ "stateMutability": "view",
92
+ "type": "function"
93
+ },
50
94
  {
51
95
  "inputs": [],
52
96
  "name": "changeDependentContractAddress",
@@ -72,9 +116,9 @@
72
116
  "name": "desiredMCR",
73
117
  "outputs": [
74
118
  {
75
- "internalType": "uint112",
119
+ "internalType": "uint80",
76
120
  "name": "",
77
- "type": "uint112"
121
+ "type": "uint80"
78
122
  }
79
123
  ],
80
124
  "stateMutability": "view",
@@ -95,7 +139,7 @@
95
139
  },
96
140
  {
97
141
  "inputs": [],
98
- "name": "getAllSumAssurance",
142
+ "name": "getGearedMCR",
99
143
  "outputs": [
100
144
  {
101
145
  "internalType": "uint256",
@@ -108,7 +152,7 @@
108
152
  },
109
153
  {
110
154
  "inputs": [],
111
- "name": "getGearedMCR",
155
+ "name": "getMCR",
112
156
  "outputs": [
113
157
  {
114
158
  "internalType": "uint256",
@@ -121,7 +165,7 @@
121
165
  },
122
166
  {
123
167
  "inputs": [],
124
- "name": "getMCR",
168
+ "name": "getTotalActiveCoverAmount",
125
169
  "outputs": [
126
170
  {
127
171
  "internalType": "uint256",
@@ -177,27 +221,14 @@
177
221
  "stateMutability": "view",
178
222
  "type": "function"
179
223
  },
180
- {
181
- "inputs": [],
182
- "name": "maxMCRFloorIncrement",
183
- "outputs": [
184
- {
185
- "internalType": "uint24",
186
- "name": "",
187
- "type": "uint24"
188
- }
189
- ],
190
- "stateMutability": "view",
191
- "type": "function"
192
- },
193
224
  {
194
225
  "inputs": [],
195
226
  "name": "maxMCRIncrement",
196
227
  "outputs": [
197
228
  {
198
- "internalType": "uint24",
229
+ "internalType": "uint16",
199
230
  "name": "",
200
- "type": "uint24"
231
+ "type": "uint16"
201
232
  }
202
233
  ],
203
234
  "stateMutability": "view",
@@ -208,35 +239,9 @@
208
239
  "name": "mcr",
209
240
  "outputs": [
210
241
  {
211
- "internalType": "uint112",
212
- "name": "",
213
- "type": "uint112"
214
- }
215
- ],
216
- "stateMutability": "view",
217
- "type": "function"
218
- },
219
- {
220
- "inputs": [],
221
- "name": "mcrFloor",
222
- "outputs": [
223
- {
224
- "internalType": "uint112",
225
- "name": "",
226
- "type": "uint112"
227
- }
228
- ],
229
- "stateMutability": "view",
230
- "type": "function"
231
- },
232
- {
233
- "inputs": [],
234
- "name": "mcrFloorIncrementThreshold",
235
- "outputs": [
236
- {
237
- "internalType": "uint24",
242
+ "internalType": "uint80",
238
243
  "name": "",
239
- "type": "uint24"
244
+ "type": "uint80"
240
245
  }
241
246
  ],
242
247
  "stateMutability": "view",
@@ -247,9 +252,9 @@
247
252
  "name": "minUpdateTime",
248
253
  "outputs": [
249
254
  {
250
- "internalType": "uint24",
255
+ "internalType": "uint16",
251
256
  "name": "",
252
- "type": "uint24"
257
+ "type": "uint16"
253
258
  }
254
259
  ],
255
260
  "stateMutability": "view",
@@ -268,6 +273,13 @@
268
273
  "stateMutability": "view",
269
274
  "type": "function"
270
275
  },
276
+ {
277
+ "inputs": [],
278
+ "name": "teleportMCR",
279
+ "outputs": [],
280
+ "stateMutability": "nonpayable",
281
+ "type": "function"
282
+ },
271
283
  {
272
284
  "inputs": [],
273
285
  "name": "updateMCR",
@@ -277,11 +289,6 @@
277
289
  },
278
290
  {
279
291
  "inputs": [
280
- {
281
- "internalType": "uint256",
282
- "name": "poolValueInEth",
283
- "type": "uint256"
284
- },
285
292
  {
286
293
  "internalType": "bool",
287
294
  "name": "forceUpdate",
@@ -302,7 +309,7 @@
302
309
  },
303
310
  {
304
311
  "internalType": "uint256",
305
- "name": "val",
312
+ "name": "value",
306
313
  "type": "uint256"
307
314
  }
308
315
  ],
@@ -18,22 +18,12 @@
18
18
  },
19
19
  {
20
20
  "internalType": "address",
21
- "name": "DAIAddress",
22
- "type": "address"
23
- },
24
- {
25
- "internalType": "address",
26
- "name": "stETHAddress",
27
- "type": "address"
28
- },
29
- {
30
- "internalType": "address",
31
- "name": "enzymeVaultAddress",
21
+ "name": "_nxmTokenAddress",
32
22
  "type": "address"
33
23
  },
34
24
  {
35
25
  "internalType": "address",
36
- "name": "_nxmTokenAddress",
26
+ "name": "_previousPool",
37
27
  "type": "address"
38
28
  }
39
29
  ],
@@ -46,48 +36,17 @@
46
36
  {
47
37
  "indexed": true,
48
38
  "internalType": "address",
49
- "name": "member",
50
- "type": "address"
51
- },
52
- {
53
- "indexed": false,
54
- "internalType": "uint256",
55
- "name": "ethIn",
56
- "type": "uint256"
57
- },
58
- {
59
- "indexed": false,
60
- "internalType": "uint256",
61
- "name": "nxmOut",
62
- "type": "uint256"
63
- }
64
- ],
65
- "name": "NXMBought",
66
- "type": "event"
67
- },
68
- {
69
- "anonymous": false,
70
- "inputs": [
71
- {
72
- "indexed": true,
73
- "internalType": "address",
74
- "name": "member",
39
+ "name": "to",
75
40
  "type": "address"
76
41
  },
77
42
  {
78
43
  "indexed": false,
79
44
  "internalType": "uint256",
80
- "name": "nxmIn",
81
- "type": "uint256"
82
- },
83
- {
84
- "indexed": false,
85
- "internalType": "uint256",
86
- "name": "ethOut",
45
+ "name": "amount",
87
46
  "type": "uint256"
88
47
  }
89
48
  ],
90
- "name": "NXMSold",
49
+ "name": "DepositReturned",
91
50
  "type": "event"
92
51
  },
93
52
  {
@@ -115,41 +74,6 @@
115
74
  "name": "Payout",
116
75
  "type": "event"
117
76
  },
118
- {
119
- "anonymous": false,
120
- "inputs": [
121
- {
122
- "indexed": true,
123
- "internalType": "address",
124
- "name": "fromAsset",
125
- "type": "address"
126
- },
127
- {
128
- "indexed": true,
129
- "internalType": "address",
130
- "name": "toAsset",
131
- "type": "address"
132
- },
133
- {
134
- "indexed": false,
135
- "internalType": "uint256",
136
- "name": "amountIn",
137
- "type": "uint256"
138
- },
139
- {
140
- "indexed": false,
141
- "internalType": "uint256",
142
- "name": "amountOut",
143
- "type": "uint256"
144
- }
145
- ],
146
- "name": "Swapped",
147
- "type": "event"
148
- },
149
- {
150
- "stateMutability": "payable",
151
- "type": "fallback"
152
- },
153
77
  {
154
78
  "inputs": [],
155
79
  "name": "ETH",
@@ -163,32 +87,6 @@
163
87
  "stateMutability": "view",
164
88
  "type": "function"
165
89
  },
166
- {
167
- "inputs": [],
168
- "name": "MAX_BUY_SELL_MCR_ETH_FRACTION",
169
- "outputs": [
170
- {
171
- "internalType": "uint256",
172
- "name": "",
173
- "type": "uint256"
174
- }
175
- ],
176
- "stateMutability": "view",
177
- "type": "function"
178
- },
179
- {
180
- "inputs": [],
181
- "name": "MAX_MCR_RATIO",
182
- "outputs": [
183
- {
184
- "internalType": "uint256",
185
- "name": "",
186
- "type": "uint256"
187
- }
188
- ],
189
- "stateMutability": "view",
190
- "type": "function"
191
- },
192
90
  {
193
91
  "inputs": [],
194
92
  "name": "MCR_RATIO_DECIMALS",
@@ -264,48 +162,6 @@
264
162
  "stateMutability": "view",
265
163
  "type": "function"
266
164
  },
267
- {
268
- "inputs": [
269
- {
270
- "internalType": "uint256",
271
- "name": "minTokensOut",
272
- "type": "uint256"
273
- }
274
- ],
275
- "name": "buyNXM",
276
- "outputs": [],
277
- "stateMutability": "payable",
278
- "type": "function"
279
- },
280
- {
281
- "inputs": [
282
- {
283
- "internalType": "uint256",
284
- "name": "nxmAmount",
285
- "type": "uint256"
286
- },
287
- {
288
- "internalType": "uint256",
289
- "name": "currentTotalAssetValue",
290
- "type": "uint256"
291
- },
292
- {
293
- "internalType": "uint256",
294
- "name": "mcrEth",
295
- "type": "uint256"
296
- }
297
- ],
298
- "name": "calculateEthForNXM",
299
- "outputs": [
300
- {
301
- "internalType": "uint256",
302
- "name": "",
303
- "type": "uint256"
304
- }
305
- ],
306
- "stateMutability": "pure",
307
- "type": "function"
308
- },
309
165
  {
310
166
  "inputs": [
311
167
  {
@@ -330,59 +186,6 @@
330
186
  "stateMutability": "pure",
331
187
  "type": "function"
332
188
  },
333
- {
334
- "inputs": [
335
- {
336
- "internalType": "uint256",
337
- "name": "ethAmount",
338
- "type": "uint256"
339
- },
340
- {
341
- "internalType": "uint256",
342
- "name": "currentTotalAssetValue",
343
- "type": "uint256"
344
- },
345
- {
346
- "internalType": "uint256",
347
- "name": "mcrEth",
348
- "type": "uint256"
349
- }
350
- ],
351
- "name": "calculateNXMForEth",
352
- "outputs": [
353
- {
354
- "internalType": "uint256",
355
- "name": "",
356
- "type": "uint256"
357
- }
358
- ],
359
- "stateMutability": "pure",
360
- "type": "function"
361
- },
362
- {
363
- "inputs": [
364
- {
365
- "internalType": "uint256",
366
- "name": "totalAssetValue",
367
- "type": "uint256"
368
- },
369
- {
370
- "internalType": "uint256",
371
- "name": "mcrEth",
372
- "type": "uint256"
373
- }
374
- ],
375
- "name": "calculateTokenSpotPrice",
376
- "outputs": [
377
- {
378
- "internalType": "uint256",
379
- "name": "tokenPrice",
380
- "type": "uint256"
381
- }
382
- ],
383
- "stateMutability": "pure",
384
- "type": "function"
385
- },
386
189
  {
387
190
  "inputs": [],
388
191
  "name": "changeDependentContractAddress",
@@ -514,28 +317,15 @@
514
317
  "inputs": [
515
318
  {
516
319
  "internalType": "uint256",
517
- "name": "nxmAmount",
518
- "type": "uint256"
519
- }
520
- ],
521
- "name": "getEthForNXM",
522
- "outputs": [
523
- {
524
- "internalType": "uint256",
525
- "name": "ethAmount",
320
+ "name": "assetId",
526
321
  "type": "uint256"
527
322
  }
528
323
  ],
529
- "stateMutability": "view",
530
- "type": "function"
531
- },
532
- {
533
- "inputs": [],
534
- "name": "getMCRRatio",
324
+ "name": "getInternalTokenPriceInAsset",
535
325
  "outputs": [
536
326
  {
537
327
  "internalType": "uint256",
538
- "name": "",
328
+ "name": "tokenPrice",
539
329
  "type": "uint256"
540
330
  }
541
331
  ],
@@ -546,24 +336,24 @@
546
336
  "inputs": [
547
337
  {
548
338
  "internalType": "uint256",
549
- "name": "ethAmount",
339
+ "name": "assetId",
550
340
  "type": "uint256"
551
341
  }
552
342
  ],
553
- "name": "getNXMForEth",
343
+ "name": "getInternalTokenPriceInAssetAndUpdateTwap",
554
344
  "outputs": [
555
345
  {
556
346
  "internalType": "uint256",
557
- "name": "",
347
+ "name": "tokenPrice",
558
348
  "type": "uint256"
559
349
  }
560
350
  ],
561
- "stateMutability": "view",
351
+ "stateMutability": "nonpayable",
562
352
  "type": "function"
563
353
  },
564
354
  {
565
355
  "inputs": [],
566
- "name": "getPoolValueInEth",
356
+ "name": "getMCRRatio",
567
357
  "outputs": [
568
358
  {
569
359
  "internalType": "uint256",
@@ -576,11 +366,11 @@
576
366
  },
577
367
  {
578
368
  "inputs": [],
579
- "name": "getTokenPrice",
369
+ "name": "getPoolValueInEth",
580
370
  "outputs": [
581
371
  {
582
372
  "internalType": "uint256",
583
- "name": "tokenPrice",
373
+ "name": "",
584
374
  "type": "uint256"
585
375
  }
586
376
  ],
@@ -588,14 +378,8 @@
588
378
  "type": "function"
589
379
  },
590
380
  {
591
- "inputs": [
592
- {
593
- "internalType": "uint256",
594
- "name": "assetId",
595
- "type": "uint256"
596
- }
597
- ],
598
- "name": "getTokenPriceInAsset",
381
+ "inputs": [],
382
+ "name": "getTokenPrice",
599
383
  "outputs": [
600
384
  {
601
385
  "internalType": "uint256",
@@ -667,37 +451,18 @@
667
451
  {
668
452
  "inputs": [
669
453
  {
670
- "internalType": "uint256",
671
- "name": "tokenAmount",
672
- "type": "uint256"
454
+ "internalType": "address",
455
+ "name": "member",
456
+ "type": "address"
673
457
  },
674
- {
675
- "internalType": "uint256",
676
- "name": "minEthOut",
677
- "type": "uint256"
678
- }
679
- ],
680
- "name": "sellNXM",
681
- "outputs": [],
682
- "stateMutability": "nonpayable",
683
- "type": "function"
684
- },
685
- {
686
- "inputs": [
687
458
  {
688
459
  "internalType": "uint256",
689
460
  "name": "amount",
690
461
  "type": "uint256"
691
462
  }
692
463
  ],
693
- "name": "sellNXMTokens",
694
- "outputs": [
695
- {
696
- "internalType": "bool",
697
- "name": "success",
698
- "type": "bool"
699
- }
700
- ],
464
+ "name": "sendEth",
465
+ "outputs": [],
701
466
  "stateMutability": "nonpayable",
702
467
  "type": "function"
703
468
  },
@@ -717,6 +482,11 @@
717
482
  "internalType": "uint256",
718
483
  "name": "amount",
719
484
  "type": "uint256"
485
+ },
486
+ {
487
+ "internalType": "uint256",
488
+ "name": "ethDepositAmount",
489
+ "type": "uint256"
720
490
  }
721
491
  ],
722
492
  "name": "sendPayout",