@@ -269,7 +269,7 @@ const axios = require('axios');
269
269
* @returns {string }
270
270
*/
271
271
function pickChainUrl ( chain ) {
272
- if ( ! chain || ! TESTNET_API_URL_MAP [ chain ] ) {
272
+ if ( ! chain || ! OTHER_API_URL_MAP [ chain ] ) {
273
273
return MAIN_API_URL ;
274
274
}
275
275
@@ -278,11 +278,13 @@ function pickChainUrl(chain) {
278
278
279
279
280
280
const MAIN_API_URL = 'https://api.etherscan.io' ;
281
- const TESTNET_API_URL_MAP = {
281
+ const OTHER_API_URL_MAP = {
282
282
ropsten : 'https://api-ropsten.etherscan.io' ,
283
283
kovan : 'https://api-kovan.etherscan.io' ,
284
284
rinkeby : 'https://api-rinkeby.etherscan.io' ,
285
- homestead : 'https://api.etherscan.io'
285
+ homestead : 'https://api.etherscan.io' ,
286
+ arbitrum : 'https://arbiscan.io' ,
287
+ arbitrum_rinkeby : 'https://testnet.arbiscan.io'
286
288
} ;
287
289
288
290
module . exports = function ( chain , timeout ) {
@@ -343,7 +345,7 @@ const account = require('./account');
343
345
344
346
/**
345
347
* @param {string } apiKey - (optional) Your Etherscan APIkey
346
- * @param {string } chain - (optional) Testnet chain keys [ropsten, rinkeby, kovan]
348
+ * @param {string } chain - (optional) Other chain keys [ropsten, rinkeby, kovan, arbitrum, arbitrum_rinkeby ]
347
349
* @param {number } timeout - (optional) Timeout in milliseconds for requests, default 10000
348
350
*/
349
351
module . exports = function ( apiKey , chain , timeout ) {
0 commit comments