@aurigami/sdk 1.9.1 → 1.9.3
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.cjs.development.js +16 -27
- 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 +16 -27
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/consts/constants.ts +3 -0
- package/src/interactors/misc.ts +22 -35
package/package.json
CHANGED
package/src/consts/constants.ts
CHANGED
|
@@ -84,6 +84,9 @@ export const networkAddresses: NetworkAddresses = {
|
|
|
84
84
|
AURI_AIRDROP: MAINNET_ADDRESSES.auriAirdrop.toLowerCase(),
|
|
85
85
|
MULTICALL: MAINNET_ADDRESSES.multicall.toLowerCase(),
|
|
86
86
|
TEAM_MULTISIG: '0x2D05FfFE70CE64c5954710D4C308dB31C8dBd8dE'.toLowerCase(),
|
|
87
|
+
TEAM_MULTISIG_AURORA_PLUS: '0x31f501589c7a090bf68f2fe2687744bf9130e1ab'.toLowerCase(),
|
|
88
|
+
AURORA_PLUS: '0xf075c896cbbb625e7911e284cd23ee19bdccf299'.toLowerCase(),
|
|
89
|
+
PULP_CONTRACT: '0x04ac48711bcdc45b4d223fb021e09da73c71095e'.toLowerCase(),
|
|
87
90
|
PLY_TOKEN_LOCK: MAINNET_ADDRESSES.plyTokenLock.toLowerCase(),
|
|
88
91
|
REFERRAL: MAINNET_ADDRESSES.referralDirectory.toLowerCase(),
|
|
89
92
|
AURI_INTERNAL_LENS: MAINNET_ADDRESSES.auriInternalLens.toLowerCase(),
|
package/src/interactors/misc.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { BigNumber as BN } from 'ethers';
|
|
|
4
4
|
import * as abis from '../abis';
|
|
5
5
|
import * as consts from '../consts';
|
|
6
6
|
import { AuriEnv, BlockchainEntityRead, PLYToken, Token, TokenAmount } from '../entities';
|
|
7
|
-
import { decimalFactor, getSymbol, isSameAddress } from '../helpers/helpers';
|
|
7
|
+
import { decimalFactor, getDecimal, getSymbol, isSameAddress } from '../helpers/helpers';
|
|
8
8
|
import { calcValuation, fetchPrice } from '../helpers/priceFetcher';
|
|
9
9
|
import * as types from '../types';
|
|
10
10
|
import { MoneyMarketRead } from './MoneyMarket';
|
|
@@ -243,41 +243,28 @@ export class MiscRead extends BlockchainEntityRead {
|
|
|
243
243
|
returnTypes: ['uint256'],
|
|
244
244
|
};
|
|
245
245
|
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
args: [consts.networkAddresses.misc.AURIFAIRLAUNCH],
|
|
267
|
-
},
|
|
268
|
-
// balance in vesting contract
|
|
269
|
-
{
|
|
270
|
-
...baseBalanceOfCall,
|
|
271
|
-
args: [consts.networkAddresses.misc.PLY_TOKEN_LOCK],
|
|
272
|
-
},
|
|
273
|
-
])) as BN[][];
|
|
274
|
-
let circulatingSupply: BN = BN.from(0);
|
|
246
|
+
const listAddrs = [
|
|
247
|
+
consts.networkAddresses.misc.TEAM_MULTISIG,
|
|
248
|
+
consts.networkAddresses.misc.COMPTROLLER,
|
|
249
|
+
consts.networkAddresses.misc.AURIFAIRLAUNCH,
|
|
250
|
+
consts.networkAddresses.misc.PLY_TOKEN_LOCK,
|
|
251
|
+
consts.networkAddresses.misc.TEAM_MULTISIG_AURORA_PLUS,
|
|
252
|
+
consts.networkAddresses.misc.AURORA_PLUS,
|
|
253
|
+
consts.networkAddresses.misc.PULP_CONTRACT,
|
|
254
|
+
];
|
|
255
|
+
|
|
256
|
+
const calls = listAddrs.map((addr) => ({
|
|
257
|
+
...baseBalanceOfCall,
|
|
258
|
+
args: [addr],
|
|
259
|
+
}));
|
|
260
|
+
|
|
261
|
+
const callResults = (await multicallRead.aggregate(calls)) as BN[][];
|
|
262
|
+
|
|
263
|
+
let circulatingSupply: BN = BN.from(
|
|
264
|
+
'1' + '0'.repeat(10) + '0'.repeat(getDecimal(this.env.ply.address))
|
|
265
|
+
);
|
|
275
266
|
callResults.forEach((result, i) => {
|
|
276
|
-
|
|
277
|
-
circulatingSupply = result[0];
|
|
278
|
-
} else {
|
|
279
|
-
circulatingSupply = circulatingSupply.sub(result[0]);
|
|
280
|
-
}
|
|
267
|
+
circulatingSupply = circulatingSupply.sub(result[0]);
|
|
281
268
|
});
|
|
282
269
|
|
|
283
270
|
return new TokenAmount(PLYToken, circulatingSupply.toString());
|