Skip to content

Commit

Permalink
Add basescan support (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
krzkaczor committed Sep 1, 2023
1 parent bd8ae18 commit c9012d4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/ethereum-viewer/src/explorer/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const explorerApiUrls = {
snowtrace: "https://api.snowtrace.io/api",
"testnet.snowtrace": "https://api-testnet.snowtrace.io/api",
cronoscan: "https://api.cronoscan.com/api",
basescan: "https://api.basescan.org/api",
"goerli.basescan": "https://api-goerli.basescan.org/",
};

/**
Expand Down Expand Up @@ -53,6 +55,8 @@ export const networkNames: Record<ApiName, string> = {
snowtrace: "avalanche",
"testnet.snowtrace": "avalancheTestnet",
cronoscan: "cronos",
basescan: "basescan",
"goerli.basescan": "basescanGoerli",
};

const ETHERSCAN_KEY = "862Y3WJ4JB4B34PZQRFEV3IK6SZ8GNR9N5";
Expand All @@ -64,6 +68,7 @@ const SNOWTRACE_KEY = "IQEHAJ43W674REN5XV79WF47X37VEB8PIC";
const ARBISCAN_KEY = "X3ZWJBXC14HTIR3B9DNYGEUICEIKKZ9ENZ";
const POLYGONSCAN_KEY = "RV4YXDXEMIHXMC7ZXB8T82G4F56FRZ1SZQ";
const CRONOSCAN_KEY = "BGAN1CWT8E1A2XRS3FU61UP7XXFMHBWNSY";
const BASESCAN_KEY = "ICQQDUA1C8R2EZY6M4QIIV7WUEZM8INNA7";

// @todo this should be possible to override using VSCode settings
export const explorerApiKeys: Record<ApiName, string> = {
Expand Down Expand Up @@ -95,4 +100,7 @@ export const explorerApiKeys: Record<ApiName, string> = {
"testnet.snowtrace": SNOWTRACE_KEY,

cronoscan: CRONOSCAN_KEY,

basescan: BASESCAN_KEY,
"goerli.basescan": BASESCAN_KEY,
};

0 comments on commit c9012d4

Please sign in to comment.