@aurigami/sdk 1.9.2 → 1.9.4
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 +1 -1
- package/dist/interactors/misc.d.ts +1 -1
- package/dist/sdk.cjs.development.js +32 -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 +32 -28
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/SDK.ts +3 -2
- package/src/consts/constants.ts +3 -0
- package/src/interactors/misc.ts +20 -25
package/package.json
CHANGED
package/src/SDK.ts
CHANGED
|
@@ -86,9 +86,10 @@ export class SdkRead extends BlockchainEntityRead {
|
|
|
86
86
|
|
|
87
87
|
public async sneakAccounts(
|
|
88
88
|
accounts: string[],
|
|
89
|
-
tokenAddresses: string[]
|
|
89
|
+
tokenAddresses: string[],
|
|
90
|
+
dust: BigNumber = new BigNumber(0.1)
|
|
90
91
|
): Promise<types.AccountAuTokensInfo[]> {
|
|
91
|
-
return this._misc.sneakAccounts(accounts, tokenAddresses);
|
|
92
|
+
return this._misc.sneakAccounts(accounts, tokenAddresses, dust);
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
|
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
|
@@ -243,28 +243,23 @@ 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
|
-
...baseBalanceOfCall,
|
|
265
|
-
args: [consts.networkAddresses.misc.PLY_TOKEN_LOCK],
|
|
266
|
-
},
|
|
267
|
-
])) as BN[][];
|
|
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
|
+
|
|
268
263
|
let circulatingSupply: BN = BN.from(
|
|
269
264
|
'1' + '0'.repeat(10) + '0'.repeat(getDecimal(this.env.ply.address))
|
|
270
265
|
);
|
|
@@ -284,10 +279,10 @@ export class MiscRead extends BlockchainEntityRead {
|
|
|
284
279
|
|
|
285
280
|
public async sneakAccounts(
|
|
286
281
|
accounts: string[],
|
|
287
|
-
tokenAddresses: string[]
|
|
282
|
+
tokenAddresses: string[],
|
|
283
|
+
dust: BigNumber = new BigNumber(0.1)
|
|
288
284
|
): Promise<types.AccountAuTokensInfo[]> {
|
|
289
285
|
const _1E18 = BN.from(10).pow(18);
|
|
290
|
-
const dust = new BigNumber(0.1);
|
|
291
286
|
const oracle = this.env.getContract<PriceOracle>(
|
|
292
287
|
consts.networkAddresses.misc.oracle,
|
|
293
288
|
abis.AuriOracleABI.abi
|
|
@@ -310,7 +305,7 @@ export class MiscRead extends BlockchainEntityRead {
|
|
|
310
305
|
let balR = new BigNumber(bal.toString()).dividedBy(_1E18.toString());
|
|
311
306
|
let borR = new BigNumber(bor.toString()).dividedBy(_1E18.toString());
|
|
312
307
|
|
|
313
|
-
if (balR.
|
|
308
|
+
if (balR.lte(dust) && borR.lte(dust)) continue;
|
|
314
309
|
|
|
315
310
|
infos.push({
|
|
316
311
|
token: getSymbol(tokenAddresses[i]),
|