@aurigami/sdk 0.1.1 → 0.1.5

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.
@@ -4,10 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6
6
 
7
- var sdkCore = require('@pendle/sdk-core');
8
- var IERC20 = _interopDefault(require('@aurigami/contracts/artifacts/contracts/EIP20Interface.sol/EIP20Interface.json'));
7
+ var BigNumber = _interopDefault(require('bignumber.js'));
9
8
  var ethers$2 = require('ethers');
10
- var AuToken = _interopDefault(require('@aurigami/contracts/artifacts/contracts/AuToken.sol/AuToken.json'));
11
9
 
12
10
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
13
11
  try {
@@ -849,43 +847,61 @@ var BlockchainEntity = /*#__PURE__*/function () {
849
847
  return BlockchainEntity;
850
848
  }();
851
849
 
852
- var dummyToken = /*#__PURE__*/new sdkCore.Token({
853
- chainId: 43114,
854
- decimal: 6,
855
- symbol: 'USDC',
856
- address: '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e'
857
- });
858
- var dummyPly = /*#__PURE__*/new sdkCore.Token({
859
- chainId: 43114,
860
- decimal: 18,
861
- symbol: 'QI',
862
- address: '0x8729438eb15e2c8b576fcc6aecda6a148776c0f5'
863
- });
864
- var dummyPlyAurora = /*#__PURE__*/new sdkCore.Token({
865
- chainId: 43114,
866
- decimal: 18,
867
- symbol: 'QIWAVAX',
868
- address: '0xE530dC2095Ef5653205CF5ea79F8979a7028065c'
869
- });
870
- var dummyTokenAmount = /*#__PURE__*/new sdkCore.CurrencyAmount({
871
- currency: dummyToken,
872
- amount: '123.456',
873
- isRaw: false
874
- });
875
- var dummyZeroTokenAmount = /*#__PURE__*/new sdkCore.CurrencyAmount({
876
- currency: dummyToken,
877
- amount: '0'
878
- });
879
- var dummyTokenAmount2 = /*#__PURE__*/new sdkCore.CurrencyAmount({
880
- currency: dummyToken,
881
- amount: '456.123',
882
- isRaw: false
883
- });
884
- var dummyTokenAmount3 = /*#__PURE__*/new sdkCore.CurrencyAmount({
885
- currency: dummyToken,
886
- amount: '1000.123',
887
- isRaw: false
888
- });
850
+ var Token = function Token(address, decimals, expiry) {
851
+ this.address = address.toLowerCase();
852
+ this.decimals = decimals;
853
+ this.expiry = expiry;
854
+ };
855
+
856
+ function formatObject(object) {
857
+ return JSON.stringify(object, null, ' ');
858
+ }
859
+ var decimalFactor = function decimalFactor(decimal) {
860
+ return ethers$2.BigNumber.from(10).pow(decimal).toString();
861
+ };
862
+ function validateAndParseAddress(address) {
863
+ try {
864
+ return ethers$2.utils.getAddress(address);
865
+ } catch (error) {
866
+ throw new Error("Invalid address " + address);
867
+ }
868
+ }
869
+
870
+ var TokenAmount = /*#__PURE__*/function () {
871
+ function TokenAmount(token, amount, isRaw) {
872
+ if (isRaw === void 0) {
873
+ isRaw = true;
874
+ }
875
+
876
+ if (isRaw) {
877
+ this.rawAmnt = amount;
878
+ } else {
879
+ this.rawAmnt = new BigNumber(amount).times(decimalFactor(token.decimals)).toFixed(0);
880
+ }
881
+
882
+ this.token = token;
883
+ }
884
+
885
+ var _proto = TokenAmount.prototype;
886
+
887
+ _proto.formattedAmount = function formattedAmount() {
888
+ return new BigNumber(this.rawAmnt).div(decimalFactor(this.token.decimals)).toString();
889
+ };
890
+
891
+ _proto.rawAmount = function rawAmount() {
892
+ return this.rawAmnt;
893
+ };
894
+
895
+ return TokenAmount;
896
+ }();
897
+
898
+ var dummyToken = /*#__PURE__*/new Token('0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e', 6);
899
+ var dummyPly = /*#__PURE__*/new Token('0x8729438eb15e2c8b576fcc6aecda6a148776c0f5', 18);
900
+ var dummyPlyAurora = /*#__PURE__*/new Token('0xE530dC2095Ef5653205CF5ea79F8979a7028065c', 18);
901
+ var dummyTokenAmount = /*#__PURE__*/new TokenAmount(dummyToken, '123.456', false);
902
+ var dummyZeroTokenAmount = /*#__PURE__*/new TokenAmount(dummyToken, '0');
903
+ var dummyTokenAmount2 = /*#__PURE__*/new TokenAmount(dummyToken, '456.123', false);
904
+ var dummyTokenAmount3 = /*#__PURE__*/new TokenAmount(dummyToken, '1000.123', false);
889
905
  var dummyMarketAddress = '0xbeb5d47a3f720ec0a390d04b4d41ed7d9688bc7f';
890
906
  var dummyUserMarketDetails = {
891
907
  market: dummyMarketAddress,
@@ -897,12 +913,7 @@ var dummyUserMarketDetails = {
897
913
 
898
914
  var ethers = /*#__PURE__*/require('ethers');
899
915
 
900
- var DOLLAR = /*#__PURE__*/new sdkCore.Token({
901
- chainId: 43114,
902
- decimal: 2,
903
- symbol: 'USDC',
904
- address: '0x0000000000000000000000000000000000000001'
905
- });
916
+ var DOLLAR = /*#__PURE__*/new Token('0x0000000000000000000000000000000000000001', 2);
906
917
  var AVAX_DEFAULT_PROVIDER_URL = 'https://api.avax.network/ext/bc/C/rpc';
907
918
  var AVAX_DEFAULT_PROVIDER = /*#__PURE__*/new ethers.providers.JsonRpcProvider(AVAX_DEFAULT_PROVIDER_URL);
908
919
  var dummyPrivateKey = '1111111111111111111111111111111111111111111111111111111111111111';
@@ -955,16 +966,8 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
955
966
  return _context2.abrupt("return", {
956
967
  markets: [dummyUserMarketDetails],
957
968
  borrowLimit: dummyTokenAmount3,
958
- accruedPly: new sdkCore.CurrencyAmount({
959
- currency: dummyPly,
960
- amount: '100.12',
961
- isRaw: false
962
- }),
963
- lockedPly: new sdkCore.CurrencyAmount({
964
- currency: dummyPly,
965
- amount: '200.12',
966
- isRaw: false
967
- }),
969
+ accruedPly: new TokenAmount(dummyPly, '100.12', false),
970
+ lockedPly: new TokenAmount(dummyPly, '200.12', false),
968
971
  borrowableAmount: dummyTokenAmount2
969
972
  });
970
973
 
@@ -990,11 +993,7 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
990
993
  switch (_context3.prev = _context3.next) {
991
994
  case 0:
992
995
  return _context3.abrupt("return", {
993
- totalStakedLiquidity: new sdkCore.CurrencyAmount({
994
- currency: dummyPlyAurora,
995
- amount: '12.1',
996
- isRaw: false
997
- }),
996
+ totalStakedLiquidity: new TokenAmount(dummyPlyAurora, '12.1', false),
998
997
  apy: 1.21
999
998
  });
1000
999
 
@@ -1024,18 +1023,10 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
1024
1023
  break;
1025
1024
  }
1026
1025
 
1027
- return _context4.abrupt("return", new sdkCore.CurrencyAmount({
1028
- currency: DOLLAR,
1029
- amount: '1',
1030
- isRaw: false
1031
- }));
1026
+ return _context4.abrupt("return", new TokenAmount(DOLLAR, '1', false));
1032
1027
 
1033
1028
  case 2:
1034
- return _context4.abrupt("return", new sdkCore.CurrencyAmount({
1035
- currency: DOLLAR,
1036
- amount: '12.1',
1037
- isRaw: false
1038
- }));
1029
+ return _context4.abrupt("return", new TokenAmount(DOLLAR, '12.1', false));
1039
1030
 
1040
1031
  case 3:
1041
1032
  case "end":
@@ -1058,11 +1049,7 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
1058
1049
  while (1) {
1059
1050
  switch (_context5.prev = _context5.next) {
1060
1051
  case 0:
1061
- return _context5.abrupt("return", new sdkCore.CurrencyAmount({
1062
- currency: dummyPlyAurora,
1063
- amount: '103.4',
1064
- isRaw: false
1065
- }));
1052
+ return _context5.abrupt("return", new TokenAmount(dummyPlyAurora, '103.4', false));
1066
1053
 
1067
1054
  case 1:
1068
1055
  case "end":
@@ -1089,19 +1076,13 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
1089
1076
 
1090
1077
  _this = _SdkRead.apply(this, arguments) || this;
1091
1078
  _this.dummyTransaction = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6() {
1092
- var dummyErc20Token;
1093
1079
  return runtime_1.wrap(function _callee6$(_context6) {
1094
1080
  while (1) {
1095
1081
  switch (_context6.prev = _context6.next) {
1096
1082
  case 0:
1097
- dummyErc20Token = new ethers$2.Contract(dummyToken.address, IERC20.abi, _this._providerOrSigner);
1098
- _context6.next = 3;
1099
- return dummyErc20Token.approve(dummyToken.address, 123);
1100
-
1101
- case 3:
1102
- return _context6.abrupt("return", _context6.sent);
1083
+ return _context6.abrupt("return", {});
1103
1084
 
1104
- case 4:
1085
+ case 1:
1105
1086
  case "end":
1106
1087
  return _context6.stop();
1107
1088
  }
@@ -1204,6 +1185,1571 @@ var SDK = /*#__PURE__*/function (_BlockchainEntity) {
1204
1185
  return SDK;
1205
1186
  }(BlockchainEntity);
1206
1187
 
1188
+ var abi = [
1189
+ {
1190
+ inputs: [
1191
+ {
1192
+ internalType: "address",
1193
+ name: "underlying_",
1194
+ type: "address"
1195
+ },
1196
+ {
1197
+ internalType: "contract ComptrollerInterface",
1198
+ name: "comptroller_",
1199
+ type: "address"
1200
+ },
1201
+ {
1202
+ internalType: "contract InterestRateModel",
1203
+ name: "interestRateModel_",
1204
+ type: "address"
1205
+ },
1206
+ {
1207
+ internalType: "uint256",
1208
+ name: "initialExchangeRateMantissa_",
1209
+ type: "uint256"
1210
+ },
1211
+ {
1212
+ internalType: "string",
1213
+ name: "name_",
1214
+ type: "string"
1215
+ },
1216
+ {
1217
+ internalType: "string",
1218
+ name: "symbol_",
1219
+ type: "string"
1220
+ },
1221
+ {
1222
+ internalType: "uint8",
1223
+ name: "decimals_",
1224
+ type: "uint8"
1225
+ },
1226
+ {
1227
+ internalType: "address payable",
1228
+ name: "admin_",
1229
+ type: "address"
1230
+ },
1231
+ {
1232
+ internalType: "address",
1233
+ name: "implementation_",
1234
+ type: "address"
1235
+ },
1236
+ {
1237
+ internalType: "bytes",
1238
+ name: "becomeImplementationData",
1239
+ type: "bytes"
1240
+ }
1241
+ ],
1242
+ payable: false,
1243
+ stateMutability: "nonpayable",
1244
+ type: "constructor"
1245
+ },
1246
+ {
1247
+ anonymous: false,
1248
+ inputs: [
1249
+ {
1250
+ indexed: false,
1251
+ internalType: "uint256",
1252
+ name: "cashPrior",
1253
+ type: "uint256"
1254
+ },
1255
+ {
1256
+ indexed: false,
1257
+ internalType: "uint256",
1258
+ name: "interestAccumulated",
1259
+ type: "uint256"
1260
+ },
1261
+ {
1262
+ indexed: false,
1263
+ internalType: "uint256",
1264
+ name: "borrowIndex",
1265
+ type: "uint256"
1266
+ },
1267
+ {
1268
+ indexed: false,
1269
+ internalType: "uint256",
1270
+ name: "totalBorrows",
1271
+ type: "uint256"
1272
+ }
1273
+ ],
1274
+ name: "AccrueInterest",
1275
+ type: "event"
1276
+ },
1277
+ {
1278
+ anonymous: false,
1279
+ inputs: [
1280
+ {
1281
+ indexed: true,
1282
+ internalType: "address",
1283
+ name: "owner",
1284
+ type: "address"
1285
+ },
1286
+ {
1287
+ indexed: true,
1288
+ internalType: "address",
1289
+ name: "spender",
1290
+ type: "address"
1291
+ },
1292
+ {
1293
+ indexed: false,
1294
+ internalType: "uint256",
1295
+ name: "amount",
1296
+ type: "uint256"
1297
+ }
1298
+ ],
1299
+ name: "Approval",
1300
+ type: "event"
1301
+ },
1302
+ {
1303
+ anonymous: false,
1304
+ inputs: [
1305
+ {
1306
+ indexed: false,
1307
+ internalType: "address",
1308
+ name: "borrower",
1309
+ type: "address"
1310
+ },
1311
+ {
1312
+ indexed: false,
1313
+ internalType: "uint256",
1314
+ name: "borrowAmount",
1315
+ type: "uint256"
1316
+ },
1317
+ {
1318
+ indexed: false,
1319
+ internalType: "uint256",
1320
+ name: "accountBorrows",
1321
+ type: "uint256"
1322
+ },
1323
+ {
1324
+ indexed: false,
1325
+ internalType: "uint256",
1326
+ name: "totalBorrows",
1327
+ type: "uint256"
1328
+ }
1329
+ ],
1330
+ name: "Borrow",
1331
+ type: "event"
1332
+ },
1333
+ {
1334
+ anonymous: false,
1335
+ inputs: [
1336
+ {
1337
+ indexed: false,
1338
+ internalType: "uint256",
1339
+ name: "error",
1340
+ type: "uint256"
1341
+ },
1342
+ {
1343
+ indexed: false,
1344
+ internalType: "uint256",
1345
+ name: "info",
1346
+ type: "uint256"
1347
+ },
1348
+ {
1349
+ indexed: false,
1350
+ internalType: "uint256",
1351
+ name: "detail",
1352
+ type: "uint256"
1353
+ }
1354
+ ],
1355
+ name: "Failure",
1356
+ type: "event"
1357
+ },
1358
+ {
1359
+ anonymous: false,
1360
+ inputs: [
1361
+ {
1362
+ indexed: false,
1363
+ internalType: "address",
1364
+ name: "liquidator",
1365
+ type: "address"
1366
+ },
1367
+ {
1368
+ indexed: false,
1369
+ internalType: "address",
1370
+ name: "borrower",
1371
+ type: "address"
1372
+ },
1373
+ {
1374
+ indexed: false,
1375
+ internalType: "uint256",
1376
+ name: "repayAmount",
1377
+ type: "uint256"
1378
+ },
1379
+ {
1380
+ indexed: false,
1381
+ internalType: "address",
1382
+ name: "qiTokenCollateral",
1383
+ type: "address"
1384
+ },
1385
+ {
1386
+ indexed: false,
1387
+ internalType: "uint256",
1388
+ name: "seizeTokens",
1389
+ type: "uint256"
1390
+ }
1391
+ ],
1392
+ name: "LiquidateBorrow",
1393
+ type: "event"
1394
+ },
1395
+ {
1396
+ anonymous: false,
1397
+ inputs: [
1398
+ {
1399
+ indexed: false,
1400
+ internalType: "address",
1401
+ name: "minter",
1402
+ type: "address"
1403
+ },
1404
+ {
1405
+ indexed: false,
1406
+ internalType: "uint256",
1407
+ name: "mintAmount",
1408
+ type: "uint256"
1409
+ },
1410
+ {
1411
+ indexed: false,
1412
+ internalType: "uint256",
1413
+ name: "mintTokens",
1414
+ type: "uint256"
1415
+ }
1416
+ ],
1417
+ name: "Mint",
1418
+ type: "event"
1419
+ },
1420
+ {
1421
+ anonymous: false,
1422
+ inputs: [
1423
+ {
1424
+ indexed: false,
1425
+ internalType: "address",
1426
+ name: "oldAdmin",
1427
+ type: "address"
1428
+ },
1429
+ {
1430
+ indexed: false,
1431
+ internalType: "address",
1432
+ name: "newAdmin",
1433
+ type: "address"
1434
+ }
1435
+ ],
1436
+ name: "NewAdmin",
1437
+ type: "event"
1438
+ },
1439
+ {
1440
+ anonymous: false,
1441
+ inputs: [
1442
+ {
1443
+ indexed: false,
1444
+ internalType: "contract ComptrollerInterface",
1445
+ name: "oldComptroller",
1446
+ type: "address"
1447
+ },
1448
+ {
1449
+ indexed: false,
1450
+ internalType: "contract ComptrollerInterface",
1451
+ name: "newComptroller",
1452
+ type: "address"
1453
+ }
1454
+ ],
1455
+ name: "NewComptroller",
1456
+ type: "event"
1457
+ },
1458
+ {
1459
+ anonymous: false,
1460
+ inputs: [
1461
+ {
1462
+ indexed: false,
1463
+ internalType: "address",
1464
+ name: "oldImplementation",
1465
+ type: "address"
1466
+ },
1467
+ {
1468
+ indexed: false,
1469
+ internalType: "address",
1470
+ name: "newImplementation",
1471
+ type: "address"
1472
+ }
1473
+ ],
1474
+ name: "NewImplementation",
1475
+ type: "event"
1476
+ },
1477
+ {
1478
+ anonymous: false,
1479
+ inputs: [
1480
+ {
1481
+ indexed: false,
1482
+ internalType: "contract InterestRateModel",
1483
+ name: "oldInterestRateModel",
1484
+ type: "address"
1485
+ },
1486
+ {
1487
+ indexed: false,
1488
+ internalType: "contract InterestRateModel",
1489
+ name: "newInterestRateModel",
1490
+ type: "address"
1491
+ }
1492
+ ],
1493
+ name: "NewMarketInterestRateModel",
1494
+ type: "event"
1495
+ },
1496
+ {
1497
+ anonymous: false,
1498
+ inputs: [
1499
+ {
1500
+ indexed: false,
1501
+ internalType: "address",
1502
+ name: "oldPendingAdmin",
1503
+ type: "address"
1504
+ },
1505
+ {
1506
+ indexed: false,
1507
+ internalType: "address",
1508
+ name: "newPendingAdmin",
1509
+ type: "address"
1510
+ }
1511
+ ],
1512
+ name: "NewPendingAdmin",
1513
+ type: "event"
1514
+ },
1515
+ {
1516
+ anonymous: false,
1517
+ inputs: [
1518
+ {
1519
+ indexed: false,
1520
+ internalType: "uint256",
1521
+ name: "oldProtocolSeizeShareMantissa",
1522
+ type: "uint256"
1523
+ },
1524
+ {
1525
+ indexed: false,
1526
+ internalType: "uint256",
1527
+ name: "newProtocolSeizeShareMantissa",
1528
+ type: "uint256"
1529
+ }
1530
+ ],
1531
+ name: "NewProtocolSeizeShare",
1532
+ type: "event"
1533
+ },
1534
+ {
1535
+ anonymous: false,
1536
+ inputs: [
1537
+ {
1538
+ indexed: false,
1539
+ internalType: "uint256",
1540
+ name: "oldReserveFactorMantissa",
1541
+ type: "uint256"
1542
+ },
1543
+ {
1544
+ indexed: false,
1545
+ internalType: "uint256",
1546
+ name: "newReserveFactorMantissa",
1547
+ type: "uint256"
1548
+ }
1549
+ ],
1550
+ name: "NewReserveFactor",
1551
+ type: "event"
1552
+ },
1553
+ {
1554
+ anonymous: false,
1555
+ inputs: [
1556
+ {
1557
+ indexed: false,
1558
+ internalType: "address",
1559
+ name: "redeemer",
1560
+ type: "address"
1561
+ },
1562
+ {
1563
+ indexed: false,
1564
+ internalType: "uint256",
1565
+ name: "redeemAmount",
1566
+ type: "uint256"
1567
+ },
1568
+ {
1569
+ indexed: false,
1570
+ internalType: "uint256",
1571
+ name: "redeemTokens",
1572
+ type: "uint256"
1573
+ }
1574
+ ],
1575
+ name: "Redeem",
1576
+ type: "event"
1577
+ },
1578
+ {
1579
+ anonymous: false,
1580
+ inputs: [
1581
+ {
1582
+ indexed: false,
1583
+ internalType: "address",
1584
+ name: "payer",
1585
+ type: "address"
1586
+ },
1587
+ {
1588
+ indexed: false,
1589
+ internalType: "address",
1590
+ name: "borrower",
1591
+ type: "address"
1592
+ },
1593
+ {
1594
+ indexed: false,
1595
+ internalType: "uint256",
1596
+ name: "repayAmount",
1597
+ type: "uint256"
1598
+ },
1599
+ {
1600
+ indexed: false,
1601
+ internalType: "uint256",
1602
+ name: "accountBorrows",
1603
+ type: "uint256"
1604
+ },
1605
+ {
1606
+ indexed: false,
1607
+ internalType: "uint256",
1608
+ name: "totalBorrows",
1609
+ type: "uint256"
1610
+ }
1611
+ ],
1612
+ name: "RepayBorrow",
1613
+ type: "event"
1614
+ },
1615
+ {
1616
+ anonymous: false,
1617
+ inputs: [
1618
+ {
1619
+ indexed: false,
1620
+ internalType: "address",
1621
+ name: "benefactor",
1622
+ type: "address"
1623
+ },
1624
+ {
1625
+ indexed: false,
1626
+ internalType: "uint256",
1627
+ name: "addAmount",
1628
+ type: "uint256"
1629
+ },
1630
+ {
1631
+ indexed: false,
1632
+ internalType: "uint256",
1633
+ name: "newTotalReserves",
1634
+ type: "uint256"
1635
+ }
1636
+ ],
1637
+ name: "ReservesAdded",
1638
+ type: "event"
1639
+ },
1640
+ {
1641
+ anonymous: false,
1642
+ inputs: [
1643
+ {
1644
+ indexed: false,
1645
+ internalType: "address",
1646
+ name: "admin",
1647
+ type: "address"
1648
+ },
1649
+ {
1650
+ indexed: false,
1651
+ internalType: "uint256",
1652
+ name: "reduceAmount",
1653
+ type: "uint256"
1654
+ },
1655
+ {
1656
+ indexed: false,
1657
+ internalType: "uint256",
1658
+ name: "newTotalReserves",
1659
+ type: "uint256"
1660
+ }
1661
+ ],
1662
+ name: "ReservesReduced",
1663
+ type: "event"
1664
+ },
1665
+ {
1666
+ anonymous: false,
1667
+ inputs: [
1668
+ {
1669
+ indexed: true,
1670
+ internalType: "address",
1671
+ name: "from",
1672
+ type: "address"
1673
+ },
1674
+ {
1675
+ indexed: true,
1676
+ internalType: "address",
1677
+ name: "to",
1678
+ type: "address"
1679
+ },
1680
+ {
1681
+ indexed: false,
1682
+ internalType: "uint256",
1683
+ name: "amount",
1684
+ type: "uint256"
1685
+ }
1686
+ ],
1687
+ name: "Transfer",
1688
+ type: "event"
1689
+ },
1690
+ {
1691
+ payable: true,
1692
+ stateMutability: "payable",
1693
+ type: "fallback"
1694
+ },
1695
+ {
1696
+ constant: false,
1697
+ inputs: [
1698
+ ],
1699
+ name: "_acceptAdmin",
1700
+ outputs: [
1701
+ {
1702
+ internalType: "uint256",
1703
+ name: "",
1704
+ type: "uint256"
1705
+ }
1706
+ ],
1707
+ payable: false,
1708
+ stateMutability: "nonpayable",
1709
+ type: "function"
1710
+ },
1711
+ {
1712
+ constant: false,
1713
+ inputs: [
1714
+ {
1715
+ internalType: "uint256",
1716
+ name: "addAmount",
1717
+ type: "uint256"
1718
+ }
1719
+ ],
1720
+ name: "_addReserves",
1721
+ outputs: [
1722
+ {
1723
+ internalType: "uint256",
1724
+ name: "",
1725
+ type: "uint256"
1726
+ }
1727
+ ],
1728
+ payable: false,
1729
+ stateMutability: "nonpayable",
1730
+ type: "function"
1731
+ },
1732
+ {
1733
+ constant: false,
1734
+ inputs: [
1735
+ {
1736
+ internalType: "uint256",
1737
+ name: "reduceAmount",
1738
+ type: "uint256"
1739
+ }
1740
+ ],
1741
+ name: "_reduceReserves",
1742
+ outputs: [
1743
+ {
1744
+ internalType: "uint256",
1745
+ name: "",
1746
+ type: "uint256"
1747
+ }
1748
+ ],
1749
+ payable: false,
1750
+ stateMutability: "nonpayable",
1751
+ type: "function"
1752
+ },
1753
+ {
1754
+ constant: false,
1755
+ inputs: [
1756
+ {
1757
+ internalType: "contract ComptrollerInterface",
1758
+ name: "newComptroller",
1759
+ type: "address"
1760
+ }
1761
+ ],
1762
+ name: "_setComptroller",
1763
+ outputs: [
1764
+ {
1765
+ internalType: "uint256",
1766
+ name: "",
1767
+ type: "uint256"
1768
+ }
1769
+ ],
1770
+ payable: false,
1771
+ stateMutability: "nonpayable",
1772
+ type: "function"
1773
+ },
1774
+ {
1775
+ constant: false,
1776
+ inputs: [
1777
+ {
1778
+ internalType: "address",
1779
+ name: "implementation_",
1780
+ type: "address"
1781
+ },
1782
+ {
1783
+ internalType: "bool",
1784
+ name: "allowResign",
1785
+ type: "bool"
1786
+ },
1787
+ {
1788
+ internalType: "bytes",
1789
+ name: "becomeImplementationData",
1790
+ type: "bytes"
1791
+ }
1792
+ ],
1793
+ name: "_setImplementation",
1794
+ outputs: [
1795
+ ],
1796
+ payable: false,
1797
+ stateMutability: "nonpayable",
1798
+ type: "function"
1799
+ },
1800
+ {
1801
+ constant: false,
1802
+ inputs: [
1803
+ {
1804
+ internalType: "contract InterestRateModel",
1805
+ name: "newInterestRateModel",
1806
+ type: "address"
1807
+ }
1808
+ ],
1809
+ name: "_setInterestRateModel",
1810
+ outputs: [
1811
+ {
1812
+ internalType: "uint256",
1813
+ name: "",
1814
+ type: "uint256"
1815
+ }
1816
+ ],
1817
+ payable: false,
1818
+ stateMutability: "nonpayable",
1819
+ type: "function"
1820
+ },
1821
+ {
1822
+ constant: false,
1823
+ inputs: [
1824
+ {
1825
+ internalType: "address payable",
1826
+ name: "newPendingAdmin",
1827
+ type: "address"
1828
+ }
1829
+ ],
1830
+ name: "_setPendingAdmin",
1831
+ outputs: [
1832
+ {
1833
+ internalType: "uint256",
1834
+ name: "",
1835
+ type: "uint256"
1836
+ }
1837
+ ],
1838
+ payable: false,
1839
+ stateMutability: "nonpayable",
1840
+ type: "function"
1841
+ },
1842
+ {
1843
+ constant: false,
1844
+ inputs: [
1845
+ {
1846
+ internalType: "uint256",
1847
+ name: "newProtocolSeizeShareMantissa",
1848
+ type: "uint256"
1849
+ }
1850
+ ],
1851
+ name: "_setProtocolSeizeShare",
1852
+ outputs: [
1853
+ {
1854
+ internalType: "uint256",
1855
+ name: "",
1856
+ type: "uint256"
1857
+ }
1858
+ ],
1859
+ payable: false,
1860
+ stateMutability: "nonpayable",
1861
+ type: "function"
1862
+ },
1863
+ {
1864
+ constant: false,
1865
+ inputs: [
1866
+ {
1867
+ internalType: "uint256",
1868
+ name: "newReserveFactorMantissa",
1869
+ type: "uint256"
1870
+ }
1871
+ ],
1872
+ name: "_setReserveFactor",
1873
+ outputs: [
1874
+ {
1875
+ internalType: "uint256",
1876
+ name: "",
1877
+ type: "uint256"
1878
+ }
1879
+ ],
1880
+ payable: false,
1881
+ stateMutability: "nonpayable",
1882
+ type: "function"
1883
+ },
1884
+ {
1885
+ constant: true,
1886
+ inputs: [
1887
+ ],
1888
+ name: "accrualBlockTimestamp",
1889
+ outputs: [
1890
+ {
1891
+ internalType: "uint256",
1892
+ name: "",
1893
+ type: "uint256"
1894
+ }
1895
+ ],
1896
+ payable: false,
1897
+ stateMutability: "view",
1898
+ type: "function"
1899
+ },
1900
+ {
1901
+ constant: false,
1902
+ inputs: [
1903
+ ],
1904
+ name: "accrueInterest",
1905
+ outputs: [
1906
+ {
1907
+ internalType: "uint256",
1908
+ name: "",
1909
+ type: "uint256"
1910
+ }
1911
+ ],
1912
+ payable: false,
1913
+ stateMutability: "nonpayable",
1914
+ type: "function"
1915
+ },
1916
+ {
1917
+ constant: true,
1918
+ inputs: [
1919
+ ],
1920
+ name: "admin",
1921
+ outputs: [
1922
+ {
1923
+ internalType: "address payable",
1924
+ name: "",
1925
+ type: "address"
1926
+ }
1927
+ ],
1928
+ payable: false,
1929
+ stateMutability: "view",
1930
+ type: "function"
1931
+ },
1932
+ {
1933
+ constant: true,
1934
+ inputs: [
1935
+ {
1936
+ internalType: "address",
1937
+ name: "owner",
1938
+ type: "address"
1939
+ },
1940
+ {
1941
+ internalType: "address",
1942
+ name: "spender",
1943
+ type: "address"
1944
+ }
1945
+ ],
1946
+ name: "allowance",
1947
+ outputs: [
1948
+ {
1949
+ internalType: "uint256",
1950
+ name: "",
1951
+ type: "uint256"
1952
+ }
1953
+ ],
1954
+ payable: false,
1955
+ stateMutability: "view",
1956
+ type: "function"
1957
+ },
1958
+ {
1959
+ constant: false,
1960
+ inputs: [
1961
+ {
1962
+ internalType: "address",
1963
+ name: "spender",
1964
+ type: "address"
1965
+ },
1966
+ {
1967
+ internalType: "uint256",
1968
+ name: "amount",
1969
+ type: "uint256"
1970
+ }
1971
+ ],
1972
+ name: "approve",
1973
+ outputs: [
1974
+ {
1975
+ internalType: "bool",
1976
+ name: "",
1977
+ type: "bool"
1978
+ }
1979
+ ],
1980
+ payable: false,
1981
+ stateMutability: "nonpayable",
1982
+ type: "function"
1983
+ },
1984
+ {
1985
+ constant: true,
1986
+ inputs: [
1987
+ {
1988
+ internalType: "address",
1989
+ name: "owner",
1990
+ type: "address"
1991
+ }
1992
+ ],
1993
+ name: "balanceOf",
1994
+ outputs: [
1995
+ {
1996
+ internalType: "uint256",
1997
+ name: "",
1998
+ type: "uint256"
1999
+ }
2000
+ ],
2001
+ payable: false,
2002
+ stateMutability: "view",
2003
+ type: "function"
2004
+ },
2005
+ {
2006
+ constant: false,
2007
+ inputs: [
2008
+ {
2009
+ internalType: "address",
2010
+ name: "owner",
2011
+ type: "address"
2012
+ }
2013
+ ],
2014
+ name: "balanceOfUnderlying",
2015
+ outputs: [
2016
+ {
2017
+ internalType: "uint256",
2018
+ name: "",
2019
+ type: "uint256"
2020
+ }
2021
+ ],
2022
+ payable: false,
2023
+ stateMutability: "nonpayable",
2024
+ type: "function"
2025
+ },
2026
+ {
2027
+ constant: false,
2028
+ inputs: [
2029
+ {
2030
+ internalType: "uint256",
2031
+ name: "borrowAmount",
2032
+ type: "uint256"
2033
+ }
2034
+ ],
2035
+ name: "borrow",
2036
+ outputs: [
2037
+ {
2038
+ internalType: "uint256",
2039
+ name: "",
2040
+ type: "uint256"
2041
+ }
2042
+ ],
2043
+ payable: false,
2044
+ stateMutability: "nonpayable",
2045
+ type: "function"
2046
+ },
2047
+ {
2048
+ constant: false,
2049
+ inputs: [
2050
+ {
2051
+ internalType: "address",
2052
+ name: "account",
2053
+ type: "address"
2054
+ }
2055
+ ],
2056
+ name: "borrowBalanceCurrent",
2057
+ outputs: [
2058
+ {
2059
+ internalType: "uint256",
2060
+ name: "",
2061
+ type: "uint256"
2062
+ }
2063
+ ],
2064
+ payable: false,
2065
+ stateMutability: "nonpayable",
2066
+ type: "function"
2067
+ },
2068
+ {
2069
+ constant: true,
2070
+ inputs: [
2071
+ {
2072
+ internalType: "address",
2073
+ name: "account",
2074
+ type: "address"
2075
+ }
2076
+ ],
2077
+ name: "borrowBalanceStored",
2078
+ outputs: [
2079
+ {
2080
+ internalType: "uint256",
2081
+ name: "",
2082
+ type: "uint256"
2083
+ }
2084
+ ],
2085
+ payable: false,
2086
+ stateMutability: "view",
2087
+ type: "function"
2088
+ },
2089
+ {
2090
+ constant: true,
2091
+ inputs: [
2092
+ ],
2093
+ name: "borrowIndex",
2094
+ outputs: [
2095
+ {
2096
+ internalType: "uint256",
2097
+ name: "",
2098
+ type: "uint256"
2099
+ }
2100
+ ],
2101
+ payable: false,
2102
+ stateMutability: "view",
2103
+ type: "function"
2104
+ },
2105
+ {
2106
+ constant: true,
2107
+ inputs: [
2108
+ ],
2109
+ name: "borrowRatePerTimestamp",
2110
+ outputs: [
2111
+ {
2112
+ internalType: "uint256",
2113
+ name: "",
2114
+ type: "uint256"
2115
+ }
2116
+ ],
2117
+ payable: false,
2118
+ stateMutability: "view",
2119
+ type: "function"
2120
+ },
2121
+ {
2122
+ constant: true,
2123
+ inputs: [
2124
+ ],
2125
+ name: "comptroller",
2126
+ outputs: [
2127
+ {
2128
+ internalType: "contract ComptrollerInterface",
2129
+ name: "",
2130
+ type: "address"
2131
+ }
2132
+ ],
2133
+ payable: false,
2134
+ stateMutability: "view",
2135
+ type: "function"
2136
+ },
2137
+ {
2138
+ constant: true,
2139
+ inputs: [
2140
+ ],
2141
+ name: "decimals",
2142
+ outputs: [
2143
+ {
2144
+ internalType: "uint8",
2145
+ name: "",
2146
+ type: "uint8"
2147
+ }
2148
+ ],
2149
+ payable: false,
2150
+ stateMutability: "view",
2151
+ type: "function"
2152
+ },
2153
+ {
2154
+ constant: false,
2155
+ inputs: [
2156
+ {
2157
+ internalType: "bytes",
2158
+ name: "data",
2159
+ type: "bytes"
2160
+ }
2161
+ ],
2162
+ name: "delegateToImplementation",
2163
+ outputs: [
2164
+ {
2165
+ internalType: "bytes",
2166
+ name: "",
2167
+ type: "bytes"
2168
+ }
2169
+ ],
2170
+ payable: false,
2171
+ stateMutability: "nonpayable",
2172
+ type: "function"
2173
+ },
2174
+ {
2175
+ constant: true,
2176
+ inputs: [
2177
+ {
2178
+ internalType: "bytes",
2179
+ name: "data",
2180
+ type: "bytes"
2181
+ }
2182
+ ],
2183
+ name: "delegateToViewImplementation",
2184
+ outputs: [
2185
+ {
2186
+ internalType: "bytes",
2187
+ name: "",
2188
+ type: "bytes"
2189
+ }
2190
+ ],
2191
+ payable: false,
2192
+ stateMutability: "view",
2193
+ type: "function"
2194
+ },
2195
+ {
2196
+ constant: false,
2197
+ inputs: [
2198
+ ],
2199
+ name: "exchangeRateCurrent",
2200
+ outputs: [
2201
+ {
2202
+ internalType: "uint256",
2203
+ name: "",
2204
+ type: "uint256"
2205
+ }
2206
+ ],
2207
+ payable: false,
2208
+ stateMutability: "nonpayable",
2209
+ type: "function"
2210
+ },
2211
+ {
2212
+ constant: true,
2213
+ inputs: [
2214
+ ],
2215
+ name: "exchangeRateStored",
2216
+ outputs: [
2217
+ {
2218
+ internalType: "uint256",
2219
+ name: "",
2220
+ type: "uint256"
2221
+ }
2222
+ ],
2223
+ payable: false,
2224
+ stateMutability: "view",
2225
+ type: "function"
2226
+ },
2227
+ {
2228
+ constant: true,
2229
+ inputs: [
2230
+ {
2231
+ internalType: "address",
2232
+ name: "account",
2233
+ type: "address"
2234
+ }
2235
+ ],
2236
+ name: "getAccountSnapshot",
2237
+ outputs: [
2238
+ {
2239
+ internalType: "uint256",
2240
+ name: "",
2241
+ type: "uint256"
2242
+ },
2243
+ {
2244
+ internalType: "uint256",
2245
+ name: "",
2246
+ type: "uint256"
2247
+ },
2248
+ {
2249
+ internalType: "uint256",
2250
+ name: "",
2251
+ type: "uint256"
2252
+ },
2253
+ {
2254
+ internalType: "uint256",
2255
+ name: "",
2256
+ type: "uint256"
2257
+ }
2258
+ ],
2259
+ payable: false,
2260
+ stateMutability: "view",
2261
+ type: "function"
2262
+ },
2263
+ {
2264
+ constant: true,
2265
+ inputs: [
2266
+ ],
2267
+ name: "getCash",
2268
+ outputs: [
2269
+ {
2270
+ internalType: "uint256",
2271
+ name: "",
2272
+ type: "uint256"
2273
+ }
2274
+ ],
2275
+ payable: false,
2276
+ stateMutability: "view",
2277
+ type: "function"
2278
+ },
2279
+ {
2280
+ constant: true,
2281
+ inputs: [
2282
+ ],
2283
+ name: "implementation",
2284
+ outputs: [
2285
+ {
2286
+ internalType: "address",
2287
+ name: "",
2288
+ type: "address"
2289
+ }
2290
+ ],
2291
+ payable: false,
2292
+ stateMutability: "view",
2293
+ type: "function"
2294
+ },
2295
+ {
2296
+ constant: true,
2297
+ inputs: [
2298
+ ],
2299
+ name: "interestRateModel",
2300
+ outputs: [
2301
+ {
2302
+ internalType: "contract InterestRateModel",
2303
+ name: "",
2304
+ type: "address"
2305
+ }
2306
+ ],
2307
+ payable: false,
2308
+ stateMutability: "view",
2309
+ type: "function"
2310
+ },
2311
+ {
2312
+ constant: true,
2313
+ inputs: [
2314
+ ],
2315
+ name: "isQiToken",
2316
+ outputs: [
2317
+ {
2318
+ internalType: "bool",
2319
+ name: "",
2320
+ type: "bool"
2321
+ }
2322
+ ],
2323
+ payable: false,
2324
+ stateMutability: "view",
2325
+ type: "function"
2326
+ },
2327
+ {
2328
+ constant: false,
2329
+ inputs: [
2330
+ {
2331
+ internalType: "address",
2332
+ name: "borrower",
2333
+ type: "address"
2334
+ },
2335
+ {
2336
+ internalType: "uint256",
2337
+ name: "repayAmount",
2338
+ type: "uint256"
2339
+ },
2340
+ {
2341
+ internalType: "contract QiTokenInterface",
2342
+ name: "qiTokenCollateral",
2343
+ type: "address"
2344
+ }
2345
+ ],
2346
+ name: "liquidateBorrow",
2347
+ outputs: [
2348
+ {
2349
+ internalType: "uint256",
2350
+ name: "",
2351
+ type: "uint256"
2352
+ }
2353
+ ],
2354
+ payable: false,
2355
+ stateMutability: "nonpayable",
2356
+ type: "function"
2357
+ },
2358
+ {
2359
+ constant: false,
2360
+ inputs: [
2361
+ {
2362
+ internalType: "uint256",
2363
+ name: "mintAmount",
2364
+ type: "uint256"
2365
+ }
2366
+ ],
2367
+ name: "mint",
2368
+ outputs: [
2369
+ {
2370
+ internalType: "uint256",
2371
+ name: "",
2372
+ type: "uint256"
2373
+ }
2374
+ ],
2375
+ payable: false,
2376
+ stateMutability: "nonpayable",
2377
+ type: "function"
2378
+ },
2379
+ {
2380
+ constant: true,
2381
+ inputs: [
2382
+ ],
2383
+ name: "name",
2384
+ outputs: [
2385
+ {
2386
+ internalType: "string",
2387
+ name: "",
2388
+ type: "string"
2389
+ }
2390
+ ],
2391
+ payable: false,
2392
+ stateMutability: "view",
2393
+ type: "function"
2394
+ },
2395
+ {
2396
+ constant: true,
2397
+ inputs: [
2398
+ ],
2399
+ name: "pendingAdmin",
2400
+ outputs: [
2401
+ {
2402
+ internalType: "address payable",
2403
+ name: "",
2404
+ type: "address"
2405
+ }
2406
+ ],
2407
+ payable: false,
2408
+ stateMutability: "view",
2409
+ type: "function"
2410
+ },
2411
+ {
2412
+ constant: true,
2413
+ inputs: [
2414
+ ],
2415
+ name: "protocolSeizeShareMantissa",
2416
+ outputs: [
2417
+ {
2418
+ internalType: "uint256",
2419
+ name: "",
2420
+ type: "uint256"
2421
+ }
2422
+ ],
2423
+ payable: false,
2424
+ stateMutability: "view",
2425
+ type: "function"
2426
+ },
2427
+ {
2428
+ constant: false,
2429
+ inputs: [
2430
+ {
2431
+ internalType: "uint256",
2432
+ name: "redeemTokens",
2433
+ type: "uint256"
2434
+ }
2435
+ ],
2436
+ name: "redeem",
2437
+ outputs: [
2438
+ {
2439
+ internalType: "uint256",
2440
+ name: "",
2441
+ type: "uint256"
2442
+ }
2443
+ ],
2444
+ payable: false,
2445
+ stateMutability: "nonpayable",
2446
+ type: "function"
2447
+ },
2448
+ {
2449
+ constant: false,
2450
+ inputs: [
2451
+ {
2452
+ internalType: "uint256",
2453
+ name: "redeemAmount",
2454
+ type: "uint256"
2455
+ }
2456
+ ],
2457
+ name: "redeemUnderlying",
2458
+ outputs: [
2459
+ {
2460
+ internalType: "uint256",
2461
+ name: "",
2462
+ type: "uint256"
2463
+ }
2464
+ ],
2465
+ payable: false,
2466
+ stateMutability: "nonpayable",
2467
+ type: "function"
2468
+ },
2469
+ {
2470
+ constant: false,
2471
+ inputs: [
2472
+ {
2473
+ internalType: "uint256",
2474
+ name: "repayAmount",
2475
+ type: "uint256"
2476
+ }
2477
+ ],
2478
+ name: "repayBorrow",
2479
+ outputs: [
2480
+ {
2481
+ internalType: "uint256",
2482
+ name: "",
2483
+ type: "uint256"
2484
+ }
2485
+ ],
2486
+ payable: false,
2487
+ stateMutability: "nonpayable",
2488
+ type: "function"
2489
+ },
2490
+ {
2491
+ constant: false,
2492
+ inputs: [
2493
+ {
2494
+ internalType: "address",
2495
+ name: "borrower",
2496
+ type: "address"
2497
+ },
2498
+ {
2499
+ internalType: "uint256",
2500
+ name: "repayAmount",
2501
+ type: "uint256"
2502
+ }
2503
+ ],
2504
+ name: "repayBorrowBehalf",
2505
+ outputs: [
2506
+ {
2507
+ internalType: "uint256",
2508
+ name: "",
2509
+ type: "uint256"
2510
+ }
2511
+ ],
2512
+ payable: false,
2513
+ stateMutability: "nonpayable",
2514
+ type: "function"
2515
+ },
2516
+ {
2517
+ constant: true,
2518
+ inputs: [
2519
+ ],
2520
+ name: "reserveFactorMantissa",
2521
+ outputs: [
2522
+ {
2523
+ internalType: "uint256",
2524
+ name: "",
2525
+ type: "uint256"
2526
+ }
2527
+ ],
2528
+ payable: false,
2529
+ stateMutability: "view",
2530
+ type: "function"
2531
+ },
2532
+ {
2533
+ constant: false,
2534
+ inputs: [
2535
+ {
2536
+ internalType: "address",
2537
+ name: "liquidator",
2538
+ type: "address"
2539
+ },
2540
+ {
2541
+ internalType: "address",
2542
+ name: "borrower",
2543
+ type: "address"
2544
+ },
2545
+ {
2546
+ internalType: "uint256",
2547
+ name: "seizeTokens",
2548
+ type: "uint256"
2549
+ }
2550
+ ],
2551
+ name: "seize",
2552
+ outputs: [
2553
+ {
2554
+ internalType: "uint256",
2555
+ name: "",
2556
+ type: "uint256"
2557
+ }
2558
+ ],
2559
+ payable: false,
2560
+ stateMutability: "nonpayable",
2561
+ type: "function"
2562
+ },
2563
+ {
2564
+ constant: true,
2565
+ inputs: [
2566
+ ],
2567
+ name: "supplyRatePerTimestamp",
2568
+ outputs: [
2569
+ {
2570
+ internalType: "uint256",
2571
+ name: "",
2572
+ type: "uint256"
2573
+ }
2574
+ ],
2575
+ payable: false,
2576
+ stateMutability: "view",
2577
+ type: "function"
2578
+ },
2579
+ {
2580
+ constant: false,
2581
+ inputs: [
2582
+ {
2583
+ internalType: "contract EIP20NonStandardInterface",
2584
+ name: "token",
2585
+ type: "address"
2586
+ }
2587
+ ],
2588
+ name: "sweepToken",
2589
+ outputs: [
2590
+ ],
2591
+ payable: false,
2592
+ stateMutability: "nonpayable",
2593
+ type: "function"
2594
+ },
2595
+ {
2596
+ constant: true,
2597
+ inputs: [
2598
+ ],
2599
+ name: "symbol",
2600
+ outputs: [
2601
+ {
2602
+ internalType: "string",
2603
+ name: "",
2604
+ type: "string"
2605
+ }
2606
+ ],
2607
+ payable: false,
2608
+ stateMutability: "view",
2609
+ type: "function"
2610
+ },
2611
+ {
2612
+ constant: true,
2613
+ inputs: [
2614
+ ],
2615
+ name: "totalBorrows",
2616
+ outputs: [
2617
+ {
2618
+ internalType: "uint256",
2619
+ name: "",
2620
+ type: "uint256"
2621
+ }
2622
+ ],
2623
+ payable: false,
2624
+ stateMutability: "view",
2625
+ type: "function"
2626
+ },
2627
+ {
2628
+ constant: false,
2629
+ inputs: [
2630
+ ],
2631
+ name: "totalBorrowsCurrent",
2632
+ outputs: [
2633
+ {
2634
+ internalType: "uint256",
2635
+ name: "",
2636
+ type: "uint256"
2637
+ }
2638
+ ],
2639
+ payable: false,
2640
+ stateMutability: "nonpayable",
2641
+ type: "function"
2642
+ },
2643
+ {
2644
+ constant: true,
2645
+ inputs: [
2646
+ ],
2647
+ name: "totalReserves",
2648
+ outputs: [
2649
+ {
2650
+ internalType: "uint256",
2651
+ name: "",
2652
+ type: "uint256"
2653
+ }
2654
+ ],
2655
+ payable: false,
2656
+ stateMutability: "view",
2657
+ type: "function"
2658
+ },
2659
+ {
2660
+ constant: true,
2661
+ inputs: [
2662
+ ],
2663
+ name: "totalSupply",
2664
+ outputs: [
2665
+ {
2666
+ internalType: "uint256",
2667
+ name: "",
2668
+ type: "uint256"
2669
+ }
2670
+ ],
2671
+ payable: false,
2672
+ stateMutability: "view",
2673
+ type: "function"
2674
+ },
2675
+ {
2676
+ constant: false,
2677
+ inputs: [
2678
+ {
2679
+ internalType: "address",
2680
+ name: "dst",
2681
+ type: "address"
2682
+ },
2683
+ {
2684
+ internalType: "uint256",
2685
+ name: "amount",
2686
+ type: "uint256"
2687
+ }
2688
+ ],
2689
+ name: "transfer",
2690
+ outputs: [
2691
+ {
2692
+ internalType: "bool",
2693
+ name: "",
2694
+ type: "bool"
2695
+ }
2696
+ ],
2697
+ payable: false,
2698
+ stateMutability: "nonpayable",
2699
+ type: "function"
2700
+ },
2701
+ {
2702
+ constant: false,
2703
+ inputs: [
2704
+ {
2705
+ internalType: "address",
2706
+ name: "src",
2707
+ type: "address"
2708
+ },
2709
+ {
2710
+ internalType: "address",
2711
+ name: "dst",
2712
+ type: "address"
2713
+ },
2714
+ {
2715
+ internalType: "uint256",
2716
+ name: "amount",
2717
+ type: "uint256"
2718
+ }
2719
+ ],
2720
+ name: "transferFrom",
2721
+ outputs: [
2722
+ {
2723
+ internalType: "bool",
2724
+ name: "",
2725
+ type: "bool"
2726
+ }
2727
+ ],
2728
+ payable: false,
2729
+ stateMutability: "nonpayable",
2730
+ type: "function"
2731
+ },
2732
+ {
2733
+ constant: true,
2734
+ inputs: [
2735
+ ],
2736
+ name: "underlying",
2737
+ outputs: [
2738
+ {
2739
+ internalType: "address",
2740
+ name: "",
2741
+ type: "address"
2742
+ }
2743
+ ],
2744
+ payable: false,
2745
+ stateMutability: "view",
2746
+ type: "function"
2747
+ }
2748
+ ];
2749
+ var AuToken = {
2750
+ abi: abi
2751
+ };
2752
+
1207
2753
  var MoneyMarketRead = /*#__PURE__*/function (_BlockchainEntityRead) {
1208
2754
  _inheritsLoose(MoneyMarketRead, _BlockchainEntityRead);
1209
2755
 
@@ -1259,19 +2805,13 @@ var MoneyMarketReadWrite = /*#__PURE__*/function (_MoneyMarketRead) {
1259
2805
 
1260
2806
  _this2 = _MoneyMarketRead.apply(this, arguments) || this;
1261
2807
  _this2.dummyTransaction = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
1262
- var dummyErc20Token;
1263
2808
  return runtime_1.wrap(function _callee2$(_context2) {
1264
2809
  while (1) {
1265
2810
  switch (_context2.prev = _context2.next) {
1266
2811
  case 0:
1267
- dummyErc20Token = new ethers$2.Contract(dummyToken.address, IERC20.abi, _this2._providerOrSigner);
1268
- _context2.next = 3;
1269
- return dummyErc20Token.approve(dummyToken.address, 123);
1270
-
1271
- case 3:
1272
- return _context2.abrupt("return", _context2.sent);
2812
+ return _context2.abrupt("return", {});
1273
2813
 
1274
- case 4:
2814
+ case 1:
1275
2815
  case "end":
1276
2816
  return _context2.stop();
1277
2817
  }
@@ -1430,7 +2970,7 @@ var MoneyMarket = /*#__PURE__*/function (_BlockchainEntity) {
1430
2970
  var _this3;
1431
2971
 
1432
2972
  _this3 = _BlockchainEntity.call(this) || this;
1433
- _this3.address = sdkCore.validateAndParseAddress(address);
2973
+ _this3.address = validateAndParseAddress(address);
1434
2974
  return _this3;
1435
2975
  }
1436
2976
 
@@ -1443,10 +2983,6 @@ var MoneyMarket = /*#__PURE__*/function (_BlockchainEntity) {
1443
2983
  return MoneyMarket;
1444
2984
  }(BlockchainEntity);
1445
2985
 
1446
- function formatObject(object) {
1447
- return JSON.stringify(object, null, ' ');
1448
- }
1449
-
1450
2986
  function sum(a, b) {
1451
2987
  return a + b;
1452
2988
  }
@@ -1464,6 +3000,7 @@ exports.MoneyMarketReadWrite = MoneyMarketReadWrite;
1464
3000
  exports.SDK = SDK;
1465
3001
  exports.SdkRead = SdkRead;
1466
3002
  exports.SdkReadWrite = SdkReadWrite;
3003
+ exports.decimalFactor = decimalFactor;
1467
3004
  exports.dummyMarketAddress = dummyMarketAddress;
1468
3005
  exports.dummyPly = dummyPly;
1469
3006
  exports.dummyPlyAurora = dummyPlyAurora;
@@ -1475,4 +3012,5 @@ exports.dummyUserMarketDetails = dummyUserMarketDetails;
1475
3012
  exports.dummyZeroTokenAmount = dummyZeroTokenAmount;
1476
3013
  exports.formatObject = formatObject;
1477
3014
  exports.sum = sum;
3015
+ exports.validateAndParseAddress = validateAndParseAddress;
1478
3016
  //# sourceMappingURL=sdk.cjs.development.js.map