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