infinite-proxy/hardhat.config.ts

90 lines
2.0 KiB
TypeScript
Raw Normal View History

2022-04-15 10:40:03 +00:00
import * as dotenv from "dotenv";
import { HardhatUserConfig, task } from "hardhat/config";
import "@nomiclabs/hardhat-etherscan";
import "@nomiclabs/hardhat-waffle";
import "@typechain/hardhat";
import "hardhat-gas-reporter";
import "solidity-coverage";
dotenv.config();
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
2022-04-15 13:04:56 +00:00
const alchemyApiKey = process.env.ALCHEMY_API_KEY;
if (!alchemyApiKey) {
throw new Error("Please set your ALCHEMY_ETH_API_KEY in a .env file");
}
2022-04-15 10:40:03 +00:00
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
const config: HardhatUserConfig = {
2022-04-15 13:04:56 +00:00
solidity: {
compilers: [
{
version: "0.8.6",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.7.6",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
{
version: "0.5.6",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
2022-04-15 10:40:03 +00:00
networks: {
2022-04-15 13:04:56 +00:00
hardhat: {
forking: {
url: `https://eth-mainnet.alchemyapi.io/v2/${alchemyApiKey}`,
// blockNumber: 14501064
},
chainId: 1,
gasPrice: 151101000000,
},
mainnet: {
url: `https://eth-mainnet.alchemyapi.io/v2/${alchemyApiKey}`,
chainId: 1,
gasPrice: 52101000000,
accounts: [`0x${process.env.PRIVATE_KEY}`]
2022-04-15 10:40:03 +00:00
},
},
gasReporter: {
enabled: process.env.REPORT_GAS !== undefined,
currency: "USD",
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
2022-04-15 13:04:56 +00:00
mocha: {
timeout: 10000 * 10000,
}
2022-04-15 10:40:03 +00:00
};
2022-04-15 13:04:56 +00:00
export default config;