@aurigami/sdk 0.5.5 → 0.6.0
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.d.ts +2 -3
- package/dist/sdk.cjs.development.js +27 -28
- 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 +27 -28
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/SDK.ts +7 -6
- package/src/constants.ts +20 -24
package/dist/SDK.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { BlockchainEntity, BlockchainEntityRead } from './BlockchainEntity';
|
|
2
2
|
import { LockingDetails, PlyAuroraPoolDetails, NetworkConnection, UserDetails, UserMarketDetails, CurrencyAmount, HypotheticalStats, MarketAction } from './types';
|
|
3
3
|
import { TransactionResponse } from '@ethersproject/abstract-provider';
|
|
4
|
-
import {
|
|
5
|
-
import { AuriFairLaunch, Comptroller, TokenLock } from '@aurigami/contracts/typechain';
|
|
4
|
+
import { AuriFairLaunch, Comptroller, TokenLock, AuriLens } from '@aurigami/contracts/typechain';
|
|
6
5
|
import { TokenAmount } from './tokenAmount';
|
|
7
6
|
import { Token } from './token';
|
|
8
7
|
export declare class SdkRead extends BlockchainEntityRead {
|
|
9
8
|
protected _comptroller: Comptroller;
|
|
10
9
|
protected _tokenLock: TokenLock;
|
|
11
10
|
protected _auriFairLaunch: AuriFairLaunch;
|
|
12
|
-
protected _auriLens:
|
|
11
|
+
protected _auriLens: AuriLens;
|
|
13
12
|
constructor(networkConnection: NetworkConnection);
|
|
14
13
|
getLockingDetails(): Promise<LockingDetails>;
|
|
15
14
|
getUserDetails(userAddress: string): Promise<UserDetails>;
|
|
@@ -919,41 +919,38 @@ var AURORA_CHAINID = 1313161554;
|
|
|
919
919
|
var DECIMAL_PRECISION = 10;
|
|
920
920
|
var networkAddresses = {
|
|
921
921
|
auTokens: [{
|
|
922
|
-
address: /*#__PURE__*/'
|
|
923
|
-
underlying: /*#__PURE__*/'
|
|
922
|
+
address: /*#__PURE__*/'0x1c7EB2ADdC2df2F28E9631cce970D2E2DF22429A'.toLowerCase(),
|
|
923
|
+
underlying: /*#__PURE__*/'0x3dcB6AdF46E4d854E94719b6ed9cfab6939cC1Cb'.toLowerCase()
|
|
924
924
|
}, {
|
|
925
|
-
address: /*#__PURE__*/'
|
|
925
|
+
address: /*#__PURE__*/'0xdaE860b77c26498e7Bd8e16Fb80AD572FaB9688f'.toLowerCase(),
|
|
926
926
|
underlying: /*#__PURE__*/ETHAddress.toLowerCase()
|
|
927
927
|
}, {
|
|
928
|
-
address: /*#__PURE__*/'
|
|
929
|
-
underlying: /*#__PURE__*/'
|
|
928
|
+
address: /*#__PURE__*/'0x5329f32A9dDaC3d274Cc670B284561b0086D2244'.toLowerCase(),
|
|
929
|
+
underlying: /*#__PURE__*/'0x6fF98E346Ba4C56fBc3Ebc3f92477ffCe09D96AB'.toLowerCase()
|
|
930
930
|
}, {
|
|
931
|
-
address: /*#__PURE__*/'
|
|
932
|
-
underlying: /*#__PURE__*/'
|
|
931
|
+
address: /*#__PURE__*/'0x57E15Bf9Bc4c8a7AFd3C8DBE153ED29eC90B68Fa'.toLowerCase(),
|
|
932
|
+
underlying: /*#__PURE__*/'0x05b8777B6c280DB4E61CF0F63d59b4Ac8ec70538'.toLowerCase()
|
|
933
933
|
}, {
|
|
934
|
-
address: /*#__PURE__*/'
|
|
935
|
-
underlying: /*#__PURE__*/'
|
|
934
|
+
address: /*#__PURE__*/'0xdCdA4c7eF408961200193d7180357AEC404C267A'.toLowerCase(),
|
|
935
|
+
underlying: /*#__PURE__*/'0xd94951E6B276fD4327FFBD3253b6307d112403e2'.toLowerCase()
|
|
936
936
|
}, {
|
|
937
|
-
address: /*#__PURE__*/'
|
|
938
|
-
underlying: /*#__PURE__*/'
|
|
937
|
+
address: /*#__PURE__*/'0xa8474c18f502551937367120a6D8453dA785f1DD'.toLowerCase(),
|
|
938
|
+
underlying: /*#__PURE__*/'0x84B5C41DC786316c5aA319B5A22CA77472e1d31f'.toLowerCase()
|
|
939
939
|
}, {
|
|
940
|
-
address: /*#__PURE__*/'
|
|
941
|
-
underlying: /*#__PURE__*/'
|
|
942
|
-
}, {
|
|
943
|
-
address: /*#__PURE__*/'0xb00f53F708235Ba28664D56AF6be1a8254060cB9'.toLowerCase(),
|
|
944
|
-
underlying: /*#__PURE__*/'0xd3F181B767cbb4e399ABbf4c2d42AEF19E177D30'.toLowerCase()
|
|
940
|
+
address: /*#__PURE__*/'0x2Db190F0Db94E78B87D805e022D2a07803652211'.toLowerCase(),
|
|
941
|
+
underlying: /*#__PURE__*/'0xb2cBCe33a6fb7D2efFb1cF73A654a4c0c9255874'.toLowerCase()
|
|
945
942
|
}],
|
|
946
943
|
misc: {
|
|
947
|
-
COMPTROLLER: /*#__PURE__*/"
|
|
948
|
-
oracle: /*#__PURE__*/"
|
|
949
|
-
AURIFAIRLAUNCH: /*#__PURE__*/"
|
|
950
|
-
AURILENS: /*#__PURE__*/'
|
|
951
|
-
TOKENLOCK: /*#__PURE__*/'
|
|
952
|
-
FAUCET: /*#__PURE__*/'
|
|
944
|
+
COMPTROLLER: /*#__PURE__*/"0x1626d7941DF19781657a921014597c449F86941e".toLowerCase(),
|
|
945
|
+
oracle: /*#__PURE__*/"0xe0E2Bb669a75Ae2384371cB4c4c95ff6fC1581b0".toLowerCase(),
|
|
946
|
+
AURIFAIRLAUNCH: /*#__PURE__*/"0x4e91CdfeA23f44D4269E66494fe532867a0fAe5E".toLowerCase(),
|
|
947
|
+
AURILENS: /*#__PURE__*/'0x680e15080Df9ff61131499D21aa5Ca9Bd05E60e0'.toLowerCase(),
|
|
948
|
+
TOKENLOCK: /*#__PURE__*/'0xc77E562C41ec3Ce860b5424758B77ad0aDb1bB93'.toLowerCase(),
|
|
949
|
+
FAUCET: /*#__PURE__*/'0x8F791d611D71699B76C03857A51D7B7E5E66f01E'.toLowerCase()
|
|
953
950
|
},
|
|
954
951
|
tokens: {
|
|
955
952
|
AURORA: /*#__PURE__*/"0xd3F181B767cbb4e399ABbf4c2d42AEF19E177D30".toLowerCase(),
|
|
956
|
-
PLY: /*#__PURE__*/"
|
|
953
|
+
PLY: /*#__PURE__*/"0x84B5C41DC786316c5aA319B5A22CA77472e1d31f".toLowerCase(),
|
|
957
954
|
AURPLY: /*#__PURE__*/dummyAddress.toLowerCase()
|
|
958
955
|
}
|
|
959
956
|
};
|
|
@@ -3085,14 +3082,16 @@ var SdkRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
3085
3082
|
if (userMarketDetails[index].isCollateral) return p.plus(v.multipliedBy(userMarketDetails[index].collateralRatio));
|
|
3086
3083
|
return p;
|
|
3087
3084
|
}, new BigNumber(0));
|
|
3088
|
-
promises =
|
|
3089
|
-
promises
|
|
3090
|
-
promises
|
|
3085
|
+
promises = new Array(3);
|
|
3086
|
+
promises[0] = this._comptroller.getAccountLiquidity(userAddress);
|
|
3087
|
+
promises[1] = this._auriLens.callStatic.claimAndGetRewardBalancesMetadata(this._comptroller.address, this._auriFairLaunch.address, [AurPlyPid], {
|
|
3088
|
+
from: userAddress
|
|
3089
|
+
})["catch"](function (err) {
|
|
3091
3090
|
return {
|
|
3092
3091
|
plyAccrued: ethers.BigNumber.from(0)
|
|
3093
3092
|
};
|
|
3094
|
-
})
|
|
3095
|
-
promises
|
|
3093
|
+
});
|
|
3094
|
+
promises[2] = this._tokenLock.lockedAmounts(userAddress);
|
|
3096
3095
|
_context2.next = 23;
|
|
3097
3096
|
return Promise.all(promises);
|
|
3098
3097
|
|