@morpho-org/blue-sdk 5.14.0 → 5.16.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.
@@ -42,6 +42,10 @@ export interface ChainAddresses {
42
42
  * Must implement USDC permit version 2 (otherwise breaks permit signatures).
43
43
  */
44
44
  usdc?: Address;
45
+ /**
46
+ * Must implement EURC permit version 2 (otherwise breaks permit signatures).
47
+ */
48
+ eurc?: Address;
45
49
  stEth?: Address;
46
50
  wstEth?: Address;
47
51
  }
@@ -85,6 +89,7 @@ declare const _addressesRegistry: {
85
89
  readonly bC3M: "0x2F123cF3F37CE3328CC9B5b8415f9EC5109b45e7";
86
90
  readonly wbC3M: "0x95D7337d43340E2721960Dc402D9b9117f0d81a2";
87
91
  readonly usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";
92
+ readonly eurc: "0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c";
88
93
  readonly usdt: "0xdAC17F958D2ee523a2206206994597C13D831ec7";
89
94
  readonly crvUsd: "0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E";
90
95
  readonly "stkcvxcrvUSDTWBTCWETH-morpho": "0xb0Ce26C88e4e7DCa51968b6047f44646f5064278";
@@ -123,6 +128,7 @@ declare const _addressesRegistry: {
123
128
  readonly preLiquidationFactory: "0x8cd16b62E170Ee0bA83D80e1F80E6085367e2aef";
124
129
  readonly wNative: "0x4200000000000000000000000000000000000006";
125
130
  readonly usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
131
+ readonly eurc: "0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42";
126
132
  readonly verUsdc: "0x59aaF835D34b1E3dF2170e4872B785f11E2a964b";
127
133
  readonly testUsdc: "0xBC77067f829979812d795d516E523C4033b66409";
128
134
  };
@@ -211,6 +217,7 @@ declare const _addressesRegistry: {
211
217
  readonly chainlinkOracleFactory: "0xd706690BA1Fe26b70c4AD89e60ff62cEB3A2eD02";
212
218
  readonly preLiquidationFactory: "0xe3cE2051a24e58DBFC0eFBe4c2d9e89c5eAe4695";
213
219
  readonly wNative: "0x4200000000000000000000000000000000000006";
220
+ readonly eurc: "0x1C60ba0A0eD1019e8Eb035E6daF4155A5cE2380B";
214
221
  };
215
222
  readonly 252: {
216
223
  readonly morpho: "0xa6030627d724bA78a59aCf43Be7550b4C5a0653b";
@@ -594,6 +601,21 @@ declare const _addressesRegistry: {
594
601
  readonly preLiquidationFactory: "0xEB8871F0FA8aB787AbCD28d1095f7B486d241D42";
595
602
  readonly wNative: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c";
596
603
  };
604
+ readonly 1868: {
605
+ readonly morpho: "0xE75Fc5eA6e74B824954349Ca351eb4e671ADA53a";
606
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
607
+ readonly bundler3: {
608
+ readonly bundler3: "0x461378B79d400c963F48F57b3a99416bc3C5c6a6";
609
+ readonly generalAdapter1: "0xA47EeDE3Aac741B830E394B2e291f6774BD8bb48";
610
+ };
611
+ readonly adaptiveCurveIrm: "0x68F9b666b984527A7c145Db4103Cc6d3171C797F";
612
+ readonly publicAllocator: "0x76f93A21573014Ab7d634D3204818922A234249e";
613
+ readonly metaMorphoFactory: "0x7026b436f294e560b3C26E731f5cac5992cA2B33";
614
+ readonly chainlinkOracleFactory: "0x669F1A4cE3127740eCdB3E36adFC5Df6Db1EA74b";
615
+ readonly preLiquidationFactory: "0xcBD0710425613d666C5Ffb4dE2eE73554F21c34B";
616
+ readonly wNative: "0x4200000000000000000000000000000000000006";
617
+ readonly usdc: "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369";
618
+ };
597
619
  };
598
620
  export type ChainDeployments<Addresses = ChainAddresses> = {
599
621
  [key in keyof Addresses]: Address extends Addresses[key] ? bigint : ChainDeployments<Addresses[key]>;
@@ -1074,6 +1096,18 @@ declare const _deployments: {
1074
1096
  readonly chainlinkOracleFactory: 54344985n;
1075
1097
  readonly preLiquidationFactory: 54346080n;
1076
1098
  };
1099
+ readonly 1868: {
1100
+ readonly morpho: 6440817n;
1101
+ readonly bundler3: {
1102
+ readonly bundler3: 6443359n;
1103
+ readonly generalAdapter1: 6443359n;
1104
+ };
1105
+ readonly adaptiveCurveIrm: 6440817n;
1106
+ readonly publicAllocator: 6440817n;
1107
+ readonly metaMorphoFactory: 6440899n;
1108
+ readonly chainlinkOracleFactory: 6440899n;
1109
+ readonly preLiquidationFactory: 6443359n;
1110
+ };
1077
1111
  };
1078
1112
  export type AddressLabel = DottedKeys<(typeof _addressesRegistry)[ChainId]>;
1079
1113
  export declare const getChainAddresses: (chainId: number) => ChainAddresses;
@@ -1142,6 +1176,7 @@ export declare let addressesRegistry: {
1142
1176
  readonly bC3M: "0x2F123cF3F37CE3328CC9B5b8415f9EC5109b45e7";
1143
1177
  readonly wbC3M: "0x95D7337d43340E2721960Dc402D9b9117f0d81a2";
1144
1178
  readonly usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";
1179
+ readonly eurc: "0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c";
1145
1180
  readonly usdt: "0xdAC17F958D2ee523a2206206994597C13D831ec7";
1146
1181
  readonly crvUsd: "0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E";
1147
1182
  readonly "stkcvxcrvUSDTWBTCWETH-morpho": "0xb0Ce26C88e4e7DCa51968b6047f44646f5064278";
@@ -1180,6 +1215,7 @@ export declare let addressesRegistry: {
1180
1215
  readonly preLiquidationFactory: "0x8cd16b62E170Ee0bA83D80e1F80E6085367e2aef";
1181
1216
  readonly wNative: "0x4200000000000000000000000000000000000006";
1182
1217
  readonly usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
1218
+ readonly eurc: "0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42";
1183
1219
  readonly verUsdc: "0x59aaF835D34b1E3dF2170e4872B785f11E2a964b";
1184
1220
  readonly testUsdc: "0xBC77067f829979812d795d516E523C4033b66409";
1185
1221
  };
@@ -1268,6 +1304,7 @@ export declare let addressesRegistry: {
1268
1304
  readonly chainlinkOracleFactory: "0xd706690BA1Fe26b70c4AD89e60ff62cEB3A2eD02";
1269
1305
  readonly preLiquidationFactory: "0xe3cE2051a24e58DBFC0eFBe4c2d9e89c5eAe4695";
1270
1306
  readonly wNative: "0x4200000000000000000000000000000000000006";
1307
+ readonly eurc: "0x1C60ba0A0eD1019e8Eb035E6daF4155A5cE2380B";
1271
1308
  };
1272
1309
  readonly 252: {
1273
1310
  readonly morpho: "0xa6030627d724bA78a59aCf43Be7550b4C5a0653b";
@@ -1651,6 +1688,21 @@ export declare let addressesRegistry: {
1651
1688
  readonly preLiquidationFactory: "0xEB8871F0FA8aB787AbCD28d1095f7B486d241D42";
1652
1689
  readonly wNative: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c";
1653
1690
  };
1691
+ readonly 1868: {
1692
+ readonly morpho: "0xE75Fc5eA6e74B824954349Ca351eb4e671ADA53a";
1693
+ readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
1694
+ readonly bundler3: {
1695
+ readonly bundler3: "0x461378B79d400c963F48F57b3a99416bc3C5c6a6";
1696
+ readonly generalAdapter1: "0xA47EeDE3Aac741B830E394B2e291f6774BD8bb48";
1697
+ };
1698
+ readonly adaptiveCurveIrm: "0x68F9b666b984527A7c145Db4103Cc6d3171C797F";
1699
+ readonly publicAllocator: "0x76f93A21573014Ab7d634D3204818922A234249e";
1700
+ readonly metaMorphoFactory: "0x7026b436f294e560b3C26E731f5cac5992cA2B33";
1701
+ readonly chainlinkOracleFactory: "0x669F1A4cE3127740eCdB3E36adFC5Df6Db1EA74b";
1702
+ readonly preLiquidationFactory: "0xcBD0710425613d666C5Ffb4dE2eE73554F21c34B";
1703
+ readonly wNative: "0x4200000000000000000000000000000000000006";
1704
+ readonly usdc: "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369";
1705
+ };
1654
1706
  };
1655
1707
  export declare let addresses: Record<number, ChainAddresses>;
1656
1708
  export declare let deployments: {
@@ -2129,6 +2181,18 @@ export declare let deployments: {
2129
2181
  readonly chainlinkOracleFactory: 54344985n;
2130
2182
  readonly preLiquidationFactory: 54346080n;
2131
2183
  };
2184
+ readonly 1868: {
2185
+ readonly morpho: 6440817n;
2186
+ readonly bundler3: {
2187
+ readonly bundler3: 6443359n;
2188
+ readonly generalAdapter1: 6443359n;
2189
+ };
2190
+ readonly adaptiveCurveIrm: 6440817n;
2191
+ readonly publicAllocator: 6440817n;
2192
+ readonly metaMorphoFactory: 6440899n;
2193
+ readonly chainlinkOracleFactory: 6440899n;
2194
+ readonly preLiquidationFactory: 6443359n;
2195
+ };
2132
2196
  };
2133
2197
  export declare let unwrappedTokensMapping: Record<number, Record<`0x${string}`, `0x${string}`>>;
2134
2198
  /**
package/lib/addresses.js CHANGED
@@ -62,6 +62,8 @@ const _addressesRegistry = {
62
62
  wbC3M: "0x95D7337d43340E2721960Dc402D9b9117f0d81a2",
63
63
  // Must implement USDC permit version 2 (otherwise breaks permit signatures).
64
64
  usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
65
+ // Must implement EURC permit version 2 (otherwise breaks permit signatures).
66
+ eurc: "0x1aBaEA1f7C830bD89Acc67eC4af516284b1bC33c",
65
67
  usdt: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
66
68
  crvUsd: "0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E",
67
69
  "stkcvxcrvUSDTWBTCWETH-morpho": "0xb0Ce26C88e4e7DCa51968b6047f44646f5064278",
@@ -101,6 +103,8 @@ const _addressesRegistry = {
101
103
  wNative: "0x4200000000000000000000000000000000000006",
102
104
  // Must implement USDC permit version 2 (otherwise breaks permit signatures).
103
105
  usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
106
+ // Must implement EURC permit version 2 (otherwise breaks permit signatures).
107
+ eurc: "0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",
104
108
  verUsdc: "0x59aaF835D34b1E3dF2170e4872B785f11E2a964b",
105
109
  testUsdc: "0xBC77067f829979812d795d516E523C4033b66409",
106
110
  },
@@ -192,6 +196,8 @@ const _addressesRegistry = {
192
196
  chainlinkOracleFactory: "0xd706690BA1Fe26b70c4AD89e60ff62cEB3A2eD02",
193
197
  preLiquidationFactory: "0xe3cE2051a24e58DBFC0eFBe4c2d9e89c5eAe4695",
194
198
  wNative: "0x4200000000000000000000000000000000000006",
199
+ // Must implement EURC permit version 2 (otherwise breaks permit signatures).
200
+ eurc: "0x1C60ba0A0eD1019e8Eb035E6daF4155A5cE2380B",
195
201
  },
196
202
  [chain_js_1.ChainId.FraxtalMainnet]: {
197
203
  morpho: "0xa6030627d724bA78a59aCf43Be7550b4C5a0653b",
@@ -586,6 +592,22 @@ const _addressesRegistry = {
586
592
  preLiquidationFactory: "0xEB8871F0FA8aB787AbCD28d1095f7B486d241D42",
587
593
  wNative: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
588
594
  },
595
+ [chain_js_1.ChainId.SoneiumMainnet]: {
596
+ morpho: "0xE75Fc5eA6e74B824954349Ca351eb4e671ADA53a",
597
+ permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
598
+ bundler3: {
599
+ bundler3: "0x461378B79d400c963F48F57b3a99416bc3C5c6a6",
600
+ generalAdapter1: "0xA47EeDE3Aac741B830E394B2e291f6774BD8bb48",
601
+ },
602
+ adaptiveCurveIrm: "0x68F9b666b984527A7c145Db4103Cc6d3171C797F",
603
+ publicAllocator: "0x76f93A21573014Ab7d634D3204818922A234249e",
604
+ metaMorphoFactory: "0x7026b436f294e560b3C26E731f5cac5992cA2B33",
605
+ chainlinkOracleFactory: "0x669F1A4cE3127740eCdB3E36adFC5Df6Db1EA74b",
606
+ preLiquidationFactory: "0xcBD0710425613d666C5Ffb4dE2eE73554F21c34B",
607
+ wNative: "0x4200000000000000000000000000000000000006",
608
+ // Must implement USDC permit version 2 (otherwise breaks permit signatures).
609
+ usdc: "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369",
610
+ },
589
611
  };
590
612
  const _deployments = {
591
613
  [chain_js_1.ChainId.EthMainnet]: {
@@ -1063,6 +1085,18 @@ const _deployments = {
1063
1085
  chainlinkOracleFactory: 54344985n,
1064
1086
  preLiquidationFactory: 54346080n,
1065
1087
  },
1088
+ [chain_js_1.ChainId.SoneiumMainnet]: {
1089
+ morpho: 6440817n,
1090
+ bundler3: {
1091
+ bundler3: 6443359n,
1092
+ generalAdapter1: 6443359n,
1093
+ },
1094
+ adaptiveCurveIrm: 6440817n,
1095
+ publicAllocator: 6440817n,
1096
+ metaMorphoFactory: 6440899n,
1097
+ chainlinkOracleFactory: 6440899n,
1098
+ preLiquidationFactory: 6443359n,
1099
+ },
1066
1100
  };
1067
1101
  const getChainAddresses = (chainId) => {
1068
1102
  const chainAddresses = exports.addresses[chainId];
@@ -1172,6 +1206,9 @@ const _unwrappedTokensMapping = {
1172
1206
  [chain_js_1.ChainId.BscMainnet]: {
1173
1207
  [_addressesRegistry[chain_js_1.ChainId.BscMainnet].wNative]: exports.NATIVE_ADDRESS,
1174
1208
  },
1209
+ [chain_js_1.ChainId.SoneiumMainnet]: {
1210
+ [_addressesRegistry[chain_js_1.ChainId.SoneiumMainnet].wNative]: exports.NATIVE_ADDRESS,
1211
+ },
1175
1212
  };
1176
1213
  function getUnwrappedToken(wrappedToken, chainId) {
1177
1214
  return exports.unwrappedTokensMapping[chainId]?.[wrappedToken];
package/lib/chain.d.ts CHANGED
@@ -29,7 +29,8 @@ export declare enum ChainId {
29
29
  CeloMainnet = 42220,
30
30
  AbstractMainnet = 2741,
31
31
  BitlayerMainnet = 200901,
32
- BscMainnet = 56
32
+ BscMainnet = 56,
33
+ SoneiumMainnet = 1868
33
34
  }
34
35
  export interface ChainMetadata {
35
36
  readonly name: string;
@@ -389,5 +390,16 @@ export declare namespace ChainUtils {
389
390
  explorerUrl: string;
390
391
  identifier: string;
391
392
  };
393
+ 1868: {
394
+ name: string;
395
+ id: ChainId.SoneiumMainnet;
396
+ nativeCurrency: {
397
+ name: string;
398
+ symbol: string;
399
+ decimals: number;
400
+ };
401
+ explorerUrl: string;
402
+ identifier: string;
403
+ };
392
404
  };
393
405
  }
package/lib/chain.js CHANGED
@@ -34,6 +34,7 @@ var ChainId;
34
34
  ChainId[ChainId["AbstractMainnet"] = 2741] = "AbstractMainnet";
35
35
  ChainId[ChainId["BitlayerMainnet"] = 200901] = "BitlayerMainnet";
36
36
  ChainId[ChainId["BscMainnet"] = 56] = "BscMainnet";
37
+ ChainId[ChainId["SoneiumMainnet"] = 1868] = "SoneiumMainnet";
37
38
  })(ChainId || (exports.ChainId = ChainId = {}));
38
39
  var ChainUtils;
39
40
  (function (ChainUtils) {
@@ -267,5 +268,12 @@ var ChainUtils;
267
268
  explorerUrl: "https://bscscan.com",
268
269
  identifier: "bsc",
269
270
  },
271
+ [ChainId.SoneiumMainnet]: {
272
+ name: "Soneium",
273
+ id: ChainId.SoneiumMainnet,
274
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
275
+ explorerUrl: "https://soneium.blockscout.com/",
276
+ identifier: "soneium",
277
+ },
270
278
  };
271
279
  })(ChainUtils || (exports.ChainUtils = ChainUtils = {}));
package/lib/errors.d.ts CHANGED
@@ -86,6 +86,14 @@ export declare namespace VaultV2Errors {
86
86
  constructor(address: Address);
87
87
  }
88
88
  }
89
+ export declare class UnknownFactory extends Error {
90
+ constructor();
91
+ }
92
+ export declare class UnknownOfFactory extends Error {
93
+ readonly factory: Address;
94
+ readonly address: Address;
95
+ constructor(factory: Address, address: Address);
96
+ }
89
97
  export interface ErrorClass<E extends Error = Error> {
90
98
  new (...args: any[]): E;
91
99
  }
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 = exports.InvalidMarketParamsError = void 0;
3
+ exports.UnknownOfFactory = exports.UnknownFactory = exports.VaultV2Errors = exports.BlueErrors = exports.UnsupportedVaultV2AdapterError = exports.UnsupportedPreLiquidationParamsError = exports.UnsupportedChainIdError = exports.UnknownVaultConfigError = exports.UnknownMarketParamsError = exports.UnknownTokenPriceError = exports.UnknownTokenError = exports.UnknownDataError = exports.InvalidMarketParamsError = void 0;
4
4
  exports._try = _try;
5
5
  const viem_1 = require("viem");
6
6
  class InvalidMarketParamsError extends Error {
@@ -172,6 +172,22 @@ var VaultV2Errors;
172
172
  }
173
173
  VaultV2Errors.UnsupportedLiquidityAdapter = UnsupportedLiquidityAdapter;
174
174
  })(VaultV2Errors || (exports.VaultV2Errors = VaultV2Errors = {}));
175
+ class UnknownFactory extends Error {
176
+ constructor() {
177
+ super(`unknown factory`);
178
+ }
179
+ }
180
+ exports.UnknownFactory = UnknownFactory;
181
+ class UnknownOfFactory extends Error {
182
+ factory;
183
+ address;
184
+ constructor(factory, address) {
185
+ super(`address "${address}" is not from the ${factory} factory`);
186
+ this.factory = factory;
187
+ this.address = address;
188
+ }
189
+ }
190
+ exports.UnknownOfFactory = UnknownOfFactory;
175
191
  function _try(accessor, ...errorClasses) {
176
192
  const maybeCatchError = (error) => {
177
193
  if (errorClasses.length === 0 ||
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.14.0",
4
+ "version": "5.16.0",
5
5
  "author": "Morpho Association <contact@morpho.org>",
6
6
  "contributors": [
7
7
  "Rubilmax <rmilon@gmail.com>"
@@ -31,8 +31,8 @@
31
31
  "typescript": "^5.9.3",
32
32
  "viem": "^2.41.2",
33
33
  "vitest": "^4.0.15",
34
- "@morpho-org/morpho-ts": "^2.4.6",
35
- "@morpho-org/test": "^2.6.7"
34
+ "@morpho-org/test": "^2.6.7",
35
+ "@morpho-org/morpho-ts": "^2.4.6"
36
36
  },
37
37
  "scripts": {
38
38
  "prepublish": "$npm_execpath build",