-
Notifications
You must be signed in to change notification settings - Fork 54
/
hardhat.config.js
117 lines (114 loc) · 3.45 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
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
114
115
116
117
/*-
*
* Hedera Smart Contracts
*
* Copyright (C) 2022-2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
require('hardhat-abi-exporter');
require('@openzeppelin/hardhat-upgrades');
require('@nomicfoundation/hardhat-foundry');
require('@nomicfoundation/hardhat-chai-matchers');
const {
OPERATOR_ID_A,
OPERATOR_KEY_A,
NETWORKS,
PRIVATE_KEYS,
} = require('./utils/constants');
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
mocha: {
timeout: 3600000,
color: true,
failZero: Boolean(process.env.CI),
forbidOnly: Boolean(process.env.CI),
reporter: 'mocha-multi-reporters',
reporterOption: {
reporterEnabled: 'spec, mocha-junit-reporter',
mochaJunitReporterReporterOptions: {
mochaFile: 'test-results.[hash].xml',
includePending: true,
outputs: true,
},
},
},
solidity: {
version: '0.8.24',
settings: {
optimizer: {
enabled: true,
runs: 500,
},
evmVersion: 'cancun',
},
},
abiExporter: {
path: './contracts-abi',
runOnCompile: true,
},
defaultNetwork: NETWORKS.local.name,
networks: {
local: {
url: NETWORKS.local.url,
accounts: PRIVATE_KEYS,
chainId: NETWORKS.local.chainId,
sdkClient: {
operatorId: OPERATOR_ID_A,
operatorKey: OPERATOR_KEY_A,
networkNodeUrl: NETWORKS.local.networkNodeUrl,
nodeId: NETWORKS.local.nodeId,
mirrorNode: NETWORKS.local.mirrorNode,
},
},
testnet: {
url: NETWORKS.testnet.url,
accounts: PRIVATE_KEYS,
chainId: NETWORKS.testnet.chainId,
sdkClient: {
operatorId: OPERATOR_ID_A,
operatorKey: OPERATOR_KEY_A,
networkNodeUrl: NETWORKS.testnet.networkNodeUrl,
nodeId: NETWORKS.testnet.nodeId,
mirrorNode: NETWORKS.testnet.mirrorNode,
},
},
previewnet: {
url: NETWORKS.previewnet.url,
accounts: PRIVATE_KEYS,
chainId: NETWORKS.previewnet.chainId,
sdkClient: {
operatorId: OPERATOR_ID_A,
operatorKey: OPERATOR_KEY_A,
networkNodeUrl: NETWORKS.previewnet.networkNodeUrl,
nodeId: NETWORKS.previewnet.nodeId,
mirrorNode: NETWORKS.previewnet.mirrorNode,
},
},
besu_local: {
url: NETWORKS.besu.url,
allowUnlimitedContractSize: NETWORKS.besu.allowUnlimitedContractSize,
blockGasLimit: NETWORKS.besu.blockGasLimit,
gas: NETWORKS.besu.gas,
timeout: NETWORKS.besu.timeout,
chainId: NETWORKS.besu.chainId,
accounts: [
// private keys are configured in the genesis file https://github.com/hyperledger/besu/blob/main/config/src/main/resources/dev.json#L20
'0xae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f',
'0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3',
'0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63'
],
},
},
};