From 1db20ea2cf66f909479a0d01899dbd5fada04e54 Mon Sep 17 00:00:00 2001 From: dwiky22 Date: Thu, 4 Jun 2026 20:56:37 +0700 Subject: [PATCH] docs: add EVM compatibility notes for PUSH0 opcode (fixes #109) --- docs/running-an-arc-node.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/running-an-arc-node.md b/docs/running-an-arc-node.md index 93f04f9..50d8b61 100644 --- a/docs/running-an-arc-node.md +++ b/docs/running-an-arc-node.md @@ -856,3 +856,30 @@ can restart without `--full`. > issues on constrained machines. If you encounter memory pressure, enable > backpressure (see [System Requirements](#system-requirements) section) and remove > `--full` after the first successful start. +## EVM Compatibility Notes + +### PUSH0 Opcode Not Supported + +Arc Testnet does not support the `PUSH0` opcode (introduced in EVM Shanghai). +Solidity >= 0.8.20 defaults to emitting `PUSH0` for zero-valued stack pushes. + +Contracts compiled with `evmVersion: "shanghai"`, `"cancun"`, or `"prague"` will +deploy successfully but all calls will revert silently with no error data. + +**Fix:** Always set `evmVersion: "paris"` in your compilation config. + +For Hardhat (`hardhat.config.ts`): +```ts +solidity: { + version: '0.8.29', + settings: { + optimizer: { enabled: true, runs: 200 }, + evmVersion: 'paris', // required for Arc Testnet + }, +}, +``` + +For Foundry (`foundry.toml`): +```toml +evm_version = "paris" +``` \ No newline at end of file