Skip to content

Commit

Permalink
Add npm command to estimate gas
Browse files Browse the repository at this point in the history
  • Loading branch information
evercoinx committed Sep 2, 2024
1 parent c175e92 commit a0baa7a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const DEFENDER_TEAM_API_SECRET_KEY =
const FX_ROOT = process.env.FX_ROOT || "";
const FX_CHILD = process.env.FX_CHILD || "";
const CHECKPOINT_MANAGER = process.env.CHECKPOINT_MANAGER || "";
const REPORT_GAS = !!process.env.REPORT_GAS || false;

export {
DEPLOYER_PRIVATE_KEY,
Expand All @@ -44,4 +45,5 @@ export {
FX_ROOT,
FX_CHILD,
CHECKPOINT_MANAGER,
REPORT_GAS,
};
2 changes: 2 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
FX_ROOT,
FX_CHILD,
CHECKPOINT_MANAGER,
REPORT_GAS,
} from "./environment";

task("verifyMaticX", "MaticX contracts verification").setAction(
Expand Down Expand Up @@ -222,6 +223,7 @@ const config: HardhatUserConfig = {
"tunnel",
],
currency: "USD",
enabled: REPORT_GAS,
},
};

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"check": "hardhat check",
"test": "hardhat test --bail",
"test:ci": "hardhat test --parallel",
"gas": "cross-env REPORT_GAS=1 npm run test",
"analyze": "slitherin . --slither",
"analyze:ci": "slitherin --separated . --skip-clean --ignore-compile",
"clean": "hardhat clean",
Expand Down

0 comments on commit a0baa7a

Please sign in to comment.