@morpho-org/blue-sdk 5.10.0 → 5.11.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,20 @@ 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
+ };
538
554
  };
539
555
  export type ChainDeployments<Addresses = ChainAddresses> = {
540
556
  [key in keyof Addresses]: Address extends Addresses[key] ? bigint : ChainDeployments<Addresses[key]>;
@@ -832,6 +848,7 @@ declare const _deployments: {
832
848
  };
833
849
  readonly 239: {
834
850
  readonly morpho: 853025n;
851
+ readonly permit2: 553679n;
835
852
  readonly bundler3: {
836
853
  readonly bundler3: 978967n;
837
854
  readonly generalAdapter1: 978967n;
@@ -962,6 +979,19 @@ declare const _deployments: {
962
979
  readonly chainlinkOracleFactory: 38459727n;
963
980
  readonly preLiquidationFactory: 38460388n;
964
981
  };
982
+ readonly 42220: {
983
+ readonly morpho: 40249329n;
984
+ readonly bundler3: {
985
+ readonly bundler3: 41808392n;
986
+ readonly generalAdapter1: 41808392n;
987
+ };
988
+ readonly adaptiveCurveIrm: 40249329n;
989
+ readonly publicAllocator: 40249329n;
990
+ readonly metaMorphoFactory: 40259931n;
991
+ readonly chainlinkOracleFactory: 40259931n;
992
+ readonly preLiquidationFactory: 41808392n;
993
+ readonly usdc: 23412006n;
994
+ };
965
995
  };
966
996
  export type AddressLabel = DottedKeys<(typeof _addressesRegistry)[ChainId]>;
967
997
  export declare const getChainAddresses: (chainId: number) => ChainAddresses;
@@ -1235,6 +1265,7 @@ export declare let addressesRegistry: {
1235
1265
  };
1236
1266
  readonly 43111: {
1237
1267
  readonly morpho: "0xa4Ca2c2e25b97DA19879201bA49422bc6f181f42";
1268
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
1238
1269
  readonly bundler3: {
1239
1270
  readonly bundler3: "0x8eDa6E01a20E3Cd90B3B2AF6F790cB8FADEf3Ea8";
1240
1271
  readonly generalAdapter1: "0x9623090C3943ad63F7d794378273610Dd0deeFD4";
@@ -1339,6 +1370,7 @@ export declare let addressesRegistry: {
1339
1370
  };
1340
1371
  readonly 239: {
1341
1372
  readonly morpho: "0x918B9F2E4B44E20c6423105BB6cCEB71473aD35c";
1373
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
1342
1374
  readonly bundler3: {
1343
1375
  readonly bundler3: "0x84b189823D0f84c36728Bb3335dD8C833564e72f";
1344
1376
  readonly generalAdapter1: "0x6D94E7dCA6d8FAE2CF954633C2Cf9c286258E0af";
@@ -1480,6 +1512,20 @@ export declare let addressesRegistry: {
1480
1512
  readonly preLiquidationFactory: "0x8bedC738f5F0D54dF7E003297AAc6692b870F3Ed";
1481
1513
  readonly wNative: "0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23";
1482
1514
  };
1515
+ readonly 42220: {
1516
+ readonly morpho: "0xd24ECdD8C1e0E57a4E26B1a7bbeAa3e95466A569";
1517
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
1518
+ readonly bundler3: {
1519
+ readonly bundler3: "0xbd142f98f847c170D51d8B23e5FEBc51FC9a67D9";
1520
+ readonly generalAdapter1: "0x3E7544a07157D03a49359eE89f2fCac9a6467230";
1521
+ };
1522
+ readonly adaptiveCurveIrm: "0x683CAAADdfA2F42e24880E202676526d501a5dED";
1523
+ readonly publicAllocator: "0x3Fe12193D178B76BaF4e23a083A64e49ACDE3188";
1524
+ readonly metaMorphoFactory: "0x6870aA9f66C1e5Efe8Dbe8730e86E9e91f688275";
1525
+ readonly chainlinkOracleFactory: "0x3a4849b5174Dc6828c6Dc9BBD87e61Ed1ebE9fFA";
1526
+ readonly preLiquidationFactory: "0x717a3eF7D366F5ce4636011924D0Bd65ea5eCE2f";
1527
+ readonly usdc: "0xcebA9300f2b948710d2653dD7B07f33A8B32118C";
1528
+ };
1483
1529
  };
1484
1530
  export declare let addresses: Record<number, ChainAddresses>;
1485
1531
  export declare let deployments: {
@@ -1775,6 +1821,7 @@ export declare let deployments: {
1775
1821
  };
1776
1822
  readonly 239: {
1777
1823
  readonly morpho: 853025n;
1824
+ readonly permit2: 553679n;
1778
1825
  readonly bundler3: {
1779
1826
  readonly bundler3: 978967n;
1780
1827
  readonly generalAdapter1: 978967n;
@@ -1905,6 +1952,19 @@ export declare let deployments: {
1905
1952
  readonly chainlinkOracleFactory: 38459727n;
1906
1953
  readonly preLiquidationFactory: 38460388n;
1907
1954
  };
1955
+ readonly 42220: {
1956
+ readonly morpho: 40249329n;
1957
+ readonly bundler3: {
1958
+ readonly bundler3: 41808392n;
1959
+ readonly generalAdapter1: 41808392n;
1960
+ };
1961
+ readonly adaptiveCurveIrm: 40249329n;
1962
+ readonly publicAllocator: 40249329n;
1963
+ readonly metaMorphoFactory: 40259931n;
1964
+ readonly chainlinkOracleFactory: 40259931n;
1965
+ readonly preLiquidationFactory: 41808392n;
1966
+ readonly usdc: 23412006n;
1967
+ };
1908
1968
  };
1909
1969
  export declare let unwrappedTokensMapping: Record<number, Record<`0x${string}`, `0x${string}`>>;
1910
1970
  /**
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,21 @@ 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
+ },
526
543
  };
527
544
  const _deployments = {
528
545
  [chain_js_1.ChainId.EthMainnet]: {
@@ -817,6 +834,7 @@ const _deployments = {
817
834
  },
818
835
  [chain_js_1.ChainId.TacMainnet]: {
819
836
  morpho: 853025n,
837
+ permit2: 553679n,
820
838
  bundler3: {
821
839
  bundler3: 978967n,
822
840
  generalAdapter1: 978967n,
@@ -947,6 +965,19 @@ const _deployments = {
947
965
  chainlinkOracleFactory: 38459727n,
948
966
  preLiquidationFactory: 38460388n,
949
967
  },
968
+ [chain_js_1.ChainId.CeloMainnet]: {
969
+ morpho: 40249329n,
970
+ bundler3: {
971
+ bundler3: 41808392n,
972
+ generalAdapter1: 41808392n,
973
+ },
974
+ adaptiveCurveIrm: 40249329n,
975
+ publicAllocator: 40249329n,
976
+ metaMorphoFactory: 40259931n,
977
+ chainlinkOracleFactory: 40259931n,
978
+ preLiquidationFactory: 41808392n,
979
+ usdc: 23412006n,
980
+ },
950
981
  };
951
982
  const getChainAddresses = (chainId) => {
952
983
  const chainAddresses = exports.addresses[chainId];
package/lib/chain.d.ts CHANGED
@@ -25,7 +25,8 @@ 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
29
30
  }
30
31
  export interface ChainMetadata {
31
32
  readonly name: string;
@@ -341,5 +342,16 @@ export declare namespace ChainUtils {
341
342
  explorerUrl: string;
342
343
  identifier: string;
343
344
  };
345
+ 42220: {
346
+ name: string;
347
+ id: ChainId.CeloMainnet;
348
+ nativeCurrency: {
349
+ name: string;
350
+ symbol: string;
351
+ decimals: number;
352
+ };
353
+ explorerUrl: string;
354
+ identifier: string;
355
+ };
344
356
  };
345
357
  }
package/lib/chain.js CHANGED
@@ -30,6 +30,7 @@ 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";
33
34
  })(ChainId || (exports.ChainId = ChainId = {}));
34
35
  var ChainUtils;
35
36
  (function (ChainUtils) {
@@ -235,5 +236,12 @@ var ChainUtils;
235
236
  explorerUrl: "https://explorer.cronos.org",
236
237
  identifier: "cronos",
237
238
  },
239
+ [ChainId.CeloMainnet]: {
240
+ name: "Celo",
241
+ id: ChainId.CeloMainnet,
242
+ nativeCurrency: { name: "Celo", symbol: "CELO", decimals: 18 },
243
+ explorerUrl: "https://celoscan.io/",
244
+ identifier: "celo",
245
+ },
238
246
  };
239
247
  })(ChainUtils || (exports.ChainUtils = ChainUtils = {}));
package/lib/errors.d.ts CHANGED
@@ -86,8 +86,8 @@ export declare namespace VaultV2Errors {
86
86
  constructor(address: Address);
87
87
  }
88
88
  }
89
- export interface ErrorClass<E extends Error> {
89
+ export interface ErrorClass<E extends Error = Error> {
90
90
  new (...args: any[]): E;
91
91
  }
92
- export declare function _try<T, E extends Error>(accessor: () => Promise<T>, ...errorClasses: ErrorClass<E>[]): Promise<T | undefined>;
93
- export declare function _try<T, E extends Error>(accessor: () => T, ...errorClasses: ErrorClass<E>[]): T | undefined;
92
+ export declare function _try<T, ErrorClasses extends readonly ErrorClass[] = []>(accessor: () => Promise<T>, ...errorClasses: ErrorClasses): Promise<T | undefined>;
93
+ export declare function _try<T, ErrorClasses extends readonly ErrorClass[] = []>(accessor: () => T, ...errorClasses: ErrorClasses): T | undefined;
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.0",
4
+ "version": "5.11.0",
5
5
  "author": "Morpho Association <contact@morpho.org>",
6
6
  "contributors": [
7
7
  "Rubilmax <rmilon@gmail.com>"