Solidity probe contracts to detect supported EVM versions by testing opcodes and precompiles on EVM chains.
Each probe contract uses opcodes or precompiles introduced in a specific EVM version. When deployed to a chain:
- Success → The chain supports that EVM version
- Revert → The chain doesn't support the required opcodes/precompiles
| Version | Opcodes/Precompiles | Probe |
|---|---|---|
| London | BASEFEE |
BasefeeProbe.sol |
| Shanghai | PUSH0 |
Push0Probe.sol |
| Cancun | MCOPY, TSTORE, TLOAD, BLOBBASEFEE, BLOBHASH |
McopyProbe.sol, TransientStorageProbe.sol, BlobProbe.sol |
| Prague | BLS12-381 precompiles (0x0B-0x11) | Bls12381Probe.sol |
| Osaka | CLZ |
ClzProbe.sol |
pnpm install
pnpm buildtsx src/main.ts check <rpc-url>Prints EVM version support to the console.
tsx src/main.ts all [--format html|md|json]Checks all chains from viem/chains and writes results to results-<timestamp>.<ext>.
html(default) — HTML tablemd— Markdown tablejson— Machine-readable JSON
pnpm testRequires Docker. Spins up Anvil at each hardfork and verifies all probes behave correctly.
- Foundry (for Solidity compilation)
- Node.js 18+
- pnpm