Skip to content

Conversation

@marian-radu
Copy link
Contributor

Abstract contracts and interfaces don't produce bytecode. The following test was failing because it expected bytecode when parsing the Context contract (an abstract contract) output.

	Running /Users/radumarian/revive-differential-tests/resolc-compiler-tests/fixtures/solidity/complex/defi/UniswapV2Router01/UniswapV2Pair/ERC20/test.json - Y M0
running 1 tests
test case_idx_0 ... FAILED, Failed to create the drivers for the various platforms: Failed to create driver for revive-dev-node-polkavm-resolc: Failed to initialize the execution state of the platform: Failed to produce the pre-linking compiled contracts: Compilation callback failed (cache miss path): Unexpected - Contract compiled with resolc has no bytecode

@marian-radu marian-radu requested a review from 0xOmarA January 17, 2026 09:16
.evm
.and_then(|evm| evm.bytecode.clone())
.context("Unexpected - Contract compiled with resolc has no bytecode")?;
else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we only apply this change to resolc but not to solc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be a difference in behavior between resolc and solc: solc returns empty bytecode if the contract is an interface, while resolc skips the bytecode key entirely.

@marian-radu marian-radu added this pull request to the merge queue Jan 19, 2026
Merged via the queue into main with commit 87758b4 Jan 19, 2026
8 checks passed
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.

3 participants