Skip to content

tinom9/evm-probes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EVM Version Checker

Solidity probe contracts to detect supported EVM versions by testing opcodes and precompiles on EVM chains.

How It Works

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

Probes

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

Usage

pnpm install
pnpm build

Check a single chain

tsx src/main.ts check <rpc-url>

Prints EVM version support to the console.

Check all chains

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 table
  • md — Markdown table
  • json — Machine-readable JSON

Tests

pnpm test

Requires Docker. Spins up Anvil at each hardfork and verifies all probes behave correctly.

Requirements

  • Foundry (for Solidity compilation)
  • Node.js 18+
  • pnpm

About

Solidity contract probes to detect EVM chains version support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors