10grans-ng/hardhat.config.ts

68 lines
1.5 KiB
TypeScript

import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "hardhat-contract-sizer";
import dotenv from "dotenv";
const env = process.env.NODE_ENV || "local";
dotenv.config({ path: `.env.${env}` });
const config: HardhatUserConfig = {
solidity: {
version: "0.8.19", // don"t make this higher
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
networks: {
"base-mainnet": {
url: "https://mainnet.base.org",
accounts: {
mnemonic: process.env.MNEMONIC as string
},
gasPrice: 1000000000,
},
"base-goerli": {
url: "https://goerli.base.org",
accounts: {
mnemonic: process.env.MNEMONIC as string
},
gasPrice: 1000000000,
},
"base-local": {
url: "http://localhost:8545",
accounts: {
mnemonic: process.env.MNEMONIC as string
},
gasPrice: 1000000000,
},
"eth-goerli": {
url: `https://goerli.infura.io/v3/${process.env.INFURA_KEY}`,
accounts: {
mnemonic: process.env.MNEMONIC as string
},
gasPrice: 1000000000,
},
},
defaultNetwork: "base-local",
etherscan: {
apiKey: {
"base-goerli": "PLACEHOLDER_STRING" // yes this is really the string
},
customChains: [
{
network: "base-goerli",
chainId: 84531,
urls: {
apiURL: "https://api-goerli.basescan.org/api",
browserURL: "https://goerli.basescan.org"
}
}
]
},
};
export default config;