@morpho-org/blue-sdk 5.21.0 → 5.22.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.
- package/lib/cjs/addresses.d.ts +54 -0
- package/lib/cjs/addresses.js +27 -0
- package/lib/cjs/chain.d.ts +17 -1
- package/lib/cjs/chain.js +13 -0
- package/lib/esm/addresses.d.ts +54 -0
- package/lib/esm/addresses.js +27 -0
- package/lib/esm/chain.d.ts +17 -1
- package/lib/esm/chain.js +13 -0
- package/package.json +5 -5
package/lib/cjs/addresses.d.ts
CHANGED
|
@@ -620,6 +620,20 @@ declare const _addressesRegistry: {
|
|
|
620
620
|
readonly wNative: "0x4200000000000000000000000000000000000006";
|
|
621
621
|
readonly usdc: "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369";
|
|
622
622
|
};
|
|
623
|
+
readonly 4217: {
|
|
624
|
+
readonly morpho: "0x10EE9AAC980A180dd4DcFc96C746d60B0EA88f97";
|
|
625
|
+
readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
|
626
|
+
readonly bundler3: {
|
|
627
|
+
readonly bundler3: "0x5A3B829dcDBE1979cdD9F648Afb6D39dCF805E33";
|
|
628
|
+
readonly generalAdapter1: "0x3a2A86bD16629B054f7f3d87F0a7570F3881a43c";
|
|
629
|
+
};
|
|
630
|
+
readonly adaptiveCurveIrm: "0x112fd4042E442C3C12C67AD23587b0afe36eB74E";
|
|
631
|
+
readonly vaultV2Factory: "0x3DE400E3F79113194fa5AF6Ae5C474947E0C82Db";
|
|
632
|
+
readonly morphoMarketV1AdapterV2Factory: "0xF85aD5f14cC903533FC409B8098B58b4C2f36697";
|
|
633
|
+
readonly registryList: "0xB118227C728b5ce52445a5aAee48C8a281C429E0";
|
|
634
|
+
readonly chainlinkOracleFactory: "0xc2c167BC5cBD833ce58239e85073258F10aD4DF6";
|
|
635
|
+
readonly preLiquidationFactory: "0xB83d2D5CAE5Fc64a408cA82447445442Fe249fe3";
|
|
636
|
+
};
|
|
623
637
|
};
|
|
624
638
|
export type ChainDeployments<Addresses = ChainAddresses> = {
|
|
625
639
|
[key in keyof Addresses]: Address extends Addresses[key] ? bigint : ChainDeployments<Addresses[key]>;
|
|
@@ -1115,6 +1129,19 @@ declare const _deployments: {
|
|
|
1115
1129
|
readonly chainlinkOracleFactory: 6440899n;
|
|
1116
1130
|
readonly preLiquidationFactory: 6443359n;
|
|
1117
1131
|
};
|
|
1132
|
+
readonly 4217: {
|
|
1133
|
+
readonly morpho: 2375189n;
|
|
1134
|
+
readonly bundler3: {
|
|
1135
|
+
readonly bundler3: 2375313n;
|
|
1136
|
+
readonly generalAdapter1: 2375301n;
|
|
1137
|
+
};
|
|
1138
|
+
readonly adaptiveCurveIrm: 2375313n;
|
|
1139
|
+
readonly vaultV2Factory: 2375650n;
|
|
1140
|
+
readonly morphoMarketV1AdapterV2Factory: 2375701n;
|
|
1141
|
+
readonly registryList: 2375601n;
|
|
1142
|
+
readonly chainlinkOracleFactory: 2375626n;
|
|
1143
|
+
readonly preLiquidationFactory: 2375010n;
|
|
1144
|
+
};
|
|
1118
1145
|
};
|
|
1119
1146
|
export type AddressLabel = DottedKeys<(typeof _addressesRegistry)[ChainId]>;
|
|
1120
1147
|
export declare const getChainAddresses: (chainId: number) => ChainAddresses;
|
|
@@ -1714,6 +1741,20 @@ export declare let addressesRegistry: {
|
|
|
1714
1741
|
readonly wNative: "0x4200000000000000000000000000000000000006";
|
|
1715
1742
|
readonly usdc: "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369";
|
|
1716
1743
|
};
|
|
1744
|
+
readonly 4217: {
|
|
1745
|
+
readonly morpho: "0x10EE9AAC980A180dd4DcFc96C746d60B0EA88f97";
|
|
1746
|
+
readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
|
1747
|
+
readonly bundler3: {
|
|
1748
|
+
readonly bundler3: "0x5A3B829dcDBE1979cdD9F648Afb6D39dCF805E33";
|
|
1749
|
+
readonly generalAdapter1: "0x3a2A86bD16629B054f7f3d87F0a7570F3881a43c";
|
|
1750
|
+
};
|
|
1751
|
+
readonly adaptiveCurveIrm: "0x112fd4042E442C3C12C67AD23587b0afe36eB74E";
|
|
1752
|
+
readonly vaultV2Factory: "0x3DE400E3F79113194fa5AF6Ae5C474947E0C82Db";
|
|
1753
|
+
readonly morphoMarketV1AdapterV2Factory: "0xF85aD5f14cC903533FC409B8098B58b4C2f36697";
|
|
1754
|
+
readonly registryList: "0xB118227C728b5ce52445a5aAee48C8a281C429E0";
|
|
1755
|
+
readonly chainlinkOracleFactory: "0xc2c167BC5cBD833ce58239e85073258F10aD4DF6";
|
|
1756
|
+
readonly preLiquidationFactory: "0xB83d2D5CAE5Fc64a408cA82447445442Fe249fe3";
|
|
1757
|
+
};
|
|
1717
1758
|
};
|
|
1718
1759
|
export declare let addresses: Record<number, ChainAddresses>;
|
|
1719
1760
|
export declare let deployments: {
|
|
@@ -2207,6 +2248,19 @@ export declare let deployments: {
|
|
|
2207
2248
|
readonly chainlinkOracleFactory: 6440899n;
|
|
2208
2249
|
readonly preLiquidationFactory: 6443359n;
|
|
2209
2250
|
};
|
|
2251
|
+
readonly 4217: {
|
|
2252
|
+
readonly morpho: 2375189n;
|
|
2253
|
+
readonly bundler3: {
|
|
2254
|
+
readonly bundler3: 2375313n;
|
|
2255
|
+
readonly generalAdapter1: 2375301n;
|
|
2256
|
+
};
|
|
2257
|
+
readonly adaptiveCurveIrm: 2375313n;
|
|
2258
|
+
readonly vaultV2Factory: 2375650n;
|
|
2259
|
+
readonly morphoMarketV1AdapterV2Factory: 2375701n;
|
|
2260
|
+
readonly registryList: 2375601n;
|
|
2261
|
+
readonly chainlinkOracleFactory: 2375626n;
|
|
2262
|
+
readonly preLiquidationFactory: 2375010n;
|
|
2263
|
+
};
|
|
2210
2264
|
};
|
|
2211
2265
|
export declare let unwrappedTokensMapping: Record<number, Record<`0x${string}`, `0x${string}`>>;
|
|
2212
2266
|
/**
|
package/lib/cjs/addresses.js
CHANGED
|
@@ -613,6 +613,20 @@ const _addressesRegistry = {
|
|
|
613
613
|
// Must implement USDC permit version 2 (otherwise breaks permit signatures).
|
|
614
614
|
usdc: "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369",
|
|
615
615
|
},
|
|
616
|
+
[chain_js_1.ChainId.TempoMainnet]: {
|
|
617
|
+
morpho: "0x10EE9AAC980A180dd4DcFc96C746d60B0EA88f97",
|
|
618
|
+
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
619
|
+
bundler3: {
|
|
620
|
+
bundler3: "0x5A3B829dcDBE1979cdD9F648Afb6D39dCF805E33",
|
|
621
|
+
generalAdapter1: "0x3a2A86bD16629B054f7f3d87F0a7570F3881a43c",
|
|
622
|
+
},
|
|
623
|
+
adaptiveCurveIrm: "0x112fd4042E442C3C12C67AD23587b0afe36eB74E",
|
|
624
|
+
vaultV2Factory: "0x3DE400E3F79113194fa5AF6Ae5C474947E0C82Db",
|
|
625
|
+
morphoMarketV1AdapterV2Factory: "0xF85aD5f14cC903533FC409B8098B58b4C2f36697",
|
|
626
|
+
registryList: "0xB118227C728b5ce52445a5aAee48C8a281C429E0",
|
|
627
|
+
chainlinkOracleFactory: "0xc2c167BC5cBD833ce58239e85073258F10aD4DF6",
|
|
628
|
+
preLiquidationFactory: "0xB83d2D5CAE5Fc64a408cA82447445442Fe249fe3",
|
|
629
|
+
},
|
|
616
630
|
};
|
|
617
631
|
const _deployments = {
|
|
618
632
|
[chain_js_1.ChainId.EthMainnet]: {
|
|
@@ -1105,6 +1119,19 @@ const _deployments = {
|
|
|
1105
1119
|
chainlinkOracleFactory: 6440899n,
|
|
1106
1120
|
preLiquidationFactory: 6443359n,
|
|
1107
1121
|
},
|
|
1122
|
+
[chain_js_1.ChainId.TempoMainnet]: {
|
|
1123
|
+
morpho: 2375189n,
|
|
1124
|
+
bundler3: {
|
|
1125
|
+
bundler3: 2375313n,
|
|
1126
|
+
generalAdapter1: 2375301n,
|
|
1127
|
+
},
|
|
1128
|
+
adaptiveCurveIrm: 2375313n,
|
|
1129
|
+
vaultV2Factory: 2375650n,
|
|
1130
|
+
morphoMarketV1AdapterV2Factory: 2375701n,
|
|
1131
|
+
registryList: 2375601n,
|
|
1132
|
+
chainlinkOracleFactory: 2375626n,
|
|
1133
|
+
preLiquidationFactory: 2375010n,
|
|
1134
|
+
},
|
|
1108
1135
|
};
|
|
1109
1136
|
const getChainAddresses = (chainId) => {
|
|
1110
1137
|
const chainAddresses = exports.addresses[chainId];
|
package/lib/cjs/chain.d.ts
CHANGED
|
@@ -30,7 +30,8 @@ export declare enum ChainId {
|
|
|
30
30
|
AbstractMainnet = 2741,
|
|
31
31
|
BitlayerMainnet = 200901,
|
|
32
32
|
BscMainnet = 56,
|
|
33
|
-
SoneiumMainnet = 1868
|
|
33
|
+
SoneiumMainnet = 1868,
|
|
34
|
+
TempoMainnet = 4217
|
|
34
35
|
}
|
|
35
36
|
export interface ChainMetadata {
|
|
36
37
|
readonly name: string;
|
|
@@ -42,8 +43,11 @@ export interface ChainMetadata {
|
|
|
42
43
|
readonly decimals: number;
|
|
43
44
|
};
|
|
44
45
|
readonly identifier: string;
|
|
46
|
+
/** Whether eth_getBalance returns a reliable value. Defaults to true. */
|
|
47
|
+
readonly hasReliableNativeBalance?: boolean;
|
|
45
48
|
}
|
|
46
49
|
export declare namespace ChainUtils {
|
|
50
|
+
const hasReliableNativeBalance: (chainId: number) => boolean;
|
|
47
51
|
const toHexChainId: (chainId: ChainId) => string;
|
|
48
52
|
const getExplorerUrl: (chainId: ChainId) => string;
|
|
49
53
|
const getExplorerAddressUrl: (chainId: ChainId, address: string) => string;
|
|
@@ -401,5 +405,17 @@ export declare namespace ChainUtils {
|
|
|
401
405
|
explorerUrl: string;
|
|
402
406
|
identifier: string;
|
|
403
407
|
};
|
|
408
|
+
4217: {
|
|
409
|
+
name: string;
|
|
410
|
+
id: ChainId.TempoMainnet;
|
|
411
|
+
nativeCurrency: {
|
|
412
|
+
name: string;
|
|
413
|
+
symbol: string;
|
|
414
|
+
decimals: number;
|
|
415
|
+
};
|
|
416
|
+
explorerUrl: string;
|
|
417
|
+
identifier: string;
|
|
418
|
+
hasReliableNativeBalance: false;
|
|
419
|
+
};
|
|
404
420
|
};
|
|
405
421
|
}
|
package/lib/cjs/chain.js
CHANGED
|
@@ -35,9 +35,14 @@ var ChainId;
|
|
|
35
35
|
ChainId[ChainId["BitlayerMainnet"] = 200901] = "BitlayerMainnet";
|
|
36
36
|
ChainId[ChainId["BscMainnet"] = 56] = "BscMainnet";
|
|
37
37
|
ChainId[ChainId["SoneiumMainnet"] = 1868] = "SoneiumMainnet";
|
|
38
|
+
ChainId[ChainId["TempoMainnet"] = 4217] = "TempoMainnet";
|
|
38
39
|
})(ChainId || (exports.ChainId = ChainId = {}));
|
|
39
40
|
var ChainUtils;
|
|
40
41
|
(function (ChainUtils) {
|
|
42
|
+
ChainUtils.hasReliableNativeBalance = (chainId) => {
|
|
43
|
+
return (ChainUtils.CHAIN_METADATA[chainId]
|
|
44
|
+
?.hasReliableNativeBalance ?? true);
|
|
45
|
+
};
|
|
41
46
|
ChainUtils.toHexChainId = (chainId) => {
|
|
42
47
|
return `0x${chainId.toString(16)}`;
|
|
43
48
|
};
|
|
@@ -275,5 +280,13 @@ var ChainUtils;
|
|
|
275
280
|
explorerUrl: "https://soneium.blockscout.com/",
|
|
276
281
|
identifier: "soneium",
|
|
277
282
|
},
|
|
283
|
+
[ChainId.TempoMainnet]: {
|
|
284
|
+
name: "Tempo",
|
|
285
|
+
id: ChainId.TempoMainnet,
|
|
286
|
+
nativeCurrency: { name: "USD", symbol: "USD", decimals: 18 },
|
|
287
|
+
explorerUrl: "https://explore.tempo.xyz",
|
|
288
|
+
identifier: "tempo",
|
|
289
|
+
hasReliableNativeBalance: false,
|
|
290
|
+
},
|
|
278
291
|
};
|
|
279
292
|
})(ChainUtils || (exports.ChainUtils = ChainUtils = {}));
|
package/lib/esm/addresses.d.ts
CHANGED
|
@@ -620,6 +620,20 @@ declare const _addressesRegistry: {
|
|
|
620
620
|
readonly wNative: "0x4200000000000000000000000000000000000006";
|
|
621
621
|
readonly usdc: "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369";
|
|
622
622
|
};
|
|
623
|
+
readonly 4217: {
|
|
624
|
+
readonly morpho: "0x10EE9AAC980A180dd4DcFc96C746d60B0EA88f97";
|
|
625
|
+
readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
|
626
|
+
readonly bundler3: {
|
|
627
|
+
readonly bundler3: "0x5A3B829dcDBE1979cdD9F648Afb6D39dCF805E33";
|
|
628
|
+
readonly generalAdapter1: "0x3a2A86bD16629B054f7f3d87F0a7570F3881a43c";
|
|
629
|
+
};
|
|
630
|
+
readonly adaptiveCurveIrm: "0x112fd4042E442C3C12C67AD23587b0afe36eB74E";
|
|
631
|
+
readonly vaultV2Factory: "0x3DE400E3F79113194fa5AF6Ae5C474947E0C82Db";
|
|
632
|
+
readonly morphoMarketV1AdapterV2Factory: "0xF85aD5f14cC903533FC409B8098B58b4C2f36697";
|
|
633
|
+
readonly registryList: "0xB118227C728b5ce52445a5aAee48C8a281C429E0";
|
|
634
|
+
readonly chainlinkOracleFactory: "0xc2c167BC5cBD833ce58239e85073258F10aD4DF6";
|
|
635
|
+
readonly preLiquidationFactory: "0xB83d2D5CAE5Fc64a408cA82447445442Fe249fe3";
|
|
636
|
+
};
|
|
623
637
|
};
|
|
624
638
|
export type ChainDeployments<Addresses = ChainAddresses> = {
|
|
625
639
|
[key in keyof Addresses]: Address extends Addresses[key] ? bigint : ChainDeployments<Addresses[key]>;
|
|
@@ -1115,6 +1129,19 @@ declare const _deployments: {
|
|
|
1115
1129
|
readonly chainlinkOracleFactory: 6440899n;
|
|
1116
1130
|
readonly preLiquidationFactory: 6443359n;
|
|
1117
1131
|
};
|
|
1132
|
+
readonly 4217: {
|
|
1133
|
+
readonly morpho: 2375189n;
|
|
1134
|
+
readonly bundler3: {
|
|
1135
|
+
readonly bundler3: 2375313n;
|
|
1136
|
+
readonly generalAdapter1: 2375301n;
|
|
1137
|
+
};
|
|
1138
|
+
readonly adaptiveCurveIrm: 2375313n;
|
|
1139
|
+
readonly vaultV2Factory: 2375650n;
|
|
1140
|
+
readonly morphoMarketV1AdapterV2Factory: 2375701n;
|
|
1141
|
+
readonly registryList: 2375601n;
|
|
1142
|
+
readonly chainlinkOracleFactory: 2375626n;
|
|
1143
|
+
readonly preLiquidationFactory: 2375010n;
|
|
1144
|
+
};
|
|
1118
1145
|
};
|
|
1119
1146
|
export type AddressLabel = DottedKeys<(typeof _addressesRegistry)[ChainId]>;
|
|
1120
1147
|
export declare const getChainAddresses: (chainId: number) => ChainAddresses;
|
|
@@ -1714,6 +1741,20 @@ export declare let addressesRegistry: {
|
|
|
1714
1741
|
readonly wNative: "0x4200000000000000000000000000000000000006";
|
|
1715
1742
|
readonly usdc: "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369";
|
|
1716
1743
|
};
|
|
1744
|
+
readonly 4217: {
|
|
1745
|
+
readonly morpho: "0x10EE9AAC980A180dd4DcFc96C746d60B0EA88f97";
|
|
1746
|
+
readonly permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
|
1747
|
+
readonly bundler3: {
|
|
1748
|
+
readonly bundler3: "0x5A3B829dcDBE1979cdD9F648Afb6D39dCF805E33";
|
|
1749
|
+
readonly generalAdapter1: "0x3a2A86bD16629B054f7f3d87F0a7570F3881a43c";
|
|
1750
|
+
};
|
|
1751
|
+
readonly adaptiveCurveIrm: "0x112fd4042E442C3C12C67AD23587b0afe36eB74E";
|
|
1752
|
+
readonly vaultV2Factory: "0x3DE400E3F79113194fa5AF6Ae5C474947E0C82Db";
|
|
1753
|
+
readonly morphoMarketV1AdapterV2Factory: "0xF85aD5f14cC903533FC409B8098B58b4C2f36697";
|
|
1754
|
+
readonly registryList: "0xB118227C728b5ce52445a5aAee48C8a281C429E0";
|
|
1755
|
+
readonly chainlinkOracleFactory: "0xc2c167BC5cBD833ce58239e85073258F10aD4DF6";
|
|
1756
|
+
readonly preLiquidationFactory: "0xB83d2D5CAE5Fc64a408cA82447445442Fe249fe3";
|
|
1757
|
+
};
|
|
1717
1758
|
};
|
|
1718
1759
|
export declare let addresses: Record<number, ChainAddresses>;
|
|
1719
1760
|
export declare let deployments: {
|
|
@@ -2207,6 +2248,19 @@ export declare let deployments: {
|
|
|
2207
2248
|
readonly chainlinkOracleFactory: 6440899n;
|
|
2208
2249
|
readonly preLiquidationFactory: 6443359n;
|
|
2209
2250
|
};
|
|
2251
|
+
readonly 4217: {
|
|
2252
|
+
readonly morpho: 2375189n;
|
|
2253
|
+
readonly bundler3: {
|
|
2254
|
+
readonly bundler3: 2375313n;
|
|
2255
|
+
readonly generalAdapter1: 2375301n;
|
|
2256
|
+
};
|
|
2257
|
+
readonly adaptiveCurveIrm: 2375313n;
|
|
2258
|
+
readonly vaultV2Factory: 2375650n;
|
|
2259
|
+
readonly morphoMarketV1AdapterV2Factory: 2375701n;
|
|
2260
|
+
readonly registryList: 2375601n;
|
|
2261
|
+
readonly chainlinkOracleFactory: 2375626n;
|
|
2262
|
+
readonly preLiquidationFactory: 2375010n;
|
|
2263
|
+
};
|
|
2210
2264
|
};
|
|
2211
2265
|
export declare let unwrappedTokensMapping: Record<number, Record<`0x${string}`, `0x${string}`>>;
|
|
2212
2266
|
/**
|
package/lib/esm/addresses.js
CHANGED
|
@@ -605,6 +605,20 @@ const _addressesRegistry = {
|
|
|
605
605
|
// Must implement USDC permit version 2 (otherwise breaks permit signatures).
|
|
606
606
|
usdc: "0xbA9986D2381edf1DA03B0B9c1f8b00dc4AacC369",
|
|
607
607
|
},
|
|
608
|
+
[ChainId.TempoMainnet]: {
|
|
609
|
+
morpho: "0x10EE9AAC980A180dd4DcFc96C746d60B0EA88f97",
|
|
610
|
+
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
611
|
+
bundler3: {
|
|
612
|
+
bundler3: "0x5A3B829dcDBE1979cdD9F648Afb6D39dCF805E33",
|
|
613
|
+
generalAdapter1: "0x3a2A86bD16629B054f7f3d87F0a7570F3881a43c",
|
|
614
|
+
},
|
|
615
|
+
adaptiveCurveIrm: "0x112fd4042E442C3C12C67AD23587b0afe36eB74E",
|
|
616
|
+
vaultV2Factory: "0x3DE400E3F79113194fa5AF6Ae5C474947E0C82Db",
|
|
617
|
+
morphoMarketV1AdapterV2Factory: "0xF85aD5f14cC903533FC409B8098B58b4C2f36697",
|
|
618
|
+
registryList: "0xB118227C728b5ce52445a5aAee48C8a281C429E0",
|
|
619
|
+
chainlinkOracleFactory: "0xc2c167BC5cBD833ce58239e85073258F10aD4DF6",
|
|
620
|
+
preLiquidationFactory: "0xB83d2D5CAE5Fc64a408cA82447445442Fe249fe3",
|
|
621
|
+
},
|
|
608
622
|
};
|
|
609
623
|
const _deployments = {
|
|
610
624
|
[ChainId.EthMainnet]: {
|
|
@@ -1097,6 +1111,19 @@ const _deployments = {
|
|
|
1097
1111
|
chainlinkOracleFactory: 6440899n,
|
|
1098
1112
|
preLiquidationFactory: 6443359n,
|
|
1099
1113
|
},
|
|
1114
|
+
[ChainId.TempoMainnet]: {
|
|
1115
|
+
morpho: 2375189n,
|
|
1116
|
+
bundler3: {
|
|
1117
|
+
bundler3: 2375313n,
|
|
1118
|
+
generalAdapter1: 2375301n,
|
|
1119
|
+
},
|
|
1120
|
+
adaptiveCurveIrm: 2375313n,
|
|
1121
|
+
vaultV2Factory: 2375650n,
|
|
1122
|
+
morphoMarketV1AdapterV2Factory: 2375701n,
|
|
1123
|
+
registryList: 2375601n,
|
|
1124
|
+
chainlinkOracleFactory: 2375626n,
|
|
1125
|
+
preLiquidationFactory: 2375010n,
|
|
1126
|
+
},
|
|
1100
1127
|
};
|
|
1101
1128
|
export const getChainAddresses = (chainId) => {
|
|
1102
1129
|
const chainAddresses = addresses[chainId];
|
package/lib/esm/chain.d.ts
CHANGED
|
@@ -30,7 +30,8 @@ export declare enum ChainId {
|
|
|
30
30
|
AbstractMainnet = 2741,
|
|
31
31
|
BitlayerMainnet = 200901,
|
|
32
32
|
BscMainnet = 56,
|
|
33
|
-
SoneiumMainnet = 1868
|
|
33
|
+
SoneiumMainnet = 1868,
|
|
34
|
+
TempoMainnet = 4217
|
|
34
35
|
}
|
|
35
36
|
export interface ChainMetadata {
|
|
36
37
|
readonly name: string;
|
|
@@ -42,8 +43,11 @@ export interface ChainMetadata {
|
|
|
42
43
|
readonly decimals: number;
|
|
43
44
|
};
|
|
44
45
|
readonly identifier: string;
|
|
46
|
+
/** Whether eth_getBalance returns a reliable value. Defaults to true. */
|
|
47
|
+
readonly hasReliableNativeBalance?: boolean;
|
|
45
48
|
}
|
|
46
49
|
export declare namespace ChainUtils {
|
|
50
|
+
const hasReliableNativeBalance: (chainId: number) => boolean;
|
|
47
51
|
const toHexChainId: (chainId: ChainId) => string;
|
|
48
52
|
const getExplorerUrl: (chainId: ChainId) => string;
|
|
49
53
|
const getExplorerAddressUrl: (chainId: ChainId, address: string) => string;
|
|
@@ -401,5 +405,17 @@ export declare namespace ChainUtils {
|
|
|
401
405
|
explorerUrl: string;
|
|
402
406
|
identifier: string;
|
|
403
407
|
};
|
|
408
|
+
4217: {
|
|
409
|
+
name: string;
|
|
410
|
+
id: ChainId.TempoMainnet;
|
|
411
|
+
nativeCurrency: {
|
|
412
|
+
name: string;
|
|
413
|
+
symbol: string;
|
|
414
|
+
decimals: number;
|
|
415
|
+
};
|
|
416
|
+
explorerUrl: string;
|
|
417
|
+
identifier: string;
|
|
418
|
+
hasReliableNativeBalance: false;
|
|
419
|
+
};
|
|
404
420
|
};
|
|
405
421
|
}
|
package/lib/esm/chain.js
CHANGED
|
@@ -32,9 +32,14 @@ export var ChainId;
|
|
|
32
32
|
ChainId[ChainId["BitlayerMainnet"] = 200901] = "BitlayerMainnet";
|
|
33
33
|
ChainId[ChainId["BscMainnet"] = 56] = "BscMainnet";
|
|
34
34
|
ChainId[ChainId["SoneiumMainnet"] = 1868] = "SoneiumMainnet";
|
|
35
|
+
ChainId[ChainId["TempoMainnet"] = 4217] = "TempoMainnet";
|
|
35
36
|
})(ChainId || (ChainId = {}));
|
|
36
37
|
export var ChainUtils;
|
|
37
38
|
(function (ChainUtils) {
|
|
39
|
+
ChainUtils.hasReliableNativeBalance = (chainId) => {
|
|
40
|
+
return (ChainUtils.CHAIN_METADATA[chainId]
|
|
41
|
+
?.hasReliableNativeBalance ?? true);
|
|
42
|
+
};
|
|
38
43
|
ChainUtils.toHexChainId = (chainId) => {
|
|
39
44
|
return `0x${chainId.toString(16)}`;
|
|
40
45
|
};
|
|
@@ -272,5 +277,13 @@ export var ChainUtils;
|
|
|
272
277
|
explorerUrl: "https://soneium.blockscout.com/",
|
|
273
278
|
identifier: "soneium",
|
|
274
279
|
},
|
|
280
|
+
[ChainId.TempoMainnet]: {
|
|
281
|
+
name: "Tempo",
|
|
282
|
+
id: ChainId.TempoMainnet,
|
|
283
|
+
nativeCurrency: { name: "USD", symbol: "USD", decimals: 18 },
|
|
284
|
+
explorerUrl: "https://explore.tempo.xyz",
|
|
285
|
+
identifier: "tempo",
|
|
286
|
+
hasReliableNativeBalance: false,
|
|
287
|
+
},
|
|
275
288
|
};
|
|
276
289
|
})(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.
|
|
4
|
+
"version": "5.22.1",
|
|
5
5
|
"author": "Morpho Association <contact@morpho.org>",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Rubilmax <rmilon@gmail.com>"
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"lodash.mergewith": "^4.6.2"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@morpho-org/morpho-ts": "^2.5.
|
|
29
|
+
"@morpho-org/morpho-ts": "^2.5.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"typescript": "^5.9.3",
|
|
33
33
|
"viem": "^2.41.2",
|
|
34
|
-
"vitest": "^4.
|
|
35
|
-
"@morpho-org/morpho-ts": "^2.5.
|
|
36
|
-
"@morpho-org/test": "^2.7.
|
|
34
|
+
"vitest": "^4.1.4",
|
|
35
|
+
"@morpho-org/morpho-ts": "^2.5.1",
|
|
36
|
+
"@morpho-org/test": "^2.7.1"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"prepublish": "$npm_execpath build",
|