@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/dist/sdk.cjs.development.js +2 -4
- 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 +2 -4
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/helpers/priceFetcher.ts +1 -3
- package/src/interactors/MoneyMarket.ts +1 -1
- package/src/a.ts.log +0 -29
package/package.json
CHANGED
|
@@ -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
|
-
.
|
|
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, '
|
|
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();
|