@curvefi/llamalend-api 1.1.9 → 1.1.10

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.
@@ -322,6 +322,7 @@ export declare class LendMarketTemplate {
322
322
  A: (() => Promise<string>) & memoize.Memoized<() => Promise<string>>;
323
323
  basePrice: (() => Promise<string>) & memoize.Memoized<() => Promise<string>>;
324
324
  oraclePrice: (() => Promise<string>) & memoize.Memoized<() => Promise<string>>;
325
+ oracleAddress: (() => Promise<string>) & memoize.Memoized<() => Promise<string>>;
325
326
  oraclePriceBand(): Promise<number>;
326
327
  price(): Promise<string>;
327
328
  calcTickPrice(n: number): Promise<string>;
@@ -270,6 +270,12 @@ export class LendMarketTemplate {
270
270
  promise: true,
271
271
  maxAge: 60 * 1000, // 1m
272
272
  });
273
+ this.oracleAddress = memoize(() => __awaiter(this, void 0, void 0, function* () {
274
+ const _address = yield this.llamalend.contracts[this.addresses.amm].contract.price_oracle_contract(this.llamalend.constantOptions);
275
+ return _address;
276
+ }), {
277
+ promise: true,
278
+ });
273
279
  this._userState = memoize((...args_1) => __awaiter(this, [...args_1], void 0, function* (address = "") {
274
280
  address = _getAddress.call(this.llamalend, address);
275
281
  const contract = this.llamalend.contracts[this.addresses.controller].contract;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/llamalend-api",
3
- "version": "1.1.9",
3
+ "version": "1.1.10",
4
4
  "description": "JavaScript library for Curve Lending",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",
@@ -1286,6 +1286,14 @@ export class LendMarketTemplate {
1286
1286
  maxAge: 60 * 1000, // 1m
1287
1287
  });
1288
1288
 
1289
+ public oracleAddress = memoize(async (): Promise<string> => {
1290
+ const _address = await this.llamalend.contracts[this.addresses.amm].contract.price_oracle_contract(this.llamalend.constantOptions) as string;
1291
+ return _address;
1292
+ },
1293
+ {
1294
+ promise: true,
1295
+ });
1296
+
1289
1297
  public async oraclePriceBand(): Promise<number> {
1290
1298
  const oraclePriceBN = BN(await this.oraclePrice());
1291
1299
  const basePriceBN = BN(await this.basePrice());