@curvefi/llamalend-api 1.1.10 → 1.1.12
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.
|
@@ -3,6 +3,7 @@ name: Release & Publish
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches:
|
|
6
|
+
- v1
|
|
6
7
|
- main
|
|
7
8
|
|
|
8
9
|
jobs:
|
|
@@ -50,4 +51,9 @@ jobs:
|
|
|
50
51
|
cache: npm
|
|
51
52
|
- run: npm ci
|
|
52
53
|
- run: npm run build
|
|
53
|
-
-
|
|
54
|
+
- name: Publish main as latest
|
|
55
|
+
if: github.ref_name == 'main'
|
|
56
|
+
run: npm publish --tag latest
|
|
57
|
+
- name: Publish v1 branch as legacy
|
|
58
|
+
if: github.ref_name == 'v1'
|
|
59
|
+
run: npm publish --tag legacy
|
|
@@ -187,6 +187,7 @@ export declare class MintMarketTemplate {
|
|
|
187
187
|
stablecoin: string;
|
|
188
188
|
collateral: string;
|
|
189
189
|
}>>;
|
|
190
|
+
oracleAddress: (() => Promise<string>) & memoize.Memoized<() => Promise<string>>;
|
|
190
191
|
oraclePrice(): Promise<string>;
|
|
191
192
|
oraclePriceBand(): Promise<number>;
|
|
192
193
|
price(): Promise<string>;
|
|
@@ -106,6 +106,12 @@ export class MintMarketTemplate {
|
|
|
106
106
|
promise: true,
|
|
107
107
|
maxAge: 60 * 1000, // 1m
|
|
108
108
|
});
|
|
109
|
+
this.oracleAddress = memoize(() => __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const _address = yield this.llamalend.contracts[this.address].contract.price_oracle_contract(this.llamalend.constantOptions);
|
|
111
|
+
return _address;
|
|
112
|
+
}), {
|
|
113
|
+
promise: true,
|
|
114
|
+
});
|
|
109
115
|
this.basePrice = memoize(() => __awaiter(this, void 0, void 0, function* () {
|
|
110
116
|
const _price = yield this.llamalend.contracts[this.address].contract.get_base_price(this.llamalend.constantOptions);
|
|
111
117
|
return formatUnits(_price);
|
package/package.json
CHANGED
|
@@ -592,6 +592,14 @@ export class MintMarketTemplate {
|
|
|
592
592
|
return res
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
+
public oracleAddress = memoize(async (): Promise<string> => {
|
|
596
|
+
const _address = await this.llamalend.contracts[this.address].contract.price_oracle_contract(this.llamalend.constantOptions) as string;
|
|
597
|
+
return _address;
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
promise: true,
|
|
601
|
+
});
|
|
602
|
+
|
|
595
603
|
public async oraclePrice(): Promise<string> {
|
|
596
604
|
const _price = await this.llamalend.contracts[this.address].contract.price_oracle(this.llamalend.constantOptions) as bigint;
|
|
597
605
|
return formatUnits(_price);
|