@aurigami/sdk 1.15.2 → 1.16.0

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.
@@ -175,5 +175,5 @@ export declare type UserNotification = {
175
175
  mail: string;
176
176
  utilisation: number;
177
177
  liquidation: boolean;
178
- };
178
+ }[];
179
179
  };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.15.2",
2
+ "version": "1.16.0",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -52,7 +52,7 @@
52
52
  "eslint-config-prettier": "^8.3.0",
53
53
  "eslint-plugin-prettier": "^4.0.0",
54
54
  "ethereum-waffle": "^3.4.4",
55
- "hardhat": "^2.9.3",
55
+ "hardhat": "^2.12.6",
56
56
  "husky": "^7.0.4",
57
57
  "prettier": "^2.5.1",
58
58
  "size-limit": "^7.0.5",
@@ -62,7 +62,7 @@
62
62
  "typescript": "^4.5.4"
63
63
  },
64
64
  "dependencies": {
65
- "@aurigami/contracts": "3.16.0",
65
+ "@aurigami/contracts": "3.17.0",
66
66
  "axios": "^0.26.1",
67
67
  "bignumber.js": "^9.0.2",
68
68
  "cache-decorator": "^0.1.6",
@@ -10,16 +10,7 @@ export const DECIMAL_PRECISION = 10;
10
10
 
11
11
  export const AURORA_PLUS_API_PREFIX = 'https://aurora.plus/api/wallet/';
12
12
 
13
- export type NetworkAddresses = {
14
- auTokens: {
15
- name: string;
16
- address: string;
17
- underlying: string;
18
- }[];
19
- misc: Record<string, string>;
20
- tokens: Record<string, string>;
21
- };
22
- export const networkAddresses: NetworkAddresses = {
13
+ export const networkAddresses = {
23
14
  auTokens: [
24
15
  {
25
16
  name: 'auUSDC',
@@ -76,6 +67,11 @@ export const networkAddresses: NetworkAddresses = {
76
67
  address: MAINNET_ADDRESSES.auTokens.USN.toLowerCase(),
77
68
  underlying: '0x5183e1b1091804bc2602586919e6880ac1cf2896'.toLowerCase(),
78
69
  },
70
+ {
71
+ name: 'auNEARX',
72
+ address: MAINNET_ADDRESSES.auTokens.NEARX.toLowerCase(),
73
+ underlying: '0xb39eeb9e168ef6c639f5e282fef1f6bc4dcae375'.toLowerCase(),
74
+ },
79
75
  ],
80
76
  misc: {
81
77
  COMPTROLLER: MAINNET_ADDRESSES.comptroller.toLowerCase(),
@@ -110,7 +106,7 @@ export const networkAddresses: NetworkAddresses = {
110
106
  WNEAR_TRI: '0x84b123875f0f36b966d0b6ca14b31121bd9676ad'.toLowerCase(),
111
107
  AURORA_WNEAR: '0x1e0e812fbcd3eb75d8562ad6f310ed94d258d008'.toLowerCase(),
112
108
  },
113
- };
109
+ } as const;
114
110
 
115
111
  export const DEPOSIT_ONLY_TOKENS = [
116
112
  MAINNET_ADDRESSES.auTokens.AURORA.toLowerCase(),
@@ -22,6 +22,7 @@ export const decimalRecords: Record<string, number> = {
22
22
  '0x04ac48711bcdc45b4d223fb021e09da73c71095e': 18, // PULP
23
23
  '0x044b6b0cd3bb13d2b9057781df4459c66781dce7': 18, // PLYWNEAR
24
24
  '0x5183e1b1091804bc2602586919e6880ac1cf2896': 18, // USN
25
- '0x84b123875f0f36b966d0b6ca14b31121bd9676ad': 18, //WNEAR_TRI,
26
- '0x1e0e812fbcd3eb75d8562ad6f310ed94d258d008': 18, //AURORA_WNEAR
25
+ '0x84b123875f0f36b966d0b6ca14b31121bd9676ad': 18, // WNEAR_TRI,
26
+ '0x1e0e812fbcd3eb75d8562ad6f310ed94d258d008': 18, // AURORA_WNEAR
27
+ '0xb39eeb9e168ef6c639f5e282fef1f6bc4dcae375': 24, // NEARX
27
28
  };
@@ -1,6 +1,7 @@
1
- import { AuErc20, AuETH, EthRepayHelper } from '@aurigami/contracts/typechain';
1
+ import { AuETH, AuErc20, EthRepayHelper } from '@aurigami/contracts/typechain';
2
2
  import { TransactionResponse } from '@ethersproject/abstract-provider';
3
3
  import BigNumber from 'bignumber.js';
4
+ import { CacheType, cache } from 'cache-decorator';
4
5
  import { BigNumber as BN, Contract } from 'ethers';
5
6
  import * as abis from '../abis';
6
7
  import * as consts from '../consts';
@@ -15,15 +16,7 @@ import {
15
16
  } from '../entities';
16
17
  import * as helpers from '../helpers';
17
18
  import { calcValuation, fetchPrice, fetchValuation } from '../helpers/priceFetcher';
18
- import {
19
- Address,
20
- Apy,
21
- ComptrollerRewardType,
22
- MoneyMarketDetails,
23
- NetworkConnection,
24
- } from '../types';
25
- import { getUnderlying } from '../helpers/helpers';
26
- import { cache, CacheType } from 'cache-decorator';
19
+ import { Address, Apy, MoneyMarketDetails, NetworkConnection } from '../types';
27
20
 
28
21
  type RewardSpeeds = {
29
22
  plyRewardSupplySpeed: BN;
@@ -189,7 +182,7 @@ export class MoneyMarketRead extends BlockchainEntityRead {
189
182
  if (helpers.isSameAddress(this.underlying.address, consts.networkAddresses.tokens.stNEAR)) {
190
183
  depositMETAApy = helpers.calcLMRewardApr(
191
184
  await fetchValuation(
192
- TokenAmount.fromAddressAndAmount(consts.networkAddresses.tokens.META, '1250000', false),
185
+ TokenAmount.fromAddressAndAmount(consts.networkAddresses.tokens.META, '1000000', false),
193
186
  this._networkConnection.provider
194
187
  ),
195
188
  underlyingPrice.multipliedBy(totalDeposited.formattedAmount()),
@@ -197,5 +197,5 @@ export type UserNotification = {
197
197
  mail: string;
198
198
  utilisation: number;
199
199
  liquidation: boolean;
200
- };
200
+ }[];
201
201
  };