Skip to content

Commit

Permalink
chore: update hardhat gas reporter dependency (#36)
Browse files Browse the repository at this point in the history
## Description

This PR updates the `hardhat-gas-reporter` dependency to be able to
generate a json file with the info related to the gas report.

## Related Issue(s)

Closes #35

## Checklist

<!-- Please check if the PR fulfills these requirements. -->

-   [x] My code follows the style guidelines of this project
-   [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
-   [x] My changes generate no new warnings
- [x] I have run `yarn format` and `yarn compile` without getting any
errors
- [ ] I have added tests that prove my fix is effective or that my
feature works
-   [x] New and existing unit tests pass locally with my changes
  • Loading branch information
vplasencia authored Aug 5, 2024
1 parent 202754d commit 8fb3d4c
Show file tree
Hide file tree
Showing 16 changed files with 254 additions and 774 deletions.
1 change: 1 addition & 0 deletions packages/excubiae/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
COINMARKETCAP_API_KEY=
REPORT_GAS=false
REPORT_GAS_OUTPUT_JSON=false
5 changes: 4 additions & 1 deletion packages/excubiae/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import "@nomicfoundation/hardhat-toolbox"
import { HardhatUserConfig } from "hardhat/config"
import "dotenv/config"

const TEST_MNEMONIC = "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"

Expand All @@ -24,7 +25,9 @@ const hardhatConfig: HardhatUserConfig = {
},
gasReporter: {
currency: "USD",
enabled: process.env.REPORT_GAS === "true"
enabled: process.env.REPORT_GAS === "true",
outputJSONFile: "gas-report-excubiae.json",
outputJSON: process.env.REPORT_GAS_OUTPUT_JSON === "true"
},
typechain: {
target: "ethers-v6"
Expand Down
2 changes: 1 addition & 1 deletion packages/excubiae/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"chai": "^4.2.0",
"ethers": "^6.4.0",
"hardhat": "^2.19.4",
"hardhat-gas-reporter": "^1.0.8",
"hardhat-gas-reporter": "^2.2.0",
"prettier-plugin-solidity": "^1.3.1",
"solhint": "^3.3.6",
"solhint-plugin-prettier": "^0.1.0",
Expand Down
1 change: 1 addition & 0 deletions packages/imt/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
COINMARKETCAP_API_KEY=
REPORT_GAS=false
REPORT_GAS_OUTPUT_JSON=false
5 changes: 4 additions & 1 deletion packages/imt/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "@nomicfoundation/hardhat-toolbox"
import { HardhatUserConfig } from "hardhat/config"
import "./tasks/deploy-imt-test"
import "dotenv/config"

const hardhatConfig: HardhatUserConfig = {
solidity: {
Expand All @@ -13,7 +14,9 @@ const hardhatConfig: HardhatUserConfig = {
},
gasReporter: {
currency: "USD",
enabled: process.env.REPORT_GAS === "true"
enabled: process.env.REPORT_GAS === "true",
outputJSONFile: "gas-report-imt.json",
outputJSON: process.env.REPORT_GAS_OUTPUT_JSON === "true"
},
typechain: {
target: "ethers-v6"
Expand Down
2 changes: 1 addition & 1 deletion packages/imt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"chai": "^4.2.0",
"ethers": "^6.4.0",
"hardhat": "^2.19.4",
"hardhat-gas-reporter": "^1.0.8",
"hardhat-gas-reporter": "^2.2.0",
"poseidon-lite": "^0.2.0",
"prettier-plugin-solidity": "^1.3.1",
"solhint": "^3.3.6",
Expand Down
1 change: 1 addition & 0 deletions packages/lazy-imt/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
COINMARKETCAP_API_KEY=
REPORT_GAS=false
REPORT_GAS_OUTPUT_JSON=false
5 changes: 4 additions & 1 deletion packages/lazy-imt/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "@nomicfoundation/hardhat-toolbox"
import { HardhatUserConfig } from "hardhat/config"
import "./tasks/deploy-imt-test"
import "dotenv/config"

const hardhatConfig: HardhatUserConfig = {
solidity: {
Expand All @@ -13,7 +14,9 @@ const hardhatConfig: HardhatUserConfig = {
},
gasReporter: {
currency: "USD",
enabled: process.env.REPORT_GAS === "true"
enabled: process.env.REPORT_GAS === "true",
outputJSONFile: "gas-report-lazyimt.json",
outputJSON: process.env.REPORT_GAS_OUTPUT_JSON === "true"
},
typechain: {
target: "ethers-v6"
Expand Down
2 changes: 1 addition & 1 deletion packages/lazy-imt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"chai": "^4.2.0",
"ethers": "^6.4.0",
"hardhat": "^2.19.4",
"hardhat-gas-reporter": "^1.0.8",
"hardhat-gas-reporter": "^2.2.0",
"poseidon-lite": "^0.2.0",
"prettier-plugin-solidity": "^1.3.1",
"solhint": "^3.3.6",
Expand Down
1 change: 1 addition & 0 deletions packages/lazytower/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
COINMARKETCAP_API_KEY=
REPORT_GAS=false
REPORT_GAS_OUTPUT_JSON=false
5 changes: 4 additions & 1 deletion packages/lazytower/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import "@nomicfoundation/hardhat-toolbox"
import { HardhatUserConfig } from "hardhat/config"
import "./tasks/deploy-lazytower-test"
import "dotenv/config"

const hardhatConfig: HardhatUserConfig = {
solidity: "0.8.23",
gasReporter: {
currency: "USD",
enabled: process.env.REPORT_GAS === "true",
coinmarketcap: process.env.COINMARKETCAP_API_KEY
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
outputJSONFile: "gas-report-lazytower.json",
outputJSON: process.env.REPORT_GAS_OUTPUT_JSON === "true"
},
typechain: {
target: "ethers-v6"
Expand Down
2 changes: 1 addition & 1 deletion packages/lazytower/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"chai": "^4.2.0",
"ethers": "^6.4.0",
"hardhat": "^2.19.4",
"hardhat-gas-reporter": "^1.0.8",
"hardhat-gas-reporter": "^2.2.0",
"poseidon-lite": "^0.2.0",
"prettier-plugin-solidity": "^1.3.1",
"solhint": "^3.3.6",
Expand Down
1 change: 1 addition & 0 deletions packages/lean-imt/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
COINMARKETCAP_API_KEY=
REPORT_GAS=false
REPORT_GAS_OUTPUT_JSON=false
5 changes: 4 additions & 1 deletion packages/lean-imt/hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "@nomicfoundation/hardhat-toolbox"
import { HardhatUserConfig } from "hardhat/config"
import "./tasks/deploy-imt-test"
import "dotenv/config"

const hardhatConfig: HardhatUserConfig = {
solidity: {
Expand All @@ -13,7 +14,9 @@ const hardhatConfig: HardhatUserConfig = {
},
gasReporter: {
currency: "USD",
enabled: process.env.REPORT_GAS === "true"
enabled: process.env.REPORT_GAS === "true",
outputJSONFile: "gas-report-leanimt.json",
outputJSON: process.env.REPORT_GAS_OUTPUT_JSON === "true"
},
typechain: {
target: "ethers-v6"
Expand Down
2 changes: 1 addition & 1 deletion packages/lean-imt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"chai": "^4.2.0",
"ethers": "^6.4.0",
"hardhat": "^2.19.4",
"hardhat-gas-reporter": "^1.0.8",
"hardhat-gas-reporter": "^2.2.0",
"poseidon-lite": "^0.2.0",
"prettier-plugin-solidity": "^1.3.1",
"solhint": "^3.3.6",
Expand Down
Loading

0 comments on commit 8fb3d4c

Please sign in to comment.