diff --git a/.github/workflows/starknet-blocks.yml b/.github/workflows/starknet-blocks.yml index d43ebc449..286635ac7 100644 --- a/.github/workflows/starknet-blocks.yml +++ b/.github/workflows/starknet-blocks.yml @@ -32,7 +32,7 @@ jobs: with: repository: lambdaclass/starknet-replay path: starknet-replay - ref: 6738a2ba8786118d38eb94b209949bcb8285cce0 + ref: 546457d800fd02f080888331aebecc15824bed91 # We need native to build the runtime - name: Checkout Native uses: actions/checkout@v4 @@ -43,7 +43,7 @@ jobs: with: repository: lambdaclass/sequencer path: sequencer - ref: ee977cc338f63f7bc34c01c21363b3a318bcac65 + ref: 15d6452d162ad5e3538e673d1e4df5abcff9452f - name: Cache RPC Calls uses: actions/cache@v4 diff --git a/Cargo.lock b/Cargo.lock index 870967616..f84dd692c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -602,9 +602,9 @@ dependencies = [ [[package]] name = "cairo-lang-casm" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31a9a437bd4015a0f888d0de9876fd4786eb24b4e17b25c86c53980865980f9d" +checksum = "151375fd72f8765eb3ca78b4aa8f71269179169d4a8d3d03f4d8a80ff062d1e5" dependencies = [ "cairo-lang-utils", "indoc", @@ -616,9 +616,9 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4608693f366e8e86061c824adaca33b56bf0bd7e1cd5edc8592be7a380950322" +checksum = "b013e303a3b2c67599cbb020d1ae3b96ceef19ed522625b32a1f4f8904bdc2d0" dependencies = [ "anyhow", "cairo-lang-defs", @@ -642,18 +642,18 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217fd373449a74efde259f8a4df501a7664f6f9c73b547c3aff632ad14feabf" +checksum = "33e397d9e5f085d04f9251c3e8c6bba2c0aeb39cb41de532977f08bc8dd0dffa" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dadf2d1002c9851ea17d37b83a26bbe6f0f53d5f94ba2e477a7a6e9d498f805b" +checksum = "e293692f3db2fdc2ab72ced7c1a31de9c7ba6f7202dfa67c4596a42fca5255e5" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -668,9 +668,9 @@ dependencies = [ [[package]] name = "cairo-lang-diagnostics" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4ac1831e7c14e5308a66254bcc57a8d4790f18567ef8d4d6768b39ffb955a0" +checksum = "af2fad7dcf507f01810038b3879310514e238c92c9e86cf66ed898e53dadc273" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -680,9 +680,9 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c5f879bca42caef7e06f1de022d6961d36c5567db600faed8a947e2b705eaa" +checksum = "62bbbd955110dc35770c77f5f4e420ea963a175a70199c8d95777b1e53da40a8" dependencies = [ "cairo-lang-utils", "good_lp", @@ -690,9 +690,9 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c632b6d3ee5f1684f757f86e04ba9cf1daa8e4e74c6a5d6c0b7773cc4465a6c6" +checksum = "ff86b7145e376eb7787da47d214583482944f8b40335947804466211e1b5f3a0" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", @@ -706,9 +706,9 @@ dependencies = [ [[package]] name = "cairo-lang-formatter" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8295a3ddc62d8d92d942292f103de0434d622f47e936a3aea25eccc3eed88c58" +checksum = "b1b8abd7b170b48b9eadb758b4fdab7e9f03bad8b2cbe23ad8b6e38232311da0" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -726,9 +726,9 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a93c2644c64cfdbbe64b1bd6e13d9c6ed511950cfae2e738d228bc89dc5605" +checksum = "d907f52244a34208ee2e5232602aa213ae190c8c015a9ab0e378b695ca9cc1b0" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -751,9 +751,9 @@ dependencies = [ [[package]] name = "cairo-lang-parser" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d884d9418895fef5b8ffd7458211523ab5abf4357845938b354adfbae1089fe2" +checksum = "ad5c844ec8e284ed1e423d40bd5d4baf98d6415986c3d4065d2c1ff8a09b5934" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -771,9 +771,9 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b224afdc76d9890edf9009fa8ffff9a91ac15614a41049d48c77c192e8c966e3" +checksum = "478c84c57c6291f1e072fedd12eb0458eb40a3ea16a17d02e8ccf895924b9ea1" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -796,9 +796,9 @@ checksum = "123ac0ecadf31bacae77436d72b88fa9caef2b8e92c89ce63a125ae911a12fae" [[package]] name = "cairo-lang-proc-macros" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae35a282e5f2d15f47ba6fffae5a32e8aa2f254366865339cf326e2e015b8f8" +checksum = "5d7afa5c9bb8be0c3654792caec70ca51587667665e667c2250b4fa79df901d3" dependencies = [ "cairo-lang-debug", "quote", @@ -807,9 +807,9 @@ dependencies = [ [[package]] name = "cairo-lang-project" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da40ba380208db0b861d8b1e6e558adaa98dd0b382177b25bdb1abf8fd8d766" +checksum = "0e557bbf5fc153203622f4fd66d8de23c35c39fe92672ba90c0a3b33766f016f" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -820,9 +820,9 @@ dependencies = [ [[package]] name = "cairo-lang-runnable-utils" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "951b72522c8a76e177119699bdcd3c4288bdc0bc784ac22dd7c0f80b2a7444d0" +checksum = "5cb5aea4258a0fcc52a8ac3848c4916a81f2601ebebdd462b4a7c6123cc20589" dependencies = [ "cairo-lang-casm", "cairo-lang-sierra", @@ -838,9 +838,9 @@ dependencies = [ [[package]] name = "cairo-lang-runner" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35b1d5b0e9103bea4e39ac1099ad47893a25f334c3ca2596d07b1a8920be22cb" +checksum = "c3b0e437bbaa58d41c1215451ef50aa914a49780a0af886e55862576aff6c19f" dependencies = [ "ark-ff 0.4.2", "ark-secp256k1 0.4.0", @@ -868,9 +868,9 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "babdf14729236dfb455519d35e7e399ba73f0eaa4f1e929474d4c37dc9ef7a29" +checksum = "2c82e765f784f4175232f51be0bd81551c48fcf64d8e9ae2e88f15c7130ca549" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -895,9 +895,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c0e4951ecd88023856e0faa9fd444647d9f1ec69ca09dfa8e3aebf9d2afdef" +checksum = "0eda99022545ec4ec1b255f05c40d498d7040e3c60ecc942009368462448686b" dependencies = [ "anyhow", "cairo-lang-utils", @@ -922,9 +922,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea9c51356e603fa38fcbd4524d19e391ac25e89e64889c3a4ef849de3d1e911" +checksum = "f13db868ea56fc7c109a21260355ef5380e8d4426ce9781a00cc7d2d18a0aada" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -938,9 +938,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-gas" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1af17244a222fd2398caaf09e909f0b584abe14c77e1b5dc8f479ef35d1e8d50" +checksum = "d4e26fbde40815352ff18f2e341a9792c651be0597bfb8e63deb0f4dd484782d" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -954,9 +954,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-generator" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2368d57175b18976222f844e4dda52d0025d70ce8b2dda35e0cc96efaa9bb4a5" +checksum = "4e2a09730000a75c143d940e0e4906cf35dd0b607b0902223dc73ff5786abb7b" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -978,9 +978,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "866e6cbba9e81bae1c2f6b8f8e718f702fee69980c3f22bdea1e4657f09a540c" +checksum = "07b3af3dee351045e063fea341f242c6eab9c0f5eca90ee8b960ddcefa799142" dependencies = [ "assert_matches", "cairo-lang-casm", @@ -999,9 +999,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8e797aa2f4023e984d13c5adf7068688da665328da6b055842f50fb673fb48b" +checksum = "5ed52ed8acd957e71139e3dde782aad04946bd1e4d979a2a0b46bd09dd200348" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -1009,9 +1009,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c16967be9b0befaa0e21f65c9c803f8354d0db09de7adf28cdf0dc54b2c90d" +checksum = "9d156a22ebdca8041506c0ae2be765a7bc81907003e588ee643f7e64c7788fbf" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1039,9 +1039,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet-classes" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0f7b0c28430c9ad477c38dba089ac5a148443bbeaa77cc3f14980de255a220e" +checksum = "a5a5b4adb80238064a7294c43d8edcc18d908c0872848063682b5c0a458a77af" dependencies = [ "cairo-lang-casm", "cairo-lang-sierra", @@ -1062,9 +1062,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5adf933d378225e031200bd41c82e09cb0fde1042f5fe3f3c82d1ccd559a6f2" +checksum = "621c6dbf1cbda7d40f4dc78ea2363d3b565e4c7e9edfdcb08e2be61bfbbaf819" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -1079,9 +1079,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b34c81e723cf05fc0655aa8527f5a2730e30b31368b1b887c3eeb50a00c81c4" +checksum = "cd79262096fbbd618c52d01964f5ed36e693f9dc1113a0d217e1b3825bd85822" dependencies = [ "genco", "xshell", @@ -1089,9 +1089,9 @@ dependencies = [ [[package]] name = "cairo-lang-test-plugin" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a9c6f1976c28de3e502589f53b97bdc5f8566724d20ff68de83d8f382f5fc99" +checksum = "bbe07acbac1f6f31e0b422833174e0a5220370542b47d9ceb6f4e4c7e33ffe61" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1116,9 +1116,9 @@ dependencies = [ [[package]] name = "cairo-lang-test-utils" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa7c6930beb6f221c1bc274460fca091e93c377570994b612682da30795ed74e" +checksum = "3d7df411c00d122de3941dc8cb78d216e2414b2bbb713c006613b98113c35861" dependencies = [ "cairo-lang-formatter", "cairo-lang-utils", @@ -1129,9 +1129,9 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.10.0-rc.0" +version = "2.10.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91b6546d9f285c7d4a2700c084f745c35e1884a1dc2e4fa54a71034cea5606aa" +checksum = "33d72369877bade85ecfef9bc13cbd0c66fdaa3e8cd9686833f0db65eacaa833" dependencies = [ "hashbrown 0.14.5", "indexmap 2.7.0", diff --git a/Cargo.toml b/Cargo.toml index 11cf22743..169c65f20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,13 +58,13 @@ normal = ["aquamarine"] [dependencies] aquamarine = "0.6.0" bumpalo = "3.16.0" -cairo-lang-compiler = "=2.10.0-rc.0" -cairo-lang-defs = "=2.10.0-rc.0" -cairo-lang-filesystem = "=2.10.0-rc.0" -cairo-lang-runner = "=2.10.0-rc.0" -cairo-lang-semantic = "=2.10.0-rc.0" -cairo-lang-sierra = "=2.10.0-rc.0" -cairo-lang-sierra-generator = "=2.10.0-rc.0" +cairo-lang-compiler = "2.10.0-rc.1" +cairo-lang-defs = "2.10.0-rc.1" +cairo-lang-filesystem = "2.10.0-rc.1" +cairo-lang-runner = "2.10.0-rc.1" +cairo-lang-semantic = "2.10.0-rc.1" +cairo-lang-sierra = "2.10.0-rc.1" +cairo-lang-sierra-generator = "2.10.0-rc.1" educe = "0.5.11" # can't update until https://github.com/magiclen/educe/issues/27 itertools = "0.13.0" lazy_static = "1.5" @@ -86,11 +86,11 @@ utf8_iter = "1.0.4" # CLI dependencies -cairo-lang-sierra-ap-change = "=2.10.0-rc.0" -cairo-lang-sierra-gas = "=2.10.0-rc.0" -cairo-lang-starknet = "=2.10.0-rc.0" -cairo-lang-utils = "=2.10.0-rc.0" -cairo-lang-starknet-classes = "=2.10.0-rc.0" +cairo-lang-sierra-ap-change = "2.10.0-rc.1" +cairo-lang-sierra-gas = "2.10.0-rc.1" +cairo-lang-starknet = "2.10.0-rc.1" +cairo-lang-utils = "2.10.0-rc.1" +cairo-lang-starknet-classes = "2.10.0-rc.1" cairo-native-runtime = { version = "0.2.8", path = "runtime", optional = true } clap = { version = "4.5.23", features = ["derive"], optional = true } libloading = "0.8.6" @@ -101,7 +101,7 @@ tracing-subscriber = { version = "0.3.19", features = [ ], optional = true } serde = { version = "1.0", features = ["derive"] } anyhow = { version = "1.0", optional = true } -cairo-lang-test-plugin = { version = "=2.10.0-rc.0", optional = true } +cairo-lang-test-plugin = { version = "2.10.0-rc.1", optional = true } colored = { version = "2.1.0", optional = true } # needed to interface with cairo-lang-* keccak = "0.1.5" @@ -120,7 +120,7 @@ num-integer = "0.1.46" [dev-dependencies] cairo-vm = { version = "2.0.0-rc3", features = ["cairo-1-hints"] } -cairo-lang-semantic = { version = "=2.10.0-rc.0", features = ["testing"] } +cairo-lang-semantic = { version = "2.10.0-rc.1", features = ["testing"] } criterion = { version = "0.5.1", features = ["html_reports"] } lambdaworks-math = "0.11.0" pretty_assertions_sorted = "1.2.3" diff --git a/Makefile b/Makefile index 1762fe5a8..f145e5d3d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Environment detection. UNAME := $(shell uname) -CAIRO_2_VERSION = 2.10.0-rc.0 +CAIRO_2_VERSION = 2.10.0-rc.1 SCARB_VERSION = 2.9.2 # Usage is the default target for newcomers running `make`. diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index b7c312078..20dc3db32 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -15,7 +15,7 @@ starknet-types-core = { version = "0.1.7", default-features = false, features = "serde", "hash", ] } -cairo-lang-sierra-gas = "=2.10.0-rc.0" +cairo-lang-sierra-gas = "2.10.0-rc.1" starknet-curve = "0.5.1" lazy_static = "1.5.0" rand = "0.8.5" diff --git a/src/debug.rs b/src/debug.rs index b90ed0779..53db70f48 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -408,7 +408,8 @@ pub const fn libfunc_to_name(value: &CoreConcreteLibfunc) -> &'static str { BoundedIntConcreteLibfunc::Constrain(_) => "bounded_int_constrain", BoundedIntConcreteLibfunc::IsZero(_) => "bounded_int_is_zero", BoundedIntConcreteLibfunc::WrapNonZero(_) => "bounded_int_wrap_non_zero", - BoundedIntConcreteLibfunc::Trim(_) => "bounded_int_trim", + BoundedIntConcreteLibfunc::TrimMin(_) => "bounded_int_trim_min", + BoundedIntConcreteLibfunc::TrimMax(_) => "bounded_int_trim_max", }, CoreConcreteLibfunc::IntRange(selector) => match selector { IntRangeConcreteLibfunc::TryNew(_) => "int_range_try_new", diff --git a/src/libfuncs/bounded_int.rs b/src/libfuncs/bounded_int.rs index 7a652d215..c34350aa7 100644 --- a/src/libfuncs/bounded_int.rs +++ b/src/libfuncs/bounded_int.rs @@ -57,7 +57,7 @@ pub fn build<'ctx, 'this>( BoundedIntConcreteLibfunc::Constrain(info) => { build_constrain(context, registry, entry, location, helper, metadata, info) } - BoundedIntConcreteLibfunc::Trim(info) => { + BoundedIntConcreteLibfunc::TrimMin(info) | BoundedIntConcreteLibfunc::TrimMax(info) => { build_trim(context, registry, entry, location, helper, metadata, info) } BoundedIntConcreteLibfunc::IsZero(info) => { @@ -830,7 +830,7 @@ mod test { use core::internal::{OptionRev, bounded_int::BoundedInt}; use core::internal::bounded_int; fn main() -> BoundedInt<-128, 126> { - let num = match bounded_int::trim::(1) { + let num = match bounded_int::trim_max::(1) { OptionRev::Some(n) => n, OptionRev::None => 0, }; @@ -861,7 +861,7 @@ mod test { use core::internal::{OptionRev, bounded_int::BoundedInt}; use core::internal::bounded_int; fn main() -> BoundedInt<-127, 127> { - let num = match bounded_int::trim::(1) { + let num = match bounded_int::trim_min::(1) { OptionRev::Some(n) => n, OptionRev::None => 1, }; @@ -892,7 +892,7 @@ mod test { use core::internal::{OptionRev, bounded_int::BoundedInt}; use core::internal::bounded_int; fn main() -> BoundedInt<0, 4294967294> { - let num = match bounded_int::trim::(0xfffffffe) { + let num = match bounded_int::trim_max::(0xfffffffe) { OptionRev::Some(n) => n, OptionRev::None => 0, }; @@ -923,7 +923,7 @@ mod test { use core::internal::{OptionRev, bounded_int::BoundedInt}; use core::internal::bounded_int; fn main() -> BoundedInt<-32767, 32767> { - let num = match bounded_int::trim::(-0x8000) { + let num = match bounded_int::trim_min::(-0x8000) { OptionRev::Some(n) => n, OptionRev::None => 0, }; diff --git a/src/libfuncs/const.rs b/src/libfuncs/const.rs index fa4e1892b..57cd83d34 100644 --- a/src/libfuncs/const.rs +++ b/src/libfuncs/const.rs @@ -17,6 +17,7 @@ use cairo_lang_sierra::{ ConstConcreteType, }, core::{CoreLibfunc, CoreType, CoreTypeConcrete}, + starknet::StarkNetTypeConcrete, }, program::GenericArg, program_registry::ProgramRegistry, @@ -268,6 +269,23 @@ pub fn build_const_type_value<'ctx, 'this>( entry.const_int_from_type(context, location, value, inner_ty) } + CoreTypeConcrete::StarkNet(starnet_type) => match starnet_type { + StarkNetTypeConcrete::ClassHash(_) | StarkNetTypeConcrete::ContractAddress(_) => { + let value = match &info.inner_data.as_slice() { + [GenericArg::Value(value)] => value.clone(), + _ => return Err(Error::ConstDataMismatch), + }; + + let (sign, value) = value.into_parts(); + let value = match sign { + Sign::Minus => PRIME.clone() - value, + _ => value, + }; + + entry.const_int_from_type(context, location, value, inner_ty) + } + _ => native_panic!("const for type {} not implemented", info.inner_ty), + }, CoreTypeConcrete::Uint8(_) | CoreTypeConcrete::Uint16(_) | CoreTypeConcrete::Uint32(_) diff --git a/tests/alexandria/Scarb.toml b/tests/alexandria/Scarb.toml index c507a5b23..f080801e3 100644 --- a/tests/alexandria/Scarb.toml +++ b/tests/alexandria/Scarb.toml @@ -1,7 +1,6 @@ [package] name = "alexandria" version = "0.1.0" -cairo-version = "2.9.2" edition = "2024_07" # See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html