Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Fork of [Foundry Compilers](https://github.com/foundry-rs/compilers) (the compil

## What This Does

Foundry Compilers provides Solidity and Vyper compilation, caching, dependency resolution, and artifact handling for the Foundry toolchain. Seismic's fork adds the **Mercury EVM version** — when the Solc version is >= 0.8.28, all EVM version normalization resolves to `Mercury`, which enables confidential storage opcodes (`CSTORE`/`CLOAD`) on Seismic's chain. The change is minimal: a constant, a new enum variant, and normalization logic.
Foundry Compilers provides Solidity and Vyper compilation, caching, dependency resolution, and artifact handling for the Foundry toolchain. Seismic's fork adds the **Mercury EVM version** — when the Solc version is >= 0.8.31, all EVM version normalization resolves to `Mercury`, which enables confidential storage opcodes (`CSTORE`/`CLOAD`) on Seismic's chain. The change is minimal: a constant, a new enum variant, and normalization logic.

## Build

Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Seismic Foundry Compilers

This repository contains Seismic's fork of Foundry Compilers

The upstream repository lives [here](https://github.com/foundry-rs/compilers). This fork is up-to-date with it through commit `8c5683d`. You can see this by viewing the [main](https://github.com/SeismicSystems/seismic-compilers/tree/main) branch on this repository.

You can view all of our changes vs. upstream on this [pull request](https://github.com/SeismicSystems/seismic-compilers/pull/1). The sole purpose of this PR is display our diff; it will never be merged in to the main branch of this repo.
This repository contains Seismic's fork of Foundry Compilers.

## Main changes

We simply enabled the Seismic Mercury [Specification](https://github.com/SeismicSystems/seismic-revm?tab=readme-ov-file#mercury-specification--seismics-revm)
Super minimal:
- Added the Seismic Mercury [Specification](https://github.com/SeismicSystems/seismic-revm?tab=readme-ov-file#mercury-specification--seismics-revm) to the EvmVersion enum.
- This is only used by foundry so that different versions can be specified/requests, and these are serialized and passed on to [ssolc](https://github.com/SeismicSystems/seismic-solidity). Currently our seismic-solidity fork is very minimal and only supports the Mercury spec so this feels overkill, but the structure is relatively easy to maintain and it will be useful in the future.
- Added the ssolc commit version to the printed output used by foundry. Given that ssolc doesn't currently adhere and support multiple semvers, it is important for debugging to know exactly which compiler build foundry is using to compile contracts.

## Structure

The upstream repository lives [here](https://github.com/foundry-rs/compilers). This fork is up-to-date with it through commit `8c5683d`. You can see this by viewing the [main](https://github.com/SeismicSystems/seismic-compilers/tree/main) branch on this repository. You can view all of our changes vs. upstream on this [here](https://github.com/SeismicSystems/seismic-compilers/compare/main...seismic).

Seismic's forks of the [reth](https://github.com/paradigmxyz/reth) stack all have the same branch structure:
- `main` or `master`: this branch only consists of commits from the upstream repository. However it will rarely be up-to-date with upstream. The latest commit from this branch reflects how recently Seismic has merged in upstream commits to the seismic branch
- `seismic`: the default and production branch for these repositories. This includes all Seismic-specific code essential to make our network run
Expand Down Expand Up @@ -83,5 +84,3 @@ let output = project.compile().unwrap();
// Tell Cargo that if a source file changes, to rerun this build script.
project.rerun_if_sources_changed();
```


2 changes: 0 additions & 2 deletions crates/compilers/src/compilers/vyper/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ use std::{
collections::BTreeSet,
path::{Path, PathBuf},
};
// TODO: remove
#[allow(deprecated)]
use winnow::{
ascii::space1,
combinator::{alt, opt, preceded},
Expand Down
3 changes: 3 additions & 0 deletions crates/compilers/src/report/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ pub fn extract_short_commit(version: &Version) -> Option<&str> {

/// Format version with optional short commit hash for display.
/// Returns e.g. "0.8.31 (676bdec)" or "0.8.31" if no commit metadata.
/// Seismic note: changed the formatting here to show the commit version given that ssolc
/// is not mature enough to follow proper semver so its useful to know which exact commit foundry is
/// using.
pub fn format_version_with_commit(version: &Version) -> String {
if let Some(hash) = extract_short_commit(version) {
format!("{}.{}.{} ({hash})", version.major, version.minor, version.patch)
Expand Down