feat: coverage for constructors#7661
Merged
Merged
Conversation
0da3b4a to
1efaae2
Compare
mattsse
approved these changes
Apr 15, 2024
| pub build_data: BuildData, | ||
| /// Known fully linked contracts. | ||
| pub highlevel_known_contracts: ArtifactContracts<ContractBytecodeSome>, | ||
| pub known_contracts: ContractsByArtifact, |
2 tasks
This was referenced Apr 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Closes #3453
Closes #1963
Solution
This PR includes general refactor of code using
ContractsByArtifactsextending it to contain both creation and runtime code. Currently it can only fit one bytecode type thus resulting in script code generating differentContractsByArtifactsobject for different purposes making code a bit harder to navigate. This allowed to add more context toMultiContractRunner::known_contractsand simplify scripting code a bit by storingContractsByArtifactsdirectly instead of generating each time.Added creation code to
ContractsByArtifactsallowed us to map collected hitmaps for creation codes to artifacts viafind_by_creation_codefn, thus extending coverage to also process creation code just required duplicating anchors discovery and processing logic