@aurigami/sdk 1.20.3 → 1.20.5

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.20.3",
2
+ "version": "1.20.5",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -66,9 +66,7 @@ export async function fetchPriceFromKyberSwap(
66
66
 
67
67
  export async function fetchPriceFromDefiLlamaAPI(id: string): Promise<BigNumber> {
68
68
  const price = await axios
69
- .post(`https://coins.llama.fi/prices`, {
70
- coins: [id],
71
- })
69
+ .get(`https://coins.llama.fi/prices/current/${id}`)
72
70
  .then((res: any) => {
73
71
  return res.data.coins[id].price;
74
72
  })
@@ -182,7 +182,7 @@ export class MoneyMarketRead extends BlockchainEntityRead {
182
182
  if (helpers.isSameAddress(this.underlying.address, consts.networkAddresses.tokens.stNEAR)) {
183
183
  depositMETAApy = helpers.calcLMRewardApr(
184
184
  await fetchValuation(
185
- TokenAmount.fromAddressAndAmount(consts.networkAddresses.tokens.META, '500000', false),
185
+ TokenAmount.fromAddressAndAmount(consts.networkAddresses.tokens.META, '250000', false),
186
186
  this._networkConnection.provider
187
187
  ),
188
188
  underlyingPrice.multipliedBy(totalDeposited.formattedAmount()),
package/src/a.ts.log DELETED
@@ -1,29 +0,0 @@
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();