diff --git a/CLAUDE.md b/CLAUDE.md index 16e0655..27b649a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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 diff --git a/README.md b/README.md index 163a40b..33beaa4 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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(); ``` - - diff --git a/crates/compilers/src/compilers/vyper/parser.rs b/crates/compilers/src/compilers/vyper/parser.rs index b2c6e4e..d3602b0 100644 --- a/crates/compilers/src/compilers/vyper/parser.rs +++ b/crates/compilers/src/compilers/vyper/parser.rs @@ -12,8 +12,6 @@ use std::{ collections::BTreeSet, path::{Path, PathBuf}, }; -// TODO: remove -#[allow(deprecated)] use winnow::{ ascii::space1, combinator::{alt, opt, preceded}, diff --git a/crates/compilers/src/report/mod.rs b/crates/compilers/src/report/mod.rs index 9ba9521..caa5073 100644 --- a/crates/compilers/src/report/mod.rs +++ b/crates/compilers/src/report/mod.rs @@ -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)