@exodus/ethereum-lib 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,11 +1,8 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-lib",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Ethereum Library",
5
- "main": "lib/index.js",
6
- "files": [
7
- "lib"
8
- ],
5
+ "main": "src/index.js",
9
6
  "author": "Exodus Movement, Inc.",
10
7
  "license": "UNLICENSED",
11
8
  "homepage": "https://github.com/ExodusMovement/ethereum#readme",
@@ -22,5 +19,5 @@
22
19
  "devDependencies": {
23
20
  "@exodus/assets": "8.0.x"
24
21
  },
25
- "gitHead": "4deb44ad3f254f99315cbc777ac758f7f443c821"
22
+ "gitHead": "b7129925fcc84bb95f5206150e17c4f27d48931f"
26
23
  }
@@ -0,0 +1,609 @@
1
+ export default [
2
+ {
3
+ constant: true,
4
+ inputs: [],
5
+ name: 'name',
6
+ outputs: [{ name: '', type: 'string' }],
7
+ payable: false,
8
+ stateMutability: 'view',
9
+ type: 'function',
10
+ },
11
+ {
12
+ constant: false,
13
+ inputs: [
14
+ { name: 'spender', type: 'address' },
15
+ { name: 'amount', type: 'uint256' },
16
+ ],
17
+ name: 'approve',
18
+ outputs: [{ name: '', type: 'bool' }],
19
+ payable: false,
20
+ stateMutability: 'nonpayable',
21
+ type: 'function',
22
+ },
23
+ {
24
+ constant: false,
25
+ inputs: [{ name: 'repayAmount', type: 'uint256' }],
26
+ name: 'repayBorrow',
27
+ outputs: [{ name: '', type: 'uint256' }],
28
+ payable: false,
29
+ stateMutability: 'nonpayable',
30
+ type: 'function',
31
+ },
32
+ {
33
+ constant: true,
34
+ inputs: [],
35
+ name: 'reserveFactorMantissa',
36
+ outputs: [{ name: '', type: 'uint256' }],
37
+ payable: false,
38
+ stateMutability: 'view',
39
+ type: 'function',
40
+ },
41
+ {
42
+ constant: false,
43
+ inputs: [{ name: 'account', type: 'address' }],
44
+ name: 'borrowBalanceCurrent',
45
+ outputs: [{ name: '', type: 'uint256' }],
46
+ payable: false,
47
+ stateMutability: 'nonpayable',
48
+ type: 'function',
49
+ },
50
+ {
51
+ constant: true,
52
+ inputs: [],
53
+ name: 'totalSupply',
54
+ outputs: [{ name: '', type: 'uint256' }],
55
+ payable: false,
56
+ stateMutability: 'view',
57
+ type: 'function',
58
+ },
59
+ {
60
+ constant: true,
61
+ inputs: [],
62
+ name: 'exchangeRateStored',
63
+ outputs: [{ name: '', type: 'uint256' }],
64
+ payable: false,
65
+ stateMutability: 'view',
66
+ type: 'function',
67
+ },
68
+ {
69
+ constant: false,
70
+ inputs: [
71
+ { name: 'src', type: 'address' },
72
+ { name: 'dst', type: 'address' },
73
+ { name: 'amount', type: 'uint256' },
74
+ ],
75
+ name: 'transferFrom',
76
+ outputs: [{ name: '', type: 'bool' }],
77
+ payable: false,
78
+ stateMutability: 'nonpayable',
79
+ type: 'function',
80
+ },
81
+ {
82
+ constant: false,
83
+ inputs: [
84
+ { name: 'borrower', type: 'address' },
85
+ { name: 'repayAmount', type: 'uint256' },
86
+ ],
87
+ name: 'repayBorrowBehalf',
88
+ outputs: [{ name: '', type: 'uint256' }],
89
+ payable: false,
90
+ stateMutability: 'nonpayable',
91
+ type: 'function',
92
+ },
93
+ {
94
+ constant: true,
95
+ inputs: [],
96
+ name: 'pendingAdmin',
97
+ outputs: [{ name: '', type: 'address' }],
98
+ payable: false,
99
+ stateMutability: 'view',
100
+ type: 'function',
101
+ },
102
+ {
103
+ constant: true,
104
+ inputs: [],
105
+ name: 'decimals',
106
+ outputs: [{ name: '', type: 'uint256' }],
107
+ payable: false,
108
+ stateMutability: 'view',
109
+ type: 'function',
110
+ },
111
+ {
112
+ constant: false,
113
+ inputs: [{ name: 'owner', type: 'address' }],
114
+ name: 'balanceOfUnderlying',
115
+ outputs: [{ name: '', type: 'uint256' }],
116
+ payable: false,
117
+ stateMutability: 'nonpayable',
118
+ type: 'function',
119
+ },
120
+ {
121
+ constant: true,
122
+ inputs: [],
123
+ name: 'getCash',
124
+ outputs: [{ name: '', type: 'uint256' }],
125
+ payable: false,
126
+ stateMutability: 'view',
127
+ type: 'function',
128
+ },
129
+ {
130
+ constant: false,
131
+ inputs: [{ name: 'newComptroller', type: 'address' }],
132
+ name: '_setComptroller',
133
+ outputs: [{ name: '', type: 'uint256' }],
134
+ payable: false,
135
+ stateMutability: 'nonpayable',
136
+ type: 'function',
137
+ },
138
+ {
139
+ constant: true,
140
+ inputs: [],
141
+ name: 'totalBorrows',
142
+ outputs: [{ name: '', type: 'uint256' }],
143
+ payable: false,
144
+ stateMutability: 'view',
145
+ type: 'function',
146
+ },
147
+ {
148
+ constant: true,
149
+ inputs: [],
150
+ name: 'comptroller',
151
+ outputs: [{ name: '', type: 'address' }],
152
+ payable: false,
153
+ stateMutability: 'view',
154
+ type: 'function',
155
+ },
156
+ {
157
+ constant: false,
158
+ inputs: [{ name: 'reduceAmount', type: 'uint256' }],
159
+ name: '_reduceReserves',
160
+ outputs: [{ name: '', type: 'uint256' }],
161
+ payable: false,
162
+ stateMutability: 'nonpayable',
163
+ type: 'function',
164
+ },
165
+ {
166
+ constant: true,
167
+ inputs: [],
168
+ name: 'initialExchangeRateMantissa',
169
+ outputs: [{ name: '', type: 'uint256' }],
170
+ payable: false,
171
+ stateMutability: 'view',
172
+ type: 'function',
173
+ },
174
+ {
175
+ constant: true,
176
+ inputs: [],
177
+ name: 'accrualBlockNumber',
178
+ outputs: [{ name: '', type: 'uint256' }],
179
+ payable: false,
180
+ stateMutability: 'view',
181
+ type: 'function',
182
+ },
183
+ {
184
+ constant: true,
185
+ inputs: [],
186
+ name: 'underlying',
187
+ outputs: [{ name: '', type: 'address' }],
188
+ payable: false,
189
+ stateMutability: 'view',
190
+ type: 'function',
191
+ },
192
+ {
193
+ constant: true,
194
+ inputs: [{ name: 'owner', type: 'address' }],
195
+ name: 'balanceOf',
196
+ outputs: [{ name: '', type: 'uint256' }],
197
+ payable: false,
198
+ stateMutability: 'view',
199
+ type: 'function',
200
+ },
201
+ {
202
+ constant: false,
203
+ inputs: [],
204
+ name: 'totalBorrowsCurrent',
205
+ outputs: [{ name: '', type: 'uint256' }],
206
+ payable: false,
207
+ stateMutability: 'nonpayable',
208
+ type: 'function',
209
+ },
210
+ {
211
+ constant: false,
212
+ inputs: [{ name: 'redeemAmount', type: 'uint256' }],
213
+ name: 'redeemUnderlying',
214
+ outputs: [{ name: '', type: 'uint256' }],
215
+ payable: false,
216
+ stateMutability: 'nonpayable',
217
+ type: 'function',
218
+ },
219
+ {
220
+ constant: true,
221
+ inputs: [],
222
+ name: 'totalReserves',
223
+ outputs: [{ name: '', type: 'uint256' }],
224
+ payable: false,
225
+ stateMutability: 'view',
226
+ type: 'function',
227
+ },
228
+ {
229
+ constant: true,
230
+ inputs: [],
231
+ name: 'symbol',
232
+ outputs: [{ name: '', type: 'string' }],
233
+ payable: false,
234
+ stateMutability: 'view',
235
+ type: 'function',
236
+ },
237
+ {
238
+ constant: true,
239
+ inputs: [{ name: 'account', type: 'address' }],
240
+ name: 'borrowBalanceStored',
241
+ outputs: [{ name: '', type: 'uint256' }],
242
+ payable: false,
243
+ stateMutability: 'view',
244
+ type: 'function',
245
+ },
246
+ {
247
+ constant: false,
248
+ inputs: [{ name: 'mintAmount', type: 'uint256' }],
249
+ name: 'mint',
250
+ outputs: [{ name: '', type: 'uint256' }],
251
+ payable: false,
252
+ stateMutability: 'nonpayable',
253
+ type: 'function',
254
+ },
255
+ {
256
+ constant: false,
257
+ inputs: [],
258
+ name: 'accrueInterest',
259
+ outputs: [{ name: '', type: 'uint256' }],
260
+ payable: false,
261
+ stateMutability: 'nonpayable',
262
+ type: 'function',
263
+ },
264
+ {
265
+ constant: false,
266
+ inputs: [
267
+ { name: 'dst', type: 'address' },
268
+ { name: 'amount', type: 'uint256' },
269
+ ],
270
+ name: 'transfer',
271
+ outputs: [{ name: '', type: 'bool' }],
272
+ payable: false,
273
+ stateMutability: 'nonpayable',
274
+ type: 'function',
275
+ },
276
+ {
277
+ constant: true,
278
+ inputs: [],
279
+ name: 'borrowIndex',
280
+ outputs: [{ name: '', type: 'uint256' }],
281
+ payable: false,
282
+ stateMutability: 'view',
283
+ type: 'function',
284
+ },
285
+ {
286
+ constant: true,
287
+ inputs: [],
288
+ name: 'supplyRatePerBlock',
289
+ outputs: [{ name: '', type: 'uint256' }],
290
+ payable: false,
291
+ stateMutability: 'view',
292
+ type: 'function',
293
+ },
294
+ {
295
+ constant: false,
296
+ inputs: [
297
+ { name: 'liquidator', type: 'address' },
298
+ { name: 'borrower', type: 'address' },
299
+ { name: 'seizeTokens', type: 'uint256' },
300
+ ],
301
+ name: 'seize',
302
+ outputs: [{ name: '', type: 'uint256' }],
303
+ payable: false,
304
+ stateMutability: 'nonpayable',
305
+ type: 'function',
306
+ },
307
+ {
308
+ constant: false,
309
+ inputs: [{ name: 'newPendingAdmin', type: 'address' }],
310
+ name: '_setPendingAdmin',
311
+ outputs: [{ name: '', type: 'uint256' }],
312
+ payable: false,
313
+ stateMutability: 'nonpayable',
314
+ type: 'function',
315
+ },
316
+ {
317
+ constant: false,
318
+ inputs: [],
319
+ name: 'exchangeRateCurrent',
320
+ outputs: [{ name: '', type: 'uint256' }],
321
+ payable: false,
322
+ stateMutability: 'nonpayable',
323
+ type: 'function',
324
+ },
325
+ {
326
+ constant: true,
327
+ inputs: [{ name: 'account', type: 'address' }],
328
+ name: 'getAccountSnapshot',
329
+ outputs: [
330
+ { name: '', type: 'uint256' },
331
+ { name: '', type: 'uint256' },
332
+ { name: '', type: 'uint256' },
333
+ { name: '', type: 'uint256' },
334
+ ],
335
+ payable: false,
336
+ stateMutability: 'view',
337
+ type: 'function',
338
+ },
339
+ {
340
+ constant: false,
341
+ inputs: [{ name: 'borrowAmount', type: 'uint256' }],
342
+ name: 'borrow',
343
+ outputs: [{ name: '', type: 'uint256' }],
344
+ payable: false,
345
+ stateMutability: 'nonpayable',
346
+ type: 'function',
347
+ },
348
+ {
349
+ constant: false,
350
+ inputs: [{ name: 'redeemTokens', type: 'uint256' }],
351
+ name: 'redeem',
352
+ outputs: [{ name: '', type: 'uint256' }],
353
+ payable: false,
354
+ stateMutability: 'nonpayable',
355
+ type: 'function',
356
+ },
357
+ {
358
+ constant: true,
359
+ inputs: [
360
+ { name: 'owner', type: 'address' },
361
+ { name: 'spender', type: 'address' },
362
+ ],
363
+ name: 'allowance',
364
+ outputs: [{ name: '', type: 'uint256' }],
365
+ payable: false,
366
+ stateMutability: 'view',
367
+ type: 'function',
368
+ },
369
+ {
370
+ constant: false,
371
+ inputs: [],
372
+ name: '_acceptAdmin',
373
+ outputs: [{ name: '', type: 'uint256' }],
374
+ payable: false,
375
+ stateMutability: 'nonpayable',
376
+ type: 'function',
377
+ },
378
+ {
379
+ constant: false,
380
+ inputs: [{ name: 'newInterestRateModel', type: 'address' }],
381
+ name: '_setInterestRateModel',
382
+ outputs: [{ name: '', type: 'uint256' }],
383
+ payable: false,
384
+ stateMutability: 'nonpayable',
385
+ type: 'function',
386
+ },
387
+ {
388
+ constant: true,
389
+ inputs: [],
390
+ name: 'interestRateModel',
391
+ outputs: [{ name: '', type: 'address' }],
392
+ payable: false,
393
+ stateMutability: 'view',
394
+ type: 'function',
395
+ },
396
+ {
397
+ constant: false,
398
+ inputs: [
399
+ { name: 'borrower', type: 'address' },
400
+ { name: 'repayAmount', type: 'uint256' },
401
+ { name: 'cTokenCollateral', type: 'address' },
402
+ ],
403
+ name: 'liquidateBorrow',
404
+ outputs: [{ name: '', type: 'uint256' }],
405
+ payable: false,
406
+ stateMutability: 'nonpayable',
407
+ type: 'function',
408
+ },
409
+ {
410
+ constant: true,
411
+ inputs: [],
412
+ name: 'admin',
413
+ outputs: [{ name: '', type: 'address' }],
414
+ payable: false,
415
+ stateMutability: 'view',
416
+ type: 'function',
417
+ },
418
+ {
419
+ constant: true,
420
+ inputs: [],
421
+ name: 'borrowRatePerBlock',
422
+ outputs: [{ name: '', type: 'uint256' }],
423
+ payable: false,
424
+ stateMutability: 'view',
425
+ type: 'function',
426
+ },
427
+ {
428
+ constant: false,
429
+ inputs: [{ name: 'newReserveFactorMantissa', type: 'uint256' }],
430
+ name: '_setReserveFactor',
431
+ outputs: [{ name: '', type: 'uint256' }],
432
+ payable: false,
433
+ stateMutability: 'nonpayable',
434
+ type: 'function',
435
+ },
436
+ {
437
+ constant: true,
438
+ inputs: [],
439
+ name: 'isCToken',
440
+ outputs: [{ name: '', type: 'bool' }],
441
+ payable: false,
442
+ stateMutability: 'view',
443
+ type: 'function',
444
+ },
445
+ {
446
+ inputs: [
447
+ { name: 'underlying_', type: 'address' },
448
+ { name: 'comptroller_', type: 'address' },
449
+ { name: 'interestRateModel_', type: 'address' },
450
+ { name: 'initialExchangeRateMantissa_', type: 'uint256' },
451
+ { name: 'name_', type: 'string' },
452
+ { name: 'symbol_', type: 'string' },
453
+ { name: 'decimals_', type: 'uint256' },
454
+ ],
455
+ payable: false,
456
+ stateMutability: 'nonpayable',
457
+ type: 'constructor',
458
+ },
459
+ {
460
+ anonymous: false,
461
+ inputs: [
462
+ { indexed: false, name: 'interestAccumulated', type: 'uint256' },
463
+ { indexed: false, name: 'borrowIndex', type: 'uint256' },
464
+ { indexed: false, name: 'totalBorrows', type: 'uint256' },
465
+ ],
466
+ name: 'AccrueInterest',
467
+ type: 'event',
468
+ },
469
+ {
470
+ anonymous: false,
471
+ inputs: [
472
+ { indexed: false, name: 'minter', type: 'address' },
473
+ { indexed: false, name: 'mintAmount', type: 'uint256' },
474
+ { indexed: false, name: 'mintTokens', type: 'uint256' },
475
+ ],
476
+ name: 'Mint',
477
+ type: 'event',
478
+ },
479
+ {
480
+ anonymous: false,
481
+ inputs: [
482
+ { indexed: false, name: 'redeemer', type: 'address' },
483
+ { indexed: false, name: 'redeemAmount', type: 'uint256' },
484
+ { indexed: false, name: 'redeemTokens', type: 'uint256' },
485
+ ],
486
+ name: 'Redeem',
487
+ type: 'event',
488
+ },
489
+ {
490
+ anonymous: false,
491
+ inputs: [
492
+ { indexed: false, name: 'borrower', type: 'address' },
493
+ { indexed: false, name: 'borrowAmount', type: 'uint256' },
494
+ { indexed: false, name: 'accountBorrows', type: 'uint256' },
495
+ { indexed: false, name: 'totalBorrows', type: 'uint256' },
496
+ ],
497
+ name: 'Borrow',
498
+ type: 'event',
499
+ },
500
+ {
501
+ anonymous: false,
502
+ inputs: [
503
+ { indexed: false, name: 'payer', type: 'address' },
504
+ { indexed: false, name: 'borrower', type: 'address' },
505
+ { indexed: false, name: 'repayAmount', type: 'uint256' },
506
+ { indexed: false, name: 'accountBorrows', type: 'uint256' },
507
+ { indexed: false, name: 'totalBorrows', type: 'uint256' },
508
+ ],
509
+ name: 'RepayBorrow',
510
+ type: 'event',
511
+ },
512
+ {
513
+ anonymous: false,
514
+ inputs: [
515
+ { indexed: false, name: 'liquidator', type: 'address' },
516
+ { indexed: false, name: 'borrower', type: 'address' },
517
+ { indexed: false, name: 'repayAmount', type: 'uint256' },
518
+ { indexed: false, name: 'cTokenCollateral', type: 'address' },
519
+ { indexed: false, name: 'seizeTokens', type: 'uint256' },
520
+ ],
521
+ name: 'LiquidateBorrow',
522
+ type: 'event',
523
+ },
524
+ {
525
+ anonymous: false,
526
+ inputs: [
527
+ { indexed: false, name: 'oldPendingAdmin', type: 'address' },
528
+ { indexed: false, name: 'newPendingAdmin', type: 'address' },
529
+ ],
530
+ name: 'NewPendingAdmin',
531
+ type: 'event',
532
+ },
533
+ {
534
+ anonymous: false,
535
+ inputs: [
536
+ { indexed: false, name: 'oldAdmin', type: 'address' },
537
+ { indexed: false, name: 'newAdmin', type: 'address' },
538
+ ],
539
+ name: 'NewAdmin',
540
+ type: 'event',
541
+ },
542
+ {
543
+ anonymous: false,
544
+ inputs: [
545
+ { indexed: false, name: 'oldComptroller', type: 'address' },
546
+ { indexed: false, name: 'newComptroller', type: 'address' },
547
+ ],
548
+ name: 'NewComptroller',
549
+ type: 'event',
550
+ },
551
+ {
552
+ anonymous: false,
553
+ inputs: [
554
+ { indexed: false, name: 'oldInterestRateModel', type: 'address' },
555
+ { indexed: false, name: 'newInterestRateModel', type: 'address' },
556
+ ],
557
+ name: 'NewMarketInterestRateModel',
558
+ type: 'event',
559
+ },
560
+ {
561
+ anonymous: false,
562
+ inputs: [
563
+ { indexed: false, name: 'oldReserveFactorMantissa', type: 'uint256' },
564
+ { indexed: false, name: 'newReserveFactorMantissa', type: 'uint256' },
565
+ ],
566
+ name: 'NewReserveFactor',
567
+ type: 'event',
568
+ },
569
+ {
570
+ anonymous: false,
571
+ inputs: [
572
+ { indexed: false, name: 'admin', type: 'address' },
573
+ { indexed: false, name: 'reduceAmount', type: 'uint256' },
574
+ { indexed: false, name: 'newTotalReserves', type: 'uint256' },
575
+ ],
576
+ name: 'ReservesReduced',
577
+ type: 'event',
578
+ },
579
+ {
580
+ anonymous: false,
581
+ inputs: [
582
+ { indexed: false, name: 'error', type: 'uint256' },
583
+ { indexed: false, name: 'info', type: 'uint256' },
584
+ { indexed: false, name: 'detail', type: 'uint256' },
585
+ ],
586
+ name: 'Failure',
587
+ type: 'event',
588
+ },
589
+ {
590
+ anonymous: false,
591
+ inputs: [
592
+ { indexed: true, name: 'from', type: 'address' },
593
+ { indexed: true, name: 'to', type: 'address' },
594
+ { indexed: false, name: 'amount', type: 'uint256' },
595
+ ],
596
+ name: 'Transfer',
597
+ type: 'event',
598
+ },
599
+ {
600
+ anonymous: false,
601
+ inputs: [
602
+ { indexed: true, name: 'owner', type: 'address' },
603
+ { indexed: true, name: 'spender', type: 'address' },
604
+ { indexed: false, name: 'amount', type: 'uint256' },
605
+ ],
606
+ name: 'Approval',
607
+ type: 'event',
608
+ },
609
+ ]