# Solidity Compiler Versions

When developing for ONINO, one important consideration is the EVM version **compatibility of the Solidity compiler**. The ONINO chain’s EVM **does not yet support the new `PUSH0` opcode** introduced in Ethereum’s Shanghai upgrade. In Solidity 0.8.20 and above, the compiler by default targets the Shanghai EVM, which means it may produce bytecode containing the `PUSH0` instruction. ONINO’s current EVM (as of 2025) is based on a pre-Shanghai fork, so it **cannot execute contracts containing `PUSH0`**([it would result in an invalid opcode error](https://forum.openzeppelin.com/t/erc20-smart-contract-push0-and-evm-failed/38486)).

**What is PUSH0?** `PUSH0` is a new Ethereum Virtual Machine opcode (introduced via EIP-3855) that pushes the constant value 0 onto the stack. This opcode was added to make smart contract bytecode more efficient – previously, pushing a zero value required a `PUSH1 0x00`which uses slightly more gas and bytecode space. By having a dedicated instruction for zero, contracts can be a bit smaller and cheaper to deploy and run. However, because this opcode was only added in the Shanghai upgrade, networks that haven’t adopted Shanghai (like ONINO, among many others) will not recognize it.

**Recommendation:** Until ONINO implements support for Shanghai opcodes, developers should **compile their smart contracts with the `Paris` EVM version** target (the last Ethereum version before Shanghai) or use Solidity 0.8.19 or lower. In practice, this means adjusting your compiler settings. For example, in Hardhat you can set:

```
solidity: {
  version: "0.8.19",
  settings: { optimizer: {...}, evmVersion: "paris" }
}
```

This ensures the generated bytecode stays compatible with ONINO’s current EVM. If you are using Solidity 0.8.20+ explicitly, configure the compiler’s `evmVersion` to `"paris"` (which corresponds to the Merge upgrade, pre-Shanghai). This way, no PUSH0 opcodes will appear in your contract bytecode, and your deployments and transactions will run smoothly on ONINO.

In summary, as a developer on ONINO you have an Ethereum-like environment: you can use familiar tools (ethers.js, web3.js, wagmi, Hardhat, etc.), the network configuration (RPC, chain IDs) is straightforward for Mainnet and Testnet, and the main thing to watch out for is the current lack of Shanghai features like `PUSH0`. By using the appropriate compiler settings and network parameters detailed above, you can build, test, and deploy on ONINO with confidence. Happy building on ONINO!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onino.io/for-developers/solidity-compiler-versions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
