-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
37 lines (32 loc) · 862 Bytes
/
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, task } from 'hardhat/config'
import '@nomicfoundation/hardhat-toolbox'
import '@typechain/hardhat'
import '@nomiclabs/hardhat-ethers'
require('@nomicfoundation/hardhat-chai-matchers')
import dotenv from 'dotenv'
dotenv.config()
const config: HardhatUserConfig = {
networks: {
goerli: {
url: `https://eth-goerli.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`,
accounts: [`${process.env.GOERLI_PRIVATE_KEY}`],
},
},
solidity: {
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 4000,
},
},
},
paths: { tests: 'tests' },
}
export default config
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)
}
})