-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhardhat.config.ts
114 lines (107 loc) · 3.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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import "@nomicfoundation/hardhat-toolbox"
import "@nomiclabs/hardhat-truffle5"
import "@nomiclabs/hardhat-ethers"
import "@nomiclabs/hardhat-etherscan"
import "@openzeppelin/hardhat-upgrades"
import "@openzeppelin/hardhat-defender"
import "solidity-coverage"
import "@nomicfoundation/hardhat-foundry"
import { task } from "hardhat/config"
require("dotenv").config()
const accounts = require("./hardhatAccountsList2k.js")
const accountsList = accounts.accountsList
import { CoreDeployer, DeploymentTarget } from "./scripts/deployment/deploy-core"
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-arbitrum-goerli", "Deploys contracts to Arbitrum-Goerli Testnet").setAction(
async (_, hre) => await new CoreDeployer(hre, DeploymentTarget.ArbitrumGoerliTestnet).run()
)
task("deploy-core-mainnet", "Deploys contracts to Mainnet").setAction(
async (_, hre) => await new CoreDeployer(hre, DeploymentTarget.Mainnet).run()
)
task("deploy-core-arbitrum", "Deploys contracts to Arbitrum").setAction(
async (_, hre) => await new CoreDeployer(hre, DeploymentTarget.Arbitrum).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.19",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
outputSelection: {
"*": {
"*": ["storageLayout"],
},
},
},
},
],
},
networks: {
hardhat: {
allowUnlimitedContractSize: true,
// accounts: [{ privateKey: process.env.DEPLOYER_PRIVATEKEY, balance: (10e18).toString() }, ...accountsList],
accounts: accountsList,
},
// Setup for testing files in test/trinity-fork:
// hardhat: {
// accounts: accountsList,
// chainId: 42161,
// forking: {
// url: "https://arb1.arbitrum.io/rpc",
// blockNumber: 133331300,
// },
// },
localhost: {
url: "http://localhost:8545",
gas: 20_000_000,
},
goerli: {
url: `${process.env.GOERLI_NETWORK_ENDPOINT}`,
accounts: [`${process.env.DEPLOYER_PRIVATEKEY}`],
},
arbitrum_goerli: {
url: `${process.env.ARBITRUM_GOERLI_NETWORK_ENDPOINT}`,
accounts: [`${process.env.DEPLOYER_PRIVATEKEY}`],
},
arbitrum: {
url: `${process.env.ARBITRUM_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}`,
},
}