Skip to content

Commit

Permalink
Update Cairo (#1293)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciektr authored May 6, 2024
1 parent c27f340 commit 3c77f4e
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 91 deletions.
62 changes: 32 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 22 additions & 22 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,28 @@ assert_fs = "1"
async-trait = "0.1"
axum = { version = "0.6", features = ["http2"] }
cairo-felt = "0.9.1"
cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-compiler = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-debug = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-defs = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-diagnostics = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-filesystem = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-formatter = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-language-server = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-lowering = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-project = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-semantic = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-sierra-generator = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-sierra-to-casm = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-sierra-type-size = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-starknet = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-starknet-classes = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-syntax = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-test-plugin = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-test-runner = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d" }
cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo", rev = "d6525b8c58bb37c13bac1f1d87cf23a374bdf59d", features = ["env_logger"] }
cairo-lang-casm = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-compiler = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-debug = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-defs = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-diagnostics = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-filesystem = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-formatter = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-language-server = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-lowering = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-project = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-runner = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-semantic = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-sierra = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-sierra-generator = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-sierra-to-casm = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-sierra-type-size = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-starknet = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-starknet-classes = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-syntax = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-test-plugin = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-test-runner = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901" }
cairo-lang-utils = { git = "https://github.com/starkware-libs/cairo", rev = "852f8fb963f5789da258f18d49a2d64865d0e901", features = ["env_logger"] }
camino = { version = "1", features = ["serde1"] }
cargo_metadata = ">=0.18"
clap = { version = "4", features = ["derive", "env", "string"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ fn extract_fork_config(db: &dyn SyntaxGroup, attr: &Attribute) -> Option<RawFork
}

match &attr.args[0].variant {
AttributeArgVariant::Unnamed { value: fork_id, .. } => {
extract_fork_config_from_id(fork_id, db)
}
AttributeArgVariant::Unnamed(fork_id) => extract_fork_config_from_id(fork_id, db),
_ => extract_fork_config_from_args(db, attr),
}
}
Expand All @@ -210,7 +208,7 @@ fn extract_fuzzer_config(db: &dyn SyntaxGroup, attr: &Attribute) -> Option<Fuzze
return None;
};

if fuzzer_runs_name != "runs" || fuzzer_seed_name != "seed" {
if fuzzer_runs_name.text.as_str() != "runs" || fuzzer_seed_name.text.as_str() != "seed" {
return None;
};

Expand Down Expand Up @@ -265,15 +263,15 @@ fn extract_fork_config_from_args(db: &dyn SyntaxGroup, attr: &Attribute) -> Opti
return None;
};

if url_arg_name != "url" {
if url_arg_name.text.as_str() != "url" {
return None;
}
let Expr::String(url_str) = url else {
return None;
};
let url = url_str.string_value(db)?;

if block_id_arg_name != "block_id" {
if block_id_arg_name.text.as_str() != "block_id" {
return None;
}
let Expr::FunctionCall(block_id) = block_id else {
Expand Down
Loading

0 comments on commit 3c77f4e

Please sign in to comment.