Skip to content
Open
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
4,086 changes: 2,848 additions & 1,238 deletions Cargo.lock

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,26 @@ bincode = { version = "2.0.0-rc.3", default-features = false, features = [
"serde",
] }
bytes = "1.5.0"
cairo-lang-casm = "=2.7.0"
cairo-lang-compiler = "=2.7.0"
cairo-lang-filesystem = "=2.7.0"
cairo-lang-runner = "=2.7.0"
cairo-lang-sierra = "=2.7.0"
cairo-lang-sierra-ap-change = { version = "2.7.0", default-features = false }
cairo-lang-sierra-gas = { version = "2.7.0", default-features = false }
cairo-lang-sierra-to-casm = "=2.7.0"
cairo-lang-sierra-generator = "=2.7.0"
cairo-lang-sierra-type-size = { version = "2.7.0", default-features = false }
cairo-lang-starknet = "=2.7.0"
cairo-lang-casm = "=2.11.1"
cairo-lang-compiler = "=2.11.1"
cairo-lang-filesystem = "=2.11.1"
cairo-lang-runner = "=2.11.1"
cairo-lang-sierra = "=2.11.1"
cairo-lang-sierra-ap-change = { version = "2.11.1", default-features = false }
cairo-lang-sierra-gas = { version = "2.11.1", default-features = false }
cairo-lang-sierra-to-casm = "=2.11.1"
cairo-lang-sierra-generator = "=2.11.1"
cairo-lang-sierra-type-size = { version = "2.11.1", default-features = false }
cairo-lang-starknet = "=2.11.1"
cairo-lang-hints-test-runner = { path = "./cairo-lang-hints-test-runner" }
cairo-lang-test-plugin = "=2.7.0"
cairo-lang-utils = "=2.7.0"
cairo-lang-test-plugin = "=2.11.1"
cairo-lang-utils = "=2.11.1"
cairo-oracle-hint-processor = { path = "./cairo-oracle-hint-processor"}
cairo-proto-build = { path = "./cairo-proto-build", default-features = false }
cairo-proto-serde = { path = "./cairo-proto-serde" }
cairo-io-serde = { path = "./cairo-io-serde" }
cairo-felt = "0.9.1"
cairo-vm = { git = "https://github.com/raphaelDkhn/cairo-vm.git", rev = "2738ec0", features = [
"std",
"cairo-1-hints",
] }
cairo-vm = { git = "https://github.com/Tbelleng/cairo-vm", features = [ "std", "cairo-1-hints" ] }
cainome-cairo-serde = { git = "https://github.com/cartridge-gg/cainome.git", rev = "0d29bb0" }
camino = "1.1.6"
clap = { version = "4.3.10", features = ["derive"] }
Expand All @@ -65,7 +62,7 @@ prost = "0.12.3"
prost-types = "0.12.3"
rayon = "1.8.1"
reqwest = { version = "0.11.23", features = ["blocking", "json"] }
scarb = { git = "https://github.com/software-mansion/scarb.git", rev = "v2.7.0" }
scarb = { git = "https://github.com/software-mansion/scarb.git", rev = "v2.11.1" }
scarb-metadata = "1.12.0"
scarb-ui = "0.1.5"
serde = { version = "1.0.195", features = ["derive"] }
Expand All @@ -74,3 +71,6 @@ starknet-types-core = "0.0.7"
tempfile = "3.9.0"
thiserror = "1.0.40"
which = "6.0.0"
wasm-bindgen = "=0.2.92"


9 changes: 6 additions & 3 deletions cairo-io-serde/src/cairo_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ fn parse_schema(value: &Value, schema_name: &str, schema: &Schema) -> Result<Vec
// Iterate over the fields in the order in which they are defined.
// This is important because the order of fields in the structure affects how they are transmitted in the VM.
for field in &schema_def.fields {
let field_value = value
.get(&field.name)
.ok_or_else(|| format!("Missing field: {} from schema {} in {}", field.name, schema_name, value))?;
let field_value = value.get(&field.name).ok_or_else(|| {
format!(
"Missing field: {} from schema {} in {}",
field.name, schema_name, value
)
})?;

let parsed = parse_value(field_value, &field.ty, schema)?;
args.extend(parsed);
Expand Down
14 changes: 9 additions & 5 deletions cairo-lang-hints-test-runner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ impl TestCompiler {
let mut b = RootDatabase::builder();
b.detect_corelib();
b.with_cfg(CfgSet::from_iter([Cfg::name("test")]));
b.with_plugin_suite(test_plugin_suite());
b.with_default_plugin_suite(test_plugin_suite());
if starknet {
b.with_plugin_suite(starknet_plugin_suite());
b.with_default_plugin_suite(starknet_plugin_suite());
}

b.build()?
Expand Down Expand Up @@ -204,13 +204,17 @@ impl TestCompiler {
let config = TestsCompilationConfig {
starknet: true,
add_statements_functions: true,
add_statements_code_locations: true,
contract_crate_ids: None, // TODO: Add contract crate ids
contract_declarations: None, // TODO: Add contract declarations
executable_crate_ids: None, // TODO: Add executable crate ids
};

compile_test_prepared_db(
&self.db,
config,
self.main_crate_ids.clone(),
self.test_crate_ids.clone(),
DiagnosticsReporter::stderr(),
)
}
}
Expand Down Expand Up @@ -254,7 +258,7 @@ pub fn filter_test_cases(
named_tests: named_tests,
contracts_info: compiled.metadata.contracts_info,
function_set_costs: compiled.metadata.function_set_costs,
statements_functions: compiled.metadata.statements_functions,
statements_locations: compiled.metadata.statements_locations,
},
};

Expand Down Expand Up @@ -330,7 +334,7 @@ pub fn run_tests(
&name,
false,
None,
None
None,
);

Ok((
Expand Down
Loading