@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/dist/SDK.d.ts +2 -2
- package/dist/constants.d.ts +0 -6
- package/dist/sdk.cjs.development.js +18 -32
- 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 +4 -13
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/SDK.ts +3 -3
- package/src/constants.ts +1 -22
package/package.json
CHANGED
package/src/SDK.ts
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
CurrencyAmount,
|
|
10
10
|
HypotheticalStats
|
|
11
11
|
} from './types';
|
|
12
|
-
import {
|
|
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
|
|
232
|
-
return new
|
|
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
|
-
|
|
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;
|