@aurigami/sdk 0.1.6 → 0.1.7

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,9 +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');
7
+ var BigNumber = _interopDefault(require('bignumber.js'));
8
8
  var ethers$2 = require('ethers');
9
- var AuToken = _interopDefault(require('@aurigami/contracts/artifacts/contracts/AuToken.sol/AuToken.json'));
10
9
 
11
10
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
12
11
  try {
@@ -848,43 +847,61 @@ var BlockchainEntity = /*#__PURE__*/function () {
848
847
  return BlockchainEntity;
849
848
  }();
850
849
 
851
- var dummyToken = /*#__PURE__*/new sdkCore.Token({
852
- chainId: 43114,
853
- decimal: 6,
854
- symbol: 'USDC',
855
- address: '0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e'
856
- });
857
- var dummyPly = /*#__PURE__*/new sdkCore.Token({
858
- chainId: 43114,
859
- decimal: 18,
860
- symbol: 'QI',
861
- address: '0x8729438eb15e2c8b576fcc6aecda6a148776c0f5'
862
- });
863
- var dummyPlyAurora = /*#__PURE__*/new sdkCore.Token({
864
- chainId: 43114,
865
- decimal: 18,
866
- symbol: 'QIWAVAX',
867
- address: '0xE530dC2095Ef5653205CF5ea79F8979a7028065c'
868
- });
869
- var dummyTokenAmount = /*#__PURE__*/new sdkCore.CurrencyAmount({
870
- currency: dummyToken,
871
- amount: '123.456',
872
- isRaw: false
873
- });
874
- var dummyZeroTokenAmount = /*#__PURE__*/new sdkCore.CurrencyAmount({
875
- currency: dummyToken,
876
- amount: '0'
877
- });
878
- var dummyTokenAmount2 = /*#__PURE__*/new sdkCore.CurrencyAmount({
879
- currency: dummyToken,
880
- amount: '456.123',
881
- isRaw: false
882
- });
883
- var dummyTokenAmount3 = /*#__PURE__*/new sdkCore.CurrencyAmount({
884
- currency: dummyToken,
885
- amount: '1000.123',
886
- isRaw: false
887
- });
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);
888
905
  var dummyMarketAddress = '0xbeb5d47a3f720ec0a390d04b4d41ed7d9688bc7f';
889
906
  var dummyUserMarketDetails = {
890
907
  market: dummyMarketAddress,
@@ -896,17 +913,1304 @@ var dummyUserMarketDetails = {
896
913
 
897
914
  var ethers = /*#__PURE__*/require('ethers');
898
915
 
899
- var DOLLAR = /*#__PURE__*/new sdkCore.Token({
900
- chainId: 43114,
901
- decimal: 2,
902
- symbol: 'USDC',
903
- address: '0x0000000000000000000000000000000000000001'
904
- });
916
+ var DOLLAR = /*#__PURE__*/new Token('0x0000000000000000000000000000000000000001', 2);
905
917
  var AVAX_DEFAULT_PROVIDER_URL = 'https://api.avax.network/ext/bc/C/rpc';
906
918
  var AVAX_DEFAULT_PROVIDER = /*#__PURE__*/new ethers.providers.JsonRpcProvider(AVAX_DEFAULT_PROVIDER_URL);
907
919
  var dummyPrivateKey = '1111111111111111111111111111111111111111111111111111111111111111';
908
920
  var AVAX_DEFAULT_SIGNER = /*#__PURE__*/new ethers.Wallet(dummyPrivateKey);
909
921
 
922
+ var abi = [
923
+ {
924
+ inputs: [
925
+ {
926
+ internalType: "string",
927
+ name: "_name",
928
+ type: "string"
929
+ },
930
+ {
931
+ internalType: "string",
932
+ name: "_symbol",
933
+ type: "string"
934
+ },
935
+ {
936
+ internalType: "uint8",
937
+ name: "_decimals",
938
+ type: "uint8"
939
+ },
940
+ {
941
+ internalType: "address",
942
+ name: "_underlying",
943
+ type: "address"
944
+ },
945
+ {
946
+ internalType: "address",
947
+ name: "_vault",
948
+ type: "address"
949
+ }
950
+ ],
951
+ stateMutability: "nonpayable",
952
+ type: "constructor"
953
+ },
954
+ {
955
+ anonymous: false,
956
+ inputs: [
957
+ {
958
+ indexed: true,
959
+ internalType: "address",
960
+ name: "owner",
961
+ type: "address"
962
+ },
963
+ {
964
+ indexed: true,
965
+ internalType: "address",
966
+ name: "spender",
967
+ type: "address"
968
+ },
969
+ {
970
+ indexed: false,
971
+ internalType: "uint256",
972
+ name: "value",
973
+ type: "uint256"
974
+ }
975
+ ],
976
+ name: "Approval",
977
+ type: "event"
978
+ },
979
+ {
980
+ anonymous: false,
981
+ inputs: [
982
+ {
983
+ indexed: true,
984
+ internalType: "address",
985
+ name: "auth",
986
+ type: "address"
987
+ },
988
+ {
989
+ indexed: false,
990
+ internalType: "uint256",
991
+ name: "timestamp",
992
+ type: "uint256"
993
+ }
994
+ ],
995
+ name: "LogAddAuth",
996
+ type: "event"
997
+ },
998
+ {
999
+ anonymous: false,
1000
+ inputs: [
1001
+ {
1002
+ indexed: true,
1003
+ internalType: "address",
1004
+ name: "oldOwner",
1005
+ type: "address"
1006
+ },
1007
+ {
1008
+ indexed: true,
1009
+ internalType: "address",
1010
+ name: "newOwner",
1011
+ type: "address"
1012
+ },
1013
+ {
1014
+ indexed: true,
1015
+ internalType: "uint256",
1016
+ name: "effectiveHeight",
1017
+ type: "uint256"
1018
+ }
1019
+ ],
1020
+ name: "LogChangeMPCOwner",
1021
+ type: "event"
1022
+ },
1023
+ {
1024
+ anonymous: false,
1025
+ inputs: [
1026
+ {
1027
+ indexed: true,
1028
+ internalType: "address",
1029
+ name: "oldVault",
1030
+ type: "address"
1031
+ },
1032
+ {
1033
+ indexed: true,
1034
+ internalType: "address",
1035
+ name: "newVault",
1036
+ type: "address"
1037
+ },
1038
+ {
1039
+ indexed: true,
1040
+ internalType: "uint256",
1041
+ name: "effectiveTime",
1042
+ type: "uint256"
1043
+ }
1044
+ ],
1045
+ name: "LogChangeVault",
1046
+ type: "event"
1047
+ },
1048
+ {
1049
+ anonymous: false,
1050
+ inputs: [
1051
+ {
1052
+ indexed: true,
1053
+ internalType: "bytes32",
1054
+ name: "txhash",
1055
+ type: "bytes32"
1056
+ },
1057
+ {
1058
+ indexed: true,
1059
+ internalType: "address",
1060
+ name: "account",
1061
+ type: "address"
1062
+ },
1063
+ {
1064
+ indexed: false,
1065
+ internalType: "uint256",
1066
+ name: "amount",
1067
+ type: "uint256"
1068
+ }
1069
+ ],
1070
+ name: "LogSwapin",
1071
+ type: "event"
1072
+ },
1073
+ {
1074
+ anonymous: false,
1075
+ inputs: [
1076
+ {
1077
+ indexed: true,
1078
+ internalType: "address",
1079
+ name: "account",
1080
+ type: "address"
1081
+ },
1082
+ {
1083
+ indexed: true,
1084
+ internalType: "address",
1085
+ name: "bindaddr",
1086
+ type: "address"
1087
+ },
1088
+ {
1089
+ indexed: false,
1090
+ internalType: "uint256",
1091
+ name: "amount",
1092
+ type: "uint256"
1093
+ }
1094
+ ],
1095
+ name: "LogSwapout",
1096
+ type: "event"
1097
+ },
1098
+ {
1099
+ anonymous: false,
1100
+ inputs: [
1101
+ {
1102
+ indexed: true,
1103
+ internalType: "address",
1104
+ name: "from",
1105
+ type: "address"
1106
+ },
1107
+ {
1108
+ indexed: true,
1109
+ internalType: "address",
1110
+ name: "to",
1111
+ type: "address"
1112
+ },
1113
+ {
1114
+ indexed: false,
1115
+ internalType: "uint256",
1116
+ name: "value",
1117
+ type: "uint256"
1118
+ }
1119
+ ],
1120
+ name: "Transfer",
1121
+ type: "event"
1122
+ },
1123
+ {
1124
+ inputs: [
1125
+ ],
1126
+ name: "DOMAIN_SEPARATOR",
1127
+ outputs: [
1128
+ {
1129
+ internalType: "bytes32",
1130
+ name: "",
1131
+ type: "bytes32"
1132
+ }
1133
+ ],
1134
+ stateMutability: "view",
1135
+ type: "function"
1136
+ },
1137
+ {
1138
+ inputs: [
1139
+ ],
1140
+ name: "PERMIT_TYPEHASH",
1141
+ outputs: [
1142
+ {
1143
+ internalType: "bytes32",
1144
+ name: "",
1145
+ type: "bytes32"
1146
+ }
1147
+ ],
1148
+ stateMutability: "view",
1149
+ type: "function"
1150
+ },
1151
+ {
1152
+ inputs: [
1153
+ {
1154
+ internalType: "bytes32",
1155
+ name: "txhash",
1156
+ type: "bytes32"
1157
+ },
1158
+ {
1159
+ internalType: "address",
1160
+ name: "account",
1161
+ type: "address"
1162
+ },
1163
+ {
1164
+ internalType: "uint256",
1165
+ name: "amount",
1166
+ type: "uint256"
1167
+ }
1168
+ ],
1169
+ name: "Swapin",
1170
+ outputs: [
1171
+ {
1172
+ internalType: "bool",
1173
+ name: "",
1174
+ type: "bool"
1175
+ }
1176
+ ],
1177
+ stateMutability: "nonpayable",
1178
+ type: "function"
1179
+ },
1180
+ {
1181
+ inputs: [
1182
+ {
1183
+ internalType: "uint256",
1184
+ name: "amount",
1185
+ type: "uint256"
1186
+ },
1187
+ {
1188
+ internalType: "address",
1189
+ name: "bindaddr",
1190
+ type: "address"
1191
+ }
1192
+ ],
1193
+ name: "Swapout",
1194
+ outputs: [
1195
+ {
1196
+ internalType: "bool",
1197
+ name: "",
1198
+ type: "bool"
1199
+ }
1200
+ ],
1201
+ stateMutability: "nonpayable",
1202
+ type: "function"
1203
+ },
1204
+ {
1205
+ inputs: [
1206
+ ],
1207
+ name: "TRANSFER_TYPEHASH",
1208
+ outputs: [
1209
+ {
1210
+ internalType: "bytes32",
1211
+ name: "",
1212
+ type: "bytes32"
1213
+ }
1214
+ ],
1215
+ stateMutability: "view",
1216
+ type: "function"
1217
+ },
1218
+ {
1219
+ inputs: [
1220
+ {
1221
+ internalType: "address",
1222
+ name: "",
1223
+ type: "address"
1224
+ },
1225
+ {
1226
+ internalType: "address",
1227
+ name: "",
1228
+ type: "address"
1229
+ }
1230
+ ],
1231
+ name: "allowance",
1232
+ outputs: [
1233
+ {
1234
+ internalType: "uint256",
1235
+ name: "",
1236
+ type: "uint256"
1237
+ }
1238
+ ],
1239
+ stateMutability: "view",
1240
+ type: "function"
1241
+ },
1242
+ {
1243
+ inputs: [
1244
+ ],
1245
+ name: "applyMinter",
1246
+ outputs: [
1247
+ ],
1248
+ stateMutability: "nonpayable",
1249
+ type: "function"
1250
+ },
1251
+ {
1252
+ inputs: [
1253
+ ],
1254
+ name: "applyVault",
1255
+ outputs: [
1256
+ ],
1257
+ stateMutability: "nonpayable",
1258
+ type: "function"
1259
+ },
1260
+ {
1261
+ inputs: [
1262
+ {
1263
+ internalType: "address",
1264
+ name: "spender",
1265
+ type: "address"
1266
+ },
1267
+ {
1268
+ internalType: "uint256",
1269
+ name: "value",
1270
+ type: "uint256"
1271
+ }
1272
+ ],
1273
+ name: "approve",
1274
+ outputs: [
1275
+ {
1276
+ internalType: "bool",
1277
+ name: "",
1278
+ type: "bool"
1279
+ }
1280
+ ],
1281
+ stateMutability: "nonpayable",
1282
+ type: "function"
1283
+ },
1284
+ {
1285
+ inputs: [
1286
+ {
1287
+ internalType: "address",
1288
+ name: "spender",
1289
+ type: "address"
1290
+ },
1291
+ {
1292
+ internalType: "uint256",
1293
+ name: "value",
1294
+ type: "uint256"
1295
+ },
1296
+ {
1297
+ internalType: "bytes",
1298
+ name: "data",
1299
+ type: "bytes"
1300
+ }
1301
+ ],
1302
+ name: "approveAndCall",
1303
+ outputs: [
1304
+ {
1305
+ internalType: "bool",
1306
+ name: "",
1307
+ type: "bool"
1308
+ }
1309
+ ],
1310
+ stateMutability: "nonpayable",
1311
+ type: "function"
1312
+ },
1313
+ {
1314
+ inputs: [
1315
+ {
1316
+ internalType: "address",
1317
+ name: "",
1318
+ type: "address"
1319
+ }
1320
+ ],
1321
+ name: "balanceOf",
1322
+ outputs: [
1323
+ {
1324
+ internalType: "uint256",
1325
+ name: "",
1326
+ type: "uint256"
1327
+ }
1328
+ ],
1329
+ stateMutability: "view",
1330
+ type: "function"
1331
+ },
1332
+ {
1333
+ inputs: [
1334
+ {
1335
+ internalType: "address",
1336
+ name: "from",
1337
+ type: "address"
1338
+ },
1339
+ {
1340
+ internalType: "uint256",
1341
+ name: "amount",
1342
+ type: "uint256"
1343
+ }
1344
+ ],
1345
+ name: "burn",
1346
+ outputs: [
1347
+ {
1348
+ internalType: "bool",
1349
+ name: "",
1350
+ type: "bool"
1351
+ }
1352
+ ],
1353
+ stateMutability: "nonpayable",
1354
+ type: "function"
1355
+ },
1356
+ {
1357
+ inputs: [
1358
+ {
1359
+ internalType: "address",
1360
+ name: "newVault",
1361
+ type: "address"
1362
+ }
1363
+ ],
1364
+ name: "changeMPCOwner",
1365
+ outputs: [
1366
+ {
1367
+ internalType: "bool",
1368
+ name: "",
1369
+ type: "bool"
1370
+ }
1371
+ ],
1372
+ stateMutability: "nonpayable",
1373
+ type: "function"
1374
+ },
1375
+ {
1376
+ inputs: [
1377
+ {
1378
+ internalType: "address",
1379
+ name: "newVault",
1380
+ type: "address"
1381
+ }
1382
+ ],
1383
+ name: "changeVault",
1384
+ outputs: [
1385
+ {
1386
+ internalType: "bool",
1387
+ name: "",
1388
+ type: "bool"
1389
+ }
1390
+ ],
1391
+ stateMutability: "nonpayable",
1392
+ type: "function"
1393
+ },
1394
+ {
1395
+ inputs: [
1396
+ ],
1397
+ name: "decimals",
1398
+ outputs: [
1399
+ {
1400
+ internalType: "uint8",
1401
+ name: "",
1402
+ type: "uint8"
1403
+ }
1404
+ ],
1405
+ stateMutability: "view",
1406
+ type: "function"
1407
+ },
1408
+ {
1409
+ inputs: [
1410
+ ],
1411
+ name: "delay",
1412
+ outputs: [
1413
+ {
1414
+ internalType: "uint256",
1415
+ name: "",
1416
+ type: "uint256"
1417
+ }
1418
+ ],
1419
+ stateMutability: "view",
1420
+ type: "function"
1421
+ },
1422
+ {
1423
+ inputs: [
1424
+ ],
1425
+ name: "delayDelay",
1426
+ outputs: [
1427
+ {
1428
+ internalType: "uint256",
1429
+ name: "",
1430
+ type: "uint256"
1431
+ }
1432
+ ],
1433
+ stateMutability: "view",
1434
+ type: "function"
1435
+ },
1436
+ {
1437
+ inputs: [
1438
+ ],
1439
+ name: "delayMinter",
1440
+ outputs: [
1441
+ {
1442
+ internalType: "uint256",
1443
+ name: "",
1444
+ type: "uint256"
1445
+ }
1446
+ ],
1447
+ stateMutability: "view",
1448
+ type: "function"
1449
+ },
1450
+ {
1451
+ inputs: [
1452
+ ],
1453
+ name: "delayVault",
1454
+ outputs: [
1455
+ {
1456
+ internalType: "uint256",
1457
+ name: "",
1458
+ type: "uint256"
1459
+ }
1460
+ ],
1461
+ stateMutability: "view",
1462
+ type: "function"
1463
+ },
1464
+ {
1465
+ inputs: [
1466
+ {
1467
+ internalType: "uint256",
1468
+ name: "amount",
1469
+ type: "uint256"
1470
+ },
1471
+ {
1472
+ internalType: "address",
1473
+ name: "to",
1474
+ type: "address"
1475
+ }
1476
+ ],
1477
+ name: "deposit",
1478
+ outputs: [
1479
+ {
1480
+ internalType: "uint256",
1481
+ name: "",
1482
+ type: "uint256"
1483
+ }
1484
+ ],
1485
+ stateMutability: "nonpayable",
1486
+ type: "function"
1487
+ },
1488
+ {
1489
+ inputs: [
1490
+ {
1491
+ internalType: "uint256",
1492
+ name: "amount",
1493
+ type: "uint256"
1494
+ }
1495
+ ],
1496
+ name: "deposit",
1497
+ outputs: [
1498
+ {
1499
+ internalType: "uint256",
1500
+ name: "",
1501
+ type: "uint256"
1502
+ }
1503
+ ],
1504
+ stateMutability: "nonpayable",
1505
+ type: "function"
1506
+ },
1507
+ {
1508
+ inputs: [
1509
+ ],
1510
+ name: "deposit",
1511
+ outputs: [
1512
+ {
1513
+ internalType: "uint256",
1514
+ name: "",
1515
+ type: "uint256"
1516
+ }
1517
+ ],
1518
+ stateMutability: "nonpayable",
1519
+ type: "function"
1520
+ },
1521
+ {
1522
+ inputs: [
1523
+ {
1524
+ internalType: "uint256",
1525
+ name: "amount",
1526
+ type: "uint256"
1527
+ },
1528
+ {
1529
+ internalType: "address",
1530
+ name: "to",
1531
+ type: "address"
1532
+ }
1533
+ ],
1534
+ name: "depositVault",
1535
+ outputs: [
1536
+ {
1537
+ internalType: "uint256",
1538
+ name: "",
1539
+ type: "uint256"
1540
+ }
1541
+ ],
1542
+ stateMutability: "nonpayable",
1543
+ type: "function"
1544
+ },
1545
+ {
1546
+ inputs: [
1547
+ {
1548
+ internalType: "address",
1549
+ name: "target",
1550
+ type: "address"
1551
+ },
1552
+ {
1553
+ internalType: "uint256",
1554
+ name: "value",
1555
+ type: "uint256"
1556
+ },
1557
+ {
1558
+ internalType: "uint256",
1559
+ name: "deadline",
1560
+ type: "uint256"
1561
+ },
1562
+ {
1563
+ internalType: "uint8",
1564
+ name: "v",
1565
+ type: "uint8"
1566
+ },
1567
+ {
1568
+ internalType: "bytes32",
1569
+ name: "r",
1570
+ type: "bytes32"
1571
+ },
1572
+ {
1573
+ internalType: "bytes32",
1574
+ name: "s",
1575
+ type: "bytes32"
1576
+ },
1577
+ {
1578
+ internalType: "address",
1579
+ name: "to",
1580
+ type: "address"
1581
+ }
1582
+ ],
1583
+ name: "depositWithPermit",
1584
+ outputs: [
1585
+ {
1586
+ internalType: "uint256",
1587
+ name: "",
1588
+ type: "uint256"
1589
+ }
1590
+ ],
1591
+ stateMutability: "nonpayable",
1592
+ type: "function"
1593
+ },
1594
+ {
1595
+ inputs: [
1596
+ {
1597
+ internalType: "address",
1598
+ name: "target",
1599
+ type: "address"
1600
+ },
1601
+ {
1602
+ internalType: "uint256",
1603
+ name: "value",
1604
+ type: "uint256"
1605
+ },
1606
+ {
1607
+ internalType: "uint256",
1608
+ name: "deadline",
1609
+ type: "uint256"
1610
+ },
1611
+ {
1612
+ internalType: "uint8",
1613
+ name: "v",
1614
+ type: "uint8"
1615
+ },
1616
+ {
1617
+ internalType: "bytes32",
1618
+ name: "r",
1619
+ type: "bytes32"
1620
+ },
1621
+ {
1622
+ internalType: "bytes32",
1623
+ name: "s",
1624
+ type: "bytes32"
1625
+ },
1626
+ {
1627
+ internalType: "address",
1628
+ name: "to",
1629
+ type: "address"
1630
+ }
1631
+ ],
1632
+ name: "depositWithTransferPermit",
1633
+ outputs: [
1634
+ {
1635
+ internalType: "uint256",
1636
+ name: "",
1637
+ type: "uint256"
1638
+ }
1639
+ ],
1640
+ stateMutability: "nonpayable",
1641
+ type: "function"
1642
+ },
1643
+ {
1644
+ inputs: [
1645
+ ],
1646
+ name: "getAllMinters",
1647
+ outputs: [
1648
+ {
1649
+ internalType: "address[]",
1650
+ name: "",
1651
+ type: "address[]"
1652
+ }
1653
+ ],
1654
+ stateMutability: "view",
1655
+ type: "function"
1656
+ },
1657
+ {
1658
+ inputs: [
1659
+ {
1660
+ internalType: "address",
1661
+ name: "_vault",
1662
+ type: "address"
1663
+ }
1664
+ ],
1665
+ name: "initVault",
1666
+ outputs: [
1667
+ ],
1668
+ stateMutability: "nonpayable",
1669
+ type: "function"
1670
+ },
1671
+ {
1672
+ inputs: [
1673
+ {
1674
+ internalType: "address",
1675
+ name: "",
1676
+ type: "address"
1677
+ }
1678
+ ],
1679
+ name: "isMinter",
1680
+ outputs: [
1681
+ {
1682
+ internalType: "bool",
1683
+ name: "",
1684
+ type: "bool"
1685
+ }
1686
+ ],
1687
+ stateMutability: "view",
1688
+ type: "function"
1689
+ },
1690
+ {
1691
+ inputs: [
1692
+ {
1693
+ internalType: "address",
1694
+ name: "to",
1695
+ type: "address"
1696
+ },
1697
+ {
1698
+ internalType: "uint256",
1699
+ name: "amount",
1700
+ type: "uint256"
1701
+ }
1702
+ ],
1703
+ name: "mint",
1704
+ outputs: [
1705
+ {
1706
+ internalType: "bool",
1707
+ name: "",
1708
+ type: "bool"
1709
+ }
1710
+ ],
1711
+ stateMutability: "nonpayable",
1712
+ type: "function"
1713
+ },
1714
+ {
1715
+ inputs: [
1716
+ {
1717
+ internalType: "uint256",
1718
+ name: "",
1719
+ type: "uint256"
1720
+ }
1721
+ ],
1722
+ name: "minters",
1723
+ outputs: [
1724
+ {
1725
+ internalType: "address",
1726
+ name: "",
1727
+ type: "address"
1728
+ }
1729
+ ],
1730
+ stateMutability: "view",
1731
+ type: "function"
1732
+ },
1733
+ {
1734
+ inputs: [
1735
+ ],
1736
+ name: "mpc",
1737
+ outputs: [
1738
+ {
1739
+ internalType: "address",
1740
+ name: "",
1741
+ type: "address"
1742
+ }
1743
+ ],
1744
+ stateMutability: "view",
1745
+ type: "function"
1746
+ },
1747
+ {
1748
+ inputs: [
1749
+ ],
1750
+ name: "name",
1751
+ outputs: [
1752
+ {
1753
+ internalType: "string",
1754
+ name: "",
1755
+ type: "string"
1756
+ }
1757
+ ],
1758
+ stateMutability: "view",
1759
+ type: "function"
1760
+ },
1761
+ {
1762
+ inputs: [
1763
+ {
1764
+ internalType: "address",
1765
+ name: "",
1766
+ type: "address"
1767
+ }
1768
+ ],
1769
+ name: "nonces",
1770
+ outputs: [
1771
+ {
1772
+ internalType: "uint256",
1773
+ name: "",
1774
+ type: "uint256"
1775
+ }
1776
+ ],
1777
+ stateMutability: "view",
1778
+ type: "function"
1779
+ },
1780
+ {
1781
+ inputs: [
1782
+ ],
1783
+ name: "owner",
1784
+ outputs: [
1785
+ {
1786
+ internalType: "address",
1787
+ name: "",
1788
+ type: "address"
1789
+ }
1790
+ ],
1791
+ stateMutability: "view",
1792
+ type: "function"
1793
+ },
1794
+ {
1795
+ inputs: [
1796
+ ],
1797
+ name: "pendingDelay",
1798
+ outputs: [
1799
+ {
1800
+ internalType: "uint256",
1801
+ name: "",
1802
+ type: "uint256"
1803
+ }
1804
+ ],
1805
+ stateMutability: "view",
1806
+ type: "function"
1807
+ },
1808
+ {
1809
+ inputs: [
1810
+ ],
1811
+ name: "pendingMinter",
1812
+ outputs: [
1813
+ {
1814
+ internalType: "address",
1815
+ name: "",
1816
+ type: "address"
1817
+ }
1818
+ ],
1819
+ stateMutability: "view",
1820
+ type: "function"
1821
+ },
1822
+ {
1823
+ inputs: [
1824
+ ],
1825
+ name: "pendingVault",
1826
+ outputs: [
1827
+ {
1828
+ internalType: "address",
1829
+ name: "",
1830
+ type: "address"
1831
+ }
1832
+ ],
1833
+ stateMutability: "view",
1834
+ type: "function"
1835
+ },
1836
+ {
1837
+ inputs: [
1838
+ {
1839
+ internalType: "address",
1840
+ name: "target",
1841
+ type: "address"
1842
+ },
1843
+ {
1844
+ internalType: "address",
1845
+ name: "spender",
1846
+ type: "address"
1847
+ },
1848
+ {
1849
+ internalType: "uint256",
1850
+ name: "value",
1851
+ type: "uint256"
1852
+ },
1853
+ {
1854
+ internalType: "uint256",
1855
+ name: "deadline",
1856
+ type: "uint256"
1857
+ },
1858
+ {
1859
+ internalType: "uint8",
1860
+ name: "v",
1861
+ type: "uint8"
1862
+ },
1863
+ {
1864
+ internalType: "bytes32",
1865
+ name: "r",
1866
+ type: "bytes32"
1867
+ },
1868
+ {
1869
+ internalType: "bytes32",
1870
+ name: "s",
1871
+ type: "bytes32"
1872
+ }
1873
+ ],
1874
+ name: "permit",
1875
+ outputs: [
1876
+ ],
1877
+ stateMutability: "nonpayable",
1878
+ type: "function"
1879
+ },
1880
+ {
1881
+ inputs: [
1882
+ {
1883
+ internalType: "address",
1884
+ name: "_auth",
1885
+ type: "address"
1886
+ }
1887
+ ],
1888
+ name: "revokeMinter",
1889
+ outputs: [
1890
+ ],
1891
+ stateMutability: "nonpayable",
1892
+ type: "function"
1893
+ },
1894
+ {
1895
+ inputs: [
1896
+ {
1897
+ internalType: "address",
1898
+ name: "_auth",
1899
+ type: "address"
1900
+ }
1901
+ ],
1902
+ name: "setMinter",
1903
+ outputs: [
1904
+ ],
1905
+ stateMutability: "nonpayable",
1906
+ type: "function"
1907
+ },
1908
+ {
1909
+ inputs: [
1910
+ {
1911
+ internalType: "address",
1912
+ name: "_vault",
1913
+ type: "address"
1914
+ }
1915
+ ],
1916
+ name: "setVault",
1917
+ outputs: [
1918
+ ],
1919
+ stateMutability: "nonpayable",
1920
+ type: "function"
1921
+ },
1922
+ {
1923
+ inputs: [
1924
+ {
1925
+ internalType: "bool",
1926
+ name: "enabled",
1927
+ type: "bool"
1928
+ }
1929
+ ],
1930
+ name: "setVaultOnly",
1931
+ outputs: [
1932
+ ],
1933
+ stateMutability: "nonpayable",
1934
+ type: "function"
1935
+ },
1936
+ {
1937
+ inputs: [
1938
+ ],
1939
+ name: "symbol",
1940
+ outputs: [
1941
+ {
1942
+ internalType: "string",
1943
+ name: "",
1944
+ type: "string"
1945
+ }
1946
+ ],
1947
+ stateMutability: "view",
1948
+ type: "function"
1949
+ },
1950
+ {
1951
+ inputs: [
1952
+ ],
1953
+ name: "totalSupply",
1954
+ outputs: [
1955
+ {
1956
+ internalType: "uint256",
1957
+ name: "",
1958
+ type: "uint256"
1959
+ }
1960
+ ],
1961
+ stateMutability: "view",
1962
+ type: "function"
1963
+ },
1964
+ {
1965
+ inputs: [
1966
+ {
1967
+ internalType: "address",
1968
+ name: "to",
1969
+ type: "address"
1970
+ },
1971
+ {
1972
+ internalType: "uint256",
1973
+ name: "value",
1974
+ type: "uint256"
1975
+ }
1976
+ ],
1977
+ name: "transfer",
1978
+ outputs: [
1979
+ {
1980
+ internalType: "bool",
1981
+ name: "",
1982
+ type: "bool"
1983
+ }
1984
+ ],
1985
+ stateMutability: "nonpayable",
1986
+ type: "function"
1987
+ },
1988
+ {
1989
+ inputs: [
1990
+ {
1991
+ internalType: "address",
1992
+ name: "to",
1993
+ type: "address"
1994
+ },
1995
+ {
1996
+ internalType: "uint256",
1997
+ name: "value",
1998
+ type: "uint256"
1999
+ },
2000
+ {
2001
+ internalType: "bytes",
2002
+ name: "data",
2003
+ type: "bytes"
2004
+ }
2005
+ ],
2006
+ name: "transferAndCall",
2007
+ outputs: [
2008
+ {
2009
+ internalType: "bool",
2010
+ name: "",
2011
+ type: "bool"
2012
+ }
2013
+ ],
2014
+ stateMutability: "nonpayable",
2015
+ type: "function"
2016
+ },
2017
+ {
2018
+ inputs: [
2019
+ {
2020
+ internalType: "address",
2021
+ name: "from",
2022
+ type: "address"
2023
+ },
2024
+ {
2025
+ internalType: "address",
2026
+ name: "to",
2027
+ type: "address"
2028
+ },
2029
+ {
2030
+ internalType: "uint256",
2031
+ name: "value",
2032
+ type: "uint256"
2033
+ }
2034
+ ],
2035
+ name: "transferFrom",
2036
+ outputs: [
2037
+ {
2038
+ internalType: "bool",
2039
+ name: "",
2040
+ type: "bool"
2041
+ }
2042
+ ],
2043
+ stateMutability: "nonpayable",
2044
+ type: "function"
2045
+ },
2046
+ {
2047
+ inputs: [
2048
+ {
2049
+ internalType: "address",
2050
+ name: "target",
2051
+ type: "address"
2052
+ },
2053
+ {
2054
+ internalType: "address",
2055
+ name: "to",
2056
+ type: "address"
2057
+ },
2058
+ {
2059
+ internalType: "uint256",
2060
+ name: "value",
2061
+ type: "uint256"
2062
+ },
2063
+ {
2064
+ internalType: "uint256",
2065
+ name: "deadline",
2066
+ type: "uint256"
2067
+ },
2068
+ {
2069
+ internalType: "uint8",
2070
+ name: "v",
2071
+ type: "uint8"
2072
+ },
2073
+ {
2074
+ internalType: "bytes32",
2075
+ name: "r",
2076
+ type: "bytes32"
2077
+ },
2078
+ {
2079
+ internalType: "bytes32",
2080
+ name: "s",
2081
+ type: "bytes32"
2082
+ }
2083
+ ],
2084
+ name: "transferWithPermit",
2085
+ outputs: [
2086
+ {
2087
+ internalType: "bool",
2088
+ name: "",
2089
+ type: "bool"
2090
+ }
2091
+ ],
2092
+ stateMutability: "nonpayable",
2093
+ type: "function"
2094
+ },
2095
+ {
2096
+ inputs: [
2097
+ ],
2098
+ name: "underlying",
2099
+ outputs: [
2100
+ {
2101
+ internalType: "address",
2102
+ name: "",
2103
+ type: "address"
2104
+ }
2105
+ ],
2106
+ stateMutability: "view",
2107
+ type: "function"
2108
+ },
2109
+ {
2110
+ inputs: [
2111
+ ],
2112
+ name: "vault",
2113
+ outputs: [
2114
+ {
2115
+ internalType: "address",
2116
+ name: "",
2117
+ type: "address"
2118
+ }
2119
+ ],
2120
+ stateMutability: "view",
2121
+ type: "function"
2122
+ },
2123
+ {
2124
+ inputs: [
2125
+ {
2126
+ internalType: "uint256",
2127
+ name: "amount",
2128
+ type: "uint256"
2129
+ },
2130
+ {
2131
+ internalType: "address",
2132
+ name: "to",
2133
+ type: "address"
2134
+ }
2135
+ ],
2136
+ name: "withdraw",
2137
+ outputs: [
2138
+ {
2139
+ internalType: "uint256",
2140
+ name: "",
2141
+ type: "uint256"
2142
+ }
2143
+ ],
2144
+ stateMutability: "nonpayable",
2145
+ type: "function"
2146
+ },
2147
+ {
2148
+ inputs: [
2149
+ {
2150
+ internalType: "uint256",
2151
+ name: "amount",
2152
+ type: "uint256"
2153
+ }
2154
+ ],
2155
+ name: "withdraw",
2156
+ outputs: [
2157
+ {
2158
+ internalType: "uint256",
2159
+ name: "",
2160
+ type: "uint256"
2161
+ }
2162
+ ],
2163
+ stateMutability: "nonpayable",
2164
+ type: "function"
2165
+ },
2166
+ {
2167
+ inputs: [
2168
+ ],
2169
+ name: "withdraw",
2170
+ outputs: [
2171
+ {
2172
+ internalType: "uint256",
2173
+ name: "",
2174
+ type: "uint256"
2175
+ }
2176
+ ],
2177
+ stateMutability: "nonpayable",
2178
+ type: "function"
2179
+ },
2180
+ {
2181
+ inputs: [
2182
+ {
2183
+ internalType: "address",
2184
+ name: "from",
2185
+ type: "address"
2186
+ },
2187
+ {
2188
+ internalType: "uint256",
2189
+ name: "amount",
2190
+ type: "uint256"
2191
+ },
2192
+ {
2193
+ internalType: "address",
2194
+ name: "to",
2195
+ type: "address"
2196
+ }
2197
+ ],
2198
+ name: "withdrawVault",
2199
+ outputs: [
2200
+ {
2201
+ internalType: "uint256",
2202
+ name: "",
2203
+ type: "uint256"
2204
+ }
2205
+ ],
2206
+ stateMutability: "nonpayable",
2207
+ type: "function"
2208
+ }
2209
+ ];
2210
+ var IERC20 = {
2211
+ abi: abi
2212
+ };
2213
+
910
2214
  var ethers$1 = /*#__PURE__*/require('ethers');
911
2215
 
912
2216
  var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
@@ -954,16 +2258,8 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
954
2258
  return _context2.abrupt("return", {
955
2259
  markets: [dummyUserMarketDetails],
956
2260
  borrowLimit: dummyTokenAmount3,
957
- accruedPly: new sdkCore.CurrencyAmount({
958
- currency: dummyPly,
959
- amount: '100.12',
960
- isRaw: false
961
- }),
962
- lockedPly: new sdkCore.CurrencyAmount({
963
- currency: dummyPly,
964
- amount: '200.12',
965
- isRaw: false
966
- }),
2261
+ accruedPly: new TokenAmount(dummyPly, '100.12', false),
2262
+ lockedPly: new TokenAmount(dummyPly, '200.12', false),
967
2263
  borrowableAmount: dummyTokenAmount2
968
2264
  });
969
2265
 
@@ -989,11 +2285,7 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
989
2285
  switch (_context3.prev = _context3.next) {
990
2286
  case 0:
991
2287
  return _context3.abrupt("return", {
992
- totalStakedLiquidity: new sdkCore.CurrencyAmount({
993
- currency: dummyPlyAurora,
994
- amount: '12.1',
995
- isRaw: false
996
- }),
2288
+ totalStakedLiquidity: new TokenAmount(dummyPlyAurora, '12.1', false),
997
2289
  apy: 1.21
998
2290
  });
999
2291
 
@@ -1023,18 +2315,10 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
1023
2315
  break;
1024
2316
  }
1025
2317
 
1026
- return _context4.abrupt("return", new sdkCore.CurrencyAmount({
1027
- currency: DOLLAR,
1028
- amount: '1',
1029
- isRaw: false
1030
- }));
2318
+ return _context4.abrupt("return", new TokenAmount(DOLLAR, '1', false));
1031
2319
 
1032
2320
  case 2:
1033
- return _context4.abrupt("return", new sdkCore.CurrencyAmount({
1034
- currency: DOLLAR,
1035
- amount: '12.1',
1036
- isRaw: false
1037
- }));
2321
+ return _context4.abrupt("return", new TokenAmount(DOLLAR, '12.1', false));
1038
2322
 
1039
2323
  case 3:
1040
2324
  case "end":
@@ -1057,11 +2341,7 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
1057
2341
  while (1) {
1058
2342
  switch (_context5.prev = _context5.next) {
1059
2343
  case 0:
1060
- return _context5.abrupt("return", new sdkCore.CurrencyAmount({
1061
- currency: dummyPlyAurora,
1062
- amount: '103.4',
1063
- isRaw: false
1064
- }));
2344
+ return _context5.abrupt("return", new TokenAmount(dummyPlyAurora, '103.4', false));
1065
2345
 
1066
2346
  case 1:
1067
2347
  case "end":
@@ -1088,13 +2368,19 @@ var SdkReadWrite = /*#__PURE__*/function (_SdkRead) {
1088
2368
 
1089
2369
  _this = _SdkRead.apply(this, arguments) || this;
1090
2370
  _this.dummyTransaction = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6() {
2371
+ var dummyErc20Token;
1091
2372
  return runtime_1.wrap(function _callee6$(_context6) {
1092
2373
  while (1) {
1093
2374
  switch (_context6.prev = _context6.next) {
1094
2375
  case 0:
1095
- return _context6.abrupt("return", {});
2376
+ dummyErc20Token = new ethers$2.Contract(dummyToken.address, IERC20.abi, _this._providerOrSigner);
2377
+ _context6.next = 3;
2378
+ return dummyErc20Token.approve(dummyToken.address, 123);
1096
2379
 
1097
- case 1:
2380
+ case 3:
2381
+ return _context6.abrupt("return", _context6.sent);
2382
+
2383
+ case 4:
1098
2384
  case "end":
1099
2385
  return _context6.stop();
1100
2386
  }
@@ -1197,6 +2483,1571 @@ var SDK = /*#__PURE__*/function (_BlockchainEntity) {
1197
2483
  return SDK;
1198
2484
  }(BlockchainEntity);
1199
2485
 
2486
+ var abi$1 = [
2487
+ {
2488
+ inputs: [
2489
+ {
2490
+ internalType: "address",
2491
+ name: "underlying_",
2492
+ type: "address"
2493
+ },
2494
+ {
2495
+ internalType: "contract ComptrollerInterface",
2496
+ name: "comptroller_",
2497
+ type: "address"
2498
+ },
2499
+ {
2500
+ internalType: "contract InterestRateModel",
2501
+ name: "interestRateModel_",
2502
+ type: "address"
2503
+ },
2504
+ {
2505
+ internalType: "uint256",
2506
+ name: "initialExchangeRateMantissa_",
2507
+ type: "uint256"
2508
+ },
2509
+ {
2510
+ internalType: "string",
2511
+ name: "name_",
2512
+ type: "string"
2513
+ },
2514
+ {
2515
+ internalType: "string",
2516
+ name: "symbol_",
2517
+ type: "string"
2518
+ },
2519
+ {
2520
+ internalType: "uint8",
2521
+ name: "decimals_",
2522
+ type: "uint8"
2523
+ },
2524
+ {
2525
+ internalType: "address payable",
2526
+ name: "admin_",
2527
+ type: "address"
2528
+ },
2529
+ {
2530
+ internalType: "address",
2531
+ name: "implementation_",
2532
+ type: "address"
2533
+ },
2534
+ {
2535
+ internalType: "bytes",
2536
+ name: "becomeImplementationData",
2537
+ type: "bytes"
2538
+ }
2539
+ ],
2540
+ payable: false,
2541
+ stateMutability: "nonpayable",
2542
+ type: "constructor"
2543
+ },
2544
+ {
2545
+ anonymous: false,
2546
+ inputs: [
2547
+ {
2548
+ indexed: false,
2549
+ internalType: "uint256",
2550
+ name: "cashPrior",
2551
+ type: "uint256"
2552
+ },
2553
+ {
2554
+ indexed: false,
2555
+ internalType: "uint256",
2556
+ name: "interestAccumulated",
2557
+ type: "uint256"
2558
+ },
2559
+ {
2560
+ indexed: false,
2561
+ internalType: "uint256",
2562
+ name: "borrowIndex",
2563
+ type: "uint256"
2564
+ },
2565
+ {
2566
+ indexed: false,
2567
+ internalType: "uint256",
2568
+ name: "totalBorrows",
2569
+ type: "uint256"
2570
+ }
2571
+ ],
2572
+ name: "AccrueInterest",
2573
+ type: "event"
2574
+ },
2575
+ {
2576
+ anonymous: false,
2577
+ inputs: [
2578
+ {
2579
+ indexed: true,
2580
+ internalType: "address",
2581
+ name: "owner",
2582
+ type: "address"
2583
+ },
2584
+ {
2585
+ indexed: true,
2586
+ internalType: "address",
2587
+ name: "spender",
2588
+ type: "address"
2589
+ },
2590
+ {
2591
+ indexed: false,
2592
+ internalType: "uint256",
2593
+ name: "amount",
2594
+ type: "uint256"
2595
+ }
2596
+ ],
2597
+ name: "Approval",
2598
+ type: "event"
2599
+ },
2600
+ {
2601
+ anonymous: false,
2602
+ inputs: [
2603
+ {
2604
+ indexed: false,
2605
+ internalType: "address",
2606
+ name: "borrower",
2607
+ type: "address"
2608
+ },
2609
+ {
2610
+ indexed: false,
2611
+ internalType: "uint256",
2612
+ name: "borrowAmount",
2613
+ type: "uint256"
2614
+ },
2615
+ {
2616
+ indexed: false,
2617
+ internalType: "uint256",
2618
+ name: "accountBorrows",
2619
+ type: "uint256"
2620
+ },
2621
+ {
2622
+ indexed: false,
2623
+ internalType: "uint256",
2624
+ name: "totalBorrows",
2625
+ type: "uint256"
2626
+ }
2627
+ ],
2628
+ name: "Borrow",
2629
+ type: "event"
2630
+ },
2631
+ {
2632
+ anonymous: false,
2633
+ inputs: [
2634
+ {
2635
+ indexed: false,
2636
+ internalType: "uint256",
2637
+ name: "error",
2638
+ type: "uint256"
2639
+ },
2640
+ {
2641
+ indexed: false,
2642
+ internalType: "uint256",
2643
+ name: "info",
2644
+ type: "uint256"
2645
+ },
2646
+ {
2647
+ indexed: false,
2648
+ internalType: "uint256",
2649
+ name: "detail",
2650
+ type: "uint256"
2651
+ }
2652
+ ],
2653
+ name: "Failure",
2654
+ type: "event"
2655
+ },
2656
+ {
2657
+ anonymous: false,
2658
+ inputs: [
2659
+ {
2660
+ indexed: false,
2661
+ internalType: "address",
2662
+ name: "liquidator",
2663
+ type: "address"
2664
+ },
2665
+ {
2666
+ indexed: false,
2667
+ internalType: "address",
2668
+ name: "borrower",
2669
+ type: "address"
2670
+ },
2671
+ {
2672
+ indexed: false,
2673
+ internalType: "uint256",
2674
+ name: "repayAmount",
2675
+ type: "uint256"
2676
+ },
2677
+ {
2678
+ indexed: false,
2679
+ internalType: "address",
2680
+ name: "qiTokenCollateral",
2681
+ type: "address"
2682
+ },
2683
+ {
2684
+ indexed: false,
2685
+ internalType: "uint256",
2686
+ name: "seizeTokens",
2687
+ type: "uint256"
2688
+ }
2689
+ ],
2690
+ name: "LiquidateBorrow",
2691
+ type: "event"
2692
+ },
2693
+ {
2694
+ anonymous: false,
2695
+ inputs: [
2696
+ {
2697
+ indexed: false,
2698
+ internalType: "address",
2699
+ name: "minter",
2700
+ type: "address"
2701
+ },
2702
+ {
2703
+ indexed: false,
2704
+ internalType: "uint256",
2705
+ name: "mintAmount",
2706
+ type: "uint256"
2707
+ },
2708
+ {
2709
+ indexed: false,
2710
+ internalType: "uint256",
2711
+ name: "mintTokens",
2712
+ type: "uint256"
2713
+ }
2714
+ ],
2715
+ name: "Mint",
2716
+ type: "event"
2717
+ },
2718
+ {
2719
+ anonymous: false,
2720
+ inputs: [
2721
+ {
2722
+ indexed: false,
2723
+ internalType: "address",
2724
+ name: "oldAdmin",
2725
+ type: "address"
2726
+ },
2727
+ {
2728
+ indexed: false,
2729
+ internalType: "address",
2730
+ name: "newAdmin",
2731
+ type: "address"
2732
+ }
2733
+ ],
2734
+ name: "NewAdmin",
2735
+ type: "event"
2736
+ },
2737
+ {
2738
+ anonymous: false,
2739
+ inputs: [
2740
+ {
2741
+ indexed: false,
2742
+ internalType: "contract ComptrollerInterface",
2743
+ name: "oldComptroller",
2744
+ type: "address"
2745
+ },
2746
+ {
2747
+ indexed: false,
2748
+ internalType: "contract ComptrollerInterface",
2749
+ name: "newComptroller",
2750
+ type: "address"
2751
+ }
2752
+ ],
2753
+ name: "NewComptroller",
2754
+ type: "event"
2755
+ },
2756
+ {
2757
+ anonymous: false,
2758
+ inputs: [
2759
+ {
2760
+ indexed: false,
2761
+ internalType: "address",
2762
+ name: "oldImplementation",
2763
+ type: "address"
2764
+ },
2765
+ {
2766
+ indexed: false,
2767
+ internalType: "address",
2768
+ name: "newImplementation",
2769
+ type: "address"
2770
+ }
2771
+ ],
2772
+ name: "NewImplementation",
2773
+ type: "event"
2774
+ },
2775
+ {
2776
+ anonymous: false,
2777
+ inputs: [
2778
+ {
2779
+ indexed: false,
2780
+ internalType: "contract InterestRateModel",
2781
+ name: "oldInterestRateModel",
2782
+ type: "address"
2783
+ },
2784
+ {
2785
+ indexed: false,
2786
+ internalType: "contract InterestRateModel",
2787
+ name: "newInterestRateModel",
2788
+ type: "address"
2789
+ }
2790
+ ],
2791
+ name: "NewMarketInterestRateModel",
2792
+ type: "event"
2793
+ },
2794
+ {
2795
+ anonymous: false,
2796
+ inputs: [
2797
+ {
2798
+ indexed: false,
2799
+ internalType: "address",
2800
+ name: "oldPendingAdmin",
2801
+ type: "address"
2802
+ },
2803
+ {
2804
+ indexed: false,
2805
+ internalType: "address",
2806
+ name: "newPendingAdmin",
2807
+ type: "address"
2808
+ }
2809
+ ],
2810
+ name: "NewPendingAdmin",
2811
+ type: "event"
2812
+ },
2813
+ {
2814
+ anonymous: false,
2815
+ inputs: [
2816
+ {
2817
+ indexed: false,
2818
+ internalType: "uint256",
2819
+ name: "oldProtocolSeizeShareMantissa",
2820
+ type: "uint256"
2821
+ },
2822
+ {
2823
+ indexed: false,
2824
+ internalType: "uint256",
2825
+ name: "newProtocolSeizeShareMantissa",
2826
+ type: "uint256"
2827
+ }
2828
+ ],
2829
+ name: "NewProtocolSeizeShare",
2830
+ type: "event"
2831
+ },
2832
+ {
2833
+ anonymous: false,
2834
+ inputs: [
2835
+ {
2836
+ indexed: false,
2837
+ internalType: "uint256",
2838
+ name: "oldReserveFactorMantissa",
2839
+ type: "uint256"
2840
+ },
2841
+ {
2842
+ indexed: false,
2843
+ internalType: "uint256",
2844
+ name: "newReserveFactorMantissa",
2845
+ type: "uint256"
2846
+ }
2847
+ ],
2848
+ name: "NewReserveFactor",
2849
+ type: "event"
2850
+ },
2851
+ {
2852
+ anonymous: false,
2853
+ inputs: [
2854
+ {
2855
+ indexed: false,
2856
+ internalType: "address",
2857
+ name: "redeemer",
2858
+ type: "address"
2859
+ },
2860
+ {
2861
+ indexed: false,
2862
+ internalType: "uint256",
2863
+ name: "redeemAmount",
2864
+ type: "uint256"
2865
+ },
2866
+ {
2867
+ indexed: false,
2868
+ internalType: "uint256",
2869
+ name: "redeemTokens",
2870
+ type: "uint256"
2871
+ }
2872
+ ],
2873
+ name: "Redeem",
2874
+ type: "event"
2875
+ },
2876
+ {
2877
+ anonymous: false,
2878
+ inputs: [
2879
+ {
2880
+ indexed: false,
2881
+ internalType: "address",
2882
+ name: "payer",
2883
+ type: "address"
2884
+ },
2885
+ {
2886
+ indexed: false,
2887
+ internalType: "address",
2888
+ name: "borrower",
2889
+ type: "address"
2890
+ },
2891
+ {
2892
+ indexed: false,
2893
+ internalType: "uint256",
2894
+ name: "repayAmount",
2895
+ type: "uint256"
2896
+ },
2897
+ {
2898
+ indexed: false,
2899
+ internalType: "uint256",
2900
+ name: "accountBorrows",
2901
+ type: "uint256"
2902
+ },
2903
+ {
2904
+ indexed: false,
2905
+ internalType: "uint256",
2906
+ name: "totalBorrows",
2907
+ type: "uint256"
2908
+ }
2909
+ ],
2910
+ name: "RepayBorrow",
2911
+ type: "event"
2912
+ },
2913
+ {
2914
+ anonymous: false,
2915
+ inputs: [
2916
+ {
2917
+ indexed: false,
2918
+ internalType: "address",
2919
+ name: "benefactor",
2920
+ type: "address"
2921
+ },
2922
+ {
2923
+ indexed: false,
2924
+ internalType: "uint256",
2925
+ name: "addAmount",
2926
+ type: "uint256"
2927
+ },
2928
+ {
2929
+ indexed: false,
2930
+ internalType: "uint256",
2931
+ name: "newTotalReserves",
2932
+ type: "uint256"
2933
+ }
2934
+ ],
2935
+ name: "ReservesAdded",
2936
+ type: "event"
2937
+ },
2938
+ {
2939
+ anonymous: false,
2940
+ inputs: [
2941
+ {
2942
+ indexed: false,
2943
+ internalType: "address",
2944
+ name: "admin",
2945
+ type: "address"
2946
+ },
2947
+ {
2948
+ indexed: false,
2949
+ internalType: "uint256",
2950
+ name: "reduceAmount",
2951
+ type: "uint256"
2952
+ },
2953
+ {
2954
+ indexed: false,
2955
+ internalType: "uint256",
2956
+ name: "newTotalReserves",
2957
+ type: "uint256"
2958
+ }
2959
+ ],
2960
+ name: "ReservesReduced",
2961
+ type: "event"
2962
+ },
2963
+ {
2964
+ anonymous: false,
2965
+ inputs: [
2966
+ {
2967
+ indexed: true,
2968
+ internalType: "address",
2969
+ name: "from",
2970
+ type: "address"
2971
+ },
2972
+ {
2973
+ indexed: true,
2974
+ internalType: "address",
2975
+ name: "to",
2976
+ type: "address"
2977
+ },
2978
+ {
2979
+ indexed: false,
2980
+ internalType: "uint256",
2981
+ name: "amount",
2982
+ type: "uint256"
2983
+ }
2984
+ ],
2985
+ name: "Transfer",
2986
+ type: "event"
2987
+ },
2988
+ {
2989
+ payable: true,
2990
+ stateMutability: "payable",
2991
+ type: "fallback"
2992
+ },
2993
+ {
2994
+ constant: false,
2995
+ inputs: [
2996
+ ],
2997
+ name: "_acceptAdmin",
2998
+ outputs: [
2999
+ {
3000
+ internalType: "uint256",
3001
+ name: "",
3002
+ type: "uint256"
3003
+ }
3004
+ ],
3005
+ payable: false,
3006
+ stateMutability: "nonpayable",
3007
+ type: "function"
3008
+ },
3009
+ {
3010
+ constant: false,
3011
+ inputs: [
3012
+ {
3013
+ internalType: "uint256",
3014
+ name: "addAmount",
3015
+ type: "uint256"
3016
+ }
3017
+ ],
3018
+ name: "_addReserves",
3019
+ outputs: [
3020
+ {
3021
+ internalType: "uint256",
3022
+ name: "",
3023
+ type: "uint256"
3024
+ }
3025
+ ],
3026
+ payable: false,
3027
+ stateMutability: "nonpayable",
3028
+ type: "function"
3029
+ },
3030
+ {
3031
+ constant: false,
3032
+ inputs: [
3033
+ {
3034
+ internalType: "uint256",
3035
+ name: "reduceAmount",
3036
+ type: "uint256"
3037
+ }
3038
+ ],
3039
+ name: "_reduceReserves",
3040
+ outputs: [
3041
+ {
3042
+ internalType: "uint256",
3043
+ name: "",
3044
+ type: "uint256"
3045
+ }
3046
+ ],
3047
+ payable: false,
3048
+ stateMutability: "nonpayable",
3049
+ type: "function"
3050
+ },
3051
+ {
3052
+ constant: false,
3053
+ inputs: [
3054
+ {
3055
+ internalType: "contract ComptrollerInterface",
3056
+ name: "newComptroller",
3057
+ type: "address"
3058
+ }
3059
+ ],
3060
+ name: "_setComptroller",
3061
+ outputs: [
3062
+ {
3063
+ internalType: "uint256",
3064
+ name: "",
3065
+ type: "uint256"
3066
+ }
3067
+ ],
3068
+ payable: false,
3069
+ stateMutability: "nonpayable",
3070
+ type: "function"
3071
+ },
3072
+ {
3073
+ constant: false,
3074
+ inputs: [
3075
+ {
3076
+ internalType: "address",
3077
+ name: "implementation_",
3078
+ type: "address"
3079
+ },
3080
+ {
3081
+ internalType: "bool",
3082
+ name: "allowResign",
3083
+ type: "bool"
3084
+ },
3085
+ {
3086
+ internalType: "bytes",
3087
+ name: "becomeImplementationData",
3088
+ type: "bytes"
3089
+ }
3090
+ ],
3091
+ name: "_setImplementation",
3092
+ outputs: [
3093
+ ],
3094
+ payable: false,
3095
+ stateMutability: "nonpayable",
3096
+ type: "function"
3097
+ },
3098
+ {
3099
+ constant: false,
3100
+ inputs: [
3101
+ {
3102
+ internalType: "contract InterestRateModel",
3103
+ name: "newInterestRateModel",
3104
+ type: "address"
3105
+ }
3106
+ ],
3107
+ name: "_setInterestRateModel",
3108
+ outputs: [
3109
+ {
3110
+ internalType: "uint256",
3111
+ name: "",
3112
+ type: "uint256"
3113
+ }
3114
+ ],
3115
+ payable: false,
3116
+ stateMutability: "nonpayable",
3117
+ type: "function"
3118
+ },
3119
+ {
3120
+ constant: false,
3121
+ inputs: [
3122
+ {
3123
+ internalType: "address payable",
3124
+ name: "newPendingAdmin",
3125
+ type: "address"
3126
+ }
3127
+ ],
3128
+ name: "_setPendingAdmin",
3129
+ outputs: [
3130
+ {
3131
+ internalType: "uint256",
3132
+ name: "",
3133
+ type: "uint256"
3134
+ }
3135
+ ],
3136
+ payable: false,
3137
+ stateMutability: "nonpayable",
3138
+ type: "function"
3139
+ },
3140
+ {
3141
+ constant: false,
3142
+ inputs: [
3143
+ {
3144
+ internalType: "uint256",
3145
+ name: "newProtocolSeizeShareMantissa",
3146
+ type: "uint256"
3147
+ }
3148
+ ],
3149
+ name: "_setProtocolSeizeShare",
3150
+ outputs: [
3151
+ {
3152
+ internalType: "uint256",
3153
+ name: "",
3154
+ type: "uint256"
3155
+ }
3156
+ ],
3157
+ payable: false,
3158
+ stateMutability: "nonpayable",
3159
+ type: "function"
3160
+ },
3161
+ {
3162
+ constant: false,
3163
+ inputs: [
3164
+ {
3165
+ internalType: "uint256",
3166
+ name: "newReserveFactorMantissa",
3167
+ type: "uint256"
3168
+ }
3169
+ ],
3170
+ name: "_setReserveFactor",
3171
+ outputs: [
3172
+ {
3173
+ internalType: "uint256",
3174
+ name: "",
3175
+ type: "uint256"
3176
+ }
3177
+ ],
3178
+ payable: false,
3179
+ stateMutability: "nonpayable",
3180
+ type: "function"
3181
+ },
3182
+ {
3183
+ constant: true,
3184
+ inputs: [
3185
+ ],
3186
+ name: "accrualBlockTimestamp",
3187
+ outputs: [
3188
+ {
3189
+ internalType: "uint256",
3190
+ name: "",
3191
+ type: "uint256"
3192
+ }
3193
+ ],
3194
+ payable: false,
3195
+ stateMutability: "view",
3196
+ type: "function"
3197
+ },
3198
+ {
3199
+ constant: false,
3200
+ inputs: [
3201
+ ],
3202
+ name: "accrueInterest",
3203
+ outputs: [
3204
+ {
3205
+ internalType: "uint256",
3206
+ name: "",
3207
+ type: "uint256"
3208
+ }
3209
+ ],
3210
+ payable: false,
3211
+ stateMutability: "nonpayable",
3212
+ type: "function"
3213
+ },
3214
+ {
3215
+ constant: true,
3216
+ inputs: [
3217
+ ],
3218
+ name: "admin",
3219
+ outputs: [
3220
+ {
3221
+ internalType: "address payable",
3222
+ name: "",
3223
+ type: "address"
3224
+ }
3225
+ ],
3226
+ payable: false,
3227
+ stateMutability: "view",
3228
+ type: "function"
3229
+ },
3230
+ {
3231
+ constant: true,
3232
+ inputs: [
3233
+ {
3234
+ internalType: "address",
3235
+ name: "owner",
3236
+ type: "address"
3237
+ },
3238
+ {
3239
+ internalType: "address",
3240
+ name: "spender",
3241
+ type: "address"
3242
+ }
3243
+ ],
3244
+ name: "allowance",
3245
+ outputs: [
3246
+ {
3247
+ internalType: "uint256",
3248
+ name: "",
3249
+ type: "uint256"
3250
+ }
3251
+ ],
3252
+ payable: false,
3253
+ stateMutability: "view",
3254
+ type: "function"
3255
+ },
3256
+ {
3257
+ constant: false,
3258
+ inputs: [
3259
+ {
3260
+ internalType: "address",
3261
+ name: "spender",
3262
+ type: "address"
3263
+ },
3264
+ {
3265
+ internalType: "uint256",
3266
+ name: "amount",
3267
+ type: "uint256"
3268
+ }
3269
+ ],
3270
+ name: "approve",
3271
+ outputs: [
3272
+ {
3273
+ internalType: "bool",
3274
+ name: "",
3275
+ type: "bool"
3276
+ }
3277
+ ],
3278
+ payable: false,
3279
+ stateMutability: "nonpayable",
3280
+ type: "function"
3281
+ },
3282
+ {
3283
+ constant: true,
3284
+ inputs: [
3285
+ {
3286
+ internalType: "address",
3287
+ name: "owner",
3288
+ type: "address"
3289
+ }
3290
+ ],
3291
+ name: "balanceOf",
3292
+ outputs: [
3293
+ {
3294
+ internalType: "uint256",
3295
+ name: "",
3296
+ type: "uint256"
3297
+ }
3298
+ ],
3299
+ payable: false,
3300
+ stateMutability: "view",
3301
+ type: "function"
3302
+ },
3303
+ {
3304
+ constant: false,
3305
+ inputs: [
3306
+ {
3307
+ internalType: "address",
3308
+ name: "owner",
3309
+ type: "address"
3310
+ }
3311
+ ],
3312
+ name: "balanceOfUnderlying",
3313
+ outputs: [
3314
+ {
3315
+ internalType: "uint256",
3316
+ name: "",
3317
+ type: "uint256"
3318
+ }
3319
+ ],
3320
+ payable: false,
3321
+ stateMutability: "nonpayable",
3322
+ type: "function"
3323
+ },
3324
+ {
3325
+ constant: false,
3326
+ inputs: [
3327
+ {
3328
+ internalType: "uint256",
3329
+ name: "borrowAmount",
3330
+ type: "uint256"
3331
+ }
3332
+ ],
3333
+ name: "borrow",
3334
+ outputs: [
3335
+ {
3336
+ internalType: "uint256",
3337
+ name: "",
3338
+ type: "uint256"
3339
+ }
3340
+ ],
3341
+ payable: false,
3342
+ stateMutability: "nonpayable",
3343
+ type: "function"
3344
+ },
3345
+ {
3346
+ constant: false,
3347
+ inputs: [
3348
+ {
3349
+ internalType: "address",
3350
+ name: "account",
3351
+ type: "address"
3352
+ }
3353
+ ],
3354
+ name: "borrowBalanceCurrent",
3355
+ outputs: [
3356
+ {
3357
+ internalType: "uint256",
3358
+ name: "",
3359
+ type: "uint256"
3360
+ }
3361
+ ],
3362
+ payable: false,
3363
+ stateMutability: "nonpayable",
3364
+ type: "function"
3365
+ },
3366
+ {
3367
+ constant: true,
3368
+ inputs: [
3369
+ {
3370
+ internalType: "address",
3371
+ name: "account",
3372
+ type: "address"
3373
+ }
3374
+ ],
3375
+ name: "borrowBalanceStored",
3376
+ outputs: [
3377
+ {
3378
+ internalType: "uint256",
3379
+ name: "",
3380
+ type: "uint256"
3381
+ }
3382
+ ],
3383
+ payable: false,
3384
+ stateMutability: "view",
3385
+ type: "function"
3386
+ },
3387
+ {
3388
+ constant: true,
3389
+ inputs: [
3390
+ ],
3391
+ name: "borrowIndex",
3392
+ outputs: [
3393
+ {
3394
+ internalType: "uint256",
3395
+ name: "",
3396
+ type: "uint256"
3397
+ }
3398
+ ],
3399
+ payable: false,
3400
+ stateMutability: "view",
3401
+ type: "function"
3402
+ },
3403
+ {
3404
+ constant: true,
3405
+ inputs: [
3406
+ ],
3407
+ name: "borrowRatePerTimestamp",
3408
+ outputs: [
3409
+ {
3410
+ internalType: "uint256",
3411
+ name: "",
3412
+ type: "uint256"
3413
+ }
3414
+ ],
3415
+ payable: false,
3416
+ stateMutability: "view",
3417
+ type: "function"
3418
+ },
3419
+ {
3420
+ constant: true,
3421
+ inputs: [
3422
+ ],
3423
+ name: "comptroller",
3424
+ outputs: [
3425
+ {
3426
+ internalType: "contract ComptrollerInterface",
3427
+ name: "",
3428
+ type: "address"
3429
+ }
3430
+ ],
3431
+ payable: false,
3432
+ stateMutability: "view",
3433
+ type: "function"
3434
+ },
3435
+ {
3436
+ constant: true,
3437
+ inputs: [
3438
+ ],
3439
+ name: "decimals",
3440
+ outputs: [
3441
+ {
3442
+ internalType: "uint8",
3443
+ name: "",
3444
+ type: "uint8"
3445
+ }
3446
+ ],
3447
+ payable: false,
3448
+ stateMutability: "view",
3449
+ type: "function"
3450
+ },
3451
+ {
3452
+ constant: false,
3453
+ inputs: [
3454
+ {
3455
+ internalType: "bytes",
3456
+ name: "data",
3457
+ type: "bytes"
3458
+ }
3459
+ ],
3460
+ name: "delegateToImplementation",
3461
+ outputs: [
3462
+ {
3463
+ internalType: "bytes",
3464
+ name: "",
3465
+ type: "bytes"
3466
+ }
3467
+ ],
3468
+ payable: false,
3469
+ stateMutability: "nonpayable",
3470
+ type: "function"
3471
+ },
3472
+ {
3473
+ constant: true,
3474
+ inputs: [
3475
+ {
3476
+ internalType: "bytes",
3477
+ name: "data",
3478
+ type: "bytes"
3479
+ }
3480
+ ],
3481
+ name: "delegateToViewImplementation",
3482
+ outputs: [
3483
+ {
3484
+ internalType: "bytes",
3485
+ name: "",
3486
+ type: "bytes"
3487
+ }
3488
+ ],
3489
+ payable: false,
3490
+ stateMutability: "view",
3491
+ type: "function"
3492
+ },
3493
+ {
3494
+ constant: false,
3495
+ inputs: [
3496
+ ],
3497
+ name: "exchangeRateCurrent",
3498
+ outputs: [
3499
+ {
3500
+ internalType: "uint256",
3501
+ name: "",
3502
+ type: "uint256"
3503
+ }
3504
+ ],
3505
+ payable: false,
3506
+ stateMutability: "nonpayable",
3507
+ type: "function"
3508
+ },
3509
+ {
3510
+ constant: true,
3511
+ inputs: [
3512
+ ],
3513
+ name: "exchangeRateStored",
3514
+ outputs: [
3515
+ {
3516
+ internalType: "uint256",
3517
+ name: "",
3518
+ type: "uint256"
3519
+ }
3520
+ ],
3521
+ payable: false,
3522
+ stateMutability: "view",
3523
+ type: "function"
3524
+ },
3525
+ {
3526
+ constant: true,
3527
+ inputs: [
3528
+ {
3529
+ internalType: "address",
3530
+ name: "account",
3531
+ type: "address"
3532
+ }
3533
+ ],
3534
+ name: "getAccountSnapshot",
3535
+ outputs: [
3536
+ {
3537
+ internalType: "uint256",
3538
+ name: "",
3539
+ type: "uint256"
3540
+ },
3541
+ {
3542
+ internalType: "uint256",
3543
+ name: "",
3544
+ type: "uint256"
3545
+ },
3546
+ {
3547
+ internalType: "uint256",
3548
+ name: "",
3549
+ type: "uint256"
3550
+ },
3551
+ {
3552
+ internalType: "uint256",
3553
+ name: "",
3554
+ type: "uint256"
3555
+ }
3556
+ ],
3557
+ payable: false,
3558
+ stateMutability: "view",
3559
+ type: "function"
3560
+ },
3561
+ {
3562
+ constant: true,
3563
+ inputs: [
3564
+ ],
3565
+ name: "getCash",
3566
+ outputs: [
3567
+ {
3568
+ internalType: "uint256",
3569
+ name: "",
3570
+ type: "uint256"
3571
+ }
3572
+ ],
3573
+ payable: false,
3574
+ stateMutability: "view",
3575
+ type: "function"
3576
+ },
3577
+ {
3578
+ constant: true,
3579
+ inputs: [
3580
+ ],
3581
+ name: "implementation",
3582
+ outputs: [
3583
+ {
3584
+ internalType: "address",
3585
+ name: "",
3586
+ type: "address"
3587
+ }
3588
+ ],
3589
+ payable: false,
3590
+ stateMutability: "view",
3591
+ type: "function"
3592
+ },
3593
+ {
3594
+ constant: true,
3595
+ inputs: [
3596
+ ],
3597
+ name: "interestRateModel",
3598
+ outputs: [
3599
+ {
3600
+ internalType: "contract InterestRateModel",
3601
+ name: "",
3602
+ type: "address"
3603
+ }
3604
+ ],
3605
+ payable: false,
3606
+ stateMutability: "view",
3607
+ type: "function"
3608
+ },
3609
+ {
3610
+ constant: true,
3611
+ inputs: [
3612
+ ],
3613
+ name: "isQiToken",
3614
+ outputs: [
3615
+ {
3616
+ internalType: "bool",
3617
+ name: "",
3618
+ type: "bool"
3619
+ }
3620
+ ],
3621
+ payable: false,
3622
+ stateMutability: "view",
3623
+ type: "function"
3624
+ },
3625
+ {
3626
+ constant: false,
3627
+ inputs: [
3628
+ {
3629
+ internalType: "address",
3630
+ name: "borrower",
3631
+ type: "address"
3632
+ },
3633
+ {
3634
+ internalType: "uint256",
3635
+ name: "repayAmount",
3636
+ type: "uint256"
3637
+ },
3638
+ {
3639
+ internalType: "contract QiTokenInterface",
3640
+ name: "qiTokenCollateral",
3641
+ type: "address"
3642
+ }
3643
+ ],
3644
+ name: "liquidateBorrow",
3645
+ outputs: [
3646
+ {
3647
+ internalType: "uint256",
3648
+ name: "",
3649
+ type: "uint256"
3650
+ }
3651
+ ],
3652
+ payable: false,
3653
+ stateMutability: "nonpayable",
3654
+ type: "function"
3655
+ },
3656
+ {
3657
+ constant: false,
3658
+ inputs: [
3659
+ {
3660
+ internalType: "uint256",
3661
+ name: "mintAmount",
3662
+ type: "uint256"
3663
+ }
3664
+ ],
3665
+ name: "mint",
3666
+ outputs: [
3667
+ {
3668
+ internalType: "uint256",
3669
+ name: "",
3670
+ type: "uint256"
3671
+ }
3672
+ ],
3673
+ payable: false,
3674
+ stateMutability: "nonpayable",
3675
+ type: "function"
3676
+ },
3677
+ {
3678
+ constant: true,
3679
+ inputs: [
3680
+ ],
3681
+ name: "name",
3682
+ outputs: [
3683
+ {
3684
+ internalType: "string",
3685
+ name: "",
3686
+ type: "string"
3687
+ }
3688
+ ],
3689
+ payable: false,
3690
+ stateMutability: "view",
3691
+ type: "function"
3692
+ },
3693
+ {
3694
+ constant: true,
3695
+ inputs: [
3696
+ ],
3697
+ name: "pendingAdmin",
3698
+ outputs: [
3699
+ {
3700
+ internalType: "address payable",
3701
+ name: "",
3702
+ type: "address"
3703
+ }
3704
+ ],
3705
+ payable: false,
3706
+ stateMutability: "view",
3707
+ type: "function"
3708
+ },
3709
+ {
3710
+ constant: true,
3711
+ inputs: [
3712
+ ],
3713
+ name: "protocolSeizeShareMantissa",
3714
+ outputs: [
3715
+ {
3716
+ internalType: "uint256",
3717
+ name: "",
3718
+ type: "uint256"
3719
+ }
3720
+ ],
3721
+ payable: false,
3722
+ stateMutability: "view",
3723
+ type: "function"
3724
+ },
3725
+ {
3726
+ constant: false,
3727
+ inputs: [
3728
+ {
3729
+ internalType: "uint256",
3730
+ name: "redeemTokens",
3731
+ type: "uint256"
3732
+ }
3733
+ ],
3734
+ name: "redeem",
3735
+ outputs: [
3736
+ {
3737
+ internalType: "uint256",
3738
+ name: "",
3739
+ type: "uint256"
3740
+ }
3741
+ ],
3742
+ payable: false,
3743
+ stateMutability: "nonpayable",
3744
+ type: "function"
3745
+ },
3746
+ {
3747
+ constant: false,
3748
+ inputs: [
3749
+ {
3750
+ internalType: "uint256",
3751
+ name: "redeemAmount",
3752
+ type: "uint256"
3753
+ }
3754
+ ],
3755
+ name: "redeemUnderlying",
3756
+ outputs: [
3757
+ {
3758
+ internalType: "uint256",
3759
+ name: "",
3760
+ type: "uint256"
3761
+ }
3762
+ ],
3763
+ payable: false,
3764
+ stateMutability: "nonpayable",
3765
+ type: "function"
3766
+ },
3767
+ {
3768
+ constant: false,
3769
+ inputs: [
3770
+ {
3771
+ internalType: "uint256",
3772
+ name: "repayAmount",
3773
+ type: "uint256"
3774
+ }
3775
+ ],
3776
+ name: "repayBorrow",
3777
+ outputs: [
3778
+ {
3779
+ internalType: "uint256",
3780
+ name: "",
3781
+ type: "uint256"
3782
+ }
3783
+ ],
3784
+ payable: false,
3785
+ stateMutability: "nonpayable",
3786
+ type: "function"
3787
+ },
3788
+ {
3789
+ constant: false,
3790
+ inputs: [
3791
+ {
3792
+ internalType: "address",
3793
+ name: "borrower",
3794
+ type: "address"
3795
+ },
3796
+ {
3797
+ internalType: "uint256",
3798
+ name: "repayAmount",
3799
+ type: "uint256"
3800
+ }
3801
+ ],
3802
+ name: "repayBorrowBehalf",
3803
+ outputs: [
3804
+ {
3805
+ internalType: "uint256",
3806
+ name: "",
3807
+ type: "uint256"
3808
+ }
3809
+ ],
3810
+ payable: false,
3811
+ stateMutability: "nonpayable",
3812
+ type: "function"
3813
+ },
3814
+ {
3815
+ constant: true,
3816
+ inputs: [
3817
+ ],
3818
+ name: "reserveFactorMantissa",
3819
+ outputs: [
3820
+ {
3821
+ internalType: "uint256",
3822
+ name: "",
3823
+ type: "uint256"
3824
+ }
3825
+ ],
3826
+ payable: false,
3827
+ stateMutability: "view",
3828
+ type: "function"
3829
+ },
3830
+ {
3831
+ constant: false,
3832
+ inputs: [
3833
+ {
3834
+ internalType: "address",
3835
+ name: "liquidator",
3836
+ type: "address"
3837
+ },
3838
+ {
3839
+ internalType: "address",
3840
+ name: "borrower",
3841
+ type: "address"
3842
+ },
3843
+ {
3844
+ internalType: "uint256",
3845
+ name: "seizeTokens",
3846
+ type: "uint256"
3847
+ }
3848
+ ],
3849
+ name: "seize",
3850
+ outputs: [
3851
+ {
3852
+ internalType: "uint256",
3853
+ name: "",
3854
+ type: "uint256"
3855
+ }
3856
+ ],
3857
+ payable: false,
3858
+ stateMutability: "nonpayable",
3859
+ type: "function"
3860
+ },
3861
+ {
3862
+ constant: true,
3863
+ inputs: [
3864
+ ],
3865
+ name: "supplyRatePerTimestamp",
3866
+ outputs: [
3867
+ {
3868
+ internalType: "uint256",
3869
+ name: "",
3870
+ type: "uint256"
3871
+ }
3872
+ ],
3873
+ payable: false,
3874
+ stateMutability: "view",
3875
+ type: "function"
3876
+ },
3877
+ {
3878
+ constant: false,
3879
+ inputs: [
3880
+ {
3881
+ internalType: "contract EIP20NonStandardInterface",
3882
+ name: "token",
3883
+ type: "address"
3884
+ }
3885
+ ],
3886
+ name: "sweepToken",
3887
+ outputs: [
3888
+ ],
3889
+ payable: false,
3890
+ stateMutability: "nonpayable",
3891
+ type: "function"
3892
+ },
3893
+ {
3894
+ constant: true,
3895
+ inputs: [
3896
+ ],
3897
+ name: "symbol",
3898
+ outputs: [
3899
+ {
3900
+ internalType: "string",
3901
+ name: "",
3902
+ type: "string"
3903
+ }
3904
+ ],
3905
+ payable: false,
3906
+ stateMutability: "view",
3907
+ type: "function"
3908
+ },
3909
+ {
3910
+ constant: true,
3911
+ inputs: [
3912
+ ],
3913
+ name: "totalBorrows",
3914
+ outputs: [
3915
+ {
3916
+ internalType: "uint256",
3917
+ name: "",
3918
+ type: "uint256"
3919
+ }
3920
+ ],
3921
+ payable: false,
3922
+ stateMutability: "view",
3923
+ type: "function"
3924
+ },
3925
+ {
3926
+ constant: false,
3927
+ inputs: [
3928
+ ],
3929
+ name: "totalBorrowsCurrent",
3930
+ outputs: [
3931
+ {
3932
+ internalType: "uint256",
3933
+ name: "",
3934
+ type: "uint256"
3935
+ }
3936
+ ],
3937
+ payable: false,
3938
+ stateMutability: "nonpayable",
3939
+ type: "function"
3940
+ },
3941
+ {
3942
+ constant: true,
3943
+ inputs: [
3944
+ ],
3945
+ name: "totalReserves",
3946
+ outputs: [
3947
+ {
3948
+ internalType: "uint256",
3949
+ name: "",
3950
+ type: "uint256"
3951
+ }
3952
+ ],
3953
+ payable: false,
3954
+ stateMutability: "view",
3955
+ type: "function"
3956
+ },
3957
+ {
3958
+ constant: true,
3959
+ inputs: [
3960
+ ],
3961
+ name: "totalSupply",
3962
+ outputs: [
3963
+ {
3964
+ internalType: "uint256",
3965
+ name: "",
3966
+ type: "uint256"
3967
+ }
3968
+ ],
3969
+ payable: false,
3970
+ stateMutability: "view",
3971
+ type: "function"
3972
+ },
3973
+ {
3974
+ constant: false,
3975
+ inputs: [
3976
+ {
3977
+ internalType: "address",
3978
+ name: "dst",
3979
+ type: "address"
3980
+ },
3981
+ {
3982
+ internalType: "uint256",
3983
+ name: "amount",
3984
+ type: "uint256"
3985
+ }
3986
+ ],
3987
+ name: "transfer",
3988
+ outputs: [
3989
+ {
3990
+ internalType: "bool",
3991
+ name: "",
3992
+ type: "bool"
3993
+ }
3994
+ ],
3995
+ payable: false,
3996
+ stateMutability: "nonpayable",
3997
+ type: "function"
3998
+ },
3999
+ {
4000
+ constant: false,
4001
+ inputs: [
4002
+ {
4003
+ internalType: "address",
4004
+ name: "src",
4005
+ type: "address"
4006
+ },
4007
+ {
4008
+ internalType: "address",
4009
+ name: "dst",
4010
+ type: "address"
4011
+ },
4012
+ {
4013
+ internalType: "uint256",
4014
+ name: "amount",
4015
+ type: "uint256"
4016
+ }
4017
+ ],
4018
+ name: "transferFrom",
4019
+ outputs: [
4020
+ {
4021
+ internalType: "bool",
4022
+ name: "",
4023
+ type: "bool"
4024
+ }
4025
+ ],
4026
+ payable: false,
4027
+ stateMutability: "nonpayable",
4028
+ type: "function"
4029
+ },
4030
+ {
4031
+ constant: true,
4032
+ inputs: [
4033
+ ],
4034
+ name: "underlying",
4035
+ outputs: [
4036
+ {
4037
+ internalType: "address",
4038
+ name: "",
4039
+ type: "address"
4040
+ }
4041
+ ],
4042
+ payable: false,
4043
+ stateMutability: "view",
4044
+ type: "function"
4045
+ }
4046
+ ];
4047
+ var AuToken = {
4048
+ abi: abi$1
4049
+ };
4050
+
1200
4051
  var MoneyMarketRead = /*#__PURE__*/function (_BlockchainEntityRead) {
1201
4052
  _inheritsLoose(MoneyMarketRead, _BlockchainEntityRead);
1202
4053
 
@@ -1252,13 +4103,19 @@ var MoneyMarketReadWrite = /*#__PURE__*/function (_MoneyMarketRead) {
1252
4103
 
1253
4104
  _this2 = _MoneyMarketRead.apply(this, arguments) || this;
1254
4105
  _this2.dummyTransaction = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2() {
4106
+ var dummyErc20Token;
1255
4107
  return runtime_1.wrap(function _callee2$(_context2) {
1256
4108
  while (1) {
1257
4109
  switch (_context2.prev = _context2.next) {
1258
4110
  case 0:
1259
- return _context2.abrupt("return", {});
4111
+ dummyErc20Token = new ethers$2.Contract(dummyToken.address, IERC20.abi, _this2._providerOrSigner);
4112
+ _context2.next = 3;
4113
+ return dummyErc20Token.approve(dummyToken.address, 123);
1260
4114
 
1261
- case 1:
4115
+ case 3:
4116
+ return _context2.abrupt("return", _context2.sent);
4117
+
4118
+ case 4:
1262
4119
  case "end":
1263
4120
  return _context2.stop();
1264
4121
  }
@@ -1417,7 +4274,7 @@ var MoneyMarket = /*#__PURE__*/function (_BlockchainEntity) {
1417
4274
  var _this3;
1418
4275
 
1419
4276
  _this3 = _BlockchainEntity.call(this) || this;
1420
- _this3.address = sdkCore.validateAndParseAddress(address);
4277
+ _this3.address = validateAndParseAddress(address);
1421
4278
  return _this3;
1422
4279
  }
1423
4280
 
@@ -1430,10 +4287,6 @@ var MoneyMarket = /*#__PURE__*/function (_BlockchainEntity) {
1430
4287
  return MoneyMarket;
1431
4288
  }(BlockchainEntity);
1432
4289
 
1433
- function formatObject(object) {
1434
- return JSON.stringify(object, null, ' ');
1435
- }
1436
-
1437
4290
  function sum(a, b) {
1438
4291
  return a + b;
1439
4292
  }
@@ -1451,6 +4304,7 @@ exports.MoneyMarketReadWrite = MoneyMarketReadWrite;
1451
4304
  exports.SDK = SDK;
1452
4305
  exports.SdkRead = SdkRead;
1453
4306
  exports.SdkReadWrite = SdkReadWrite;
4307
+ exports.decimalFactor = decimalFactor;
1454
4308
  exports.dummyMarketAddress = dummyMarketAddress;
1455
4309
  exports.dummyPly = dummyPly;
1456
4310
  exports.dummyPlyAurora = dummyPlyAurora;
@@ -1462,4 +4316,5 @@ exports.dummyUserMarketDetails = dummyUserMarketDetails;
1462
4316
  exports.dummyZeroTokenAmount = dummyZeroTokenAmount;
1463
4317
  exports.formatObject = formatObject;
1464
4318
  exports.sum = sum;
4319
+ exports.validateAndParseAddress = validateAndParseAddress;
1465
4320
  //# sourceMappingURL=sdk.cjs.development.js.map