Skip to content

Link libraries during coverage report generation#724

Merged
anishnaik merged 4 commits intomasterfrom
library-link-during-report
Nov 25, 2025
Merged

Link libraries during coverage report generation#724
anishnaik merged 4 commits intomasterfrom
library-link-during-report

Conversation

@samalws-tob
Copy link
Copy Markdown
Contributor

Fixes a bug where some library linked contracts weren't getting coverage shown in coverage report
So I think what's going on is: if the base contract (say A) deploys other contracts (say B), we link A's init bytecode, causing B's init bytecode to also get linked since it's included in A's. This is all well and good when running the fuzzer, but when generating coverage reports we look at B's bytecode directly, so we need to link that directly in order to get the correct bytecode in order to grab coverage for B
We also add an extra map in the fuzzer struct to track which libraries got deployed where (because it used to be a local variable in a function, now we need to persist until report generation)

@anishnaik anishnaik merged commit c6b7051 into master Nov 25, 2025
4 checks passed
@anishnaik anishnaik deleted the library-link-during-report branch November 25, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants