-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.js
44 lines (42 loc) · 1.26 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
require("@nomicfoundation/hardhat-toolbox");
require('@openzeppelin/hardhat-upgrades');
require("@nomicfoundation/hardhat-foundry");
require("dotenv").config();
/** @type import('hardhat/config').HardhatUserConfig */
const createConfig = (env) => {
if(env != 'test') {
const privateKey = env === 'prod' ? process.env.PRIVATE_KEY_PRODUCTION : process.env.PRIVATE_KEY;
return {
solidity: "0.8.28",
evm_version: "paris",
networks: {
arbitrum: {
url: process.env.ETH_NODE_URI_ARBITRUM,
accounts: [privateKey],
protocolOwner: process.env.PROTOCOL_OWNER,
managerOwner: process.env.MANAGER_OWNER,
tokenRegistryOwner: process.env.TOKEN_REGISTRY_OWNER,
},
celo: {
url: process.env.ETH_NODE_URI_CELO,
accounts: [privateKey],
protocolOwner: process.env.PROTOCOL_OWNER,
managerOwner: process.env.MANAGER_OWNER,
tokenRegistryOwner: process.env.TOKEN_REGISTRY_OWNER,
}
// Add more networks here
}
}
} else {
return {
solidity: "0.8.28",
evm_version: "paris",
networks: {
hardhat: {
chainId: 1337
}
}
}
}
}
module.exports = createConfig(process.env.HH_ENVIRONMENT);