forked from enesizgi/nft-marketplace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.js
59 lines (55 loc) · 1.51 KB
/
hardhat.config.js
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
require('hardhat-ethernal');
require('@nomicfoundation/hardhat-toolbox');
require('@nomiclabs/hardhat-etherscan');
const dotenv = require('dotenv');
dotenv.config();
const { ALCHEMY_GOERLI_API_KEY, ALCHEMY_SEPOLIA_API_KEY, DEPLOYER_PRIVATE_KEY, DISABLE_AUTOMINING, ETHERSCAN_API_KEY } = process.env;
module.exports = {
solidity: '0.8.18',
paths: {
artifacts: './libs/contracts/src/artifacts',
sources: './libs/contracts/src/contracts',
cache: './libs/contracts/src/cache',
tests: './libs/contracts/src/test'
},
networks: {
...(ALCHEMY_GOERLI_API_KEY &&
DEPLOYER_PRIVATE_KEY && {
goerli: {
url: `https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_GOERLI_API_KEY}`,
accounts: [DEPLOYER_PRIVATE_KEY]
}
}),
...(ALCHEMY_GOERLI_API_KEY &&
DEPLOYER_PRIVATE_KEY && {
sepolia: {
url: `https://eth-sepolia.g.alchemy.com/v2/${ALCHEMY_SEPOLIA_API_KEY}`,
accounts: [DEPLOYER_PRIVATE_KEY]
}
}),
...(DISABLE_AUTOMINING === 'true' && {
hardhat: {
mining: {
auto: false,
interval: [1000, 2000]
}
}
})
},
...(ETHERSCAN_API_KEY && {
etherscan: {
apiKey: {
goerli: ETHERSCAN_API_KEY,
sepolia: ETHERSCAN_API_KEY
}
}
}),
...(process.env.ETHERNAL_EMAIL &&
process.env.ETHERNAL_PASSWORD && {
ethernal: {
email: process.env.ETHERNAL_EMAIL,
password: process.env.ETHERNAL_PASSWORD,
uploadAst: true
}
})
};