Skip to content

Commit

Permalink
Added hardhat-verify and configs for Base/Gnosis
Browse files Browse the repository at this point in the history
  • Loading branch information
u-hubar committed Jun 27, 2024
1 parent 265b376 commit 4c66ca7
Show file tree
Hide file tree
Showing 4 changed files with 521 additions and 1 deletion.
52 changes: 51 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import '@typechain/hardhat';
import '@nomicfoundation/hardhat-chai-matchers';
import '@nomiclabs/hardhat-ethers';
import '@nomiclabs/hardhat-solhint';
import '@nomicfoundation/hardhat-verify';
import { extendEnvironment } from 'hardhat/config';
import { lazyObject } from 'hardhat/plugins';
import { HardhatRuntimeEnvironment } from 'hardhat/types';
Expand All @@ -23,7 +24,7 @@ import './tasks/send_otp';
import './utils/type-extensions';
import config from './hardhat.node.config';
import { Helpers } from './utils/helpers';
import { accounts, rpc } from './utils/network';
import { accounts, etherscan_api_key, rpc } from './utils/network';

extendEnvironment((hre: HardhatRuntimeEnvironment) => {
hre.helpers = lazyObject(() => new Helpers(hre));
Expand Down Expand Up @@ -176,4 +177,53 @@ config.contractSizer = {
except: [],
};

config.etherscan = {
customChains: [
{
network: 'chiado',
chainId: 10200,
urls: {
//Blockscout
apiURL: 'https://gnosis-chiado.blockscout.com/api',
browserURL: 'https://gnosis-chiado.blockscout.com',
},
},
{
network: 'gnosis',
chainId: 100,
urls: {
// Gnosisscan
apiURL: 'https://api.gnosisscan.io/api',
browserURL: 'https://gnosisscan.io/',
// Blockscout
//apiURL: "https://blockscout.com/xdai/mainnet/api",
//browserURL: "https://blockscout.com/xdai/mainnet",
},
},
{
network: 'base_sepolia',
chainId: 84532,
urls: {
apiURL: 'https://api-sepolia.basescan.org/api',
browserURL: 'https://sepolia.basescan.org/',
},
},
{
network: 'base',
chainId: 8453,
urls: {
apiURL: 'https://api.basescan.org/api',
browserURL: 'https://basescan.org/',
},
},
],
apiKey: {
//blockscout explorer verification does not require keys
chiado: 'chiado',
gnosis: etherscan_api_key('gnosis_mainnet'),
base_sepolia: etherscan_api_key('base_sepolia'),
base: etherscan_api_key('base'),
},
};

export default config;
Loading

0 comments on commit 4c66ca7

Please sign in to comment.