@morpho-org/blue-sdk 5.12.1 → 5.14.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.
@@ -409,6 +409,7 @@ declare const _addressesRegistry: {
409
409
  };
410
410
  readonly 1135: {
411
411
  readonly morpho: "0x00cD58DEEbd7A2F1C55dAec715faF8aed5b27BF8";
412
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
412
413
  readonly bundler3: {
413
414
  readonly bundler3: "0xD96E5e02580C4EAfE15B5537b25eE3dEe5861e00";
414
415
  readonly generalAdapter1: "0x76cFE4BF840C7b461772fE7CDE399f58c4173584";
@@ -565,6 +566,34 @@ declare const _addressesRegistry: {
565
566
  readonly wNative: "0x3439153EB7AF838Ad19d56E1571FBD09333C2809";
566
567
  readonly usdc: "0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1";
567
568
  };
569
+ readonly 200901: {
570
+ readonly morpho: "0xAeA7eFF1bD3c875c18ef50F0387892dF181431C6";
571
+ readonly bundler3: {
572
+ readonly bundler3: "0x82b3ea7558Fc383b949fa42Db7ee3eB101447B96";
573
+ readonly generalAdapter1: "0xa87F1422Df88B5f490203D71e2f8e7244843E62F";
574
+ };
575
+ readonly adaptiveCurveIrm: "0xefB565442B9Eb740B50Cf928C14d21c0111254F9";
576
+ readonly publicAllocator: "0x3A1db0038361528756bED147abe3d41255c7128c";
577
+ readonly metaMorphoFactory: "0xb95De4a9C81Ba6240378F383f88592d30937d048";
578
+ readonly chainlinkOracleFactory: "0xfDc69d06De855701731D142F28bD401802DA4daF";
579
+ readonly preLiquidationFactory: "0x4E28CAE07A008FF2D7D345992C969118eb253CD6";
580
+ readonly wNative: "0xfF204e2681A6fA0e2C3FaDe68a1B28fb90E4Fc5F";
581
+ readonly usdc: "0xf8C374CE88A3BE3d374e8888349C7768B607c755";
582
+ };
583
+ readonly 56: {
584
+ readonly morpho: "0x01b0Bd309AA75547f7a37Ad7B1219A898E67a83a";
585
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
586
+ readonly bundler3: {
587
+ readonly bundler3: "0x16D40b9DF1497468195BFAfeb2718e486E15bF91";
588
+ readonly generalAdapter1: "0x87c93660ECe6E68C6492EabBbBdbaafA102ae3a3";
589
+ };
590
+ readonly adaptiveCurveIrm: "0x7112D95cB5f6b13bF5F5B94a373bB3b2B381F979";
591
+ readonly publicAllocator: "0x842bEccF8eBC11006c4bE96DEfE09b60326D0495";
592
+ readonly metaMorphoFactory: "0x92983687e672cA6d96530f9Dbe11a196cE905d72";
593
+ readonly chainlinkOracleFactory: "0xDf2035fC15919588526dBb5560863C812F135236";
594
+ readonly preLiquidationFactory: "0xEB8871F0FA8aB787AbCD28d1095f7B486d241D42";
595
+ readonly wNative: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c";
596
+ };
568
597
  };
569
598
  export type ChainDeployments<Addresses = ChainAddresses> = {
570
599
  [key in keyof Addresses]: Address extends Addresses[key] ? bigint : ChainDeployments<Addresses[key]>;
@@ -1019,6 +1048,32 @@ declare const _deployments: {
1019
1048
  readonly preLiquidationFactory: 13949482n;
1020
1049
  readonly usdc: 53247n;
1021
1050
  };
1051
+ readonly 200901: {
1052
+ readonly morpho: 13516997n;
1053
+ readonly bundler3: {
1054
+ readonly bundler3: 13638316n;
1055
+ readonly generalAdapter1: 13638316n;
1056
+ };
1057
+ readonly adaptiveCurveIrm: 13516997n;
1058
+ readonly publicAllocator: 13516997n;
1059
+ readonly metaMorphoFactory: 13638155n;
1060
+ readonly chainlinkOracleFactory: 13638155n;
1061
+ readonly preLiquidationFactory: 13638316n;
1062
+ readonly usdc: 4041175n;
1063
+ };
1064
+ readonly 56: {
1065
+ readonly morpho: 54344680n;
1066
+ readonly permit2: 25343783n;
1067
+ readonly bundler3: {
1068
+ readonly bundler3: 54346080n;
1069
+ readonly generalAdapter1: 54346080n;
1070
+ };
1071
+ readonly adaptiveCurveIrm: 54344680n;
1072
+ readonly publicAllocator: 54344680n;
1073
+ readonly metaMorphoFactory: 54344985n;
1074
+ readonly chainlinkOracleFactory: 54344985n;
1075
+ readonly preLiquidationFactory: 54346080n;
1076
+ };
1022
1077
  };
1023
1078
  export type AddressLabel = DottedKeys<(typeof _addressesRegistry)[ChainId]>;
1024
1079
  export declare const getChainAddresses: (chainId: number) => ChainAddresses;
@@ -1411,6 +1466,7 @@ export declare let addressesRegistry: {
1411
1466
  };
1412
1467
  readonly 1135: {
1413
1468
  readonly morpho: "0x00cD58DEEbd7A2F1C55dAec715faF8aed5b27BF8";
1469
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
1414
1470
  readonly bundler3: {
1415
1471
  readonly bundler3: "0xD96E5e02580C4EAfE15B5537b25eE3dEe5861e00";
1416
1472
  readonly generalAdapter1: "0x76cFE4BF840C7b461772fE7CDE399f58c4173584";
@@ -1567,6 +1623,34 @@ export declare let addressesRegistry: {
1567
1623
  readonly wNative: "0x3439153EB7AF838Ad19d56E1571FBD09333C2809";
1568
1624
  readonly usdc: "0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1";
1569
1625
  };
1626
+ readonly 200901: {
1627
+ readonly morpho: "0xAeA7eFF1bD3c875c18ef50F0387892dF181431C6";
1628
+ readonly bundler3: {
1629
+ readonly bundler3: "0x82b3ea7558Fc383b949fa42Db7ee3eB101447B96";
1630
+ readonly generalAdapter1: "0xa87F1422Df88B5f490203D71e2f8e7244843E62F";
1631
+ };
1632
+ readonly adaptiveCurveIrm: "0xefB565442B9Eb740B50Cf928C14d21c0111254F9";
1633
+ readonly publicAllocator: "0x3A1db0038361528756bED147abe3d41255c7128c";
1634
+ readonly metaMorphoFactory: "0xb95De4a9C81Ba6240378F383f88592d30937d048";
1635
+ readonly chainlinkOracleFactory: "0xfDc69d06De855701731D142F28bD401802DA4daF";
1636
+ readonly preLiquidationFactory: "0x4E28CAE07A008FF2D7D345992C969118eb253CD6";
1637
+ readonly wNative: "0xfF204e2681A6fA0e2C3FaDe68a1B28fb90E4Fc5F";
1638
+ readonly usdc: "0xf8C374CE88A3BE3d374e8888349C7768B607c755";
1639
+ };
1640
+ readonly 56: {
1641
+ readonly morpho: "0x01b0Bd309AA75547f7a37Ad7B1219A898E67a83a";
1642
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
1643
+ readonly bundler3: {
1644
+ readonly bundler3: "0x16D40b9DF1497468195BFAfeb2718e486E15bF91";
1645
+ readonly generalAdapter1: "0x87c93660ECe6E68C6492EabBbBdbaafA102ae3a3";
1646
+ };
1647
+ readonly adaptiveCurveIrm: "0x7112D95cB5f6b13bF5F5B94a373bB3b2B381F979";
1648
+ readonly publicAllocator: "0x842bEccF8eBC11006c4bE96DEfE09b60326D0495";
1649
+ readonly metaMorphoFactory: "0x92983687e672cA6d96530f9Dbe11a196cE905d72";
1650
+ readonly chainlinkOracleFactory: "0xDf2035fC15919588526dBb5560863C812F135236";
1651
+ readonly preLiquidationFactory: "0xEB8871F0FA8aB787AbCD28d1095f7B486d241D42";
1652
+ readonly wNative: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c";
1653
+ };
1570
1654
  };
1571
1655
  export declare let addresses: Record<number, ChainAddresses>;
1572
1656
  export declare let deployments: {
@@ -2019,6 +2103,32 @@ export declare let deployments: {
2019
2103
  readonly preLiquidationFactory: 13949482n;
2020
2104
  readonly usdc: 53247n;
2021
2105
  };
2106
+ readonly 200901: {
2107
+ readonly morpho: 13516997n;
2108
+ readonly bundler3: {
2109
+ readonly bundler3: 13638316n;
2110
+ readonly generalAdapter1: 13638316n;
2111
+ };
2112
+ readonly adaptiveCurveIrm: 13516997n;
2113
+ readonly publicAllocator: 13516997n;
2114
+ readonly metaMorphoFactory: 13638155n;
2115
+ readonly chainlinkOracleFactory: 13638155n;
2116
+ readonly preLiquidationFactory: 13638316n;
2117
+ readonly usdc: 4041175n;
2118
+ };
2119
+ readonly 56: {
2120
+ readonly morpho: 54344680n;
2121
+ readonly permit2: 25343783n;
2122
+ readonly bundler3: {
2123
+ readonly bundler3: 54346080n;
2124
+ readonly generalAdapter1: 54346080n;
2125
+ };
2126
+ readonly adaptiveCurveIrm: 54344680n;
2127
+ readonly publicAllocator: 54344680n;
2128
+ readonly metaMorphoFactory: 54344985n;
2129
+ readonly chainlinkOracleFactory: 54344985n;
2130
+ readonly preLiquidationFactory: 54346080n;
2131
+ };
2022
2132
  };
2023
2133
  export declare let unwrappedTokensMapping: Record<number, Record<`0x${string}`, `0x${string}`>>;
2024
2134
  /**
package/lib/addresses.js CHANGED
@@ -395,6 +395,7 @@ const _addressesRegistry = {
395
395
  },
396
396
  [chain_js_1.ChainId.LiskMainnet]: {
397
397
  morpho: "0x00cD58DEEbd7A2F1C55dAec715faF8aed5b27BF8",
398
+ permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
398
399
  bundler3: {
399
400
  bundler3: "0xD96E5e02580C4EAfE15B5537b25eE3dEe5861e00",
400
401
  generalAdapter1: "0x76cFE4BF840C7b461772fE7CDE399f58c4173584",
@@ -556,6 +557,35 @@ const _addressesRegistry = {
556
557
  // Must implement USDC permit version 2 (otherwise breaks permit signatures).
557
558
  usdc: "0x84A71ccD554Cc1b02749b35d22F684CC8ec987e1",
558
559
  },
560
+ [chain_js_1.ChainId.BitlayerMainnet]: {
561
+ morpho: "0xAeA7eFF1bD3c875c18ef50F0387892dF181431C6",
562
+ bundler3: {
563
+ bundler3: "0x82b3ea7558Fc383b949fa42Db7ee3eB101447B96",
564
+ generalAdapter1: "0xa87F1422Df88B5f490203D71e2f8e7244843E62F",
565
+ },
566
+ adaptiveCurveIrm: "0xefB565442B9Eb740B50Cf928C14d21c0111254F9",
567
+ publicAllocator: "0x3A1db0038361528756bED147abe3d41255c7128c",
568
+ metaMorphoFactory: "0xb95De4a9C81Ba6240378F383f88592d30937d048",
569
+ chainlinkOracleFactory: "0xfDc69d06De855701731D142F28bD401802DA4daF",
570
+ preLiquidationFactory: "0x4E28CAE07A008FF2D7D345992C969118eb253CD6",
571
+ wNative: "0xfF204e2681A6fA0e2C3FaDe68a1B28fb90E4Fc5F",
572
+ // Must implement USDC permit version 2 (otherwise breaks permit signatures).
573
+ usdc: "0xf8C374CE88A3BE3d374e8888349C7768B607c755",
574
+ },
575
+ [chain_js_1.ChainId.BscMainnet]: {
576
+ morpho: "0x01b0Bd309AA75547f7a37Ad7B1219A898E67a83a",
577
+ permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
578
+ bundler3: {
579
+ bundler3: "0x16D40b9DF1497468195BFAfeb2718e486E15bF91",
580
+ generalAdapter1: "0x87c93660ECe6E68C6492EabBbBdbaafA102ae3a3",
581
+ },
582
+ adaptiveCurveIrm: "0x7112D95cB5f6b13bF5F5B94a373bB3b2B381F979",
583
+ publicAllocator: "0x842bEccF8eBC11006c4bE96DEfE09b60326D0495",
584
+ metaMorphoFactory: "0x92983687e672cA6d96530f9Dbe11a196cE905d72",
585
+ chainlinkOracleFactory: "0xDf2035fC15919588526dBb5560863C812F135236",
586
+ preLiquidationFactory: "0xEB8871F0FA8aB787AbCD28d1095f7B486d241D42",
587
+ wNative: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
588
+ },
559
589
  };
560
590
  const _deployments = {
561
591
  [chain_js_1.ChainId.EthMainnet]: {
@@ -1007,6 +1037,32 @@ const _deployments = {
1007
1037
  preLiquidationFactory: 13949482n,
1008
1038
  usdc: 53247n,
1009
1039
  },
1040
+ [chain_js_1.ChainId.BitlayerMainnet]: {
1041
+ morpho: 13516997n,
1042
+ bundler3: {
1043
+ bundler3: 13638316n,
1044
+ generalAdapter1: 13638316n,
1045
+ },
1046
+ adaptiveCurveIrm: 13516997n,
1047
+ publicAllocator: 13516997n,
1048
+ metaMorphoFactory: 13638155n,
1049
+ chainlinkOracleFactory: 13638155n,
1050
+ preLiquidationFactory: 13638316n,
1051
+ usdc: 4041175n,
1052
+ },
1053
+ [chain_js_1.ChainId.BscMainnet]: {
1054
+ morpho: 54344680n,
1055
+ permit2: 25343783n,
1056
+ bundler3: {
1057
+ bundler3: 54346080n,
1058
+ generalAdapter1: 54346080n,
1059
+ },
1060
+ adaptiveCurveIrm: 54344680n,
1061
+ publicAllocator: 54344680n,
1062
+ metaMorphoFactory: 54344985n,
1063
+ chainlinkOracleFactory: 54344985n,
1064
+ preLiquidationFactory: 54346080n,
1065
+ },
1010
1066
  };
1011
1067
  const getChainAddresses = (chainId) => {
1012
1068
  const chainAddresses = exports.addresses[chainId];
@@ -1110,6 +1166,12 @@ const _unwrappedTokensMapping = {
1110
1166
  [chain_js_1.ChainId.AbstractMainnet]: {
1111
1167
  [_addressesRegistry[chain_js_1.ChainId.AbstractMainnet].wNative]: exports.NATIVE_ADDRESS,
1112
1168
  },
1169
+ [chain_js_1.ChainId.BitlayerMainnet]: {
1170
+ [_addressesRegistry[chain_js_1.ChainId.BitlayerMainnet].wNative]: exports.NATIVE_ADDRESS,
1171
+ },
1172
+ [chain_js_1.ChainId.BscMainnet]: {
1173
+ [_addressesRegistry[chain_js_1.ChainId.BscMainnet].wNative]: exports.NATIVE_ADDRESS,
1174
+ },
1113
1175
  };
1114
1176
  function getUnwrappedToken(wrappedToken, chainId) {
1115
1177
  return exports.unwrappedTokensMapping[chainId]?.[wrappedToken];
package/lib/chain.d.ts CHANGED
@@ -27,7 +27,9 @@ export declare enum ChainId {
27
27
  StableMainnet = 988,
28
28
  CronosMainnet = 25,
29
29
  CeloMainnet = 42220,
30
- AbstractMainnet = 2741
30
+ AbstractMainnet = 2741,
31
+ BitlayerMainnet = 200901,
32
+ BscMainnet = 56
31
33
  }
32
34
  export interface ChainMetadata {
33
35
  readonly name: string;
@@ -365,5 +367,27 @@ export declare namespace ChainUtils {
365
367
  explorerUrl: string;
366
368
  identifier: string;
367
369
  };
370
+ 200901: {
371
+ name: string;
372
+ id: ChainId.BitlayerMainnet;
373
+ nativeCurrency: {
374
+ name: string;
375
+ symbol: string;
376
+ decimals: number;
377
+ };
378
+ explorerUrl: string;
379
+ identifier: string;
380
+ };
381
+ 56: {
382
+ name: string;
383
+ id: ChainId.BscMainnet;
384
+ nativeCurrency: {
385
+ name: string;
386
+ symbol: string;
387
+ decimals: number;
388
+ };
389
+ explorerUrl: string;
390
+ identifier: string;
391
+ };
368
392
  };
369
393
  }
package/lib/chain.js CHANGED
@@ -32,6 +32,8 @@ var ChainId;
32
32
  ChainId[ChainId["CronosMainnet"] = 25] = "CronosMainnet";
33
33
  ChainId[ChainId["CeloMainnet"] = 42220] = "CeloMainnet";
34
34
  ChainId[ChainId["AbstractMainnet"] = 2741] = "AbstractMainnet";
35
+ ChainId[ChainId["BitlayerMainnet"] = 200901] = "BitlayerMainnet";
36
+ ChainId[ChainId["BscMainnet"] = 56] = "BscMainnet";
35
37
  })(ChainId || (exports.ChainId = ChainId = {}));
36
38
  var ChainUtils;
37
39
  (function (ChainUtils) {
@@ -251,5 +253,19 @@ var ChainUtils;
251
253
  explorerUrl: "https://abscan.org/",
252
254
  identifier: "abstract",
253
255
  },
256
+ [ChainId.BitlayerMainnet]: {
257
+ name: "Bitlayer",
258
+ id: ChainId.BitlayerMainnet,
259
+ nativeCurrency: { name: "Bitcoin", symbol: "BTC", decimals: 18 },
260
+ explorerUrl: "https://www.btrscan.com",
261
+ identifier: "bitlayer",
262
+ },
263
+ [ChainId.BscMainnet]: {
264
+ name: "Bnb Smart Chain",
265
+ id: ChainId.BscMainnet,
266
+ nativeCurrency: { name: "Bnb", symbol: "BNB", decimals: 18 },
267
+ explorerUrl: "https://bscscan.com",
268
+ identifier: "bsc",
269
+ },
254
270
  };
255
271
  })(ChainUtils || (exports.ChainUtils = ChainUtils = {}));
@@ -82,7 +82,7 @@ class AccrualVaultV2 extends VaultV2 {
82
82
  // `absoluteCap` can be set lower than `allocation`.
83
83
  const absoluteMaxDeposit = math_1.MathLib.zeroFloorSub(absoluteCap, allocation);
84
84
  if (liquidityAdapterLimit.value > absoluteMaxDeposit)
85
- return {
85
+ liquidityAdapterLimit = {
86
86
  value: absoluteMaxDeposit,
87
87
  limiter: utils_1.CapacityLimitReason.vaultV2_absoluteCap,
88
88
  };
@@ -90,7 +90,7 @@ class AccrualVaultV2 extends VaultV2 {
90
90
  // `relativeCap` can be set lower than `allocation / totalAssets`.
91
91
  const relativeMaxDeposit = math_1.MathLib.zeroFloorSub(math_1.MathLib.wMulDown(this.totalAssets, relativeCap), allocation);
92
92
  if (liquidityAdapterLimit.value > relativeMaxDeposit)
93
- return {
93
+ liquidityAdapterLimit = {
94
94
  value: relativeMaxDeposit,
95
95
  limiter: utils_1.CapacityLimitReason.vaultV2_relativeCap,
96
96
  };
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.12.1",
4
+ "version": "5.14.0",
5
5
  "author": "Morpho Association <contact@morpho.org>",
6
6
  "contributors": [
7
7
  "Rubilmax <rmilon@gmail.com>"