@toruslabs/ethereum-controllers 5.2.11 → 5.2.13

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.
@@ -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 GOERLI_CHAIN_ID = "0x5";
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 = "0x66eeb";
25
- export declare const OPTIMISM_TESTNET_CHAIN_ID = "0x1a4";
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.11",
3
+ "version": "5.2.13",
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.10",
27
+ "@toruslabs/base-controllers": "^5.2.12",
28
28
  "@toruslabs/http-helpers": "^6.0.0",
29
- "@toruslabs/openlogin-jrpc": "^6.2.1",
30
- "async-mutex": "^0.4.0",
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.9.2",
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": "0cbbf777c16de9811b29a09c27de92e67300a452",
67
+ "gitHead": "ff1f86a9f2c01898e1df8ea7f58ee919e88164de",
68
68
  "devDependencies": {
69
69
  "@nomicfoundation/hardhat-toolbox": "^4.0.0",
70
70
  "hardhat": "^2.19.4"
@@ -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 = "0x66eeb";
30
- export const OPTIMISM_TESTNET_CHAIN_ID = "0x1a4";
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
 
@@ -45,7 +46,7 @@ export const SUPPORTED_NETWORKS: Record<string, EthereumProviderConfig> = {
45
46
  blockExplorerUrl: "https://polygonscan.com",
46
47
  chainId: POLYGON_CHAIN_ID,
47
48
  displayName: "Polygon",
48
- logo: "matic-network-logo.svg",
49
+ logo: "polygon.svg",
49
50
  rpcTarget: `https://polygon-mainnet.infura.io/v3/${INFURA_KEY}`,
50
51
  ticker: "MATIC",
51
52
  tickerName: "Matic Network Token",
@@ -54,7 +55,7 @@ export const SUPPORTED_NETWORKS: Record<string, EthereumProviderConfig> = {
54
55
  blockExplorerUrl: "https://bscscan.com",
55
56
  chainId: BSC_MAINNET_CHAIN_ID,
56
57
  displayName: "Binance Smart Chain (BSC)",
57
- logo: "bnb.png",
58
+ logo: "bnb_logo.png",
58
59
  rpcTarget: `https://bsc-dataseed.binance.org`,
59
60
  ticker: "BNB",
60
61
  tickerName: "Binance Coin",
@@ -90,29 +91,28 @@ export const SUPPORTED_NETWORKS: Record<string, EthereumProviderConfig> = {
90
91
  blockExplorerUrl: "https://arbiscan.io",
91
92
  chainId: ARBITRUM_MAINNET_CHAIN_ID,
92
93
  displayName: "Arbitrum One",
93
- logo: "eth.svg",
94
+ logo: "arbitrum.svg",
94
95
  rpcTarget: `https://arbitrum-mainnet.infura.io/v3/${INFURA_KEY}`,
95
96
  ticker: "ETH",
96
97
  tickerName: "Ethereum",
97
98
  },
98
99
  [XDAI_CHAIN_ID]: {
99
- blockExplorerUrl: "https://blockscout.com/poa/xdai",
100
+ blockExplorerUrl: "https://gnosis.blockscout.com",
100
101
  chainId: XDAI_CHAIN_ID,
101
102
  displayName: "xDai",
102
103
  logo: "xdai.svg",
103
104
  rpcTarget: `https://rpc.gnosischain.com`,
104
105
  ticker: "DAI",
105
- tickerName: "xDai Network Token",
106
+ tickerName: "xDai Token",
106
107
  },
107
- [GOERLI_CHAIN_ID]: {
108
- blockExplorerUrl: "https://goerli.etherscan.io",
109
- chainId: GOERLI_CHAIN_ID,
110
- displayName: "Goerli Test Network",
111
- logo: "eth.svg",
112
- rpcTarget: `https://goerli.infura.io/v3/${INFURA_KEY}`,
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",
@@ -128,7 +128,7 @@ export const SUPPORTED_NETWORKS: Record<string, EthereumProviderConfig> = {
128
128
  blockExplorerUrl: "https://mumbai.polygonscan.com",
129
129
  chainId: POLYGON_MUMBAI_CHAIN_ID,
130
130
  displayName: "Polygon Mumbai",
131
- logo: "matic-network-logo.svg",
131
+ logo: "polygon.svg",
132
132
  rpcTarget: `https://polygon-mumbai.infura.io/v3/${INFURA_KEY}`,
133
133
  ticker: "MATIC",
134
134
  tickerName: "Matic Network Token",
@@ -138,7 +138,7 @@ export const SUPPORTED_NETWORKS: Record<string, EthereumProviderConfig> = {
138
138
  blockExplorerUrl: "https://testnet.bscscan.com",
139
139
  chainId: BSC_TESTNET_CHAIN_ID,
140
140
  displayName: "Binance Smart Chain Testnet",
141
- logo: "bnb.png",
141
+ logo: "bnb_logo.png",
142
142
  rpcTarget: `https://data-seed-prebsc-1-s1.binance.org:8545`,
143
143
  ticker: "BNB",
144
144
  tickerName: "Binance Coin",
@@ -148,28 +148,38 @@ export const SUPPORTED_NETWORKS: Record<string, EthereumProviderConfig> = {
148
148
  blockExplorerUrl: "https://testnet.snowtrace.io",
149
149
  chainId: AVALANCHE_TESTNET_CHAIN_ID,
150
150
  displayName: "Avalanche Testnet C-Chain",
151
- logo: "avax.png",
151
+ logo: "avax.svg",
152
152
  rpcTarget: `https://api.avax-test.network/ext/bc/C/rpc`,
153
153
  ticker: "AVAX",
154
154
  tickerName: "Avalanche",
155
155
  isTestnet: true,
156
156
  },
157
157
  [ARBITRUM_TESTNET_CHAIN_ID]: {
158
- blockExplorerUrl: "https://testnet.arbiscan.io",
158
+ blockExplorerUrl: "https://sepolia.arbiscan.io",
159
159
  chainId: ARBITRUM_TESTNET_CHAIN_ID,
160
- displayName: "Arbitrum Goerli",
161
- logo: "eth.svg",
162
- rpcTarget: `https://arbitrum-rinkeby.infura.io/v3/${INFURA_KEY}`,
160
+ displayName: "Arbitrum Sepolia",
161
+ logo: "arbitrum.svg",
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://goerli-optimism.etherscan.io",
168
+ blockExplorerUrl: "https://sepolia-optimistic.etherscan.io",
169
169
  chainId: OPTIMISM_TESTNET_CHAIN_ID,
170
- displayName: "Optimism Goerli",
170
+ displayName: "Optimism Sepolia",
171
171
  logo: "optimism.svg",
172
- rpcTarget: `https://optimism-goerli.infura.io/v3/${INFURA_KEY}`,
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.basescan.org",
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 = [GOERLI_CHAIN_ID, SEPOLIA_CHAIN_ID];
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
- GOERLI_CHAIN_ID,
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",