Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 34 additions & 3 deletions docs/solidity.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,40 @@

## Compatibility

- mainnet: v0.8.28
- testnet: v0.8.28
- devnet: v0.8.28
XDPoSChain compatibility is determined by the target EVM version, not by a
single Solidity compiler version.

Current network activation block numbers:

| Network | Cancun | Prague | Osaka |
| :-----: | -------: | :----: | :---: |
| mainnet | 98802000 | TBD | TBD |
| testnet | 71551800 | TBD | TBD |
| devnet | 43200 | TBD | TBD |

Recommended compiler settings:

| Solidity version | Default target EVM | Deploying to current mainnet/testnet/devnet |
| ---------------- | ------------------ | ------------------------------------------- |
| 0.8.25 to 0.8.29 | cancun | default settings are fine |
| 0.8.30 | prague | generally compatible (see note 2) |
| 0.8.31 and later | osaka | pin `evmVersion` (see note 3) |

Notes:

1. `evmVersion` mainly affects opcode availability and code generation strategy,
not Solidity language syntax itself.
2. (0.8.30) pin `evmVersion: "cancun"` only if you need reproducible outputs
with existing Cancun-targeted artifacts.
3. (0.8.31+) set `evmVersion` to `cancun` (or `prague` after Prague activation)
unless your target network has Osaka.
4. The repository contains fixtures generated by `solc 0.8.28`, but that is not
a hard upper bound for supported Solidity versions.
5. If Prague is activated on XDPoSChain in the future, Solidity 0.8.30 and later
can target it by setting `evmVersion: "prague"` explicitly.
6. Solidity 0.8.31 introduced support for the `CLZ` opcode (EIP-7939), which is
part of Osaka, not Prague. The strong pinning warning applies to Osaka-only
features (such as CLZ), not to 0.8.30's default `prague` target by itself.

## Special variables

Expand Down
Loading