1) enable reporter for imported contracts 2) gas-reporter discrepancies with mainnet
See original GitHub issueHi @cgewecke ,
I realized that hardhat-gas-reporter
only seems to report for contracts who were compiled with hardhat
and thus have certain files associated with them in artifacts/
.
Is this correct?
In our integration testing we make use of forking
and thus instantiate many contracts with await ethers.getContractAt(abi, addresss)
, where the abi
is in a pre-compiled/
folder.
It would be amazing if hardhat-gas-reporter
would also report gas usage of methods called on those instances.
What would need to change for that to happen?
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (7 by maintainers)
Top Results From Across the Web
upgrades.deployProxy did *not* deploy proxy (confused, fun ...
I have recently deployed a contract to the Ethereum Mainnet that I ... Obtain one at https://etherscan.io/ apiKey: etherScan }, gasReporter: ...
Read more >hardhat-gas-reporter - UNPKG
The CDN for hardhat-gas-reporter. ... 1, import fs from "fs". 2, import path from "path" ... 41, * Filters out contracts to exclude...
Read more >How to deploy your first smart contract on Ethereum ... - StErMi
Configure Hardhat to compile, deploy, test, and debug your Solidity code; Write a smart contract; Test your smart contract; Deploy your ...
Read more >Ashish Kumar Singh on LinkedIn: #solidity #blockchain #ethereum ...
1. How to use a Library? You can either use an already deployed libraries like 'SafeMath' or 'Counters' by simply importing it, and...
Read more >How to deploy your first smart contract on Ethereum with ...
Shall we proceed? What are you going to learn today? Configure Hardhat to compile, deploy, test, and debug your Solidity code; Write a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gitpusha The
remoteContracts
option is now published with1.0.2
. And I suspect the discrepancy in gas readings is only fixable at hardhat.Going to close this for now. Thanks for reporting all this stuff though.
Here in the contract I shared you can see the
console.logs
.And here is the TX from mainnet which is almost identical to the
execViaRoute0AndOpenVault
test transaction: https://etherscan.io/tx/0xdc810ac1cdd34a613ac739eea49807f62c17ba31ec9b1c5516837c07c35c1ab6As you can see
gasUsed
is2,215,931
here which is closer to theconsole.log
value.