@morpho-org/blue-sdk 1.6.1 → 1.7.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/addresses.d.ts +0 -10
- package/lib/addresses.js +0 -19
- package/lib/chain.d.ts +0 -1
- package/lib/chain.js +13 -12
- package/lib/chain.test.js +0 -1
- package/package.json +5 -5
package/lib/addresses.d.ts
CHANGED
|
@@ -6,16 +6,6 @@ import { Address } from "./types";
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const NATIVE_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
8
8
|
export declare const addresses: {
|
|
9
|
-
5: {
|
|
10
|
-
morpho: "0x64c7044050Ba0431252df24fEd4d9635a275CB41";
|
|
11
|
-
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
|
12
|
-
bundler: "0xCFFbEEAFCD79Fd68FD56Dbc31A419f290A2Fe9e0";
|
|
13
|
-
wNative: "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6";
|
|
14
|
-
stEth: "0x1643E812aE58766192Cf7D2Cf9567dF2C37e9B7F";
|
|
15
|
-
wstEth: "0x6320cD32aA674d2898A68ec82e869385Fc5f7E2f";
|
|
16
|
-
dai: "0x11fE4B6AE13d2a6055C8D9cF65c55bac32B5d844";
|
|
17
|
-
usdc: "0x62bD2A599664D421132d7C54AB4DbE3233f4f0Ae";
|
|
18
|
-
};
|
|
19
9
|
1: {
|
|
20
10
|
morpho: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb";
|
|
21
11
|
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3";
|
package/lib/addresses.js
CHANGED
|
@@ -11,16 +11,6 @@ const errors_1 = require("./errors");
|
|
|
11
11
|
*/
|
|
12
12
|
exports.NATIVE_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
13
13
|
exports.addresses = {
|
|
14
|
-
[chain_1.ChainId.EthGoerliTestnet]: {
|
|
15
|
-
morpho: "0x64c7044050Ba0431252df24fEd4d9635a275CB41",
|
|
16
|
-
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
17
|
-
bundler: "0xCFFbEEAFCD79Fd68FD56Dbc31A419f290A2Fe9e0",
|
|
18
|
-
wNative: "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
|
|
19
|
-
stEth: "0x1643E812aE58766192Cf7D2Cf9567dF2C37e9B7F",
|
|
20
|
-
wstEth: "0x6320cD32aA674d2898A68ec82e869385Fc5f7E2f",
|
|
21
|
-
dai: "0x11fE4B6AE13d2a6055C8D9cF65c55bac32B5d844",
|
|
22
|
-
usdc: "0x62bD2A599664D421132d7C54AB4DbE3233f4f0Ae",
|
|
23
|
-
},
|
|
24
14
|
[chain_1.ChainId.EthMainnet]: {
|
|
25
15
|
morpho: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
|
|
26
16
|
permit2: "0x000000000022D473030F116dDEE9F6B43aC78BA3",
|
|
@@ -91,10 +81,6 @@ exports.getChainAddresses = getChainAddresses;
|
|
|
91
81
|
* - unwrapped token has same number of decimals than wrapped tokens.
|
|
92
82
|
*/
|
|
93
83
|
exports.unwrappedTokensMapping = {
|
|
94
|
-
[chain_1.ChainId.EthGoerliTestnet]: {
|
|
95
|
-
[exports.addresses[chain_1.ChainId.EthGoerliTestnet].wNative]: exports.NATIVE_ADDRESS,
|
|
96
|
-
[exports.addresses[chain_1.ChainId.EthGoerliTestnet].wstEth]: exports.addresses[chain_1.ChainId.EthGoerliTestnet].stEth,
|
|
97
|
-
},
|
|
98
84
|
[chain_1.ChainId.EthMainnet]: {
|
|
99
85
|
[exports.addresses[chain_1.ChainId.EthMainnet].wbIB01]: exports.addresses[chain_1.ChainId.EthMainnet].bIB01,
|
|
100
86
|
[exports.addresses[chain_1.ChainId.EthMainnet].wbC3M]: exports.addresses[chain_1.ChainId.EthMainnet].bC3M,
|
|
@@ -122,7 +108,6 @@ function getUnwrappedToken(wrappedToken, chainId) {
|
|
|
122
108
|
*/
|
|
123
109
|
exports.erc20WrapperTokens = {
|
|
124
110
|
[chain_1.ChainId.EthMainnet]: new Set(),
|
|
125
|
-
[chain_1.ChainId.EthGoerliTestnet]: new Set(),
|
|
126
111
|
[chain_1.ChainId.BaseMainnet]: new Set(),
|
|
127
112
|
};
|
|
128
113
|
/**
|
|
@@ -131,7 +116,6 @@ exports.erc20WrapperTokens = {
|
|
|
131
116
|
*/
|
|
132
117
|
exports.permissionedWrapperTokens = {
|
|
133
118
|
[chain_1.ChainId.EthMainnet]: new Set(),
|
|
134
|
-
[chain_1.ChainId.EthGoerliTestnet]: new Set(),
|
|
135
119
|
[chain_1.ChainId.BaseMainnet]: new Set([exports.addresses[chain_1.ChainId.BaseMainnet].testUsdc]),
|
|
136
120
|
};
|
|
137
121
|
/**
|
|
@@ -143,7 +127,6 @@ exports.permissionedBackedTokens = {
|
|
|
143
127
|
exports.addresses[chain_1.ChainId.EthMainnet].wbIB01,
|
|
144
128
|
exports.addresses[chain_1.ChainId.EthMainnet].wbC3M,
|
|
145
129
|
]),
|
|
146
|
-
[chain_1.ChainId.EthGoerliTestnet]: new Set(),
|
|
147
130
|
[chain_1.ChainId.BaseMainnet]: new Set(),
|
|
148
131
|
};
|
|
149
132
|
/**
|
|
@@ -152,7 +135,6 @@ exports.permissionedBackedTokens = {
|
|
|
152
135
|
*/
|
|
153
136
|
exports.permissionedCoinbaseTokens = {
|
|
154
137
|
[chain_1.ChainId.EthMainnet]: new Set(),
|
|
155
|
-
[chain_1.ChainId.EthGoerliTestnet]: new Set(),
|
|
156
138
|
[chain_1.ChainId.BaseMainnet]: new Set([exports.addresses[chain_1.ChainId.BaseMainnet].verUsdc]),
|
|
157
139
|
};
|
|
158
140
|
(0, morpho_ts_1.entries)(exports.permissionedBackedTokens).forEach(([chainId, tokens]) => {
|
|
@@ -176,6 +158,5 @@ exports.convexWrapperTokens = {
|
|
|
176
158
|
exports.addresses[chain_1.ChainId.EthMainnet]["stkcvxcrvUSDETHCRV-morpho"],
|
|
177
159
|
exports.addresses[chain_1.ChainId.EthMainnet]["stkcvx2BTC-f-morpho"],
|
|
178
160
|
]),
|
|
179
|
-
[chain_1.ChainId.EthGoerliTestnet]: new Set(),
|
|
180
161
|
[chain_1.ChainId.BaseMainnet]: new Set(),
|
|
181
162
|
};
|
package/lib/chain.d.ts
CHANGED
package/lib/chain.js
CHANGED
|
@@ -5,8 +5,8 @@ const errors_1 = require("./errors");
|
|
|
5
5
|
var ChainId;
|
|
6
6
|
(function (ChainId) {
|
|
7
7
|
ChainId[ChainId["EthMainnet"] = 1] = "EthMainnet";
|
|
8
|
-
ChainId[ChainId["EthGoerliTestnet"] = 5] = "EthGoerliTestnet";
|
|
9
8
|
ChainId[ChainId["BaseMainnet"] = 8453] = "BaseMainnet";
|
|
9
|
+
// EthGoerliTestnet = 5,
|
|
10
10
|
// PolygonMainnet = 137,
|
|
11
11
|
// MumbaiTestnet = 80001,
|
|
12
12
|
// OptimismMainnet = 10,
|
|
@@ -70,17 +70,6 @@ var ChainUtils;
|
|
|
70
70
|
logoSrc: "https://cdn.morpho.org/assets/chains/eth.svg",
|
|
71
71
|
identifier: "mainnet",
|
|
72
72
|
},
|
|
73
|
-
[ChainId.EthGoerliTestnet]: {
|
|
74
|
-
name: "Ethereum Goerli Testnet",
|
|
75
|
-
id: ChainId.EthGoerliTestnet,
|
|
76
|
-
nativeCurrency: { name: "Goerli Ether", symbol: "ETH", decimals: 18 },
|
|
77
|
-
defaultRpcUrl: "https://goerli.infura.io/V3/84842078b09946638c03157f83405213",
|
|
78
|
-
explorerUrl: "https://goerli.etherscan.io",
|
|
79
|
-
isTestnet: true,
|
|
80
|
-
shortName: "Goerli",
|
|
81
|
-
logoSrc: "https://cdn.morpho.org/assets/chains/eth.svg",
|
|
82
|
-
identifier: "goerli",
|
|
83
|
-
},
|
|
84
73
|
[ChainId.BaseMainnet]: {
|
|
85
74
|
name: "Base",
|
|
86
75
|
id: ChainId.BaseMainnet,
|
|
@@ -92,6 +81,18 @@ var ChainUtils;
|
|
|
92
81
|
logoSrc: "https://cdn.morpho.org/assets/chains/base.png",
|
|
93
82
|
identifier: "base",
|
|
94
83
|
},
|
|
84
|
+
// [ChainId.EthGoerliTestnet]: {
|
|
85
|
+
// name: "Ethereum Goerli Testnet",
|
|
86
|
+
// id: ChainId.EthGoerliTestnet,
|
|
87
|
+
// nativeCurrency: { name: "Goerli Ether", symbol: "ETH", decimals: 18 },
|
|
88
|
+
// defaultRpcUrl:
|
|
89
|
+
// "https://goerli.infura.io/V3/84842078b09946638c03157f83405213",
|
|
90
|
+
// explorerUrl: "https://goerli.etherscan.io",
|
|
91
|
+
// isTestnet: true,
|
|
92
|
+
// shortName: "Goerli",
|
|
93
|
+
// logoSrc: "https://cdn.morpho.org/assets/chains/eth.svg",
|
|
94
|
+
// identifier: "goerli",
|
|
95
|
+
// },
|
|
95
96
|
// [ChainId.PolygonMainnet]: {
|
|
96
97
|
// name: "Polygon Mainnet",
|
|
97
98
|
// id: ChainId.PolygonMainnet,
|
package/lib/chain.test.js
CHANGED
|
@@ -16,7 +16,6 @@ describe("Network", () => {
|
|
|
16
16
|
});
|
|
17
17
|
});
|
|
18
18
|
it("Should convert correctly a chainId to hexChainId", () => {
|
|
19
|
-
expect(chain_1.ChainUtils.toHexChainId(chain_1.ChainId.EthGoerliTestnet)).toEqual("0x5");
|
|
20
19
|
expect(chain_1.ChainUtils.toHexChainId(chain_1.ChainId.BaseMainnet)).toEqual("0x2105");
|
|
21
20
|
});
|
|
22
21
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morpho-org/blue-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"author": "Morpho Association <contact@morpho.org>",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"keccak256": "^1.0.6"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@morpho-org/morpho-test": "^1.
|
|
20
|
-
"@morpho-org/morpho-ts": "^1.
|
|
19
|
+
"@morpho-org/morpho-test": "^1.7.1",
|
|
20
|
+
"@morpho-org/morpho-ts": "^1.7.1",
|
|
21
21
|
"@types/jest": "^29.5.12",
|
|
22
22
|
"@types/node": "^22.1.0",
|
|
23
23
|
"jest": "^29.7.0",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"typescript": "^5.4.5"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@morpho-org/morpho-ts": "^1.
|
|
28
|
+
"@morpho-org/morpho-ts": "^1.7.1"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
],
|
|
50
50
|
"preset": "ts-jest"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "396bb4772f53ae6563d1c9e7afd3572f365a0303"
|
|
53
53
|
}
|