Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forge coverage fails to run on OApp #42

Open
eugenPtr opened this issue Feb 27, 2024 · 3 comments · Fixed by LayerZero-Labs/devtools#791 · May be fixed by #92
Open

forge coverage fails to run on OApp #42

eugenPtr opened this issue Feb 27, 2024 · 3 comments · Fixed by LayerZero-Labs/devtools#791 · May be fixed by #92

Comments

@eugenPtr
Copy link

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.

@jordaniza
Copy link

+1 also have this issue

@jordaniza
Copy link

// 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
Copy link

foundry-rs/foundry#3527

This error persists even with --ir-minimum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment