@morpho-org/blue-sdk 5.10.1 → 5.12.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.
@@ -290,6 +290,7 @@ declare const _addressesRegistry: {
290
290
  };
291
291
  readonly 43111: {
292
292
  readonly morpho: "0xa4Ca2c2e25b97DA19879201bA49422bc6f181f42";
293
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
293
294
  readonly bundler3: {
294
295
  readonly bundler3: "0x8eDa6E01a20E3Cd90B3B2AF6F790cB8FADEf3Ea8";
295
296
  readonly generalAdapter1: "0x9623090C3943ad63F7d794378273610Dd0deeFD4";
@@ -394,6 +395,7 @@ declare const _addressesRegistry: {
394
395
  };
395
396
  readonly 239: {
396
397
  readonly morpho: "0x918B9F2E4B44E20c6423105BB6cCEB71473aD35c";
398
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
397
399
  readonly bundler3: {
398
400
  readonly bundler3: "0x84b189823D0f84c36728Bb3335dD8C833564e72f";
399
401
  readonly generalAdapter1: "0x6D94E7dCA6d8FAE2CF954633C2Cf9c286258E0af";
@@ -535,6 +537,34 @@ declare const _addressesRegistry: {
535
537
  readonly preLiquidationFactory: "0x8bedC738f5F0D54dF7E003297AAc6692b870F3Ed";
536
538
  readonly wNative: "0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23";
537
539
  };
540
+ readonly 42220: {
541
+ readonly morpho: "0xd24ECdD8C1e0E57a4E26B1a7bbeAa3e95466A569";
542
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
543
+ readonly bundler3: {
544
+ readonly bundler3: "0xbd142f98f847c170D51d8B23e5FEBc51FC9a67D9";
545
+ readonly generalAdapter1: "0x3E7544a07157D03a49359eE89f2fCac9a6467230";
546
+ };
547
+ readonly adaptiveCurveIrm: "0x683CAAADdfA2F42e24880E202676526d501a5dED";
548
+ readonly publicAllocator: "0x3Fe12193D178B76BaF4e23a083A64e49ACDE3188";
549
+ readonly metaMorphoFactory: "0x6870aA9f66C1e5Efe8Dbe8730e86E9e91f688275";
550
+ readonly chainlinkOracleFactory: "0x3a4849b5174Dc6828c6Dc9BBD87e61Ed1ebE9fFA";
551
+ readonly preLiquidationFactory: "0x717a3eF7D366F5ce4636011924D0Bd65ea5eCE2f";
552
+ readonly usdc: "0xcebA9300f2b948710d2653dD7B07f33A8B32118C";
553
+ };
554
+ readonly 2741: {
555
+ readonly morpho: "0xc85CE8ffdA27b646D269516B8d0Fa6ec2E958B55";
556
+ readonly bundler3: {
557
+ readonly bundler3: "0xc13A3Ca3B0120EE6121d1E0ca9Da22fDD7ed28Cd";
558
+ readonly generalAdapter1: "0x3716AA06304D1bC70f553Da44904d13086A4a791";
559
+ };
560
+ readonly adaptiveCurveIrm: "0xd334eb112CfD1EB4a50FB871b7D9895EBB955C43";
561
+ readonly publicAllocator: "0x609f3DF49806B5617A0Bd3301f04Ac3CB26d9e82";
562
+ readonly metaMorphoFactory: "0x83A7f60c9fc57cEf1e8001bda98783AA1A53E4b1";
563
+ readonly chainlinkOracleFactory: "0x3585E3fD72F8d1b02250E1F6496b706c6e092884";
564
+ readonly preLiquidationFactory: "0x1058DA51242dF63bA3A61c838A61405ea6Edb083";
565
+ readonly wNative: "0x3439153EB7AF838Ad19d56E1571FBD09333C2809";
566
+ readonly usdc: "0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1";
567
+ };
538
568
  };
539
569
  export type ChainDeployments<Addresses = ChainAddresses> = {
540
570
  [key in keyof Addresses]: Address extends Addresses[key] ? bigint : ChainDeployments<Addresses[key]>;
@@ -832,6 +862,7 @@ declare const _deployments: {
832
862
  };
833
863
  readonly 239: {
834
864
  readonly morpho: 853025n;
865
+ readonly permit2: 553679n;
835
866
  readonly bundler3: {
836
867
  readonly bundler3: 978967n;
837
868
  readonly generalAdapter1: 978967n;
@@ -962,6 +993,32 @@ declare const _deployments: {
962
993
  readonly chainlinkOracleFactory: 38459727n;
963
994
  readonly preLiquidationFactory: 38460388n;
964
995
  };
996
+ readonly 42220: {
997
+ readonly morpho: 40249329n;
998
+ readonly bundler3: {
999
+ readonly bundler3: 41808392n;
1000
+ readonly generalAdapter1: 41808392n;
1001
+ };
1002
+ readonly adaptiveCurveIrm: 40249329n;
1003
+ readonly publicAllocator: 40249329n;
1004
+ readonly metaMorphoFactory: 40259931n;
1005
+ readonly chainlinkOracleFactory: 40259931n;
1006
+ readonly preLiquidationFactory: 41808392n;
1007
+ readonly usdc: 23412006n;
1008
+ };
1009
+ readonly 2741: {
1010
+ readonly morpho: 13947713n;
1011
+ readonly bundler3: {
1012
+ readonly bundler3: 13949482n;
1013
+ readonly generalAdapter1: 13949482n;
1014
+ };
1015
+ readonly adaptiveCurveIrm: 13947713n;
1016
+ readonly publicAllocator: 13947713n;
1017
+ readonly metaMorphoFactory: 13949369n;
1018
+ readonly chainlinkOracleFactory: 13949369n;
1019
+ readonly preLiquidationFactory: 13949482n;
1020
+ readonly usdc: 53247n;
1021
+ };
965
1022
  };
966
1023
  export type AddressLabel = DottedKeys<(typeof _addressesRegistry)[ChainId]>;
967
1024
  export declare const getChainAddresses: (chainId: number) => ChainAddresses;
@@ -1235,6 +1292,7 @@ export declare let addressesRegistry: {
1235
1292
  };
1236
1293
  readonly 43111: {
1237
1294
  readonly morpho: "0xa4Ca2c2e25b97DA19879201bA49422bc6f181f42";
1295
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
1238
1296
  readonly bundler3: {
1239
1297
  readonly bundler3: "0x8eDa6E01a20E3Cd90B3B2AF6F790cB8FADEf3Ea8";
1240
1298
  readonly generalAdapter1: "0x9623090C3943ad63F7d794378273610Dd0deeFD4";
@@ -1339,6 +1397,7 @@ export declare let addressesRegistry: {
1339
1397
  };
1340
1398
  readonly 239: {
1341
1399
  readonly morpho: "0x918B9F2E4B44E20c6423105BB6cCEB71473aD35c";
1400
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
1342
1401
  readonly bundler3: {
1343
1402
  readonly bundler3: "0x84b189823D0f84c36728Bb3335dD8C833564e72f";
1344
1403
  readonly generalAdapter1: "0x6D94E7dCA6d8FAE2CF954633C2Cf9c286258E0af";
@@ -1480,6 +1539,34 @@ export declare let addressesRegistry: {
1480
1539
  readonly preLiquidationFactory: "0x8bedC738f5F0D54dF7E003297AAc6692b870F3Ed";
1481
1540
  readonly wNative: "0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23";
1482
1541
  };
1542
+ readonly 42220: {
1543
+ readonly morpho: "0xd24ECdD8C1e0E57a4E26B1a7bbeAa3e95466A569";
1544
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
1545
+ readonly bundler3: {
1546
+ readonly bundler3: "0xbd142f98f847c170D51d8B23e5FEBc51FC9a67D9";
1547
+ readonly generalAdapter1: "0x3E7544a07157D03a49359eE89f2fCac9a6467230";
1548
+ };
1549
+ readonly adaptiveCurveIrm: "0x683CAAADdfA2F42e24880E202676526d501a5dED";
1550
+ readonly publicAllocator: "0x3Fe12193D178B76BaF4e23a083A64e49ACDE3188";
1551
+ readonly metaMorphoFactory: "0x6870aA9f66C1e5Efe8Dbe8730e86E9e91f688275";
1552
+ readonly chainlinkOracleFactory: "0x3a4849b5174Dc6828c6Dc9BBD87e61Ed1ebE9fFA";
1553
+ readonly preLiquidationFactory: "0x717a3eF7D366F5ce4636011924D0Bd65ea5eCE2f";
1554
+ readonly usdc: "0xcebA9300f2b948710d2653dD7B07f33A8B32118C";
1555
+ };
1556
+ readonly 2741: {
1557
+ readonly morpho: "0xc85CE8ffdA27b646D269516B8d0Fa6ec2E958B55";
1558
+ readonly bundler3: {
1559
+ readonly bundler3: "0xc13A3Ca3B0120EE6121d1E0ca9Da22fDD7ed28Cd";
1560
+ readonly generalAdapter1: "0x3716AA06304D1bC70f553Da44904d13086A4a791";
1561
+ };
1562
+ readonly adaptiveCurveIrm: "0xd334eb112CfD1EB4a50FB871b7D9895EBB955C43";
1563
+ readonly publicAllocator: "0x609f3DF49806B5617A0Bd3301f04Ac3CB26d9e82";
1564
+ readonly metaMorphoFactory: "0x83A7f60c9fc57cEf1e8001bda98783AA1A53E4b1";
1565
+ readonly chainlinkOracleFactory: "0x3585E3fD72F8d1b02250E1F6496b706c6e092884";
1566
+ readonly preLiquidationFactory: "0x1058DA51242dF63bA3A61c838A61405ea6Edb083";
1567
+ readonly wNative: "0x3439153EB7AF838Ad19d56E1571FBD09333C2809";
1568
+ readonly usdc: "0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1";
1569
+ };
1483
1570
  };
1484
1571
  export declare let addresses: Record<number, ChainAddresses>;
1485
1572
  export declare let deployments: {
@@ -1775,6 +1862,7 @@ export declare let deployments: {
1775
1862
  };
1776
1863
  readonly 239: {
1777
1864
  readonly morpho: 853025n;
1865
+ readonly permit2: 553679n;
1778
1866
  readonly bundler3: {
1779
1867
  readonly bundler3: 978967n;
1780
1868
  readonly generalAdapter1: 978967n;
@@ -1905,6 +1993,32 @@ export declare let deployments: {
1905
1993
  readonly chainlinkOracleFactory: 38459727n;
1906
1994
  readonly preLiquidationFactory: 38460388n;
1907
1995
  };
1996
+ readonly 42220: {
1997
+ readonly morpho: 40249329n;
1998
+ readonly bundler3: {
1999
+ readonly bundler3: 41808392n;
2000
+ readonly generalAdapter1: 41808392n;
2001
+ };
2002
+ readonly adaptiveCurveIrm: 40249329n;
2003
+ readonly publicAllocator: 40249329n;
2004
+ readonly metaMorphoFactory: 40259931n;
2005
+ readonly chainlinkOracleFactory: 40259931n;
2006
+ readonly preLiquidationFactory: 41808392n;
2007
+ readonly usdc: 23412006n;
2008
+ };
2009
+ readonly 2741: {
2010
+ readonly morpho: 13947713n;
2011
+ readonly bundler3: {
2012
+ readonly bundler3: 13949482n;
2013
+ readonly generalAdapter1: 13949482n;
2014
+ };
2015
+ readonly adaptiveCurveIrm: 13947713n;
2016
+ readonly publicAllocator: 13947713n;
2017
+ readonly metaMorphoFactory: 13949369n;
2018
+ readonly chainlinkOracleFactory: 13949369n;
2019
+ readonly preLiquidationFactory: 13949482n;
2020
+ readonly usdc: 53247n;
2021
+ };
1908
2022
  };
1909
2023
  export declare let unwrappedTokensMapping: Record<number, Record<`0x${string}`, `0x${string}`>>;
1910
2024
  /**
package/lib/addresses.js CHANGED
@@ -274,6 +274,7 @@ const _addressesRegistry = {
274
274
  },
275
275
  [chain_js_1.ChainId.HemiMainnet]: {
276
276
  morpho: "0xa4Ca2c2e25b97DA19879201bA49422bc6f181f42",
277
+ permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
277
278
  bundler3: {
278
279
  bundler3: "0x8eDa6E01a20E3Cd90B3B2AF6F790cB8FADEf3Ea8",
279
280
  generalAdapter1: "0x9623090C3943ad63F7d794378273610Dd0deeFD4",
@@ -380,6 +381,7 @@ const _addressesRegistry = {
380
381
  },
381
382
  [chain_js_1.ChainId.TacMainnet]: {
382
383
  morpho: "0x918B9F2E4B44E20c6423105BB6cCEB71473aD35c",
384
+ permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
383
385
  bundler3: {
384
386
  bundler3: "0x84b189823D0f84c36728Bb3335dD8C833564e72f",
385
387
  generalAdapter1: "0x6D94E7dCA6d8FAE2CF954633C2Cf9c286258E0af",
@@ -523,6 +525,36 @@ const _addressesRegistry = {
523
525
  preLiquidationFactory: "0x8bedC738f5F0D54dF7E003297AAc6692b870F3Ed",
524
526
  wNative: "0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23",
525
527
  },
528
+ [chain_js_1.ChainId.CeloMainnet]: {
529
+ morpho: "0xd24ECdD8C1e0E57a4E26B1a7bbeAa3e95466A569",
530
+ permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
531
+ bundler3: {
532
+ bundler3: "0xbd142f98f847c170D51d8B23e5FEBc51FC9a67D9",
533
+ generalAdapter1: "0x3E7544a07157D03a49359eE89f2fCac9a6467230",
534
+ },
535
+ adaptiveCurveIrm: "0x683CAAADdfA2F42e24880E202676526d501a5dED",
536
+ publicAllocator: "0x3Fe12193D178B76BaF4e23a083A64e49ACDE3188",
537
+ metaMorphoFactory: "0x6870aA9f66C1e5Efe8Dbe8730e86E9e91f688275",
538
+ chainlinkOracleFactory: "0x3a4849b5174Dc6828c6Dc9BBD87e61Ed1ebE9fFA",
539
+ preLiquidationFactory: "0x717a3eF7D366F5ce4636011924D0Bd65ea5eCE2f",
540
+ // No wrapped native is provided as the native asset CELO is already an ERC20.
541
+ usdc: "0xcebA9300f2b948710d2653dD7B07f33A8B32118C",
542
+ },
543
+ [chain_js_1.ChainId.AbstractMainnet]: {
544
+ morpho: "0xc85CE8ffdA27b646D269516B8d0Fa6ec2E958B55",
545
+ bundler3: {
546
+ bundler3: "0xc13A3Ca3B0120EE6121d1E0ca9Da22fDD7ed28Cd",
547
+ generalAdapter1: "0x3716AA06304D1bC70f553Da44904d13086A4a791",
548
+ },
549
+ adaptiveCurveIrm: "0xd334eb112CfD1EB4a50FB871b7D9895EBB955C43",
550
+ publicAllocator: "0x609f3DF49806B5617A0Bd3301f04Ac3CB26d9e82",
551
+ metaMorphoFactory: "0x83A7f60c9fc57cEf1e8001bda98783AA1A53E4b1",
552
+ chainlinkOracleFactory: "0x3585E3fD72F8d1b02250E1F6496b706c6e092884",
553
+ preLiquidationFactory: "0x1058DA51242dF63bA3A61c838A61405ea6Edb083",
554
+ wNative: "0x3439153EB7AF838Ad19d56E1571FBD09333C2809",
555
+ // Must implement USDC permit version 2 (otherwise breaks permit signatures).
556
+ usdc: "0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1",
557
+ },
526
558
  };
527
559
  const _deployments = {
528
560
  [chain_js_1.ChainId.EthMainnet]: {
@@ -817,6 +849,7 @@ const _deployments = {
817
849
  },
818
850
  [chain_js_1.ChainId.TacMainnet]: {
819
851
  morpho: 853025n,
852
+ permit2: 553679n,
820
853
  bundler3: {
821
854
  bundler3: 978967n,
822
855
  generalAdapter1: 978967n,
@@ -947,6 +980,32 @@ const _deployments = {
947
980
  chainlinkOracleFactory: 38459727n,
948
981
  preLiquidationFactory: 38460388n,
949
982
  },
983
+ [chain_js_1.ChainId.CeloMainnet]: {
984
+ morpho: 40249329n,
985
+ bundler3: {
986
+ bundler3: 41808392n,
987
+ generalAdapter1: 41808392n,
988
+ },
989
+ adaptiveCurveIrm: 40249329n,
990
+ publicAllocator: 40249329n,
991
+ metaMorphoFactory: 40259931n,
992
+ chainlinkOracleFactory: 40259931n,
993
+ preLiquidationFactory: 41808392n,
994
+ usdc: 23412006n,
995
+ },
996
+ [chain_js_1.ChainId.AbstractMainnet]: {
997
+ morpho: 13947713n,
998
+ bundler3: {
999
+ bundler3: 13949482n,
1000
+ generalAdapter1: 13949482n,
1001
+ },
1002
+ adaptiveCurveIrm: 13947713n,
1003
+ publicAllocator: 13947713n,
1004
+ metaMorphoFactory: 13949369n,
1005
+ chainlinkOracleFactory: 13949369n,
1006
+ preLiquidationFactory: 13949482n,
1007
+ usdc: 53247n,
1008
+ },
950
1009
  };
951
1010
  const getChainAddresses = (chainId) => {
952
1011
  const chainAddresses = exports.addresses[chainId];
@@ -1047,6 +1106,9 @@ const _unwrappedTokensMapping = {
1047
1106
  [chain_js_1.ChainId.CronosMainnet]: {
1048
1107
  [_addressesRegistry[chain_js_1.ChainId.CronosMainnet].wNative]: exports.NATIVE_ADDRESS,
1049
1108
  },
1109
+ [chain_js_1.ChainId.AbstractMainnet]: {
1110
+ [_addressesRegistry[chain_js_1.ChainId.AbstractMainnet].wNative]: exports.NATIVE_ADDRESS,
1111
+ },
1050
1112
  };
1051
1113
  function getUnwrappedToken(wrappedToken, chainId) {
1052
1114
  return exports.unwrappedTokensMapping[chainId]?.[wrappedToken];
package/lib/chain.d.ts CHANGED
@@ -25,7 +25,9 @@ export declare enum ChainId {
25
25
  LineaMainnet = 59144,
26
26
  MonadMainnet = 143,
27
27
  StableMainnet = 988,
28
- CronosMainnet = 25
28
+ CronosMainnet = 25,
29
+ CeloMainnet = 42220,
30
+ AbstractMainnet = 2741
29
31
  }
30
32
  export interface ChainMetadata {
31
33
  readonly name: string;
@@ -341,5 +343,27 @@ export declare namespace ChainUtils {
341
343
  explorerUrl: string;
342
344
  identifier: string;
343
345
  };
346
+ 42220: {
347
+ name: string;
348
+ id: ChainId.CeloMainnet;
349
+ nativeCurrency: {
350
+ name: string;
351
+ symbol: string;
352
+ decimals: number;
353
+ };
354
+ explorerUrl: string;
355
+ identifier: string;
356
+ };
357
+ 2741: {
358
+ name: string;
359
+ id: ChainId.AbstractMainnet;
360
+ nativeCurrency: {
361
+ name: string;
362
+ symbol: string;
363
+ decimals: number;
364
+ };
365
+ explorerUrl: string;
366
+ identifier: string;
367
+ };
344
368
  };
345
369
  }
package/lib/chain.js CHANGED
@@ -30,6 +30,8 @@ var ChainId;
30
30
  ChainId[ChainId["MonadMainnet"] = 143] = "MonadMainnet";
31
31
  ChainId[ChainId["StableMainnet"] = 988] = "StableMainnet";
32
32
  ChainId[ChainId["CronosMainnet"] = 25] = "CronosMainnet";
33
+ ChainId[ChainId["CeloMainnet"] = 42220] = "CeloMainnet";
34
+ ChainId[ChainId["AbstractMainnet"] = 2741] = "AbstractMainnet";
33
35
  })(ChainId || (exports.ChainId = ChainId = {}));
34
36
  var ChainUtils;
35
37
  (function (ChainUtils) {
@@ -235,5 +237,19 @@ var ChainUtils;
235
237
  explorerUrl: "https://explorer.cronos.org",
236
238
  identifier: "cronos",
237
239
  },
240
+ [ChainId.CeloMainnet]: {
241
+ name: "Celo",
242
+ id: ChainId.CeloMainnet,
243
+ nativeCurrency: { name: "Celo", symbol: "CELO", decimals: 18 },
244
+ explorerUrl: "https://celoscan.io/",
245
+ identifier: "celo",
246
+ },
247
+ [ChainId.AbstractMainnet]: {
248
+ name: "Abstract",
249
+ id: ChainId.AbstractMainnet,
250
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
251
+ explorerUrl: "https://abscan.org/",
252
+ identifier: "abstract",
253
+ },
238
254
  };
239
255
  })(ChainUtils || (exports.ChainUtils = ChainUtils = {}));
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.10.1",
4
+ "version": "5.12.0",
5
5
  "author": "Morpho Association <contact@morpho.org>",
6
6
  "contributors": [
7
7
  "Rubilmax <rmilon@gmail.com>"
@@ -32,7 +32,7 @@
32
32
  "viem": "^2.41.2",
33
33
  "vitest": "^4.0.15",
34
34
  "@morpho-org/morpho-ts": "^2.4.6",
35
- "@morpho-org/test": "^2.6.5"
35
+ "@morpho-org/test": "^2.6.6"
36
36
  },
37
37
  "scripts": {
38
38
  "prepublish": "$npm_execpath build",