Skip to content

[Arc Testnet quirk] Contracts compiled with PUSH0 (EVM ≥ Shanghai) are rejected — use evmVersion: paris #4

Description

@osr21

Symptom

Deploying a Solidity contract compiled with evmVersion: "shanghai" (or later — including the default in recent solc versions) silently fails on Arc Testnet. The deployment transaction is accepted but the contract creation reverts with no error data, leaving an empty address.

The same contract compiled with evmVersion: "paris" deploys and works correctly.

Root cause

EVM Shanghai introduced the PUSH0 opcode (0x5f). Arc Testnet's EVM does not support PUSH0. Solidity ≥ 0.8.20 emits PUSH0 by default for stack zero-pushes, making all contracts compiled without --evm-version paris incompatible.

Affected tools

Tool Fix
solc CLI --evm-version paris
Hardhat evmVersion: 'paris' in solidity.settings
Foundry evm_version = "paris" in foundry.toml
Remix Compiler → Advanced Settings → EVM Version → paris

Verification

Check your compiled bytecode for 0x5f (PUSH0). If it appears, recompile with paris.

# Check for PUSH0 in bytecode
echo "<bytecode>" | grep -o '5f' | wc -l

Also affects

  • Avalanche Fuji (same restriction — PUSH0 not supported on C-Chain EVM as of this writing)
  • Any chain with EVM < Shanghai

Notes

A subtle variant: Solidity constructor patterns with two immutable variables generate a 0x60c0 init code prefix (two-immutable pattern) that also silently reverts on Arc and Fuji, even with paris evmVersion. Keep the second variable as a constant instead of immutable to stay on the single-immutable 0x60a0 pattern.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions