-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
37 lines (32 loc) · 1 KB
/
hardhat.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";
import "@nomiclabs/hardhat-etherscan";
import "hardhat-gas-reporter";
import { config as dotenvConfig } from "dotenv";
import { resolve } from "path";
import "@nomiclabs/hardhat-ethers";
const dotenvConfigPath: string = process.env.DOTENV_CONFIG_PATH || "./.env";
dotenvConfig({ path: resolve(__dirname, dotenvConfigPath) });
const ALCHEMY_API_KEY = process.env.ALCHEMY_API_KEY || '';
const GOERLI_PRIVATE_KEY = process.env.GOERLI_PRIVATE_KEY || '';
const config: HardhatUserConfig = {
solidity: '0.8.17',
networks: {
goerli: {
url: `https://eth-goerli.alchemyapi.io/v2/${ALCHEMY_API_KEY}`,
accounts: [GOERLI_PRIVATE_KEY]
},
hardhat: {
allowUnlimitedContractSize: true
}
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY
},
gasReporter: {
currency: 'USD',
gasPrice: 21,
enabled: (process.env.REPORT_GAS === 'true') ? true : false
},
};
export default config;