File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -5,25 +5,20 @@ const axios = require('axios');
5
5
* @returns {string }
6
6
*/
7
7
function pickChainUrl ( chain ) {
8
- if ( ! chain || ! TESTNET_API_URL_MAP [ chain ] ) {
8
+ if ( ! chain || ! OTHER_API_URL_MAP [ chain ] ) {
9
9
return MAIN_API_URL ;
10
10
}
11
- if ( ROLLUP_API_URL_MAP [ chain ] ) {
12
- return ROLLUP_API_URL_MAP [ chain ] ;
13
- }
14
- return TESTNET_API_URL_MAP [ chain ] ;
11
+
12
+ return OTHER_API_URL_MAP [ chain ] ;
15
13
}
16
14
17
15
18
16
const MAIN_API_URL = 'https://api.etherscan.io' ;
19
- const TESTNET_API_URL_MAP = {
17
+ const OTHER_API_URL_MAP = {
20
18
ropsten : 'https://api-ropsten.etherscan.io' ,
21
19
kovan : 'https://api-kovan.etherscan.io' ,
22
20
rinkeby : 'https://api-rinkeby.etherscan.io' ,
23
- homestead : 'https://api.etherscan.io'
24
- } ;
25
-
26
- const ROLLUP_API_URL_MAP = {
21
+ homestead : 'https://api.etherscan.io' ,
27
22
arbitrum : 'https://arbiscan.io' ,
28
23
arbitrum_rinkeby : 'https://testnet.arbiscan.io'
29
24
} ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const account = require('./account');
12
12
13
13
/**
14
14
* @param {string } apiKey - (optional) Your Etherscan APIkey
15
- * @param {string } chain - (optional) Testnet chain keys [ropsten, rinkeby, kovan]
15
+ * @param {string } chain - (optional) Other chain keys [ropsten, rinkeby, kovan]
16
16
* @param {number } timeout - (optional) Timeout in milliseconds for requests, default 10000
17
17
*/
18
18
module . exports = function ( apiKey , chain , timeout ) {
You can’t perform that action at this time.
0 commit comments