@morpho-org/blue-sdk 3.0.0-next.7 → 3.0.0-next.9
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/lib/addresses.d.ts
CHANGED
|
@@ -139,6 +139,9 @@ export declare const addressesRegistry: {
|
|
|
139
139
|
readonly bundler3: "0x2d9C3A9E67c966C711208cc78b34fB9E9f8db589";
|
|
140
140
|
readonly generalAdapter1: "0xB261B51938A9767406ef83bbFbaAFE16691b7047";
|
|
141
141
|
readonly paraswapAdapter: "0x5F2617F12D1fDd1e43e72Cb80C92dFcE8124Db8d";
|
|
142
|
+
readonly compoundV3MigrationAdapter: "0xB34D2f54139bA12defC315C0822aDf9A5eB9A9b7";
|
|
143
|
+
readonly aaveV2MigrationAdapter: "0x43980Ae597f12Ff64690506b2AEEFFb4D8BeAF2a";
|
|
144
|
+
readonly aaveV3CoreMigrationAdapter: "0xEcB1662a1dff5C20650CF98c3334d2fddcD50742";
|
|
142
145
|
};
|
|
143
146
|
readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
|
144
147
|
readonly adaptiveCurveIrm: "0xe675A2161D4a6E2de2eeD70ac98EEBf257FBF0B0";
|
package/lib/addresses.js
CHANGED
|
@@ -108,6 +108,9 @@ exports.addressesRegistry = {
|
|
|
108
108
|
bundler3: "0x2d9C3A9E67c966C711208cc78b34fB9E9f8db589",
|
|
109
109
|
generalAdapter1: "0xB261B51938A9767406ef83bbFbaAFE16691b7047",
|
|
110
110
|
paraswapAdapter: "0x5F2617F12D1fDd1e43e72Cb80C92dFcE8124Db8d",
|
|
111
|
+
compoundV3MigrationAdapter: "0xB34D2f54139bA12defC315C0822aDf9A5eB9A9b7",
|
|
112
|
+
aaveV2MigrationAdapter: "0x43980Ae597f12Ff64690506b2AEEFFb4D8BeAF2a",
|
|
113
|
+
aaveV3CoreMigrationAdapter: "0xEcB1662a1dff5C20650CF98c3334d2fddcD50742",
|
|
111
114
|
},
|
|
112
115
|
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
113
116
|
adaptiveCurveIrm: "0xe675A2161D4a6E2de2eeD70ac98EEBf257FBF0B0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Market, type MaxBorrowOptions, type MaxPositionCapacities, type MaxWithdrawCollateralOptions } from "../market/index.js";
|
|
1
|
+
import { type IMarket, Market, type MaxBorrowOptions, type MaxPositionCapacities, type MaxWithdrawCollateralOptions } from "../market/index.js";
|
|
2
2
|
import type { Address, BigIntish, MarketId } from "../types.js";
|
|
3
3
|
export interface IPosition {
|
|
4
4
|
user: Address;
|
|
@@ -37,7 +37,7 @@ export declare class AccrualPosition extends Position implements IAccrualPositio
|
|
|
37
37
|
* The market on which this position is held.
|
|
38
38
|
*/
|
|
39
39
|
readonly market: Market;
|
|
40
|
-
constructor(position: IAccrualPosition, market:
|
|
40
|
+
constructor(position: IAccrualPosition, market: IMarket);
|
|
41
41
|
get supplyAssets(): bigint;
|
|
42
42
|
get borrowAssets(): bigint;
|
|
43
43
|
/**
|
package/lib/position/Position.js
CHANGED
|
@@ -40,8 +40,9 @@ class AccrualPosition extends Position {
|
|
|
40
40
|
*/
|
|
41
41
|
market;
|
|
42
42
|
constructor(position, market) {
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
const _market = new index_js_1.Market(market);
|
|
44
|
+
super({ ...position, marketId: _market.id });
|
|
45
|
+
this.market = _market;
|
|
45
46
|
}
|
|
46
47
|
get supplyAssets() {
|
|
47
48
|
return this.market.toSupplyAssets(this.supplyShares);
|