@aurigami/sdk 1.12.0-beta5 → 1.12.1-beta1

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.12.0-beta5",
2
+ "version": "1.12.1-beta1",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -70,4 +70,4 @@
70
70
  "jest": {
71
71
  "testURL": "https://app.aurigami.finance"
72
72
  }
73
- }
73
+ }
package/src/a.ts.log ADDED
@@ -0,0 +1,29 @@
1
+ import { AuToken } from '@aurigami/contracts/typechain';
2
+ import { ethers } from 'ethers';
3
+ import { AuriEnv, formatObject, getDecimal, MAINNET_ADDRESSES, networkAddresses, SDK, Token } from '../src';
4
+ import { ask } from 'stdio';
5
+ const AURORA_DEFAULT_PROVIDER_URL = `https://mainnet.aurora.dev/`;
6
+
7
+ const AURORA_DEFAULT_PROVIDER = new ethers.providers.JsonRpcProvider(
8
+ AURORA_DEFAULT_PROVIDER_URL
9
+ );
10
+
11
+ async function foo(contract: AuToken, block: number) {
12
+ let data = await contract.callStatic.borrowBalanceCurrent('0x25a087dc3512e3be548f0ca13233ae29d3781bdc', {blockTag: block});
13
+ console.log("c", data.toString());
14
+ data = await contract.callStatic.borrowBalanceStored('0x25a087dc3512e3be548f0ca13233ae29d3781bdc', {blockTag: block});
15
+ console.log("s", data.toString());
16
+ }
17
+
18
+ async function main() {
19
+ let env = new AuriEnv({ provider: AURORA_DEFAULT_PROVIDER });
20
+ let contract = env.getAuErc20Contract({address: MAINNET_ADDRESSES.auTokens.USDC});
21
+ // let block = 60596417;
22
+ // while (true) {
23
+ // block = parseInt(eval(await ask('block')));
24
+ // if (block == 0) break;
25
+ // await foo(contract, block);
26
+ // }
27
+ }
28
+
29
+ main();
@@ -1,12 +1,6 @@
1
1
  import { TransactionResponse } from '@ethersproject/abstract-provider';
2
- import axios from 'axios';
3
2
  import { ethers } from 'ethers';
4
- import {
5
- AURORA_PLUS_API_PREFIX,
6
- referralRewardDummy1,
7
- referralRewardDummy2,
8
- REFERRAL_CAMPAIGNS,
9
- } from '../consts';
3
+ import { REFERRAL_CAMPAIGNS } from '../consts';
10
4
  import { AuriEnv, BlockchainEntity, BlockchainEntityRead, TokenAmount } from '../entities';
11
5
  import { getBlocksTimestamp } from '../helpers';
12
6
  import * as AuriAPI from '../helpers/aurigami-api';
@@ -89,7 +83,6 @@ export class ReferralRead extends BlockchainEntityRead {
89
83
  refereeAddress: null,
90
84
  }));
91
85
 
92
- items = [referralRewardDummy1, referralRewardDummy2, ...items];
93
86
  return items;
94
87
  }
95
88
 
@@ -149,9 +142,10 @@ export class ReferralRead extends BlockchainEntityRead {
149
142
  }
150
143
 
151
144
  public async isOnAuroraPlus(address: Address): Promise<boolean> {
152
- let resp = await axios.get(AURORA_PLUS_API_PREFIX + address);
145
+ return true;
146
+ // let resp = await axios.get(AURORA_PLUS_API_PREFIX + address);
153
147
 
154
- return resp.data.status == 'active';
148
+ // return resp.data.status == 'active';
155
149
  }
156
150
 
157
151
  public async isNewUserAtReferralTime(address: Address): Promise<boolean> {