Skip to content

Commit

Permalink
feat(api): add API key for Scroll network
Browse files Browse the repository at this point in the history
Add Scroll network support by including its API endpoint and environment variable key in the etherscanAPIs map.
  • Loading branch information
portdeveloper committed Aug 13, 2024
1 parent b419ba8 commit 19ebc7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ BASE_API_KEY=your_api_key_here
ARBITRUM_API_KEY=your_arbitrum_api_key_here
GNOSIS_API_KEY=your_gnosis_api_key_here
ZKSYNC_API_KEY=a # doesn't need an API key, so just use a placeholder
SCROLL_API_KEY=your_scroll_api_key_here
BSC_API_KEY=your_bsc_api_key_here
POLYGON_API_KEY=your_polygon_api_key_here
# Add more chain API keys as needed
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func init() {
etherscanAPIs[42161] = &GenericEtherscanAPI{BaseURL: "https://api.arbiscan.io/api", EnvKey: "ARBITRUM_API_KEY"}
etherscanAPIs[100] = &GenericEtherscanAPI{BaseURL: "https://api-gnosis.etherscan.io/api", EnvKey: "GNOSIS_API_KEY"}
etherscanAPIs[324] = &GenericEtherscanAPI{BaseURL: "https://block-explorer-api.mainnet.zksync.io/api", EnvKey: "ZKSYNC_API_KEY"}
etherscanAPIs[534352] = &GenericEtherscanAPI{BaseURL: "https://api.scrollscan.com/api", EnvKey: "SCROLL_API_KEY"}
etherscanAPIs[56] = &GenericEtherscanAPI{BaseURL: "https://api.bscscan.com/api", EnvKey: "BSC_API_KEY"}
etherscanAPIs[137] = &GenericEtherscanAPI{BaseURL: "https://api.polygonscan.com/api", EnvKey: "POLYGON_API_KEY"}

Expand Down

0 comments on commit 19ebc7d

Please sign in to comment.