@aurigami/sdk 0.3.0 → 0.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/dist/constants.d.ts +1 -1
- package/dist/sdk.cjs.development.js +46 -59
- 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 +46 -59
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/MoneyMarket.ts +1 -7
- package/src/SDK.ts +0 -1
- package/src/constants.ts +24 -24
- package/src/decimals.ts +17 -16
package/src/MoneyMarket.ts
CHANGED
|
@@ -45,13 +45,7 @@ export class MoneyMarketRead extends BlockchainEntityRead {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
protected async getRewardSpeeds(): Promise<RewardSpeeds> {
|
|
48
|
-
var
|
|
49
|
-
var speeds = {} as RewardSpeeds;
|
|
50
|
-
promises.push(this._comptroller.rewardSpeeds(ComptrollerRewardType.PLY, this.auToken.address, true).then((res: BN) => {speeds.plyRewardSupplySpeed = res}));
|
|
51
|
-
promises.push(this._comptroller.rewardSpeeds(ComptrollerRewardType.PLY, this.auToken.address, false).then((res: BN) => {speeds.plyRewardBorrowSpeed = res}));
|
|
52
|
-
promises.push(this._comptroller.rewardSpeeds(ComptrollerRewardType.AURORA, this.auToken.address, true).then((res: BN) => {speeds.auroraRewardSupplySpeed = res}));
|
|
53
|
-
promises.push(this._comptroller.rewardSpeeds(ComptrollerRewardType.AURORA, this.auToken.address, false).then((res: BN) => {speeds.auroraRewardBorrowSpeed = res}));
|
|
54
|
-
await Promise.all(promises);
|
|
48
|
+
var speeds = await this._auriLens.getRewardSpeeds(this._comptroller.address, this.auToken.address);
|
|
55
49
|
return speeds;
|
|
56
50
|
}
|
|
57
51
|
public async getTotalTokenBorrowed(): Promise<TokenAmount> {
|
package/src/SDK.ts
CHANGED
|
@@ -141,7 +141,6 @@ export class SdkRead extends BlockchainEntityRead {
|
|
|
141
141
|
var stakedLiquidity: BN, rewardPerSecond: BN;
|
|
142
142
|
var promises = [];
|
|
143
143
|
promises.push(this._auriFairLaunch.getPoolInfo(AurPlyPid).then((res) => {
|
|
144
|
-
console.log(res)
|
|
145
144
|
stakedLiquidity = res.totalStake;
|
|
146
145
|
rewardPerSecond = res.rewardPerSecond;
|
|
147
146
|
}));
|
package/src/constants.ts
CHANGED
|
@@ -9,7 +9,7 @@ export const AVAX_DEFAULT_PROVIDER = new ethers.providers.JsonRpcProvider(
|
|
|
9
9
|
AVAX_DEFAULT_PROVIDER_URL
|
|
10
10
|
);
|
|
11
11
|
|
|
12
|
-
export const AURORA_DEFAULT_PROVIDER_URL = "https://
|
|
12
|
+
export const AURORA_DEFAULT_PROVIDER_URL = "https://mainnet.aurora.dev";
|
|
13
13
|
|
|
14
14
|
export const AURORA_DEFAULT_PROVIDER = new ethers.providers.JsonRpcProvider(
|
|
15
15
|
AURORA_DEFAULT_PROVIDER_URL
|
|
@@ -36,49 +36,49 @@ export type NetworkAddresses = {
|
|
|
36
36
|
export const networkAddresses: NetworkAddresses = {
|
|
37
37
|
auTokens: [
|
|
38
38
|
{
|
|
39
|
-
address: '
|
|
40
|
-
underlying: '
|
|
39
|
+
address: '0x2dEf6eb801757655AD227110d65C80DB595bBc60'.toLowerCase(),
|
|
40
|
+
underlying: '0xb12bfca5a55806aaf64e99521918a4bf0fc40802'.toLowerCase()
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
|
-
address: '
|
|
43
|
+
address: '0x7b47690b04494A628151Dbb86B4cC95CF2629B14'.toLowerCase(),
|
|
44
44
|
underlying: ETHAddress.toLowerCase()
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
address: '
|
|
48
|
-
underlying: '
|
|
47
|
+
address: '0xFB0e4680B8b1c7B69fb6a3988029c74fea871DD9'.toLowerCase(),
|
|
48
|
+
underlying: '0xf4eb217ba2454613b15dbdea6e5f22276410e89e'.toLowerCase()
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
address: '
|
|
52
|
-
underlying: '
|
|
51
|
+
address: '0x6bB82009b316A9098C23E3962b4371E879c8D23D'.toLowerCase(),
|
|
52
|
+
underlying: '0x4988a896b1227218e4a686fde5eabdcabd91571f'.toLowerCase()
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
address: '
|
|
56
|
-
underlying: '
|
|
55
|
+
address: '0xBf43057c634868251e65e39b4f27662f644454b4'.toLowerCase(),
|
|
56
|
+
underlying: '0xe3520349f477a5f6eb06107066048508498a291b'.toLowerCase()
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
|
-
address: '
|
|
60
|
-
underlying: '
|
|
59
|
+
address: '0x83Ae17f197C1F1260543d4D5A710772761535066'.toLowerCase(),
|
|
60
|
+
underlying: '0x8bec47865ade3b172a928df8f990bc7f2a3b9f79'.toLowerCase()
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
|
-
address: '
|
|
64
|
-
underlying: '
|
|
63
|
+
address: '0xcC5CA0156317C1FF2A96E0f45659625081352071'.toLowerCase(),
|
|
64
|
+
underlying: '0xC42C30aC6Cc15faC9bD938618BcaA1a1FaE8501d'.toLowerCase(),
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
address: '
|
|
68
|
-
underlying: '
|
|
67
|
+
address: '0x173Bf18675D52B4887C5d40E935C3ab1192aFb4C'.toLowerCase(),
|
|
68
|
+
underlying: '0xb9b8d9e5557381BF025f1A59B602ad3F19A4e4Be'.toLowerCase()
|
|
69
69
|
}
|
|
70
70
|
],
|
|
71
71
|
misc: {
|
|
72
|
-
COMPTROLLER: "
|
|
73
|
-
oracle: "
|
|
74
|
-
AURIFAIRLAUNCH: "
|
|
75
|
-
AURILENS: '
|
|
76
|
-
TOKENLOCK: '
|
|
72
|
+
COMPTROLLER: "0x3b416D37A85F7aD941e36258d4Da660A1898E181".toLowerCase(),
|
|
73
|
+
oracle: "0x08A74ca75BAE803e92752f8d7A5cD718b1cA6509".toLowerCase(),
|
|
74
|
+
AURIFAIRLAUNCH: "0xeed0433Cbc81F25061bb739Ff8f1D5736b16d038".toLowerCase(),
|
|
75
|
+
AURILENS: '0xb11820C3d8ae1f6C31047644C59190280651C9da'.toLowerCase(),
|
|
76
|
+
TOKENLOCK: '0x537754515509A83Ce2D076c0982292AC5289b408'.toLowerCase()
|
|
77
77
|
},
|
|
78
78
|
tokens: {
|
|
79
|
-
AURORA: "
|
|
80
|
-
PLY: "
|
|
81
|
-
AURPLY:
|
|
79
|
+
AURORA: "0x8bec47865ade3b172a928df8f990bc7f2a3b9f79".toLowerCase(),
|
|
80
|
+
PLY: "0xb9b8d9e5557381BF025f1A59B602ad3F19A4e4Be".toLowerCase(),
|
|
81
|
+
AURPLY: "0x822E871518C22E8570cFbEa43FddbBFF963d4bdE".toLowerCase()
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
package/src/decimals.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
export const decimalRecords: Record<string, number> = {
|
|
2
2
|
'0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee': 18,
|
|
3
|
-
'
|
|
4
|
-
'
|
|
5
|
-
'
|
|
6
|
-
'
|
|
7
|
-
'
|
|
8
|
-
'
|
|
9
|
-
'
|
|
10
|
-
'
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
|
|
3
|
+
'0xb9b8d9e5557381bf025f1a59b602ad3f19a4e4be': 18,
|
|
4
|
+
'0x83ae17f197c1f1260543d4d5a710772761535066': 8,
|
|
5
|
+
'0xf4eb217ba2454613b15dbdea6e5f22276410e89e': 8,
|
|
6
|
+
'0x4988a896b1227218e4a686fde5eabdcabd91571f': 6,
|
|
7
|
+
'0xfb0e4680b8b1c7b69fb6a3988029c74fea871dd9': 8,
|
|
8
|
+
'0xb12bfca5a55806aaf64e99521918a4bf0fc40802': 6,
|
|
9
|
+
'0xbf43057c634868251e65e39b4f27662f644454b4': 8,
|
|
10
|
+
'0xc42c30ac6cc15fac9bd938618bcaa1a1fae8501d': 24,
|
|
11
|
+
'0x7b47690b04494a628151dbb86b4cc95cf2629b14': 8,
|
|
12
|
+
'0x822e871518c22e8570cfbea43fddbbff963d4bde': 18,
|
|
13
|
+
'0x2def6eb801757655ad227110d65c80db595bbc60': 8,
|
|
14
|
+
'0x6bb82009b316a9098c23e3962b4371e879c8d23d': 8,
|
|
15
|
+
'0x8bec47865ade3b172a928df8f990bc7f2a3b9f79': 18,
|
|
16
|
+
'0xcc5ca0156317c1ff2a96e0f45659625081352071': 8,
|
|
17
|
+
'0xe3520349f477a5f6eb06107066048508498a291b': 18,
|
|
18
|
+
'0x173bf18675d52b4887c5d40e935c3ab1192afb4c': 8
|
|
19
|
+
}
|