Require call target for multi-contract tests - #16897
Open
erak wants to merge 2 commits into
Open
Conversation
erak
force-pushed
the
test-target-contract
branch
from
August 12, 2026 21:56
a8d743d to
d8c92fe
Compare
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.
Part of #16394.
Description
Currently, the
SolidityExecutionFrameworkrelies on the last compiled contract theCompilerStackknows of. With #16394, we will use the compilers' standard JSON output, which only exposes the compilation order via the AST. Since exporting and parsing the AST JSON output for every test is very expensive, we aim to remove this cost by requiring explicit definition of the contract under test (the contract that is the target of function calls) for tests that define more than one contract.This means that all semantic tests that define more than one contract must now define which contract should be called. This is done by either specifying the contract programmatically in an end-to-end test or by setting the
targetContractin a semantic test file.For tests that only define one contract, this one will be called and specifying the target contract is not required.
AI Disclosure
targetContractsetting to all multi-contract tests