@aurigami/sdk 0.4.0 → 0.4.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": "0.4.0",
2
+ "version": "0.4.1",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
package/src/SDK.ts CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  CurrencyAmount,
10
10
  HypotheticalStats
11
11
  } from './types';
12
- import { AVAX_DEFAULT_PROVIDER_URL, networkAddresses, BORROW_LIMIT_BUFFER, DECIMAL_PRECISION, REWARDCLAIMSTART, ONE_DAY, AurPlyPid } from './constants';
12
+ import { networkAddresses, BORROW_LIMIT_BUFFER, DECIMAL_PRECISION, REWARDCLAIMSTART, ONE_DAY, AurPlyPid } from './constants';
13
13
  import { TransactionResponse } from '@ethersproject/abstract-provider';
14
14
  import { Contract, BigNumber as BN, ethers, providers } from 'ethers';
15
15
  import { isSameAddress, decimalFactor, getCurrentTimestamp, calcLMRewardApr } from './helpers';
@@ -228,7 +228,7 @@ export class SDK extends BlockchainEntity {
228
228
  return new SdkRead(networkConnection);
229
229
  }
230
230
 
231
- public static defaultProvider(): providers.Provider {
232
- return new ethers.providers.JsonRpcProvider(AVAX_DEFAULT_PROVIDER_URL);
231
+ public readWrite(networkConnection: NetworkConnection): SdkReadWrite {
232
+ return new SdkReadWrite(networkConnection);
233
233
  }
234
234
  }
package/src/constants.ts CHANGED
@@ -1,29 +1,8 @@
1
1
  import BigNumber from 'bignumber.js';
2
- // import ethers from 'ethers';
3
- const ethers = require('ethers');
4
- import { Signer } from 'ethers';
5
- import * as dotenv from "dotenv";
6
- dotenv.config();
7
-
8
- export const AVAX_DEFAULT_PROVIDER_URL =
9
- 'https://api.avax.network/ext/bc/C/rpc';
10
-
11
- export const AVAX_DEFAULT_PROVIDER = new ethers.providers.JsonRpcProvider(
12
- AVAX_DEFAULT_PROVIDER_URL
13
- );
14
-
15
- export const AURORA_DEFAULT_PROVIDER_URL = `https://mainnet.aurora.dev/${process.env.AURORA_API_KEY}`;
16
-
17
- export const AURORA_DEFAULT_PROVIDER = new ethers.providers.JsonRpcProvider(
18
- AURORA_DEFAULT_PROVIDER_URL
19
- );
2
+ import { ethers, Signer} from 'ethers';
20
3
  export const dummyAddress: string = "0xDEADbeEfEEeEEEeEEEeEEeeeeeEeEEeeeeEEEEeE";
21
4
  export const ETHAddress: string = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
22
5
 
23
- const dummyPrivateKey =
24
- '1111111111111111111111111111111111111111111111111111111111111111';
25
- export const AURORA_DEFAULT_SIGNER: Signer = new ethers.Wallet(dummyPrivateKey, AURORA_DEFAULT_PROVIDER);
26
-
27
6
  export const AURORA_CHAINID = 1313161554;
28
7
 
29
8
  export const DECIMAL_PRECISION = 6;