Skip to content

Commit 2e97508

Browse files
authored
Add testGas command (chiru-labs#44)
* Update hardhat.config.js * Update package.json
1 parent df11252 commit 2e97508

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

hardhat.config.js

+13-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@ if (process.env.REPORT_GAS) {
99
* @type import('hardhat/config').HardhatUserConfig
1010
*/
1111
module.exports = {
12-
solidity: "0.8.11",
12+
solidity: {
13+
version: "0.8.11",
14+
settings: {
15+
optimizer: {
16+
enabled: true,
17+
runs: 800,
18+
},
19+
},
20+
},
1321
gasReporter: {
14-
currency: 'USD',
15-
}
22+
currency: "USD",
23+
gasPrice: 100,
24+
showTimeSpent: true,
25+
},
1626
};

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"scripts": {
1111
"node": "hardhat node",
1212
"test": "hardhat test",
13+
"testGas": "REPORT_GAS=true npx hardhat test",
1314
"lint": "npm run lint:js && npm run lint:sol",
1415
"lint:js": "eslint --ignore-path .gitignore . --fix",
1516
"lint:sol": "prettier --write \"contracts/**/*.sol\""

0 commit comments

Comments
 (0)