Skip to content

Require call target for multi-contract tests - #16897

Open
erak wants to merge 2 commits into
developfrom
test-target-contract
Open

Require call target for multi-contract tests#16897
erak wants to merge 2 commits into
developfrom
test-target-contract

Conversation

@erak

@erak erak commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Part of #16394.

Description

Currently, the SolidityExecutionFramework relies on the last compiled contract the CompilerStack knows 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 targetContract in 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

  • assisted with adding the targetContract setting to all multi-contract tests

@erak erak changed the title Specify the contract under test explicitly Require target for multi-contract semantic tests Aug 7, 2026
@erak erak changed the title Require target for multi-contract semantic tests Require call target for multi-contract semantic tests Aug 7, 2026
@erak erak changed the title Require call target for multi-contract semantic tests Require call target for multi-contract tests Aug 7, 2026
@erak
erak force-pushed the test-target-contract branch from a8d743d to d8c92fe Compare August 12, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants