@aurigami/sdk 1.3.0 → 1.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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.0",
2
+ "version": "1.3.1",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -1,11 +1,12 @@
1
1
  import { Provider } from "@ethersproject/abstract-provider";
2
2
  import { BlockchainEntity, BlockchainEntityRead } from "./BlockchainEntity";
3
3
  import { NetworkConnection } from "./types";
4
- import * as FileSystem from 'fs';
5
4
  import { BigNumber as BN } from "ethers";
6
5
  import { TransferEventQuery } from "./transfer-event-query";
7
6
  import { AIRDROP_START_TIMESTAMP, AIRDROP_KEEP_THRESHOLD, AIRDROP_END_TIMESTAMP } from "./constants";
8
7
  import { getBlockBeforeTimestamp, getCurrentTimestamp } from "./helpers";
8
+ import AIRDROP_AUTOKEN_INFO from "./airdrop_misc/auTokensInfo.json"
9
+ import AIRDROP_WHITELIST_ADDRESSES from "./airdrop_misc/whitelist.json"
9
10
 
10
11
  type AirdropUnderlyingInfo = {
11
12
  minDeposit: BN,
@@ -165,13 +166,10 @@ export class AirdropRead extends BlockchainEntityRead {
165
166
  private keepTrackers: AirdropAuTokenKeepTracker[] = [];
166
167
  public constructor(networkConnection: NetworkConnection) {
167
168
  super(networkConnection);
168
- this._whitelistedAddresses = new Set(
169
- FileSystem.readFileSync("airdrop_misc/whitelist.txt").toString().trim().split('\n')
170
- );
171
169
 
172
- let auTokens = JSON.parse(
173
- FileSystem.readFileSync("airdrop_misc/auTokensInfo.json").toString()
174
- )
170
+ this._whitelistedAddresses = new Set(AIRDROP_WHITELIST_ADDRESSES as string[]);
171
+
172
+ let auTokens: any = AIRDROP_AUTOKEN_INFO;
175
173
 
176
174
  for (let auToken in auTokens) {
177
175
  let { address, exchangeRate, deploymentBlock, underlying } = auTokens[auToken];
@@ -194,7 +192,6 @@ export class AirdropRead extends BlockchainEntityRead {
194
192
  }
195
193
  }
196
194
 
197
- // this is for testing purpose only
198
195
  public countWhitelistedAddresses(): number {
199
196
  return this._whitelistedAddresses.size;
200
197
  }
@@ -0,0 +1,34 @@
1
+ {
2
+ "auUSDC": {
3
+ "address": "0x4f0d864b1ABf4B701799a0b30b57A22dFEB5917b",
4
+ "exchangeRate": "200810680770707",
5
+ "deploymentBlock": "60501576",
6
+ "underlying": {
7
+ "minDeposit": "1000000000"
8
+ }
9
+ },
10
+ "auETH": {
11
+ "address": "0xca9511B610bA5fc7E311FDeF9cE16050eE4449E9",
12
+ "exchangeRate": "200390813218617347858934298",
13
+ "deploymentBlock": "60501625",
14
+ "underlying": {
15
+ "minDeposit": "300000000000000000"
16
+ }
17
+ },
18
+ "auWBTC": {
19
+ "address": "0xCFb6b0498cb7555e7e21502E0F449bf28760Adbb",
20
+ "exchangeRate": "20050472926613996",
21
+ "deploymentBlock": "60501670",
22
+ "underlying": {
23
+ "minDeposit": "2000000"
24
+ }
25
+ },
26
+ "auUSDT": {
27
+ "address": "0xaD5A2437Ff55ed7A8Cad3b797b3eC7c5a19B1c54",
28
+ "exchangeRate": "200868369820223",
29
+ "deploymentBlock": "60501723",
30
+ "underlying": {
31
+ "minDeposit": "1000000000"
32
+ }
33
+ }
34
+ }
@@ -0,0 +1,4 @@
1
+ 0x2b285e1b49ba0cb6f71d8b0d9cafdfbf9868fda9
2
+ 0xe8e9a0a2571299a0dabcaae98608352faf533e6a
3
+ 0xb3539af6596d8e08f75e96452d92bc17e3cdffc0
4
+ 0x0c5a5bd45078916ff5ff3acafeb19fe96fd747dc