@toruslabs/ethereum-controllers 5.2.11 → 5.2.12
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/dist/ethereumControllers.cjs.js +36 -22
- package/dist/ethereumControllers.cjs.js.map +1 -1
- package/dist/ethereumControllers.esm.js +35 -22
- package/dist/ethereumControllers.esm.js.map +1 -1
- package/dist/ethereumControllers.umd.min.js +1 -1
- package/dist/ethereumControllers.umd.min.js.map +1 -1
- package/dist/types/utils/constants.d.ts +4 -3
- package/package.json +6 -6
- package/src/utils/constants.ts +36 -19
- package/src/utils/contractAddresses.ts +0 -2
|
@@ -16,13 +16,14 @@ export declare const XDAI_CHAIN_ID = "0x64";
|
|
|
16
16
|
export declare const ARBITRUM_MAINNET_CHAIN_ID = "0xa4b1";
|
|
17
17
|
export declare const OPTIMISM_MAINNET_CHAIN_ID = "0xa";
|
|
18
18
|
export declare const CELO_MAINNET_CHAIN_ID = "0xa4ec";
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const BASE_CHAIN_ID = "0x2105";
|
|
20
20
|
export declare const SEPOLIA_CHAIN_ID = "0xaa36a7";
|
|
21
21
|
export declare const POLYGON_MUMBAI_CHAIN_ID = "0x13881";
|
|
22
22
|
export declare const BSC_TESTNET_CHAIN_ID = "0x61";
|
|
23
23
|
export declare const AVALANCHE_TESTNET_CHAIN_ID = "0xa869";
|
|
24
|
-
export declare const ARBITRUM_TESTNET_CHAIN_ID = "
|
|
25
|
-
export declare const OPTIMISM_TESTNET_CHAIN_ID = "
|
|
24
|
+
export declare const ARBITRUM_TESTNET_CHAIN_ID = "0x66eee";
|
|
25
|
+
export declare const OPTIMISM_TESTNET_CHAIN_ID = "0xaa37dc";
|
|
26
|
+
export declare const BASE_TESTNET_CHAIN_ID = "0x14a34";
|
|
26
27
|
export declare const SUPPORTED_NETWORKS: Record<string, EthereumProviderConfig>;
|
|
27
28
|
export declare const METHOD_TYPES: {
|
|
28
29
|
readonly GET_ACCOUNTS: "eth_accounts";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toruslabs/ethereum-controllers",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.12",
|
|
4
4
|
"homepage": "https://github.com/torusresearch/controllers#readme",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/ethereumControllers.cjs.js",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"@ethereumjs/util": "^9.0.1",
|
|
25
25
|
"@metamask/eth-sig-util": "^7.0.1",
|
|
26
26
|
"@metamask/rpc-errors": "^6.1.0",
|
|
27
|
-
"@toruslabs/base-controllers": "^5.2.
|
|
27
|
+
"@toruslabs/base-controllers": "^5.2.12",
|
|
28
28
|
"@toruslabs/http-helpers": "^6.0.0",
|
|
29
|
-
"@toruslabs/openlogin-jrpc": "^6.2.
|
|
30
|
-
"async-mutex": "^0.4.
|
|
29
|
+
"@toruslabs/openlogin-jrpc": "^6.2.3",
|
|
30
|
+
"async-mutex": "^0.4.1",
|
|
31
31
|
"bignumber.js": "^9.1.2",
|
|
32
32
|
"bn.js": "^5.2.1",
|
|
33
|
-
"ethers": "^6.
|
|
33
|
+
"ethers": "^6.10.0",
|
|
34
34
|
"fast-json-patch": "^3.1.1",
|
|
35
35
|
"jsonschema": "^1.4.1",
|
|
36
36
|
"lodash": "^4.17.21",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "0a1a961aca3a7c31d53cc7dda9d9166a2ab7783b",
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@nomicfoundation/hardhat-toolbox": "^4.0.0",
|
|
70
70
|
"hardhat": "^2.19.4"
|
package/src/utils/constants.ts
CHANGED
|
@@ -20,14 +20,15 @@ export const XDAI_CHAIN_ID = "0x64";
|
|
|
20
20
|
export const ARBITRUM_MAINNET_CHAIN_ID = "0xa4b1";
|
|
21
21
|
export const OPTIMISM_MAINNET_CHAIN_ID = "0xa";
|
|
22
22
|
export const CELO_MAINNET_CHAIN_ID = "0xa4ec";
|
|
23
|
+
export const BASE_CHAIN_ID = "0x2105";
|
|
23
24
|
|
|
24
|
-
export const GOERLI_CHAIN_ID = "0x5";
|
|
25
25
|
export const SEPOLIA_CHAIN_ID = "0xaa36a7";
|
|
26
26
|
export const POLYGON_MUMBAI_CHAIN_ID = "0x13881";
|
|
27
27
|
export const BSC_TESTNET_CHAIN_ID = "0x61";
|
|
28
28
|
export const AVALANCHE_TESTNET_CHAIN_ID = "0xa869";
|
|
29
|
-
export const ARBITRUM_TESTNET_CHAIN_ID = "
|
|
30
|
-
export const OPTIMISM_TESTNET_CHAIN_ID = "
|
|
29
|
+
export const ARBITRUM_TESTNET_CHAIN_ID = "0x66eee";
|
|
30
|
+
export const OPTIMISM_TESTNET_CHAIN_ID = "0xaa37dc";
|
|
31
|
+
export const BASE_TESTNET_CHAIN_ID = "0x14a34";
|
|
31
32
|
|
|
32
33
|
const INFURA_KEY = process.env.VITE_APP_INFURA_PROJECT_KEY;
|
|
33
34
|
|
|
@@ -104,15 +105,14 @@ export const SUPPORTED_NETWORKS: Record<string, EthereumProviderConfig> = {
|
|
|
104
105
|
ticker: "DAI",
|
|
105
106
|
tickerName: "xDai Network Token",
|
|
106
107
|
},
|
|
107
|
-
[
|
|
108
|
-
blockExplorerUrl: "https://
|
|
109
|
-
chainId:
|
|
110
|
-
displayName: "
|
|
111
|
-
logo: "
|
|
112
|
-
rpcTarget: `https://
|
|
108
|
+
[BASE_CHAIN_ID]: {
|
|
109
|
+
blockExplorerUrl: "https://basescan.org",
|
|
110
|
+
chainId: BASE_CHAIN_ID,
|
|
111
|
+
displayName: "Base",
|
|
112
|
+
logo: "base.svg",
|
|
113
|
+
rpcTarget: `https://mainnet.base.org`,
|
|
113
114
|
ticker: "ETH",
|
|
114
115
|
tickerName: "Ethereum",
|
|
115
|
-
isTestnet: true,
|
|
116
116
|
},
|
|
117
117
|
[SEPOLIA_CHAIN_ID]: {
|
|
118
118
|
blockExplorerUrl: "https://sepolia.etherscan.io",
|
|
@@ -155,21 +155,31 @@ export const SUPPORTED_NETWORKS: Record<string, EthereumProviderConfig> = {
|
|
|
155
155
|
isTestnet: true,
|
|
156
156
|
},
|
|
157
157
|
[ARBITRUM_TESTNET_CHAIN_ID]: {
|
|
158
|
-
blockExplorerUrl: "https://
|
|
158
|
+
blockExplorerUrl: "https://sepolia.arbiscan.io",
|
|
159
159
|
chainId: ARBITRUM_TESTNET_CHAIN_ID,
|
|
160
|
-
displayName: "Arbitrum
|
|
160
|
+
displayName: "Arbitrum Sepolia",
|
|
161
161
|
logo: "eth.svg",
|
|
162
|
-
rpcTarget: `https://arbitrum-
|
|
162
|
+
rpcTarget: `https://arbitrum-sepolia.infura.io/v3/${INFURA_KEY}`,
|
|
163
163
|
ticker: "ETH",
|
|
164
164
|
tickerName: "Ethereum",
|
|
165
165
|
isTestnet: true,
|
|
166
166
|
},
|
|
167
167
|
[OPTIMISM_TESTNET_CHAIN_ID]: {
|
|
168
|
-
blockExplorerUrl: "https://
|
|
168
|
+
blockExplorerUrl: "https://sepolia-optimistic.etherscan.io",
|
|
169
169
|
chainId: OPTIMISM_TESTNET_CHAIN_ID,
|
|
170
|
-
displayName: "Optimism
|
|
170
|
+
displayName: "Optimism Sepolia",
|
|
171
171
|
logo: "optimism.svg",
|
|
172
|
-
rpcTarget: `https://optimism-
|
|
172
|
+
rpcTarget: `https://optimism-sepolia.infura.io/v3/${INFURA_KEY}`,
|
|
173
|
+
ticker: "ETH",
|
|
174
|
+
tickerName: "Ethereum",
|
|
175
|
+
isTestnet: true,
|
|
176
|
+
},
|
|
177
|
+
[BASE_TESTNET_CHAIN_ID]: {
|
|
178
|
+
blockExplorerUrl: "https://sepolia-optimistic.etherscan.io",
|
|
179
|
+
chainId: BASE_TESTNET_CHAIN_ID,
|
|
180
|
+
displayName: "Base Sepolia",
|
|
181
|
+
logo: "base.svg",
|
|
182
|
+
rpcTarget: `https://sepolia.base.org`,
|
|
173
183
|
ticker: "ETH",
|
|
174
184
|
tickerName: "Ethereum",
|
|
175
185
|
isTestnet: true,
|
|
@@ -239,11 +249,10 @@ export const OLD_ERC721_LIST: Record<string, { name?: string; logo?: string; erc
|
|
|
239
249
|
},
|
|
240
250
|
};
|
|
241
251
|
|
|
242
|
-
export const TEST_CHAINS = [
|
|
252
|
+
export const TEST_CHAINS = [SEPOLIA_CHAIN_ID];
|
|
243
253
|
|
|
244
254
|
export const ETHERSCAN_SUPPORTED_CHAINS = [
|
|
245
255
|
MAINNET_CHAIN_ID,
|
|
246
|
-
GOERLI_CHAIN_ID,
|
|
247
256
|
SEPOLIA_CHAIN_ID,
|
|
248
257
|
BSC_MAINNET_CHAIN_ID,
|
|
249
258
|
BSC_TESTNET_CHAIN_ID,
|
|
@@ -256,6 +265,8 @@ export const ETHERSCAN_SUPPORTED_CHAINS = [
|
|
|
256
265
|
POLYGON_CHAIN_ID,
|
|
257
266
|
POLYGON_MUMBAI_CHAIN_ID,
|
|
258
267
|
CELO_MAINNET_CHAIN_ID,
|
|
268
|
+
BASE_CHAIN_ID,
|
|
269
|
+
BASE_TESTNET_CHAIN_ID,
|
|
259
270
|
];
|
|
260
271
|
|
|
261
272
|
export const SIMPLEHASH_SUPPORTED_CHAINS = [
|
|
@@ -271,7 +282,9 @@ export const SIMPLEHASH_SUPPORTED_CHAINS = [
|
|
|
271
282
|
CELO_MAINNET_CHAIN_ID,
|
|
272
283
|
AVALANCHE_MAINNET_CHAIN_ID,
|
|
273
284
|
AVALANCHE_TESTNET_CHAIN_ID,
|
|
274
|
-
|
|
285
|
+
SEPOLIA_CHAIN_ID,
|
|
286
|
+
BASE_CHAIN_ID,
|
|
287
|
+
BASE_TESTNET_CHAIN_ID,
|
|
275
288
|
];
|
|
276
289
|
|
|
277
290
|
export const COINGECKO_SUPPORTED_CURRENCIES = new Set([
|
|
@@ -371,6 +384,10 @@ export const COINGECKO_PLATFORMS_CHAIN_CODE_MAP: Record<string, { platform: stri
|
|
|
371
384
|
platform: "avalanche",
|
|
372
385
|
currency: "avax",
|
|
373
386
|
},
|
|
387
|
+
[BASE_CHAIN_ID]: {
|
|
388
|
+
platform: "base",
|
|
389
|
+
currency: "eth",
|
|
390
|
+
},
|
|
374
391
|
};
|
|
375
392
|
|
|
376
393
|
export const MessageStatus = {
|
|
@@ -2,7 +2,6 @@ import {
|
|
|
2
2
|
ARBITRUM_MAINNET_CHAIN_ID,
|
|
3
3
|
AVALANCHE_MAINNET_CHAIN_ID,
|
|
4
4
|
BSC_MAINNET_CHAIN_ID,
|
|
5
|
-
GOERLI_CHAIN_ID,
|
|
6
5
|
MAINNET_CHAIN_ID,
|
|
7
6
|
OPTIMISM_MAINNET_CHAIN_ID,
|
|
8
7
|
POLYGON_CHAIN_ID,
|
|
@@ -10,7 +9,6 @@ import {
|
|
|
10
9
|
|
|
11
10
|
export const SINGLE_CALL_BALANCES_ADDRESSES: Record<string, string> = {
|
|
12
11
|
[MAINNET_CHAIN_ID]: "0xb1f8e55c7f64d203c1400b9d8555d050f94adf39",
|
|
13
|
-
[GOERLI_CHAIN_ID]: "0x9788C4E93f9002a7ad8e72633b11E8d1ecd51f9b",
|
|
14
12
|
// [SEPOLIA_CHAIN_ID]: SINGLE_CALL_BALANCES_ADDRESS_SEPOLIA,
|
|
15
13
|
// [FANTOM_CHAIN_ID]: "0x07f697424ABe762bB808c109860c04eA488ff92B",
|
|
16
14
|
[BSC_MAINNET_CHAIN_ID]: "0x2352c63A83f9Fd126af8676146721Fa00924d7e4",
|