Hardhat gas reporter is reporting an empty file #6716
Unanswered
dashDebasis123
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi all! This codebase is no longer maintained by me. I recommend you checking out cyfrin updraft instead! This question might make sense to ask on stack exchange eth |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@PatrickAlphaC
While running the hh test to print the gas report it is printing the empty txt file
`require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();
require ("hardhat-gas-reporter");
// require("@nomiclabs/hardhat-waffle");
const { SEPOLIA_RPC_URL, SEPOLIA_PRIVATE_KEY, ETHERSCAN_API_KEY } = process.env;
module.exports = {
solidity: "0.8.24",
};
`
test file
`const { ethers } = require("hardhat");
const {expect, assert} = require("chai");
const { SEPOLIA_RPC_URL, SEPOLIA_PRIVATE_KEY } = process.env;
const provider = new ethers.JsonRpcProvider(SEPOLIA_RPC_URL);
const fs = require('fs');
const wallet = new ethers.Wallet(SEPOLIA_PRIVATE_KEY, provider);
describe("SimpleStorage", function () {
let SimpleStorageFactory, simpleStorage;
const metadata = JSON.parse(fs.readFileSync('./artifacts/contracts/SimpleStorage.sol/SimpleStorage.json').toString());
})
`
Beta Was this translation helpful? Give feedback.
All reactions