-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.bak.js
91 lines (86 loc) · 2.39 KB
/
hardhat.config.bak.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
require("@nomicfoundation/hardhat-toolbox")
require("@nomiclabs/hardhat-truffle5")
require("@nomiclabs/hardhat-ethers")
require("@nomiclabs/hardhat-etherscan")
require("@openzeppelin/hardhat-upgrades")
// require("hardhat-gas-reporter")
// require("hardhat-contract-sizer")
// require("hardhat-interface-generator")
require("@openzeppelin/hardhat-defender")
require("solidity-coverage")
require("dotenv").config()
const accounts = require("./hardhatAccountsList2k.js")
const accountsList = accounts.accountsList
const CoreDeployer = require("./scripts/deployment/deployer-core.js")
const { DeploymentTarget } = require("./scripts/deployment/deployer-common.js")
task("deploy-core-localhost", "Deploys contracts to Localhost").setAction(
async (_, hre) => await new CoreDeployer(hre, DeploymentTarget.Localhost).run()
)
task("deploy-core-goerli", "Deploys contracts to Goerli Testnet").setAction(
async (_, hre) => await new CoreDeployer(hre, DeploymentTarget.GoerliTestnet).run()
)
task("deploy-core-mainnet", "Deploys contracts to Mainnet").setAction(
async (_, hre) => await new CoreDeployer(hre, DeploymentTarget.Mainnet).run()
)
module.exports = {
paths: {
sources: "./contracts",
tests: "./test/trinity",
cache: "./cache",
artifacts: "./artifacts",
},
defender: {
apiKey: process.env.DEFENDER_TEAM_API_KEY,
apiSecret: process.env.DEFENDER_TEAM_API_SECRET_KEY,
},
solidity: {
compilers: [
{
version: "0.8.20",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
outputSelection: {
"*": {
"*": ["storageLayout"],
},
},
},
},
],
},
networks: {
hardhat: {
allowUnlimitedContractSize: true,
// accounts: [{ privateKey: process.env.DEPLOYER_PRIVATEKEY, balance: (10e18).toString() }, ...accountsList],
accounts: accountsList,
},
localhost: {
url: "http://localhost:8545",
gas: 20_000_000,
},
goerli: {
url: `${process.env.GOERLI_NETWORK_ENDPOINT}`,
accounts: [`${process.env.DEPLOYER_PRIVATEKEY}`],
},
mainnet: {
url: `${process.env.ETHEREUM_NETWORK_ENDPOINT}`,
accounts: [`${process.env.DEPLOYER_PRIVATEKEY}`],
},
},
etherscan: {
apiKey: `${process.env.ETHERSCAN_API_KEY}`,
},
mocha: { timeout: 12_000_000 },
rpc: {
host: "localhost",
port: 8545,
},
gasReporter: {
enabled: false, // `${process.env.REPORT_GAS}`,
currency: "USD",
coinmarketcap: `${process.env.COINMARKETCAP_KEY}`,
},
}