@morpho-org/blue-sdk 5.18.0 → 5.20.0
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/cjs/addresses.d.ts +36 -34
- package/lib/cjs/addresses.js +19 -17
- package/lib/cjs/vault/v2/VaultV2.d.ts +9 -1
- package/lib/cjs/vault/v2/VaultV2.js +8 -2
- package/lib/esm/addresses.d.ts +36 -34
- package/lib/esm/addresses.js +19 -17
- package/lib/esm/vault/v2/VaultV2.d.ts +9 -1
- package/lib/esm/vault/v2/VaultV2.js +8 -2
- package/package.json +1 -1
package/lib/cjs/addresses.d.ts
CHANGED
|
@@ -357,17 +357,18 @@ declare const _addressesRegistry: {
|
|
|
357
357
|
readonly wNative: "0xEa237441c92CAe6FC17Caaf9a7acB3f953be4bd1";
|
|
358
358
|
};
|
|
359
359
|
readonly 123420001114: {
|
|
360
|
-
readonly morpho: "
|
|
360
|
+
readonly morpho: "0xea4f2979D7A99B40404b447Cf71c008e3805760F";
|
|
361
361
|
readonly bundler3: {
|
|
362
|
-
readonly bundler3: "
|
|
363
|
-
readonly generalAdapter1: "
|
|
362
|
+
readonly bundler3: "0x88A4038BB4A14ecD7301c8Fb1f1e8732c4355D53";
|
|
363
|
+
readonly generalAdapter1: "0x29dcA26F9862CFb8064163ddc3401aaB4D4D05c6";
|
|
364
364
|
};
|
|
365
|
-
readonly adaptiveCurveIrm: "
|
|
366
|
-
readonly publicAllocator: "
|
|
367
|
-
readonly metaMorphoFactory: "
|
|
368
|
-
readonly chainlinkOracleFactory: "
|
|
369
|
-
readonly preLiquidationFactory: "
|
|
370
|
-
readonly wNative: "
|
|
365
|
+
readonly adaptiveCurveIrm: "0xd5661D965cc60ed1954d4f6725b766051De3ef97";
|
|
366
|
+
readonly publicAllocator: "0x0b7a3A49dafd98363B428cEC966106f29c0eee75";
|
|
367
|
+
readonly metaMorphoFactory: "0x3F4b9246b7Cd3F7671c70BeBd5AAFC08e5bb5f16";
|
|
368
|
+
readonly chainlinkOracleFactory: "0x391A3fd481743FE48409e2e31eDac8a5f4C7653A";
|
|
369
|
+
readonly preLiquidationFactory: "0xD55fA5DF6F1A21C2B93009A702aad3a0891C1B48";
|
|
370
|
+
readonly wNative: "0x3bd5C81a8Adf3355078Dc5F73c41d3194B316690";
|
|
371
|
+
readonly usdc: "0x8a2B28364102Bea189D99A475C494330Ef2bDD0B";
|
|
371
372
|
};
|
|
372
373
|
readonly 747474: {
|
|
373
374
|
readonly morpho: "0xD50F2DffFd62f94Ee4AEd9ca05C61d0753268aBc";
|
|
@@ -874,16 +875,16 @@ declare const _deployments: {
|
|
|
874
875
|
readonly preLiquidationFactory: 789925n;
|
|
875
876
|
};
|
|
876
877
|
readonly 123420001114: {
|
|
877
|
-
readonly morpho:
|
|
878
|
+
readonly morpho: 2410315n;
|
|
878
879
|
readonly bundler3: {
|
|
879
|
-
readonly bundler3:
|
|
880
|
-
readonly generalAdapter1:
|
|
880
|
+
readonly bundler3: 2471517n;
|
|
881
|
+
readonly generalAdapter1: 2471517n;
|
|
881
882
|
};
|
|
882
|
-
readonly adaptiveCurveIrm:
|
|
883
|
-
readonly publicAllocator:
|
|
884
|
-
readonly metaMorphoFactory:
|
|
885
|
-
readonly chainlinkOracleFactory:
|
|
886
|
-
readonly preLiquidationFactory:
|
|
883
|
+
readonly adaptiveCurveIrm: 2410315n;
|
|
884
|
+
readonly publicAllocator: 2410315n;
|
|
885
|
+
readonly metaMorphoFactory: 2410440n;
|
|
886
|
+
readonly chainlinkOracleFactory: 2410440n;
|
|
887
|
+
readonly preLiquidationFactory: 2471517n;
|
|
887
888
|
};
|
|
888
889
|
readonly 747474: {
|
|
889
890
|
readonly morpho: 2741069n;
|
|
@@ -1450,17 +1451,18 @@ export declare let addressesRegistry: {
|
|
|
1450
1451
|
readonly wNative: "0xEa237441c92CAe6FC17Caaf9a7acB3f953be4bd1";
|
|
1451
1452
|
};
|
|
1452
1453
|
readonly 123420001114: {
|
|
1453
|
-
readonly morpho: "
|
|
1454
|
+
readonly morpho: "0xea4f2979D7A99B40404b447Cf71c008e3805760F";
|
|
1454
1455
|
readonly bundler3: {
|
|
1455
|
-
readonly bundler3: "
|
|
1456
|
-
readonly generalAdapter1: "
|
|
1456
|
+
readonly bundler3: "0x88A4038BB4A14ecD7301c8Fb1f1e8732c4355D53";
|
|
1457
|
+
readonly generalAdapter1: "0x29dcA26F9862CFb8064163ddc3401aaB4D4D05c6";
|
|
1457
1458
|
};
|
|
1458
|
-
readonly adaptiveCurveIrm: "
|
|
1459
|
-
readonly publicAllocator: "
|
|
1460
|
-
readonly metaMorphoFactory: "
|
|
1461
|
-
readonly chainlinkOracleFactory: "
|
|
1462
|
-
readonly preLiquidationFactory: "
|
|
1463
|
-
readonly wNative: "
|
|
1459
|
+
readonly adaptiveCurveIrm: "0xd5661D965cc60ed1954d4f6725b766051De3ef97";
|
|
1460
|
+
readonly publicAllocator: "0x0b7a3A49dafd98363B428cEC966106f29c0eee75";
|
|
1461
|
+
readonly metaMorphoFactory: "0x3F4b9246b7Cd3F7671c70BeBd5AAFC08e5bb5f16";
|
|
1462
|
+
readonly chainlinkOracleFactory: "0x391A3fd481743FE48409e2e31eDac8a5f4C7653A";
|
|
1463
|
+
readonly preLiquidationFactory: "0xD55fA5DF6F1A21C2B93009A702aad3a0891C1B48";
|
|
1464
|
+
readonly wNative: "0x3bd5C81a8Adf3355078Dc5F73c41d3194B316690";
|
|
1465
|
+
readonly usdc: "0x8a2B28364102Bea189D99A475C494330Ef2bDD0B";
|
|
1464
1466
|
};
|
|
1465
1467
|
readonly 747474: {
|
|
1466
1468
|
readonly morpho: "0xD50F2DffFd62f94Ee4AEd9ca05C61d0753268aBc";
|
|
@@ -1965,16 +1967,16 @@ export declare let deployments: {
|
|
|
1965
1967
|
readonly preLiquidationFactory: 789925n;
|
|
1966
1968
|
};
|
|
1967
1969
|
readonly 123420001114: {
|
|
1968
|
-
readonly morpho:
|
|
1970
|
+
readonly morpho: 2410315n;
|
|
1969
1971
|
readonly bundler3: {
|
|
1970
|
-
readonly bundler3:
|
|
1971
|
-
readonly generalAdapter1:
|
|
1972
|
+
readonly bundler3: 2471517n;
|
|
1973
|
+
readonly generalAdapter1: 2471517n;
|
|
1972
1974
|
};
|
|
1973
|
-
readonly adaptiveCurveIrm:
|
|
1974
|
-
readonly publicAllocator:
|
|
1975
|
-
readonly metaMorphoFactory:
|
|
1976
|
-
readonly chainlinkOracleFactory:
|
|
1977
|
-
readonly preLiquidationFactory:
|
|
1975
|
+
readonly adaptiveCurveIrm: 2410315n;
|
|
1976
|
+
readonly publicAllocator: 2410315n;
|
|
1977
|
+
readonly metaMorphoFactory: 2410440n;
|
|
1978
|
+
readonly chainlinkOracleFactory: 2410440n;
|
|
1979
|
+
readonly preLiquidationFactory: 2471517n;
|
|
1978
1980
|
};
|
|
1979
1981
|
readonly 747474: {
|
|
1980
1982
|
readonly morpho: 2741069n;
|
package/lib/cjs/addresses.js
CHANGED
|
@@ -342,17 +342,19 @@ const _addressesRegistry = {
|
|
|
342
342
|
wNative: "0xEa237441c92CAe6FC17Caaf9a7acB3f953be4bd1",
|
|
343
343
|
},
|
|
344
344
|
[chain_js_1.ChainId.CampMainnet]: {
|
|
345
|
-
morpho: "
|
|
345
|
+
morpho: "0xea4f2979D7A99B40404b447Cf71c008e3805760F",
|
|
346
346
|
bundler3: {
|
|
347
|
-
bundler3: "
|
|
348
|
-
generalAdapter1: "
|
|
347
|
+
bundler3: "0x88A4038BB4A14ecD7301c8Fb1f1e8732c4355D53",
|
|
348
|
+
generalAdapter1: "0x29dcA26F9862CFb8064163ddc3401aaB4D4D05c6",
|
|
349
349
|
},
|
|
350
|
-
adaptiveCurveIrm: "
|
|
351
|
-
publicAllocator: "
|
|
352
|
-
metaMorphoFactory: "
|
|
353
|
-
chainlinkOracleFactory: "
|
|
354
|
-
preLiquidationFactory: "
|
|
355
|
-
wNative: "
|
|
350
|
+
adaptiveCurveIrm: "0xd5661D965cc60ed1954d4f6725b766051De3ef97",
|
|
351
|
+
publicAllocator: "0x0b7a3A49dafd98363B428cEC966106f29c0eee75",
|
|
352
|
+
metaMorphoFactory: "0x3F4b9246b7Cd3F7671c70BeBd5AAFC08e5bb5f16",
|
|
353
|
+
chainlinkOracleFactory: "0x391A3fd481743FE48409e2e31eDac8a5f4C7653A",
|
|
354
|
+
preLiquidationFactory: "0xD55fA5DF6F1A21C2B93009A702aad3a0891C1B48",
|
|
355
|
+
wNative: "0x3bd5C81a8Adf3355078Dc5F73c41d3194B316690",
|
|
356
|
+
// Must implement USDC permit version 2 (otherwise breaks permit signatures).
|
|
357
|
+
usdc: "0x8a2B28364102Bea189D99A475C494330Ef2bDD0B",
|
|
356
358
|
},
|
|
357
359
|
[chain_js_1.ChainId.KatanaMainnet]: {
|
|
358
360
|
morpho: "0xD50F2DffFd62f94Ee4AEd9ca05C61d0753268aBc",
|
|
@@ -863,16 +865,16 @@ const _deployments = {
|
|
|
863
865
|
preLiquidationFactory: 789925n,
|
|
864
866
|
},
|
|
865
867
|
[chain_js_1.ChainId.CampMainnet]: {
|
|
866
|
-
morpho:
|
|
868
|
+
morpho: 2410315n,
|
|
867
869
|
bundler3: {
|
|
868
|
-
bundler3:
|
|
869
|
-
generalAdapter1:
|
|
870
|
+
bundler3: 2471517n,
|
|
871
|
+
generalAdapter1: 2471517n,
|
|
870
872
|
},
|
|
871
|
-
adaptiveCurveIrm:
|
|
872
|
-
publicAllocator:
|
|
873
|
-
metaMorphoFactory:
|
|
874
|
-
chainlinkOracleFactory:
|
|
875
|
-
preLiquidationFactory:
|
|
873
|
+
adaptiveCurveIrm: 2410315n,
|
|
874
|
+
publicAllocator: 2410315n,
|
|
875
|
+
metaMorphoFactory: 2410440n,
|
|
876
|
+
chainlinkOracleFactory: 2410440n,
|
|
877
|
+
preLiquidationFactory: 2471517n,
|
|
876
878
|
},
|
|
877
879
|
[chain_js_1.ChainId.KatanaMainnet]: {
|
|
878
880
|
morpho: 2741069n,
|
|
@@ -64,7 +64,15 @@ export declare class AccrualVaultV2 extends VaultV2 implements IAccrualVaultV2 {
|
|
|
64
64
|
accrualLiquidityAdapter: IAccrualVaultV2Adapter | undefined;
|
|
65
65
|
accrualAdapters: IAccrualVaultV2Adapter[];
|
|
66
66
|
assetBalance: bigint;
|
|
67
|
-
|
|
67
|
+
/**
|
|
68
|
+
* The force deallocate penalty for each adapter, keyed by adapter address.
|
|
69
|
+
*/
|
|
70
|
+
forceDeallocatePenalties: Record<Address, bigint>;
|
|
71
|
+
constructor(vault: IAccrualVaultV2, accrualLiquidityAdapter: IAccrualVaultV2Adapter | undefined, accrualAdapters: IAccrualVaultV2Adapter[], assetBalance: bigint,
|
|
72
|
+
/**
|
|
73
|
+
* The force deallocate penalty for each adapter, keyed by adapter address.
|
|
74
|
+
*/
|
|
75
|
+
forceDeallocatePenalties: Record<Address, bigint>);
|
|
68
76
|
/**
|
|
69
77
|
* Returns the maximum amount of assets that can be deposited to the vault.
|
|
70
78
|
* @param assets The maximum amount of assets to deposit.
|
|
@@ -58,11 +58,17 @@ class AccrualVaultV2 extends VaultV2 {
|
|
|
58
58
|
accrualLiquidityAdapter;
|
|
59
59
|
accrualAdapters;
|
|
60
60
|
assetBalance;
|
|
61
|
-
|
|
61
|
+
forceDeallocatePenalties;
|
|
62
|
+
constructor(vault, accrualLiquidityAdapter, accrualAdapters, assetBalance,
|
|
63
|
+
/**
|
|
64
|
+
* The force deallocate penalty for each adapter, keyed by adapter address.
|
|
65
|
+
*/
|
|
66
|
+
forceDeallocatePenalties) {
|
|
62
67
|
super({ ...vault, adapters: accrualAdapters.map((a) => a.address) });
|
|
63
68
|
this.accrualLiquidityAdapter = accrualLiquidityAdapter;
|
|
64
69
|
this.accrualAdapters = accrualAdapters;
|
|
65
70
|
this.assetBalance = assetBalance;
|
|
71
|
+
this.forceDeallocatePenalties = forceDeallocatePenalties;
|
|
66
72
|
}
|
|
67
73
|
/**
|
|
68
74
|
* Returns the maximum amount of assets that can be deposited to the vault.
|
|
@@ -124,7 +130,7 @@ class AccrualVaultV2 extends VaultV2 {
|
|
|
124
130
|
* @param timestamp The timestamp at which to accrue interest. Must be greater than or equal to the vault's `lastUpdate`.
|
|
125
131
|
*/
|
|
126
132
|
accrueInterest(timestamp) {
|
|
127
|
-
const vault = new AccrualVaultV2(this, this.accrualLiquidityAdapter, this.accrualAdapters, this.assetBalance);
|
|
133
|
+
const vault = new AccrualVaultV2(this, this.accrualLiquidityAdapter, this.accrualAdapters, this.assetBalance, this.forceDeallocatePenalties);
|
|
128
134
|
timestamp = BigInt(timestamp);
|
|
129
135
|
const elapsed = timestamp - this.lastUpdate;
|
|
130
136
|
if (elapsed < 0n)
|
package/lib/esm/addresses.d.ts
CHANGED
|
@@ -357,17 +357,18 @@ declare const _addressesRegistry: {
|
|
|
357
357
|
readonly wNative: "0xEa237441c92CAe6FC17Caaf9a7acB3f953be4bd1";
|
|
358
358
|
};
|
|
359
359
|
readonly 123420001114: {
|
|
360
|
-
readonly morpho: "
|
|
360
|
+
readonly morpho: "0xea4f2979D7A99B40404b447Cf71c008e3805760F";
|
|
361
361
|
readonly bundler3: {
|
|
362
|
-
readonly bundler3: "
|
|
363
|
-
readonly generalAdapter1: "
|
|
362
|
+
readonly bundler3: "0x88A4038BB4A14ecD7301c8Fb1f1e8732c4355D53";
|
|
363
|
+
readonly generalAdapter1: "0x29dcA26F9862CFb8064163ddc3401aaB4D4D05c6";
|
|
364
364
|
};
|
|
365
|
-
readonly adaptiveCurveIrm: "
|
|
366
|
-
readonly publicAllocator: "
|
|
367
|
-
readonly metaMorphoFactory: "
|
|
368
|
-
readonly chainlinkOracleFactory: "
|
|
369
|
-
readonly preLiquidationFactory: "
|
|
370
|
-
readonly wNative: "
|
|
365
|
+
readonly adaptiveCurveIrm: "0xd5661D965cc60ed1954d4f6725b766051De3ef97";
|
|
366
|
+
readonly publicAllocator: "0x0b7a3A49dafd98363B428cEC966106f29c0eee75";
|
|
367
|
+
readonly metaMorphoFactory: "0x3F4b9246b7Cd3F7671c70BeBd5AAFC08e5bb5f16";
|
|
368
|
+
readonly chainlinkOracleFactory: "0x391A3fd481743FE48409e2e31eDac8a5f4C7653A";
|
|
369
|
+
readonly preLiquidationFactory: "0xD55fA5DF6F1A21C2B93009A702aad3a0891C1B48";
|
|
370
|
+
readonly wNative: "0x3bd5C81a8Adf3355078Dc5F73c41d3194B316690";
|
|
371
|
+
readonly usdc: "0x8a2B28364102Bea189D99A475C494330Ef2bDD0B";
|
|
371
372
|
};
|
|
372
373
|
readonly 747474: {
|
|
373
374
|
readonly morpho: "0xD50F2DffFd62f94Ee4AEd9ca05C61d0753268aBc";
|
|
@@ -874,16 +875,16 @@ declare const _deployments: {
|
|
|
874
875
|
readonly preLiquidationFactory: 789925n;
|
|
875
876
|
};
|
|
876
877
|
readonly 123420001114: {
|
|
877
|
-
readonly morpho:
|
|
878
|
+
readonly morpho: 2410315n;
|
|
878
879
|
readonly bundler3: {
|
|
879
|
-
readonly bundler3:
|
|
880
|
-
readonly generalAdapter1:
|
|
880
|
+
readonly bundler3: 2471517n;
|
|
881
|
+
readonly generalAdapter1: 2471517n;
|
|
881
882
|
};
|
|
882
|
-
readonly adaptiveCurveIrm:
|
|
883
|
-
readonly publicAllocator:
|
|
884
|
-
readonly metaMorphoFactory:
|
|
885
|
-
readonly chainlinkOracleFactory:
|
|
886
|
-
readonly preLiquidationFactory:
|
|
883
|
+
readonly adaptiveCurveIrm: 2410315n;
|
|
884
|
+
readonly publicAllocator: 2410315n;
|
|
885
|
+
readonly metaMorphoFactory: 2410440n;
|
|
886
|
+
readonly chainlinkOracleFactory: 2410440n;
|
|
887
|
+
readonly preLiquidationFactory: 2471517n;
|
|
887
888
|
};
|
|
888
889
|
readonly 747474: {
|
|
889
890
|
readonly morpho: 2741069n;
|
|
@@ -1450,17 +1451,18 @@ export declare let addressesRegistry: {
|
|
|
1450
1451
|
readonly wNative: "0xEa237441c92CAe6FC17Caaf9a7acB3f953be4bd1";
|
|
1451
1452
|
};
|
|
1452
1453
|
readonly 123420001114: {
|
|
1453
|
-
readonly morpho: "
|
|
1454
|
+
readonly morpho: "0xea4f2979D7A99B40404b447Cf71c008e3805760F";
|
|
1454
1455
|
readonly bundler3: {
|
|
1455
|
-
readonly bundler3: "
|
|
1456
|
-
readonly generalAdapter1: "
|
|
1456
|
+
readonly bundler3: "0x88A4038BB4A14ecD7301c8Fb1f1e8732c4355D53";
|
|
1457
|
+
readonly generalAdapter1: "0x29dcA26F9862CFb8064163ddc3401aaB4D4D05c6";
|
|
1457
1458
|
};
|
|
1458
|
-
readonly adaptiveCurveIrm: "
|
|
1459
|
-
readonly publicAllocator: "
|
|
1460
|
-
readonly metaMorphoFactory: "
|
|
1461
|
-
readonly chainlinkOracleFactory: "
|
|
1462
|
-
readonly preLiquidationFactory: "
|
|
1463
|
-
readonly wNative: "
|
|
1459
|
+
readonly adaptiveCurveIrm: "0xd5661D965cc60ed1954d4f6725b766051De3ef97";
|
|
1460
|
+
readonly publicAllocator: "0x0b7a3A49dafd98363B428cEC966106f29c0eee75";
|
|
1461
|
+
readonly metaMorphoFactory: "0x3F4b9246b7Cd3F7671c70BeBd5AAFC08e5bb5f16";
|
|
1462
|
+
readonly chainlinkOracleFactory: "0x391A3fd481743FE48409e2e31eDac8a5f4C7653A";
|
|
1463
|
+
readonly preLiquidationFactory: "0xD55fA5DF6F1A21C2B93009A702aad3a0891C1B48";
|
|
1464
|
+
readonly wNative: "0x3bd5C81a8Adf3355078Dc5F73c41d3194B316690";
|
|
1465
|
+
readonly usdc: "0x8a2B28364102Bea189D99A475C494330Ef2bDD0B";
|
|
1464
1466
|
};
|
|
1465
1467
|
readonly 747474: {
|
|
1466
1468
|
readonly morpho: "0xD50F2DffFd62f94Ee4AEd9ca05C61d0753268aBc";
|
|
@@ -1965,16 +1967,16 @@ export declare let deployments: {
|
|
|
1965
1967
|
readonly preLiquidationFactory: 789925n;
|
|
1966
1968
|
};
|
|
1967
1969
|
readonly 123420001114: {
|
|
1968
|
-
readonly morpho:
|
|
1970
|
+
readonly morpho: 2410315n;
|
|
1969
1971
|
readonly bundler3: {
|
|
1970
|
-
readonly bundler3:
|
|
1971
|
-
readonly generalAdapter1:
|
|
1972
|
+
readonly bundler3: 2471517n;
|
|
1973
|
+
readonly generalAdapter1: 2471517n;
|
|
1972
1974
|
};
|
|
1973
|
-
readonly adaptiveCurveIrm:
|
|
1974
|
-
readonly publicAllocator:
|
|
1975
|
-
readonly metaMorphoFactory:
|
|
1976
|
-
readonly chainlinkOracleFactory:
|
|
1977
|
-
readonly preLiquidationFactory:
|
|
1975
|
+
readonly adaptiveCurveIrm: 2410315n;
|
|
1976
|
+
readonly publicAllocator: 2410315n;
|
|
1977
|
+
readonly metaMorphoFactory: 2410440n;
|
|
1978
|
+
readonly chainlinkOracleFactory: 2410440n;
|
|
1979
|
+
readonly preLiquidationFactory: 2471517n;
|
|
1978
1980
|
};
|
|
1979
1981
|
readonly 747474: {
|
|
1980
1982
|
readonly morpho: 2741069n;
|
package/lib/esm/addresses.js
CHANGED
|
@@ -334,17 +334,19 @@ const _addressesRegistry = {
|
|
|
334
334
|
wNative: "0xEa237441c92CAe6FC17Caaf9a7acB3f953be4bd1",
|
|
335
335
|
},
|
|
336
336
|
[ChainId.CampMainnet]: {
|
|
337
|
-
morpho: "
|
|
337
|
+
morpho: "0xea4f2979D7A99B40404b447Cf71c008e3805760F",
|
|
338
338
|
bundler3: {
|
|
339
|
-
bundler3: "
|
|
340
|
-
generalAdapter1: "
|
|
339
|
+
bundler3: "0x88A4038BB4A14ecD7301c8Fb1f1e8732c4355D53",
|
|
340
|
+
generalAdapter1: "0x29dcA26F9862CFb8064163ddc3401aaB4D4D05c6",
|
|
341
341
|
},
|
|
342
|
-
adaptiveCurveIrm: "
|
|
343
|
-
publicAllocator: "
|
|
344
|
-
metaMorphoFactory: "
|
|
345
|
-
chainlinkOracleFactory: "
|
|
346
|
-
preLiquidationFactory: "
|
|
347
|
-
wNative: "
|
|
342
|
+
adaptiveCurveIrm: "0xd5661D965cc60ed1954d4f6725b766051De3ef97",
|
|
343
|
+
publicAllocator: "0x0b7a3A49dafd98363B428cEC966106f29c0eee75",
|
|
344
|
+
metaMorphoFactory: "0x3F4b9246b7Cd3F7671c70BeBd5AAFC08e5bb5f16",
|
|
345
|
+
chainlinkOracleFactory: "0x391A3fd481743FE48409e2e31eDac8a5f4C7653A",
|
|
346
|
+
preLiquidationFactory: "0xD55fA5DF6F1A21C2B93009A702aad3a0891C1B48",
|
|
347
|
+
wNative: "0x3bd5C81a8Adf3355078Dc5F73c41d3194B316690",
|
|
348
|
+
// Must implement USDC permit version 2 (otherwise breaks permit signatures).
|
|
349
|
+
usdc: "0x8a2B28364102Bea189D99A475C494330Ef2bDD0B",
|
|
348
350
|
},
|
|
349
351
|
[ChainId.KatanaMainnet]: {
|
|
350
352
|
morpho: "0xD50F2DffFd62f94Ee4AEd9ca05C61d0753268aBc",
|
|
@@ -855,16 +857,16 @@ const _deployments = {
|
|
|
855
857
|
preLiquidationFactory: 789925n,
|
|
856
858
|
},
|
|
857
859
|
[ChainId.CampMainnet]: {
|
|
858
|
-
morpho:
|
|
860
|
+
morpho: 2410315n,
|
|
859
861
|
bundler3: {
|
|
860
|
-
bundler3:
|
|
861
|
-
generalAdapter1:
|
|
862
|
+
bundler3: 2471517n,
|
|
863
|
+
generalAdapter1: 2471517n,
|
|
862
864
|
},
|
|
863
|
-
adaptiveCurveIrm:
|
|
864
|
-
publicAllocator:
|
|
865
|
-
metaMorphoFactory:
|
|
866
|
-
chainlinkOracleFactory:
|
|
867
|
-
preLiquidationFactory:
|
|
865
|
+
adaptiveCurveIrm: 2410315n,
|
|
866
|
+
publicAllocator: 2410315n,
|
|
867
|
+
metaMorphoFactory: 2410440n,
|
|
868
|
+
chainlinkOracleFactory: 2410440n,
|
|
869
|
+
preLiquidationFactory: 2471517n,
|
|
868
870
|
},
|
|
869
871
|
[ChainId.KatanaMainnet]: {
|
|
870
872
|
morpho: 2741069n,
|
|
@@ -64,7 +64,15 @@ export declare class AccrualVaultV2 extends VaultV2 implements IAccrualVaultV2 {
|
|
|
64
64
|
accrualLiquidityAdapter: IAccrualVaultV2Adapter | undefined;
|
|
65
65
|
accrualAdapters: IAccrualVaultV2Adapter[];
|
|
66
66
|
assetBalance: bigint;
|
|
67
|
-
|
|
67
|
+
/**
|
|
68
|
+
* The force deallocate penalty for each adapter, keyed by adapter address.
|
|
69
|
+
*/
|
|
70
|
+
forceDeallocatePenalties: Record<Address, bigint>;
|
|
71
|
+
constructor(vault: IAccrualVaultV2, accrualLiquidityAdapter: IAccrualVaultV2Adapter | undefined, accrualAdapters: IAccrualVaultV2Adapter[], assetBalance: bigint,
|
|
72
|
+
/**
|
|
73
|
+
* The force deallocate penalty for each adapter, keyed by adapter address.
|
|
74
|
+
*/
|
|
75
|
+
forceDeallocatePenalties: Record<Address, bigint>);
|
|
68
76
|
/**
|
|
69
77
|
* Returns the maximum amount of assets that can be deposited to the vault.
|
|
70
78
|
* @param assets The maximum amount of assets to deposit.
|
|
@@ -54,11 +54,17 @@ export class AccrualVaultV2 extends VaultV2 {
|
|
|
54
54
|
accrualLiquidityAdapter;
|
|
55
55
|
accrualAdapters;
|
|
56
56
|
assetBalance;
|
|
57
|
-
|
|
57
|
+
forceDeallocatePenalties;
|
|
58
|
+
constructor(vault, accrualLiquidityAdapter, accrualAdapters, assetBalance,
|
|
59
|
+
/**
|
|
60
|
+
* The force deallocate penalty for each adapter, keyed by adapter address.
|
|
61
|
+
*/
|
|
62
|
+
forceDeallocatePenalties) {
|
|
58
63
|
super({ ...vault, adapters: accrualAdapters.map((a) => a.address) });
|
|
59
64
|
this.accrualLiquidityAdapter = accrualLiquidityAdapter;
|
|
60
65
|
this.accrualAdapters = accrualAdapters;
|
|
61
66
|
this.assetBalance = assetBalance;
|
|
67
|
+
this.forceDeallocatePenalties = forceDeallocatePenalties;
|
|
62
68
|
}
|
|
63
69
|
/**
|
|
64
70
|
* Returns the maximum amount of assets that can be deposited to the vault.
|
|
@@ -120,7 +126,7 @@ export class AccrualVaultV2 extends VaultV2 {
|
|
|
120
126
|
* @param timestamp The timestamp at which to accrue interest. Must be greater than or equal to the vault's `lastUpdate`.
|
|
121
127
|
*/
|
|
122
128
|
accrueInterest(timestamp) {
|
|
123
|
-
const vault = new AccrualVaultV2(this, this.accrualLiquidityAdapter, this.accrualAdapters, this.assetBalance);
|
|
129
|
+
const vault = new AccrualVaultV2(this, this.accrualLiquidityAdapter, this.accrualAdapters, this.assetBalance, this.forceDeallocatePenalties);
|
|
124
130
|
timestamp = BigInt(timestamp);
|
|
125
131
|
const elapsed = timestamp - this.lastUpdate;
|
|
126
132
|
if (elapsed < 0n)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morpho-org/blue-sdk",
|
|
3
3
|
"description": "Framework-agnostic package that defines Morpho-related entity classes (such as `Market`, `Token`, `Vault`).",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.20.0",
|
|
5
5
|
"author": "Morpho Association <contact@morpho.org>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Rubilmax <rmilon@gmail.com>"
|