EVM Bytecode Interpreter FAQ

The following questions are related to usage of the EVM Bytecode Interpreter.

Can I use default Foundry instead of Foundry-zksync?

Yes. But for scripts execution (forge script ...) it's required to use the --skip-simulation flag. This is necessary because underlying EraVM uses its own native gas, but foundry performs simulation against native EVM. This can lead to underestimated gas limit value.

Can I use Hardhat without the hardhat-zksync plugin?

Yes, Hardhat works without ZKsync-specific plugins.

What is the EVM version used by the EVM Interpreter?

The EVM interpreter targets Cancun.

Given that on EraVM contract deployment is done via the ContractDeployer, how does deployment work using the EVM Interpreter?

You can deploy contracts just like on Ethereum (e.g., a transaction without field to and with the contract init code as calldata) and use tools like Hardhat and Foundry out of the box (no plugins needed).

How does the interpreter contract get invoked on execution?

Invoking the EVM interpreter is handled behind the scenes by the protocol. Developers don’t need to take any extra steps. If you want to learn more, check the protocol documentation.

Are EVM-bytecode contracts and EraVM-bytecode contracts allowed to interact with each other transparently?

Contracts deployed with EVM bytecode can interact with contracts deployed with EraVM bytecode, except for delegate calls, which are prohibited between EraVM and EVM bytecode contracts.

Find more details in EraVM-EVM interactions.

Will address derivation with regular create and create2 be the same as on other EVM chains?

Yes.

Is the EVM interpreter 100% compatible with EVM?

No. Although interpretation covers most developers' needs, there are limitations due to the underlying EraVM, such as unsupported opcodes or gas differences. Full EVM equivalence is expected with the next proving system in 2025.

See differences from Ethereum (Cancun) in the documentation.

What's the behavior of block.gaslimit? Does it return the batch limit or the transaction limit?

It returns 1125899906842624n directly from underlying EraVM. In practice this is meaningless value and should not be used. This differs from the value returned by EVM chains: 36000000n.

Can I send an L1-L2 transaction to deploy EVM bytecode contracts?

EVM contracts can't be deployed directly as from EOA, as requestL2TransactionDirect requires a to field in the transaction and EVM bytecode deployments omit this field. But L1-L2 transaction can call any kind of factory contract, including Create2 factories.

How do I verify EVM contracts?

Contract verification must be done using ZKsync's native block explorer API and use of the following endpoints are required:

Important: Etherscan does not support ZKsync EVM contract verification at this time.

When verifying with Foundry, be aware that it reports an Etherscan-style URL like https://sepolia-era.zksync.network by default.

This is due to how Foundry formats the verifier endpoint, even if you’ve correctly set the correct API (e.g., --verifier-url https://block-explorer-api.sepolia.zksync.dev/api).


Made with ❤️ by the ZKsync Community