@morpho-org/blue-sdk 5.1.0-next.0 → 5.1.1

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.
@@ -9,30 +9,6 @@ export declare const NATIVE_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEe
9
9
  export interface ChainAddresses {
10
10
  morpho: Address;
11
11
  permit2?: Address;
12
- /**
13
- * @deprecated All bundles should use Bundler3 instead.
14
- */
15
- bundler?: Address;
16
- /**
17
- * @deprecated All bundles should use Bundler3 instead.
18
- */
19
- aaveV3OptimizerBundler?: Address;
20
- /**
21
- * @deprecated All bundles should use Bundler3 instead.
22
- */
23
- aaveV2Bundler?: Address;
24
- /**
25
- * @deprecated All bundles should use Bundler3 instead.
26
- */
27
- aaveV3Bundler?: Address;
28
- /**
29
- * @deprecated All bundles should use Bundler3 instead.
30
- */
31
- compoundV3Bundler?: Address;
32
- /**
33
- * @deprecated All bundles should use Bundler3 instead.
34
- */
35
- compoundV2Bundler?: Address;
36
12
  bundler3: {
37
13
  bundler3: Address;
38
14
  generalAdapter1: Address;
@@ -49,6 +25,8 @@ export interface ChainAddresses {
49
25
  adaptiveCurveIrm: Address;
50
26
  publicAllocator?: Address;
51
27
  metaMorphoFactory?: Address;
28
+ vaultV2Factory?: Address;
29
+ morphoVaultV1AdapterFactory?: Address;
52
30
  registryList?: Address;
53
31
  chainlinkOracleFactory?: Address;
54
32
  preLiquidationFactory?: Address;
@@ -64,17 +42,11 @@ export interface ChainAddresses {
64
42
  usdc?: Address;
65
43
  stEth?: Address;
66
44
  wstEth?: Address;
67
- vaultV2Factory?: Address;
68
- morphoVaultV1AdapterFactory?: Address;
69
45
  }
70
46
  declare const _addressesRegistry: {
71
47
  readonly 1: {
72
48
  readonly morpho: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb";
73
49
  readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
74
- /**
75
- * @deprecated All bundles should use Bundler3 instead.
76
- */
77
- readonly bundler: "0x4095F064B8d3c3548A3bebfd0Bbfd04750E30077";
78
50
  readonly bundler3: {
79
51
  readonly bundler3: "0x6566194141eefa99Af43Bb5Aa71460Ca2Dc90245";
80
52
  readonly generalAdapter1: "0x4A6c312ec70E8747a587EE860a0353cd42Be0aE0";
@@ -88,29 +60,11 @@ declare const _addressesRegistry: {
88
60
  readonly aaveV3EtherFiMigrationAdapter: "0x4011dc6581fA05F9B0c7A12AdCd676e2b1a59ca3";
89
61
  readonly aaveV3OptimizerMigrationAdapter: "0x9e2ea2d5785598a163D569D795f286F5C55ad972";
90
62
  };
91
- /**
92
- * @deprecated All bundles should use Bundler3 instead.
93
- */
94
- readonly aaveV3OptimizerBundler: "0x16F38d2E764E7BeBF625a8E995b34968226D2F9c";
95
- /**
96
- * @deprecated All bundles should use Bundler3 instead.
97
- */
98
- readonly aaveV2Bundler: "0xb3dCc75DB379925edFd3007511A8CE0cB4aa8e76";
99
- /**
100
- * @deprecated All bundles should use Bundler3 instead.
101
- */
102
- readonly aaveV3Bundler: "0x98ccB155E86bb478d514a827d16f58c6912f9BDC";
103
- /**
104
- * @deprecated All bundles should use Bundler3 instead.
105
- */
106
- readonly compoundV3Bundler: "0x3a0e2E9FB9c95fBc843daF166276C90B6C479558";
107
- /**
108
- * @deprecated All bundles should use Bundler3 instead.
109
- */
110
- readonly compoundV2Bundler: "0x26bF52a84360Ad3d01d7CDc28FC2dDC04d8c8647";
111
63
  readonly adaptiveCurveIrm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC";
112
64
  readonly publicAllocator: "0xfd32fA2ca22c76dD6E550706Ad913FC6CE91c75D";
113
65
  readonly metaMorphoFactory: "0x1897A8997241C1cD4bD0698647e4EB7213535c24";
66
+ readonly vaultV2Factory: "0xA1D94F746dEfa1928926b84fB2596c06926C0405";
67
+ readonly morphoVaultV1AdapterFactory: "0xD1B8E2dee25c2b89DCD2f98448a7ce87d6F63394";
114
68
  readonly registryList: "0x3696c5eAe4a7Ffd04Ea163564571E9CD8Ed9364e";
115
69
  readonly chainlinkOracleFactory: "0x3A7bB36Ee3f3eE32A60e9f2b33c1e5f2E83ad766";
116
70
  readonly preLiquidationFactory: "0x6FF33615e792E35ed1026ea7cACCf42D9BF83476";
@@ -141,16 +95,10 @@ declare const _addressesRegistry: {
141
95
  readonly crvUSDETHCRV: "0x4eBdF703948ddCEA3B11f675B4D1Fba9d2414A14";
142
96
  readonly "stkcvx2BTC-f-morpho": "0x385E12cf4040543Bc8C18e05C1298Be5B04f3f5e";
143
97
  readonly "2BTC-f": "0xB7ECB2AA52AA64a717180E030241bC75Cd946726";
144
- readonly vaultV2Factory: "0xA1D94F746dEfa1928926b84fB2596c06926C0405";
145
- readonly morphoVaultV1AdapterFactory: "0xD1B8E2dee25c2b89DCD2f98448a7ce87d6F63394";
146
98
  };
147
99
  readonly 8453: {
148
100
  readonly morpho: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb";
149
101
  readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
150
- /**
151
- * @deprecated All bundles should use Bundler3 instead.
152
- */
153
- readonly bundler: "0x23055618898e202386e6c13955a58D3C68200BFB";
154
102
  readonly bundler3: {
155
103
  readonly bundler3: "0x6BFd8137e702540E7A42B74178A4a49Ba43920C4";
156
104
  readonly generalAdapter1: "0xb98c948CFA24072e58935BC004a8A7b376AE746A";
@@ -159,21 +107,11 @@ declare const _addressesRegistry: {
159
107
  readonly compoundV3MigrationAdapter: "0x85D4812Ef92c040d4270eD8547b6835e41FbbB70";
160
108
  readonly aaveV3CoreMigrationAdapter: "0xb27Aa2a964eAd5ed661D86974b37e4fB995b36f5";
161
109
  };
162
- /**
163
- * @deprecated All bundles should use Bundler3 instead.
164
- */
165
- readonly compoundV2Bundler: "0x123f3167a416cA19365dE03a65e0AF3532af7223";
166
- /**
167
- * @deprecated All bundles should use Bundler3 instead.
168
- */
169
- readonly aaveV3Bundler: "0xcAe2929baBc60Be34818EaA5F40bF69265677108";
170
- /**
171
- * @deprecated All bundles should use Bundler3 instead.
172
- */
173
- readonly compoundV3Bundler: "0x1f8076e2EB6f10b12e6886f30D4909A91969F7dA";
174
110
  readonly adaptiveCurveIrm: "0x46415998764C29aB2a25CbeA6254146D50D22687";
175
111
  readonly publicAllocator: "0xA090dD1a701408Df1d4d0B85b716c87565f90467";
176
112
  readonly metaMorphoFactory: "0xFf62A7c278C62eD665133147129245053Bbf5918";
113
+ readonly vaultV2Factory: "0x4501125508079A99ebBebCE205DeC9593C2b5857";
114
+ readonly morphoVaultV1AdapterFactory: "0xF42D9c36b34c9c2CF3Bc30eD2a52a90eEB604642";
177
115
  readonly registryList: "0x5C2531Cbd2cf112Cf687da3Cd536708aDd7DB10a";
178
116
  readonly chainlinkOracleFactory: "0x2DC205F24BCb6B311E5cdf0745B0741648Aebd3d";
179
117
  readonly preLiquidationFactory: "0x8cd16b62E170Ee0bA83D80e1F80E6085367e2aef";
@@ -181,8 +119,6 @@ declare const _addressesRegistry: {
181
119
  readonly usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
182
120
  readonly verUsdc: "0x59aaF835D34b1E3dF2170e4872B785f11E2a964b";
183
121
  readonly testUsdc: "0xBC77067f829979812d795d516E523C4033b66409";
184
- readonly vaultV2Factory: "0x4501125508079A99ebBebCE205DeC9593C2b5857";
185
- readonly morphoVaultV1AdapterFactory: "0xF42D9c36b34c9c2CF3Bc30eD2a52a90eEB604642";
186
122
  };
187
123
  readonly 137: {
188
124
  readonly morpho: "0x1bF0c2541F820E775182832f06c0B7Fc27A25f67";
@@ -456,6 +392,7 @@ declare const _addressesRegistry: {
456
392
  readonly chainlinkOracleFactory: "0xeb476f124FaD625178759d13557A72394A6f9aF5";
457
393
  readonly preLiquidationFactory: "0x1b6782Ac7A859503cE953FBf4736311CC335B8f0";
458
394
  readonly wNative: "0x5555555555555555555555555555555555555555";
395
+ readonly usdc: "0xb88339CB7199b77E23DB6E890353E22632Ba630f";
459
396
  };
460
397
  readonly 1329: {
461
398
  readonly morpho: "0xc9cDAc20FCeAAF616f7EB0bb6Cd2c69dcfa9094c";
@@ -494,11 +431,11 @@ declare const _deployments: {
494
431
  readonly adaptiveCurveIrm: 18883124n;
495
432
  readonly publicAllocator: 19375099n;
496
433
  readonly metaMorphoFactory: 21439510n;
434
+ readonly vaultV2Factory: 23375073n;
435
+ readonly morphoVaultV1AdapterFactory: 23375073n;
497
436
  readonly registryList: 23375119n;
498
437
  readonly chainlinkOracleFactory: 19375066n;
499
438
  readonly preLiquidationFactory: 21414664n;
500
- readonly vaultV2Factory: 23375073n;
501
- readonly morphoVaultV1AdapterFactory: 23375073n;
502
439
  };
503
440
  readonly 8453: {
504
441
  readonly morpho: 13977148n;
@@ -514,11 +451,11 @@ declare const _deployments: {
514
451
  readonly adaptiveCurveIrm: 13977152n;
515
452
  readonly publicAllocator: 13979545n;
516
453
  readonly metaMorphoFactory: 23928808n;
454
+ readonly vaultV2Factory: 35615206n;
455
+ readonly morphoVaultV1AdapterFactory: 35615206n;
517
456
  readonly registryList: 35615358n;
518
457
  readonly chainlinkOracleFactory: 13978286n;
519
458
  readonly preLiquidationFactory: 23779056n;
520
- readonly vaultV2Factory: 35615206n;
521
- readonly morphoVaultV1AdapterFactory: 35615206n;
522
459
  };
523
460
  readonly 137: {
524
461
  readonly morpho: 66931042n;
@@ -809,10 +746,6 @@ export declare let addressesRegistry: {
809
746
  readonly 1: {
810
747
  readonly morpho: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb";
811
748
  readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
812
- /**
813
- * @deprecated All bundles should use Bundler3 instead.
814
- */
815
- readonly bundler: "0x4095F064B8d3c3548A3bebfd0Bbfd04750E30077";
816
749
  readonly bundler3: {
817
750
  readonly bundler3: "0x6566194141eefa99Af43Bb5Aa71460Ca2Dc90245";
818
751
  readonly generalAdapter1: "0x4A6c312ec70E8747a587EE860a0353cd42Be0aE0";
@@ -826,29 +759,11 @@ export declare let addressesRegistry: {
826
759
  readonly aaveV3EtherFiMigrationAdapter: "0x4011dc6581fA05F9B0c7A12AdCd676e2b1a59ca3";
827
760
  readonly aaveV3OptimizerMigrationAdapter: "0x9e2ea2d5785598a163D569D795f286F5C55ad972";
828
761
  };
829
- /**
830
- * @deprecated All bundles should use Bundler3 instead.
831
- */
832
- readonly aaveV3OptimizerBundler: "0x16F38d2E764E7BeBF625a8E995b34968226D2F9c";
833
- /**
834
- * @deprecated All bundles should use Bundler3 instead.
835
- */
836
- readonly aaveV2Bundler: "0xb3dCc75DB379925edFd3007511A8CE0cB4aa8e76";
837
- /**
838
- * @deprecated All bundles should use Bundler3 instead.
839
- */
840
- readonly aaveV3Bundler: "0x98ccB155E86bb478d514a827d16f58c6912f9BDC";
841
- /**
842
- * @deprecated All bundles should use Bundler3 instead.
843
- */
844
- readonly compoundV3Bundler: "0x3a0e2E9FB9c95fBc843daF166276C90B6C479558";
845
- /**
846
- * @deprecated All bundles should use Bundler3 instead.
847
- */
848
- readonly compoundV2Bundler: "0x26bF52a84360Ad3d01d7CDc28FC2dDC04d8c8647";
849
762
  readonly adaptiveCurveIrm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC";
850
763
  readonly publicAllocator: "0xfd32fA2ca22c76dD6E550706Ad913FC6CE91c75D";
851
764
  readonly metaMorphoFactory: "0x1897A8997241C1cD4bD0698647e4EB7213535c24";
765
+ readonly vaultV2Factory: "0xA1D94F746dEfa1928926b84fB2596c06926C0405";
766
+ readonly morphoVaultV1AdapterFactory: "0xD1B8E2dee25c2b89DCD2f98448a7ce87d6F63394";
852
767
  readonly registryList: "0x3696c5eAe4a7Ffd04Ea163564571E9CD8Ed9364e";
853
768
  readonly chainlinkOracleFactory: "0x3A7bB36Ee3f3eE32A60e9f2b33c1e5f2E83ad766";
854
769
  readonly preLiquidationFactory: "0x6FF33615e792E35ed1026ea7cACCf42D9BF83476";
@@ -879,16 +794,10 @@ export declare let addressesRegistry: {
879
794
  readonly crvUSDETHCRV: "0x4eBdF703948ddCEA3B11f675B4D1Fba9d2414A14";
880
795
  readonly "stkcvx2BTC-f-morpho": "0x385E12cf4040543Bc8C18e05C1298Be5B04f3f5e";
881
796
  readonly "2BTC-f": "0xB7ECB2AA52AA64a717180E030241bC75Cd946726";
882
- readonly vaultV2Factory: "0xA1D94F746dEfa1928926b84fB2596c06926C0405";
883
- readonly morphoVaultV1AdapterFactory: "0xD1B8E2dee25c2b89DCD2f98448a7ce87d6F63394";
884
797
  };
885
798
  readonly 8453: {
886
799
  readonly morpho: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb";
887
800
  readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
888
- /**
889
- * @deprecated All bundles should use Bundler3 instead.
890
- */
891
- readonly bundler: "0x23055618898e202386e6c13955a58D3C68200BFB";
892
801
  readonly bundler3: {
893
802
  readonly bundler3: "0x6BFd8137e702540E7A42B74178A4a49Ba43920C4";
894
803
  readonly generalAdapter1: "0xb98c948CFA24072e58935BC004a8A7b376AE746A";
@@ -897,21 +806,11 @@ export declare let addressesRegistry: {
897
806
  readonly compoundV3MigrationAdapter: "0x85D4812Ef92c040d4270eD8547b6835e41FbbB70";
898
807
  readonly aaveV3CoreMigrationAdapter: "0xb27Aa2a964eAd5ed661D86974b37e4fB995b36f5";
899
808
  };
900
- /**
901
- * @deprecated All bundles should use Bundler3 instead.
902
- */
903
- readonly compoundV2Bundler: "0x123f3167a416cA19365dE03a65e0AF3532af7223";
904
- /**
905
- * @deprecated All bundles should use Bundler3 instead.
906
- */
907
- readonly aaveV3Bundler: "0xcAe2929baBc60Be34818EaA5F40bF69265677108";
908
- /**
909
- * @deprecated All bundles should use Bundler3 instead.
910
- */
911
- readonly compoundV3Bundler: "0x1f8076e2EB6f10b12e6886f30D4909A91969F7dA";
912
809
  readonly adaptiveCurveIrm: "0x46415998764C29aB2a25CbeA6254146D50D22687";
913
810
  readonly publicAllocator: "0xA090dD1a701408Df1d4d0B85b716c87565f90467";
914
811
  readonly metaMorphoFactory: "0xFf62A7c278C62eD665133147129245053Bbf5918";
812
+ readonly vaultV2Factory: "0x4501125508079A99ebBebCE205DeC9593C2b5857";
813
+ readonly morphoVaultV1AdapterFactory: "0xF42D9c36b34c9c2CF3Bc30eD2a52a90eEB604642";
915
814
  readonly registryList: "0x5C2531Cbd2cf112Cf687da3Cd536708aDd7DB10a";
916
815
  readonly chainlinkOracleFactory: "0x2DC205F24BCb6B311E5cdf0745B0741648Aebd3d";
917
816
  readonly preLiquidationFactory: "0x8cd16b62E170Ee0bA83D80e1F80E6085367e2aef";
@@ -919,8 +818,6 @@ export declare let addressesRegistry: {
919
818
  readonly usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
920
819
  readonly verUsdc: "0x59aaF835D34b1E3dF2170e4872B785f11E2a964b";
921
820
  readonly testUsdc: "0xBC77067f829979812d795d516E523C4033b66409";
922
- readonly vaultV2Factory: "0x4501125508079A99ebBebCE205DeC9593C2b5857";
923
- readonly morphoVaultV1AdapterFactory: "0xF42D9c36b34c9c2CF3Bc30eD2a52a90eEB604642";
924
821
  };
925
822
  readonly 137: {
926
823
  readonly morpho: "0x1bF0c2541F820E775182832f06c0B7Fc27A25f67";
@@ -1194,6 +1091,7 @@ export declare let addressesRegistry: {
1194
1091
  readonly chainlinkOracleFactory: "0xeb476f124FaD625178759d13557A72394A6f9aF5";
1195
1092
  readonly preLiquidationFactory: "0x1b6782Ac7A859503cE953FBf4736311CC335B8f0";
1196
1093
  readonly wNative: "0x5555555555555555555555555555555555555555";
1094
+ readonly usdc: "0xb88339CB7199b77E23DB6E890353E22632Ba630f";
1197
1095
  };
1198
1096
  readonly 1329: {
1199
1097
  readonly morpho: "0xc9cDAc20FCeAAF616f7EB0bb6Cd2c69dcfa9094c";
@@ -1230,11 +1128,11 @@ export declare let deployments: {
1230
1128
  readonly adaptiveCurveIrm: 18883124n;
1231
1129
  readonly publicAllocator: 19375099n;
1232
1130
  readonly metaMorphoFactory: 21439510n;
1131
+ readonly vaultV2Factory: 23375073n;
1132
+ readonly morphoVaultV1AdapterFactory: 23375073n;
1233
1133
  readonly registryList: 23375119n;
1234
1134
  readonly chainlinkOracleFactory: 19375066n;
1235
1135
  readonly preLiquidationFactory: 21414664n;
1236
- readonly vaultV2Factory: 23375073n;
1237
- readonly morphoVaultV1AdapterFactory: 23375073n;
1238
1136
  };
1239
1137
  readonly 8453: {
1240
1138
  readonly morpho: 13977148n;
@@ -1250,11 +1148,11 @@ export declare let deployments: {
1250
1148
  readonly adaptiveCurveIrm: 13977152n;
1251
1149
  readonly publicAllocator: 13979545n;
1252
1150
  readonly metaMorphoFactory: 23928808n;
1151
+ readonly vaultV2Factory: 35615206n;
1152
+ readonly morphoVaultV1AdapterFactory: 35615206n;
1253
1153
  readonly registryList: 35615358n;
1254
1154
  readonly chainlinkOracleFactory: 13978286n;
1255
1155
  readonly preLiquidationFactory: 23779056n;
1256
- readonly vaultV2Factory: 35615206n;
1257
- readonly morphoVaultV1AdapterFactory: 35615206n;
1258
1156
  };
1259
1157
  readonly 137: {
1260
1158
  readonly morpho: 66931042n;
package/lib/addresses.js CHANGED
@@ -20,10 +20,6 @@ const _addressesRegistry = {
20
20
  [chain_js_1.ChainId.EthMainnet]: {
21
21
  morpho: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
22
22
  permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
23
- /**
24
- * @deprecated All bundles should use Bundler3 instead.
25
- */
26
- bundler: "0x4095F064B8d3c3548A3bebfd0Bbfd04750E30077",
27
23
  bundler3: {
28
24
  bundler3: "0x6566194141eefa99Af43Bb5Aa71460Ca2Dc90245",
29
25
  generalAdapter1: "0x4A6c312ec70E8747a587EE860a0353cd42Be0aE0",
@@ -37,29 +33,11 @@ const _addressesRegistry = {
37
33
  aaveV3EtherFiMigrationAdapter: "0x4011dc6581fA05F9B0c7A12AdCd676e2b1a59ca3",
38
34
  aaveV3OptimizerMigrationAdapter: "0x9e2ea2d5785598a163D569D795f286F5C55ad972",
39
35
  },
40
- /**
41
- * @deprecated All bundles should use Bundler3 instead.
42
- */
43
- aaveV3OptimizerBundler: "0x16F38d2E764E7BeBF625a8E995b34968226D2F9c",
44
- /**
45
- * @deprecated All bundles should use Bundler3 instead.
46
- */
47
- aaveV2Bundler: "0xb3dCc75DB379925edFd3007511A8CE0cB4aa8e76",
48
- /**
49
- * @deprecated All bundles should use Bundler3 instead.
50
- */
51
- aaveV3Bundler: "0x98ccB155E86bb478d514a827d16f58c6912f9BDC",
52
- /**
53
- * @deprecated All bundles should use Bundler3 instead.
54
- */
55
- compoundV3Bundler: "0x3a0e2E9FB9c95fBc843daF166276C90B6C479558",
56
- /**
57
- * @deprecated All bundles should use Bundler3 instead.
58
- */
59
- compoundV2Bundler: "0x26bF52a84360Ad3d01d7CDc28FC2dDC04d8c8647",
60
36
  adaptiveCurveIrm: "0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC",
61
37
  publicAllocator: "0xfd32fA2ca22c76dD6E550706Ad913FC6CE91c75D",
62
38
  metaMorphoFactory: "0x1897A8997241C1cD4bD0698647e4EB7213535c24",
39
+ vaultV2Factory: "0xA1D94F746dEfa1928926b84fB2596c06926C0405",
40
+ morphoVaultV1AdapterFactory: "0xD1B8E2dee25c2b89DCD2f98448a7ce87d6F63394",
63
41
  registryList: "0x3696c5eAe4a7Ffd04Ea163564571E9CD8Ed9364e",
64
42
  chainlinkOracleFactory: "0x3A7bB36Ee3f3eE32A60e9f2b33c1e5f2E83ad766",
65
43
  preLiquidationFactory: "0x6FF33615e792E35ed1026ea7cACCf42D9BF83476",
@@ -96,16 +74,10 @@ const _addressesRegistry = {
96
74
  crvUSDETHCRV: "0x4eBdF703948ddCEA3B11f675B4D1Fba9d2414A14",
97
75
  "stkcvx2BTC-f-morpho": "0x385E12cf4040543Bc8C18e05C1298Be5B04f3f5e",
98
76
  "2BTC-f": "0xB7ECB2AA52AA64a717180E030241bC75Cd946726",
99
- vaultV2Factory: "0xA1D94F746dEfa1928926b84fB2596c06926C0405",
100
- morphoVaultV1AdapterFactory: "0xD1B8E2dee25c2b89DCD2f98448a7ce87d6F63394",
101
77
  },
102
78
  [chain_js_1.ChainId.BaseMainnet]: {
103
79
  morpho: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
104
80
  permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
105
- /**
106
- * @deprecated All bundles should use Bundler3 instead.
107
- */
108
- bundler: "0x23055618898e202386e6c13955a58D3C68200BFB",
109
81
  bundler3: {
110
82
  bundler3: "0x6BFd8137e702540E7A42B74178A4a49Ba43920C4",
111
83
  generalAdapter1: "0xb98c948CFA24072e58935BC004a8A7b376AE746A",
@@ -114,21 +86,11 @@ const _addressesRegistry = {
114
86
  compoundV3MigrationAdapter: "0x85D4812Ef92c040d4270eD8547b6835e41FbbB70",
115
87
  aaveV3CoreMigrationAdapter: "0xb27Aa2a964eAd5ed661D86974b37e4fB995b36f5",
116
88
  },
117
- /**
118
- * @deprecated All bundles should use Bundler3 instead.
119
- */
120
- compoundV2Bundler: "0x123f3167a416cA19365dE03a65e0AF3532af7223",
121
- /**
122
- * @deprecated All bundles should use Bundler3 instead.
123
- */
124
- aaveV3Bundler: "0xcAe2929baBc60Be34818EaA5F40bF69265677108",
125
- /**
126
- * @deprecated All bundles should use Bundler3 instead.
127
- */
128
- compoundV3Bundler: "0x1f8076e2EB6f10b12e6886f30D4909A91969F7dA",
129
89
  adaptiveCurveIrm: "0x46415998764C29aB2a25CbeA6254146D50D22687",
130
90
  publicAllocator: "0xA090dD1a701408Df1d4d0B85b716c87565f90467",
131
91
  metaMorphoFactory: "0xFf62A7c278C62eD665133147129245053Bbf5918",
92
+ vaultV2Factory: "0x4501125508079A99ebBebCE205DeC9593C2b5857",
93
+ morphoVaultV1AdapterFactory: "0xF42D9c36b34c9c2CF3Bc30eD2a52a90eEB604642",
132
94
  registryList: "0x5C2531Cbd2cf112Cf687da3Cd536708aDd7DB10a",
133
95
  chainlinkOracleFactory: "0x2DC205F24BCb6B311E5cdf0745B0741648Aebd3d",
134
96
  preLiquidationFactory: "0x8cd16b62E170Ee0bA83D80e1F80E6085367e2aef",
@@ -137,8 +99,6 @@ const _addressesRegistry = {
137
99
  usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
138
100
  verUsdc: "0x59aaF835D34b1E3dF2170e4872B785f11E2a964b",
139
101
  testUsdc: "0xBC77067f829979812d795d516E523C4033b66409",
140
- vaultV2Factory: "0x4501125508079A99ebBebCE205DeC9593C2b5857",
141
- morphoVaultV1AdapterFactory: "0xF42D9c36b34c9c2CF3Bc30eD2a52a90eEB604642",
142
102
  },
143
103
  [chain_js_1.ChainId.PolygonMainnet]: {
144
104
  morpho: "0x1bF0c2541F820E775182832f06c0B7Fc27A25f67",
@@ -421,6 +381,8 @@ const _addressesRegistry = {
421
381
  chainlinkOracleFactory: "0xeb476f124FaD625178759d13557A72394A6f9aF5",
422
382
  preLiquidationFactory: "0x1b6782Ac7A859503cE953FBf4736311CC335B8f0",
423
383
  wNative: "0x5555555555555555555555555555555555555555",
384
+ // Must implement USDC permit version 2 (otherwise breaks permit signatures).
385
+ usdc: "0xb88339CB7199b77E23DB6E890353E22632Ba630f",
424
386
  },
425
387
  [chain_js_1.ChainId.SeiMainnet]: {
426
388
  morpho: "0xc9cDAc20FCeAAF616f7EB0bb6Cd2c69dcfa9094c",
@@ -456,11 +418,11 @@ const _deployments = {
456
418
  adaptiveCurveIrm: 18883124n,
457
419
  publicAllocator: 19375099n,
458
420
  metaMorphoFactory: 21439510n,
421
+ vaultV2Factory: 23375073n,
422
+ morphoVaultV1AdapterFactory: 23375073n,
459
423
  registryList: 23375119n,
460
424
  chainlinkOracleFactory: 19375066n,
461
425
  preLiquidationFactory: 21414664n,
462
- vaultV2Factory: 23375073n,
463
- morphoVaultV1AdapterFactory: 23375073n,
464
426
  },
465
427
  [chain_js_1.ChainId.BaseMainnet]: {
466
428
  morpho: 13977148n,
@@ -476,11 +438,11 @@ const _deployments = {
476
438
  adaptiveCurveIrm: 13977152n,
477
439
  publicAllocator: 13979545n,
478
440
  metaMorphoFactory: 23928808n,
441
+ vaultV2Factory: 35615206n,
442
+ morphoVaultV1AdapterFactory: 35615206n,
479
443
  registryList: 35615358n,
480
444
  chainlinkOracleFactory: 13978286n,
481
445
  preLiquidationFactory: 23779056n,
482
- vaultV2Factory: 35615206n,
483
- morphoVaultV1AdapterFactory: 35615206n,
484
446
  },
485
447
  [chain_js_1.ChainId.PolygonMainnet]: {
486
448
  morpho: 66931042n,
package/lib/errors.d.ts CHANGED
@@ -25,10 +25,6 @@ export declare class UnsupportedPreLiquidationParamsError extends Error {
25
25
  readonly lltv: bigint;
26
26
  constructor(lltv: bigint);
27
27
  }
28
- export declare class UnsupportedVaultV2AdapterError extends Error {
29
- readonly address: Address;
30
- constructor(address: Address);
31
- }
32
28
  export declare namespace BlueErrors {
33
29
  class AlreadySet extends Error {
34
30
  readonly name: string;
@@ -69,18 +65,6 @@ export declare namespace BlueErrors {
69
65
  constructor(deadline: bigint);
70
66
  }
71
67
  }
72
- export declare namespace VaultV2Errors {
73
- class InvalidInterestAccrual extends Error {
74
- readonly vault: Address;
75
- readonly timestamp: bigint;
76
- readonly lastUpdate: bigint;
77
- constructor(vault: Address, timestamp: bigint, lastUpdate: bigint);
78
- }
79
- class UnsupportedLiquidityAdapter extends Error {
80
- readonly address: Address;
81
- constructor(address: Address);
82
- }
83
- }
84
68
  export interface ErrorClass<E extends Error> {
85
69
  new (...args: any[]): E;
86
70
  }
package/lib/errors.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VaultV2Errors = exports.BlueErrors = exports.UnsupportedVaultV2AdapterError = exports.UnsupportedPreLiquidationParamsError = exports.UnsupportedChainIdError = exports.UnknownVaultConfigError = exports.UnknownMarketParamsError = exports.UnknownTokenPriceError = exports.UnknownTokenError = exports.UnknownDataError = void 0;
3
+ exports.BlueErrors = exports.UnsupportedPreLiquidationParamsError = exports.UnsupportedChainIdError = exports.UnknownVaultConfigError = exports.UnknownMarketParamsError = exports.UnknownTokenPriceError = exports.UnknownTokenError = exports.UnknownDataError = void 0;
4
4
  exports._try = _try;
5
5
  const viem_1 = require("viem");
6
6
  class UnknownDataError extends Error {
@@ -54,14 +54,6 @@ class UnsupportedPreLiquidationParamsError extends Error {
54
54
  }
55
55
  }
56
56
  exports.UnsupportedPreLiquidationParamsError = UnsupportedPreLiquidationParamsError;
57
- class UnsupportedVaultV2AdapterError extends Error {
58
- address;
59
- constructor(address) {
60
- super(`vault v2 adapter "${address}" is not supported`);
61
- this.address = address;
62
- }
63
- }
64
- exports.UnsupportedVaultV2AdapterError = UnsupportedVaultV2AdapterError;
65
57
  var BlueErrors;
66
58
  (function (BlueErrors) {
67
59
  class AlreadySet extends Error {
@@ -141,29 +133,6 @@ var BlueErrors;
141
133
  }
142
134
  BlueErrors.ExpiredSignature = ExpiredSignature;
143
135
  })(BlueErrors || (exports.BlueErrors = BlueErrors = {}));
144
- var VaultV2Errors;
145
- (function (VaultV2Errors) {
146
- class InvalidInterestAccrual extends Error {
147
- vault;
148
- timestamp;
149
- lastUpdate;
150
- constructor(vault, timestamp, lastUpdate) {
151
- super(`invalid interest accrual on vault ${vault}: accrual timestamp ${timestamp} can't be prior to last update ${lastUpdate}`);
152
- this.vault = vault;
153
- this.timestamp = timestamp;
154
- this.lastUpdate = lastUpdate;
155
- }
156
- }
157
- VaultV2Errors.InvalidInterestAccrual = InvalidInterestAccrual;
158
- class UnsupportedLiquidityAdapter extends Error {
159
- address;
160
- constructor(address) {
161
- super(`unsupported liquidity adapter "${address}"`);
162
- this.address = address;
163
- }
164
- }
165
- VaultV2Errors.UnsupportedLiquidityAdapter = UnsupportedLiquidityAdapter;
166
- })(VaultV2Errors || (exports.VaultV2Errors = VaultV2Errors = {}));
167
136
  function _try(accessor, ...errorClasses) {
168
137
  const maybeCatchError = (error) => {
169
138
  if (errorClasses.length === 0 ||
package/lib/index.d.ts CHANGED
@@ -11,4 +11,3 @@ export * from "./holding/index.js";
11
11
  export * from "./position/index.js";
12
12
  export * from "./vault/index.js";
13
13
  export * from "./preLiquidation.js";
14
- export * from "./utils.js";
package/lib/index.js CHANGED
@@ -27,4 +27,3 @@ __exportStar(require("./holding/index.js"), exports);
27
27
  __exportStar(require("./position/index.js"), exports);
28
28
  __exportStar(require("./vault/index.js"), exports);
29
29
  __exportStar(require("./preLiquidation.js"), exports);
30
- __exportStar(require("./utils.js"), exports);
@@ -1,7 +1,17 @@
1
1
  import { type RoundingDirection } from "../math/index.js";
2
2
  import type { BigIntish } from "../types.js";
3
- import { type CapacityLimit } from "../utils.js";
4
3
  import { type IMarketParams, MarketParams } from "./MarketParams.js";
4
+ export declare enum CapacityLimitReason {
5
+ liquidity = "Liquidity",
6
+ balance = "Balance",
7
+ position = "Position",
8
+ collateral = "Collateral",
9
+ cap = "Cap"
10
+ }
11
+ export interface CapacityLimit {
12
+ value: bigint;
13
+ limiter: CapacityLimitReason;
14
+ }
5
15
  export interface MaxBorrowOptions {
6
16
  maxLtv?: bigint;
7
17
  }
@@ -88,19 +98,9 @@ export declare class Market implements IMarket {
88
98
  */
89
99
  get utilization(): bigint;
90
100
  /**
91
- * The market's Annual Percentage Yield (APY) at the IRM's target utilization rate, if applicable (scaled by WAD).
92
- */
93
- get apyAtTarget(): bigint | undefined;
94
- /**
95
- * Returns the rate at which interest accrued for suppliers of this market,
96
- * since the last time the market was updated (scaled by WAD).
97
- * @deprecated There's no such thing as a supply rate in Morpho. Only the supply APY is meaningful.
98
- */
99
- get supplyRate(): bigint;
100
- /**
101
- * @deprecated Use `avgBorrowRate` instead.
101
+ * The market's Annual Percentage Yield (APY) at the IRM's target utilization rate, if applicable.
102
102
  */
103
- get borrowRate(): bigint;
103
+ get apyAtTarget(): number | undefined;
104
104
  /**
105
105
  * Returns the instantaneous rate at which interest accrues for borrowers of this market,
106
106
  * if `accrueInterest` was called immediately onchain (scaled by WAD).
@@ -127,19 +127,15 @@ export declare class Market implements IMarket {
127
127
  */
128
128
  get avgBorrowRate(): bigint;
129
129
  /**
130
- * The market's current, instantaneous supply-side Annual Percentage Yield (APY) (scaled by WAD).
130
+ * The market's current, instantaneous supply-side Annual Percentage Yield (APY).
131
131
  * If interested in the APY at a specific timestamp, use `getSupplyApy(timestamp)` instead.
132
132
  */
133
- get supplyApy(): bigint;
133
+ get supplyApy(): number;
134
134
  /**
135
- * The market's current, instantaneous borrow-side Annual Percentage Yield (APY) (scaled by WAD).
135
+ * The market's current, instantaneous borrow-side Annual Percentage Yield (APY).
136
136
  * If interested in the APY at a specific timestamp, use `getBorrowApy(timestamp)` instead.
137
137
  */
138
- get borrowApy(): bigint;
139
- /**
140
- * @deprecated Use `getEndBorrowRate(timestamp)` instead.
141
- */
142
- getBorrowRate(timestamp?: BigIntish): bigint;
138
+ get borrowApy(): number;
143
139
  /**
144
140
  * Returns the instantaneous rate at which interest accrues for borrowers of this market,
145
141
  * at the given timestamp, if the state remains unchanged (not accrued) (scaled by WAD).
@@ -173,36 +169,44 @@ export declare class Market implements IMarket {
173
169
  };
174
170
  /**
175
171
  * The market's instantaneous borrow-side Annual Percentage Yield (APY) at the given timestamp,
176
- * if the state remains unchanged (not accrued) (scaled by WAD).
172
+ * if the state remains unchanged (not accrued).
177
173
  * @param timestamp The timestamp at which to calculate the borrow APY.
178
174
  * Must be greater than or equal to `lastUpdate`.
179
175
  * Defaults to `Time.timestamp()` (returns the current borrow APY).
180
176
  */
181
- getBorrowApy(timestamp?: BigIntish): bigint;
177
+ getBorrowApy(timestamp?: BigIntish): number;
182
178
  /**
183
179
  * The market's instantaneous supply-side Annual Percentage Yield (APY) at the given timestamp,
184
- * if the state remains unchanged (not accrued) (scaled by WAD).
180
+ * if the state remains unchanged (not accrued).
185
181
  * @param timestamp The timestamp at which to calculate the supply APY.
186
182
  * Must be greater than or equal to `lastUpdate`.
187
183
  * Defaults to `Time.timestamp()` (returns the current supply APY).
188
184
  */
189
- getSupplyApy(timestamp?: BigIntish): bigint;
185
+ getSupplyApy(timestamp?: BigIntish): number;
190
186
  /**
191
187
  * The market's experienced borrow-side Annual Percentage Yield (APY),
192
- * if interest was to be accrued at the given timestamp (scaled by WAD).
188
+ * if interest was to be accrued at the given timestamp.
193
189
  * @param timestamp The timestamp at which to calculate the borrow APY.
194
190
  * Must be greater than or equal to `lastUpdate`.
195
191
  * Defaults to `Time.timestamp()` (returns the current borrow APY).
196
192
  */
197
- getAvgBorrowApy(timestamp?: BigIntish): bigint;
193
+ getAvgBorrowApy(timestamp?: BigIntish): number;
194
+ /**
195
+ * Returns the average rate at which interest _would_ accrue for suppliers of this market,
196
+ * if `accrueInterest` was called at the given timestamp (scaled by WAD).
197
+ * @param timestamp The timestamp at which to calculate the average supply rate.
198
+ * Must be greater than or equal to `lastUpdate`.
199
+ * Defaults to `Time.timestamp()` (returns the current average supply rate).
200
+ */
201
+ getAvgSupplyRate(timestamp?: BigIntish): bigint;
198
202
  /**
199
203
  * The market's experienced supply-side Annual Percentage Yield (APY),
200
- * if interest was to be accrued at the given timestamp (scaled by WAD).
204
+ * if interest was to be accrued at the given timestamp.
201
205
  * @param timestamp The timestamp at which to calculate the supply APY.
202
206
  * Must be greater than or equal to `lastUpdate`.
203
207
  * Defaults to `Time.timestamp()` (returns the current supply APY).
204
208
  */
205
- getAvgSupplyApy(timestamp?: BigIntish): bigint;
209
+ getAvgSupplyApy(timestamp?: BigIntish): number;
206
210
  /**
207
211
  * Returns a new market derived from this market, whose interest has been accrued up to the given timestamp.
208
212
  * @param timestamp The timestamp at which to accrue interest.