@strkfarm/sdk 2.0.0-dev.2 → 2.0.0-dev.21
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/index.browser.global.js +2006 -1062
- package/dist/index.browser.mjs +1845 -911
- package/dist/index.d.ts +144 -37
- package/dist/index.js +1853 -915
- package/dist/index.mjs +1845 -911
- package/package.json +1 -1
- package/src/modules/ExtendedWrapperSDk/types.ts +1 -1
- package/src/modules/ExtendedWrapperSDk/wrapper.ts +39 -8
- package/src/modules/ekubo-quoter.ts +0 -12
- package/src/strategies/index.ts +2 -1
- package/src/strategies/universal-adapters/avnu-adapter.ts +17 -9
- package/src/strategies/universal-adapters/extended-adapter.ts +500 -146
- package/src/strategies/universal-adapters/index.ts +2 -1
- package/src/strategies/universal-adapters/vesu-adapter.ts +6 -6
- package/src/strategies/universal-adapters/vesu-multiply-adapter.ts +778 -396
- package/src/strategies/universal-lst-muliplier-strategy.tsx +2 -1
- package/src/strategies/universal-strategy.tsx +5 -0
- package/src/strategies/vesu-extended-strategy/services/operationService.ts +25 -16
- package/src/strategies/vesu-extended-strategy/types/transaction-metadata.ts +36 -0
- package/src/strategies/vesu-extended-strategy/utils/constants.ts +3 -6
- package/src/strategies/vesu-extended-strategy/utils/helper.ts +50 -16
- package/src/strategies/vesu-extended-strategy/vesu-extended-strategy.tsx +746 -305
|
@@ -5,4 +5,5 @@ export * from "./vesu-supply-only-adapter";
|
|
|
5
5
|
export * from "./vesu-multiply-adapter";
|
|
6
6
|
export * from "./extended-adapter";
|
|
7
7
|
export * from "./adapter-utils";
|
|
8
|
-
export * from "./unused-balance-adapter";
|
|
8
|
+
export * from "./unused-balance-adapter";
|
|
9
|
+
export * from "./avnu-adapter";
|
|
@@ -628,11 +628,11 @@ export class VesuAdapter extends CacheClass {
|
|
|
628
628
|
throw new Error('Pricer is not initialized');
|
|
629
629
|
}
|
|
630
630
|
// { '0': { collateral_shares: 0n, nominal_debt: 0n }, '1': 0n, '2': 0n }
|
|
631
|
-
const CACHE_KEY = `positions_${blockNumber}_${this.config.poolId.shortString()}_${this.config.collateral.symbol}_${this.config.debt.symbol}`;
|
|
632
|
-
const cacheData = this.getCache<VaultPosition[]>(CACHE_KEY);
|
|
633
|
-
if (cacheData) {
|
|
634
|
-
|
|
635
|
-
}
|
|
631
|
+
// const CACHE_KEY = `positions_${blockNumber}_${this.config.poolId.shortString()}_${this.config.collateral.symbol}_${this.config.debt.symbol}`;
|
|
632
|
+
// const cacheData = this.getCache<VaultPosition[]>(CACHE_KEY);
|
|
633
|
+
// if (cacheData) {
|
|
634
|
+
// return cacheData;
|
|
635
|
+
// }
|
|
636
636
|
|
|
637
637
|
const { contract, isV2} = this.getVesuSingletonContract(config, this.config.poolId);
|
|
638
638
|
const output: any = await contract
|
|
@@ -661,7 +661,7 @@ export class VesuAdapter extends CacheClass {
|
|
|
661
661
|
usdValue: debtAmount.multipliedBy(token2Price.price).toNumber(),
|
|
662
662
|
remarks: "Debt"
|
|
663
663
|
}];
|
|
664
|
-
this.setCache(CACHE_KEY, value, 60000); // ttl: 1min
|
|
664
|
+
// this.setCache(CACHE_KEY, value, 60000); // ttl: 1min
|
|
665
665
|
return value.map(v => ({ ...v, protocol: Protocols.VESU }));
|
|
666
666
|
}
|
|
667
667
|
|