F-2024-0013·compiler-target

Solidity version 0.8.20+ may not work on other chains due to PUSH0

Acknowledgedbridgenearrainbow-bridgegithub.com/Near-One/rainbow-token-connector
TL;DR

Solidity 0.8.20 defaults to the Shanghai EVM target which includes the PUSH0 opcode; deployment may fail on L2s that do not yet implement PUSH0.

Severity
INFO
Impact
LOW
Likelihood
LOW
Method
MManual review
CAT.
Complexity
LOW
Exploitability
LOW
02Section · Description

Description

The compiler for Solidity 0.8.20 switches the default target EVM version to Shanghai, which includes the new PUSH0 opcode. This opcode may not yet be implemented on all L2s, so deployment on these chains will fail. To work around this issue, use an earlier EVM version. While the project itself may or may not compile with 0.8.20, other projects with which it integrates or extends this project may, and those projects will have problems deploying these contracts and libraries.

03Section · Impact

Impact

The issue can lead to the contracts needing to be deployable on targeted chains.

04Section · Recommendation

Recommendation

We recommend using the correct Solidity version for each targeted chain.

05Section · Resolution

Resolution

Unresolved.

F-2024-0013

oog
zealynx

Smart Contract Security Digest

Monthly exploit breakdowns, audit checklists, and DeFi security research — straight to your inbox

© 2026 Zealynx