diff --git a/crates/blockifier/src/test_utils/cairo_compile.rs b/crates/blockifier/src/test_utils/cairo_compile.rs index c663b9640e9..49f32545054 100644 --- a/crates/blockifier/src/test_utils/cairo_compile.rs +++ b/crates/blockifier/src/test_utils/cairo_compile.rs @@ -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 /, where the relative path can be /// overridden by the environment variable (otherwise, the default is used). @@ -166,7 +170,7 @@ fn verify_cairo0_compiler_deps() { fn verify_cairo1_compiler_deps(git_tag_override: Option) { 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!( diff --git a/crates/blockifier/src/test_utils/contracts.rs b/crates/blockifier/src/test_utils/contracts.rs index 153b61d7b53..a6115fe51ba 100644 --- a/crates/blockifier/src/test_utils/contracts.rs +++ b/crates/blockifier/src/test_utils/contracts.rs @@ -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.