From fa33b554512ee6879e5fa9f2843f7c7856fd6749 Mon Sep 17 00:00:00 2001 From: Dori Medini Date: Mon, 29 Jul 2024 17:28:39 +0300 Subject: [PATCH] a --- .../src/test_utils/cairo_compile.rs | 22 ++++++++++++++++++ crates/blockifier/src/test_utils/contracts.rs | 1 + .../__pycache__/merge_branches.cpython-39.pyc | Bin 0 -> 4799 bytes 3 files changed, 23 insertions(+) create mode 100644 crates/blockifier/src/test_utils/cairo_compile.rs create mode 100644 scripts/__pycache__/merge_branches.cpython-39.pyc diff --git a/crates/blockifier/src/test_utils/cairo_compile.rs b/crates/blockifier/src/test_utils/cairo_compile.rs new file mode 100644 index 0000000000..61827ee5e0 --- /dev/null +++ b/crates/blockifier/src/test_utils/cairo_compile.rs @@ -0,0 +1,22 @@ +use std::process::Command; + +/// Compiles a Cairo0 program using the deprecated compiler. +pub fn cairo0_compile(path: String, extra_arg: Option, debug_info: bool) -> Vec { + let mut command = Command::new("starknet-compile-deprecated"); + command.arg(&path); + if let Some(extra_arg) = extra_arg { + command.arg(extra_arg); + } + if !debug_info { + command.arg("--no_debug_info"); + } + let compile_output = command.output().unwrap(); + let stderr_output = String::from_utf8(compile_output.stderr).unwrap(); + assert!(compile_output.status.success(), "{stderr_output}"); + compile_output.stdout +} + +/// Compiles a Cairo1 program using the compiler version set in the Cargo.toml. +pub fn cairo1_compile(_path: String) -> Vec { + todo!(); +} diff --git a/crates/blockifier/src/test_utils/contracts.rs b/crates/blockifier/src/test_utils/contracts.rs index 1f19b43c77..498b660691 100644 --- a/crates/blockifier/src/test_utils/contracts.rs +++ b/crates/blockifier/src/test_utils/contracts.rs @@ -204,6 +204,7 @@ impl FeatureContract { }; } }; + // a. format!( "feature_contracts/cairo{}/compiled/{}{}.json", match cairo_version { diff --git a/scripts/__pycache__/merge_branches.cpython-39.pyc b/scripts/__pycache__/merge_branches.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cd781e791ff2170013518a43f14950926d3f6efc GIT binary patch literal 4799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