LayerZero-v2 icon indicating copy to clipboard operation
LayerZero-v2 copied to clipboard

forge coverage fails to run on OApp

Open eugenPtr opened this issue 11 months ago • 3 comments

I am unable to run forge coverage in any foundry project integrating OApp or directly in the library's oapp folder

I get the following "Stack too deep error": image

Tried running it with the --ir-minimum and --via-ir flags without success.

Taiko managed to fix this by restructuring their data storage layout. I am not sure how easy would be to do this in LayerZero. Source

I believe it's important to be able to generate the coverage report for any dapp integrating LayerZero and I'm wondering what could potentially be a solution to this issue.

eugenPtr avatar Feb 27 '24 10:02 eugenPtr

+1 also have this issue

jordaniza avatar May 31 '24 08:05 jordaniza

// import {EndpointV2} from "@layerzerolabs/lz-evm-protocol-v2/contracts/EndpointV2.sol"; // import {SendUln302Mock as SendUln302} from "@lz-oapp-test/mocks/SendUln302Mock.sol"; // import {SimpleMessageLibMock} from "@lz-oapp-test/mocks/SimpleMessageLibMock.sol";

The above 3 libraries all generate compiler errors when trying to run coverage.

jordaniza avatar May 31 '24 08:05 jordaniza

https://github.com/foundry-rs/foundry/issues/3527

This error persists even with --ir-minimum

jordaniza avatar May 31 '24 08:05 jordaniza