Skip to content

Commit

Permalink
fix mainnet not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
v1rtl committed Sep 14, 2021
1 parent 93e508b commit 3391022
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/ChainProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ export class ChainProvider extends EtherscanProvider {
case 'arbitrum':
case 'mumbai':
case 'chapel':

// standard networks
case 'homestead':
case 'ethereum':
case 'mainnet':
case 'kovan':
case 'ropsten':
case 'goerli':
case 'rinkeby':
break
default:
logger.throwError('unsupported network', Logger.errors.UNSUPPORTED_OPERATION, {
Expand Down
8 changes: 7 additions & 1 deletion src/getDefaultApiKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ export const getDefaultApiKey = (network: string) => {
case 'arbitrum':
case 'arbitrum-mainnet':
case 'arbitrum-testnet':

case 'homestead':
case 'ethereum':
case 'mainnet':
case 'kovan':
case 'ropsten':
case 'goerli':
case 'rinkeby':
case 'optimism-kovan':
return '9D13ZE7XSBTJ94N9BNJ2MA33VMAY2YPIRB'
case 'bsc-mainnet':
Expand Down
20 changes: 20 additions & 0 deletions src/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,26 @@ export const networks = [
{
name: 'arbitrum-testnet',
chainId: 421611
},
{
name: 'homestead',
chainId: 1
},
{
name: 'ropsten',
chainId: 3
},
{
name: 'rinkeby',
chainId: 4
},
{
name: 'goerli',
chainId: 5
},
{
name: 'kovan',
chainId: 42
}
]

Expand Down

0 comments on commit 3391022

Please sign in to comment.