Skip to content

Commit

Permalink
chore(blockifier): add text file with current compiler version for CI…
Browse files Browse the repository at this point in the history
… use
  • Loading branch information
dorimedini-starkware committed Aug 6, 2024
1 parent 6e5f836 commit e11a98a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion crates/blockifier/src/test_utils/cairo_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ pub fn cairo1_compiler_version() -> String {
}
}

pub fn cairo1_compiler_tag() -> String {
format!("v{}", cairo1_compiler_version())
}

/// Returns the path to the local Cairo1 compiler repository.
/// Returns <sequencer_crate_root>/<RELATIVE_PATH_TO_CAIRO_REPO>, where the relative path can be
/// overridden by the environment variable (otherwise, the default is used).
Expand Down Expand Up @@ -166,7 +170,7 @@ fn verify_cairo0_compiler_deps() {

fn verify_cairo1_compiler_deps(git_tag_override: Option<String>) {
let cairo_repo_path = local_cairo1_compiler_repo_path();
let tag = git_tag_override.unwrap_or(format!("v{}", cairo1_compiler_version()));
let tag = git_tag_override.unwrap_or(cairo1_compiler_tag());

// Check if the path is a directory.
assert!(
Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/test_utils/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const ERC20_CAIRO1_CONTRACT_SOURCE_PATH: &str = "./ERC20/ERC20_Cairo1/ERC20.cair
const ERC20_CAIRO1_CONTRACT_PATH: &str = "./ERC20/ERC20_Cairo1/erc20.casm.json";

// Legacy contract is compiled with a fixed version of the compiler.
const LEGACY_CONTRACT_COMPILER_TAG: &str = "v2.1.0";
pub const LEGACY_CONTRACT_COMPILER_TAG: &str = "v2.1.0";

/// Enum representing all feature contracts.
/// The contracts that are implemented in both Cairo versions include a version field.
Expand Down

0 comments on commit e11a98a

Please sign in to comment.