Skip to content

Commit

Permalink
Change api key name
Browse files Browse the repository at this point in the history
  • Loading branch information
portdeveloper committed Oct 31, 2024
1 parent 2c861be commit 553c634
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/nextjs/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ NEXT_PUBLIC_POLYGON_ETHERSCAN_API_KEY=
NEXT_PUBLIC_ARBITRUM_ETHERSCAN_API_KEY=
NEXT_PUBLIC_SCROLL_ETHERSCAN_API_KEY=
NEXT_PUBLIC_BSC_ETHERSCAN_API_KEY=
NEXT_PUBLIC_ETHERSCAN_V2_API_KEY=

NEXT_PUBLIC_HEIMDALL_URL=

Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/utils/abi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { isZeroAddress } from "./scaffold-eth/common";
import { Address } from "viem";

export const fetchContractABIFromEtherscan = async (verifiedContractAddress: Address, chainId: number) => {
const apiKey = process.env.NEXT_PUBLIC_MAINNET_ETHERSCAN_API_KEY;
const apiKey = process.env.NEXT_PUBLIC_ETHERSCAN_V2_API_KEY;

// First call to get source code and check for implementation
const sourceCodeUrl = `https://api.etherscan.io/v2/api?chainid=${chainId}&module=contract&action=getsourcecode&address=${verifiedContractAddress}&apikey=${apiKey}`;
Expand Down

0 comments on commit 553c634

Please sign in to comment.