-
Notifications
You must be signed in to change notification settings - Fork 512
Open
Description
npx hardhat coverage --show-stack-traces
Version
=======
> solidity-coverage: v0.8.12
Instrumenting for coverage...
=============================
> APIConsumer.sol
> AutomationCounter.sol
> PriceConsumerV3.sol
> RandomNumberConsumerV2Plus.sol
> RandomNumberDirectFundingConsumerV2Plus.sol
> test/VRFCoordinatorV2_5Mock.sol
> VRFV2PlusWrapper.sol
Coverage skipped for:
=====================
> test/fuzzing/AutomationCounterEchidnaTest.sol
> test/MockLinkToken.sol
> test/MockOracle.sol
> test/MockV3Aggregator.sol
Compilation:
============
CompilerError: Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables. When compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack. Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables.
after checking out, npm install, npx hardhat compile, npx hardhat test, I am trying to get the code coverage.
It fails with stack too deep. In order to solve the above issue, I tinkered around with
- enabling the via-ir flag
- excluding more/all of the .sol files in .solcover.js
- adding a @skip-on-coverage to the test definitions (
it("testname [ @skip-on-coverage ]", async () => {})
)
but with none of those i was able to get code coverage running
Any hint is appreciated to help me understand how to get code coverage for the code to run.
Metadata
Metadata
Assignees
Labels
No labels