EVM differences on Lumia
You're porting a contract written for Ethereum (or another EVM chain) to Lumia and need to know where the zkEVM's behavior diverges from what you're used to.
Who this is for: developers deploying existing Solidity contracts on Lumia, especially anything using low-level opcodes, SELFDESTRUCT, or a hash/pairing precompile. Prerequisites: Smart Contracts on Lumia. Time: 5 minutes to read; longer if you need to rewrite affected code.
The short version
Lumia's zkEVM supports the EVM instruction set with a small number of modified opcodes and three unsupported ones, plus a reduced precompile set. The full, current table lives at /reference/evm-opcodes. This page explains why it matters and doesn't repeat the table.
What to check before you deploy
Modified opcodes: these still work, but don't behave the way they do on Ethereum L1:
SELFDESTRUCTis removed and replaced bySENDALL. If your contract (or an inherited library) relies onSELFDESTRUCTto reclaim funds or as an upgrade/kill-switch mechanism, that code path needs rewriting, not just redeploying.EXTCODEHASHreads from the zkEVM state tree, not raw bytecode the way you may be assuming.DIFFICULTYalways returns0. If any code branches on difficulty (rare, but seen in old randomness hacks), it will behave differently.BLOCKHASHreturns all previous block hashes, not just the last 256. Do not assume the Ethereum L1 256-block window applies.NUMBERreturns the number of processable transactions, not a conventional block number in the way some contracts assume. Check any logic that does arithmetic onblock.number.
Unsupported opcodes: using these will fail, full stop. SHA256, BLAKE, PAIRINGS are not supported. A contract or an imported library (some ZK/aggregate-signature libraries call these) that touches any of the three will not deploy or will revert at call time.
Precompiles: only ecRecover and identity are supported; every other precompile address reverts. This affects anything relying on modexp, the bn256/alt_bn128 pairing precompiles (common in some ZK-verifier and BLS-signature libraries), or ripemd160.
Verify it worked
Compile and deploy on Beam testnet first (see /build/smart-contracts/deploy-with-hardhat). If deployment or a specific call reverts with no clear reason, check whether the reverting code path touches one of the opcodes/precompiles above before assuming it's a logic bug.
Troubleshooting
Was this helpful?