@aurigami/sdk 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +1 -1
- package/dist/sdk.cjs.development.js +46 -59
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +46 -59
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/MoneyMarket.ts +1 -7
- package/src/SDK.ts +0 -1
- package/src/constants.ts +24 -24
- package/src/decimals.ts +17 -16
package/dist/constants.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import BigNumber from 'bignumber.js';
|
|
|
2
2
|
import { Signer } from 'ethers';
|
|
3
3
|
export declare const AVAX_DEFAULT_PROVIDER_URL = "https://api.avax.network/ext/bc/C/rpc";
|
|
4
4
|
export declare const AVAX_DEFAULT_PROVIDER: any;
|
|
5
|
-
export declare const AURORA_DEFAULT_PROVIDER_URL = "https://
|
|
5
|
+
export declare const AURORA_DEFAULT_PROVIDER_URL = "https://mainnet.aurora.dev";
|
|
6
6
|
export declare const AURORA_DEFAULT_PROVIDER: any;
|
|
7
7
|
export declare const dummyAddress: string;
|
|
8
8
|
export declare const ETHAddress: string;
|
|
@@ -900,7 +900,7 @@ var ethers = /*#__PURE__*/require('ethers');
|
|
|
900
900
|
|
|
901
901
|
var AVAX_DEFAULT_PROVIDER_URL = 'https://api.avax.network/ext/bc/C/rpc';
|
|
902
902
|
var AVAX_DEFAULT_PROVIDER = /*#__PURE__*/new ethers.providers.JsonRpcProvider(AVAX_DEFAULT_PROVIDER_URL);
|
|
903
|
-
var AURORA_DEFAULT_PROVIDER_URL = "https://
|
|
903
|
+
var AURORA_DEFAULT_PROVIDER_URL = "https://mainnet.aurora.dev";
|
|
904
904
|
var AURORA_DEFAULT_PROVIDER = /*#__PURE__*/new ethers.providers.JsonRpcProvider(AURORA_DEFAULT_PROVIDER_URL);
|
|
905
905
|
var dummyAddress = "0xDEADbeEfEEeEEEeEEEeEEeeeeeEeEEeeeeEEEEeE";
|
|
906
906
|
var ETHAddress = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
@@ -910,41 +910,41 @@ var AURORA_CHAINID = 1313161554;
|
|
|
910
910
|
var DECIMAL_PRECISION = 6;
|
|
911
911
|
var networkAddresses = {
|
|
912
912
|
auTokens: [{
|
|
913
|
-
address: /*#__PURE__*/'
|
|
914
|
-
underlying: /*#__PURE__*/'
|
|
913
|
+
address: /*#__PURE__*/'0x2dEf6eb801757655AD227110d65C80DB595bBc60'.toLowerCase(),
|
|
914
|
+
underlying: /*#__PURE__*/'0xb12bfca5a55806aaf64e99521918a4bf0fc40802'.toLowerCase()
|
|
915
915
|
}, {
|
|
916
|
-
address: /*#__PURE__*/'
|
|
916
|
+
address: /*#__PURE__*/'0x7b47690b04494A628151Dbb86B4cC95CF2629B14'.toLowerCase(),
|
|
917
917
|
underlying: /*#__PURE__*/ETHAddress.toLowerCase()
|
|
918
918
|
}, {
|
|
919
|
-
address: /*#__PURE__*/'
|
|
920
|
-
underlying: /*#__PURE__*/'
|
|
919
|
+
address: /*#__PURE__*/'0xFB0e4680B8b1c7B69fb6a3988029c74fea871DD9'.toLowerCase(),
|
|
920
|
+
underlying: /*#__PURE__*/'0xf4eb217ba2454613b15dbdea6e5f22276410e89e'.toLowerCase()
|
|
921
921
|
}, {
|
|
922
|
-
address: /*#__PURE__*/'
|
|
923
|
-
underlying: /*#__PURE__*/'
|
|
922
|
+
address: /*#__PURE__*/'0x6bB82009b316A9098C23E3962b4371E879c8D23D'.toLowerCase(),
|
|
923
|
+
underlying: /*#__PURE__*/'0x4988a896b1227218e4a686fde5eabdcabd91571f'.toLowerCase()
|
|
924
924
|
}, {
|
|
925
|
-
address: /*#__PURE__*/'
|
|
926
|
-
underlying: /*#__PURE__*/'
|
|
925
|
+
address: /*#__PURE__*/'0xBf43057c634868251e65e39b4f27662f644454b4'.toLowerCase(),
|
|
926
|
+
underlying: /*#__PURE__*/'0xe3520349f477a5f6eb06107066048508498a291b'.toLowerCase()
|
|
927
927
|
}, {
|
|
928
|
-
address: /*#__PURE__*/'
|
|
929
|
-
underlying: /*#__PURE__*/'
|
|
928
|
+
address: /*#__PURE__*/'0x83Ae17f197C1F1260543d4D5A710772761535066'.toLowerCase(),
|
|
929
|
+
underlying: /*#__PURE__*/'0x8bec47865ade3b172a928df8f990bc7f2a3b9f79'.toLowerCase()
|
|
930
930
|
}, {
|
|
931
|
-
address: /*#__PURE__*/'
|
|
932
|
-
underlying: /*#__PURE__*/'
|
|
931
|
+
address: /*#__PURE__*/'0xcC5CA0156317C1FF2A96E0f45659625081352071'.toLowerCase(),
|
|
932
|
+
underlying: /*#__PURE__*/'0xC42C30aC6Cc15faC9bD938618BcaA1a1FaE8501d'.toLowerCase()
|
|
933
933
|
}, {
|
|
934
|
-
address: /*#__PURE__*/'
|
|
935
|
-
underlying: /*#__PURE__*/'
|
|
934
|
+
address: /*#__PURE__*/'0x173Bf18675D52B4887C5d40E935C3ab1192aFb4C'.toLowerCase(),
|
|
935
|
+
underlying: /*#__PURE__*/'0xb9b8d9e5557381BF025f1A59B602ad3F19A4e4Be'.toLowerCase()
|
|
936
936
|
}],
|
|
937
937
|
misc: {
|
|
938
|
-
COMPTROLLER: /*#__PURE__*/"
|
|
939
|
-
oracle: /*#__PURE__*/"
|
|
940
|
-
AURIFAIRLAUNCH: /*#__PURE__*/"
|
|
941
|
-
AURILENS: /*#__PURE__*/'
|
|
942
|
-
TOKENLOCK: /*#__PURE__*/'
|
|
938
|
+
COMPTROLLER: /*#__PURE__*/"0x3b416D37A85F7aD941e36258d4Da660A1898E181".toLowerCase(),
|
|
939
|
+
oracle: /*#__PURE__*/"0x08A74ca75BAE803e92752f8d7A5cD718b1cA6509".toLowerCase(),
|
|
940
|
+
AURIFAIRLAUNCH: /*#__PURE__*/"0xeed0433Cbc81F25061bb739Ff8f1D5736b16d038".toLowerCase(),
|
|
941
|
+
AURILENS: /*#__PURE__*/'0xb11820C3d8ae1f6C31047644C59190280651C9da'.toLowerCase(),
|
|
942
|
+
TOKENLOCK: /*#__PURE__*/'0x537754515509A83Ce2D076c0982292AC5289b408'.toLowerCase()
|
|
943
943
|
},
|
|
944
944
|
tokens: {
|
|
945
|
-
AURORA: /*#__PURE__*/"
|
|
946
|
-
PLY: /*#__PURE__*/"
|
|
947
|
-
AURPLY: /*#__PURE__*/
|
|
945
|
+
AURORA: /*#__PURE__*/"0x8bec47865ade3b172a928df8f990bc7f2a3b9f79".toLowerCase(),
|
|
946
|
+
PLY: /*#__PURE__*/"0xb9b8d9e5557381BF025f1A59B602ad3F19A4e4Be".toLowerCase(),
|
|
947
|
+
AURPLY: /*#__PURE__*/"0x822E871518C22E8570cFbEa43FddbBFF963d4bdE".toLowerCase()
|
|
948
948
|
}
|
|
949
949
|
};
|
|
950
950
|
var BORROW_LIMIT_BUFFER = /*#__PURE__*/new BigNumber(0.95);
|
|
@@ -955,21 +955,22 @@ var AurPlyPid = 0;
|
|
|
955
955
|
|
|
956
956
|
var decimalRecords = {
|
|
957
957
|
'0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee': 18,
|
|
958
|
-
'
|
|
959
|
-
'
|
|
960
|
-
'
|
|
961
|
-
'
|
|
962
|
-
'
|
|
963
|
-
'
|
|
964
|
-
'
|
|
965
|
-
'
|
|
966
|
-
'
|
|
967
|
-
'
|
|
968
|
-
'
|
|
969
|
-
'
|
|
970
|
-
'
|
|
971
|
-
'
|
|
972
|
-
'
|
|
958
|
+
'0xb9b8d9e5557381bf025f1a59b602ad3f19a4e4be': 18,
|
|
959
|
+
'0x83ae17f197c1f1260543d4d5a710772761535066': 8,
|
|
960
|
+
'0xf4eb217ba2454613b15dbdea6e5f22276410e89e': 8,
|
|
961
|
+
'0x4988a896b1227218e4a686fde5eabdcabd91571f': 6,
|
|
962
|
+
'0xfb0e4680b8b1c7b69fb6a3988029c74fea871dd9': 8,
|
|
963
|
+
'0xb12bfca5a55806aaf64e99521918a4bf0fc40802': 6,
|
|
964
|
+
'0xbf43057c634868251e65e39b4f27662f644454b4': 8,
|
|
965
|
+
'0xc42c30ac6cc15fac9bd938618bcaa1a1fae8501d': 24,
|
|
966
|
+
'0x7b47690b04494a628151dbb86b4cc95cf2629b14': 8,
|
|
967
|
+
'0x822e871518c22e8570cfbea43fddbbff963d4bde': 18,
|
|
968
|
+
'0x2def6eb801757655ad227110d65c80db595bbc60': 8,
|
|
969
|
+
'0x6bb82009b316a9098c23e3962b4371e879c8d23d': 8,
|
|
970
|
+
'0x8bec47865ade3b172a928df8f990bc7f2a3b9f79': 18,
|
|
971
|
+
'0xcc5ca0156317c1ff2a96e0f45659625081352071': 8,
|
|
972
|
+
'0xe3520349f477a5f6eb06107066048508498a291b': 18,
|
|
973
|
+
'0x173bf18675d52b4887c5d40e935c3ab1192afb4c': 8
|
|
973
974
|
};
|
|
974
975
|
|
|
975
976
|
function formatObject(object) {
|
|
@@ -2343,32 +2344,19 @@ var MoneyMarketRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
2343
2344
|
|
|
2344
2345
|
_proto.getRewardSpeeds = /*#__PURE__*/function () {
|
|
2345
2346
|
var _getRewardSpeeds = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
|
2346
|
-
var
|
|
2347
|
+
var speeds;
|
|
2347
2348
|
return runtime_1.wrap(function _callee$(_context) {
|
|
2348
2349
|
while (1) {
|
|
2349
2350
|
switch (_context.prev = _context.next) {
|
|
2350
2351
|
case 0:
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
promises.push(this._comptroller.rewardSpeeds(exports.ComptrollerRewardType.PLY, this.auToken.address, true).then(function (res) {
|
|
2354
|
-
speeds.plyRewardSupplySpeed = res;
|
|
2355
|
-
}));
|
|
2356
|
-
promises.push(this._comptroller.rewardSpeeds(exports.ComptrollerRewardType.PLY, this.auToken.address, false).then(function (res) {
|
|
2357
|
-
speeds.plyRewardBorrowSpeed = res;
|
|
2358
|
-
}));
|
|
2359
|
-
promises.push(this._comptroller.rewardSpeeds(exports.ComptrollerRewardType.AURORA, this.auToken.address, true).then(function (res) {
|
|
2360
|
-
speeds.auroraRewardSupplySpeed = res;
|
|
2361
|
-
}));
|
|
2362
|
-
promises.push(this._comptroller.rewardSpeeds(exports.ComptrollerRewardType.AURORA, this.auToken.address, false).then(function (res) {
|
|
2363
|
-
speeds.auroraRewardBorrowSpeed = res;
|
|
2364
|
-
}));
|
|
2365
|
-
_context.next = 8;
|
|
2366
|
-
return Promise.all(promises);
|
|
2352
|
+
_context.next = 2;
|
|
2353
|
+
return this._auriLens.getRewardSpeeds(this._comptroller.address, this.auToken.address);
|
|
2367
2354
|
|
|
2368
|
-
case
|
|
2355
|
+
case 2:
|
|
2356
|
+
speeds = _context.sent;
|
|
2369
2357
|
return _context.abrupt("return", speeds);
|
|
2370
2358
|
|
|
2371
|
-
case
|
|
2359
|
+
case 4:
|
|
2372
2360
|
case "end":
|
|
2373
2361
|
return _context.stop();
|
|
2374
2362
|
}
|
|
@@ -3154,7 +3142,6 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
3154
3142
|
case 0:
|
|
3155
3143
|
promises = [];
|
|
3156
3144
|
promises.push(this._auriFairLaunch.getPoolInfo(AurPlyPid).then(function (res) {
|
|
3157
|
-
console.log(res);
|
|
3158
3145
|
stakedLiquidity = res.totalStake;
|
|
3159
3146
|
rewardPerSecond = res.rewardPerSecond;
|
|
3160
3147
|
}));
|