diff --git a/.tool-versions b/.tool-versions index 9b86cbf810..49edbb5364 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1 +1 @@ -scarb 2.5.0 +scarb 2.5.4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2486c13234..358890d5e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - contract names to call trace +#### Changed + +- Bump cairo to 2.5.4 + #### Fixed - Calling Cairo 0 contract no longer cancels cheatcodes in further calls diff --git a/Cargo.lock b/Cargo.lock index 93cf9bbc56..3e544f2304 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -526,10 +526,10 @@ dependencies = [ "ark-secp256r1", "cached", "cairo-felt 0.9.1", - "cairo-lang-casm 2.5.0", + "cairo-lang-casm 2.5.4", "cairo-lang-runner", - "cairo-lang-starknet 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-starknet 2.5.4", + "cairo-lang-utils 2.5.4", "cairo-vm", "ctor", "derive_more", @@ -689,12 +689,11 @@ dependencies = [ [[package]] name = "cairo-lang-casm" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3085455fa119efc82b887950b56d4d34a10348ae8a29f422101f2b199438ca6" +checksum = "8ceb71a4cbf5b474bd671c79b2c05e8168a97199bfea1c01ef63b1bdaac3db03" dependencies = [ - "cairo-lang-utils 2.5.0", - "hashbrown 0.14.3", + "cairo-lang-utils 2.5.4", "indoc 2.0.4", "num-bigint", "num-traits 0.2.17", @@ -753,22 +752,22 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "470c388cd2a281788c4dfec42821ba313a4e49e304fd2d2c9e66bf4300aa9f34" +checksum = "95c1aab3213462c5b7c21508f1a4330bdf0766c90e6dd4ed79b0002c2b96a715" dependencies = [ "anyhow", - "cairo-lang-defs 2.5.0", - "cairo-lang-diagnostics 2.5.0", - "cairo-lang-filesystem 2.5.0", - "cairo-lang-lowering 2.5.0", - "cairo-lang-parser 2.5.0", - "cairo-lang-project 2.5.0", - "cairo-lang-semantic 2.5.0", - "cairo-lang-sierra 2.5.0", - "cairo-lang-sierra-generator 2.5.0", - "cairo-lang-syntax 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-defs 2.5.4", + "cairo-lang-diagnostics 2.5.4", + "cairo-lang-filesystem 2.5.4", + "cairo-lang-lowering 2.5.4", + "cairo-lang-parser 2.5.4", + "cairo-lang-project 2.5.4", + "cairo-lang-semantic 2.5.4", + "cairo-lang-sierra 2.5.4", + "cairo-lang-sierra-generator 2.5.4", + "cairo-lang-syntax 2.5.4", + "cairo-lang-utils 2.5.4", "salsa", "thiserror", ] @@ -785,11 +784,11 @@ source = "git+https://github.com/starkware-libs/cairo?tag=v1.0.0-rc0#05867c82de4 [[package]] name = "cairo-lang-debug" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab648e172102fc4a6c45d99b56d440684dbe89c9e707f3cfb32adb711818834" +checksum = "03623ba892200c6b3c55fab260d4aa0bff833d6bcecdb1fb022565ac00d5a683" dependencies = [ - "cairo-lang-utils 2.5.0", + "cairo-lang-utils 2.5.4", ] [[package]] @@ -828,16 +827,16 @@ dependencies = [ [[package]] name = "cairo-lang-defs" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0772c941cce18e5ebc64b138db5579fdd4ce776d8afb9d8d310df42e01d367a4" +checksum = "09131755b08a485322656e061ad05602215a198dd4a2daf3897e64dc76e7544e" dependencies = [ - "cairo-lang-debug 2.5.0", - "cairo-lang-diagnostics 2.5.0", - "cairo-lang-filesystem 2.5.0", - "cairo-lang-parser 2.5.0", - "cairo-lang-syntax 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-debug 2.5.4", + "cairo-lang-diagnostics 2.5.4", + "cairo-lang-filesystem 2.5.4", + "cairo-lang-parser 2.5.4", + "cairo-lang-syntax 2.5.4", + "cairo-lang-utils 2.5.4", "itertools 0.11.0", "salsa", "smol_str 0.2.1", @@ -867,13 +866,13 @@ dependencies = [ [[package]] name = "cairo-lang-diagnostics" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34d641d9b6200c1d79c2da92ab14dcfad211676cd7775d67028f1132581da2b" +checksum = "3b8185cc9472c648ac9db970ce558595c71259eebd55d25a502fe569cb871448" dependencies = [ - "cairo-lang-debug 2.5.0", - "cairo-lang-filesystem 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-debug 2.5.4", + "cairo-lang-filesystem 2.5.4", + "cairo-lang-utils 2.5.4", "itertools 0.11.0", ] @@ -901,11 +900,11 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "860afc2931051a91866c64058b1f682ab3b1d6bd67d07153261de63536659542" +checksum = "8ae71750096b64d4dd54dd2c39ef50651bb4aff4bc829e3d07549a5035620e0a" dependencies = [ - "cairo-lang-utils 2.5.0", + "cairo-lang-utils 2.5.4", "good_lp", ] @@ -936,12 +935,12 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fe3c207886492581816d744a81f2ee81d2fee6f7326b62caa7c5f99fd658887" +checksum = "1819ef5a5396df695dcec993500c46bc44c309590b503da26965c873dfe8a84a" dependencies = [ - "cairo-lang-debug 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-debug 2.5.4", + "cairo-lang-utils 2.5.4", "path-clean 1.0.1", "salsa", "serde", @@ -998,19 +997,19 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff23dfe3e4de8613a7044cb0a313826b049cc8b8a89aa6dffed326b3d0c6405" -dependencies = [ - "cairo-lang-debug 2.5.0", - "cairo-lang-defs 2.5.0", - "cairo-lang-diagnostics 2.5.0", - "cairo-lang-filesystem 2.5.0", - "cairo-lang-parser 2.5.0", - "cairo-lang-proc-macros 2.5.0", - "cairo-lang-semantic 2.5.0", - "cairo-lang-syntax 2.5.0", - "cairo-lang-utils 2.5.0", +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0968f0da6117dca1a70d6ac7d2e252d8b1710f333458c54ce08dbef1c0323881" +dependencies = [ + "cairo-lang-debug 2.5.4", + "cairo-lang-defs 2.5.4", + "cairo-lang-diagnostics 2.5.4", + "cairo-lang-filesystem 2.5.4", + "cairo-lang-parser 2.5.4", + "cairo-lang-proc-macros 2.5.4", + "cairo-lang-semantic 2.5.4", + "cairo-lang-syntax 2.5.4", + "cairo-lang-utils 2.5.4", "id-arena", "itertools 0.11.0", "log", @@ -1060,15 +1059,15 @@ dependencies = [ [[package]] name = "cairo-lang-parser" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef5ad088b73ec17360766e1149de6a09f43cfd610ff54f19c6c02bb39b05a725" +checksum = "ae556e49c0a90d30e52f068b0fb5ed4d419766661d3713a1644f3894a9255a5a" dependencies = [ - "cairo-lang-diagnostics 2.5.0", - "cairo-lang-filesystem 2.5.0", - "cairo-lang-syntax 2.5.0", - "cairo-lang-syntax-codegen 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-diagnostics 2.5.4", + "cairo-lang-filesystem 2.5.4", + "cairo-lang-syntax 2.5.4", + "cairo-lang-syntax-codegen 2.5.4", + "cairo-lang-utils 2.5.4", "colored", "itertools 0.11.0", "num-bigint", @@ -1117,16 +1116,16 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22353bef64e394ffe12d21d6c1aa61894af1faa8cf511c6675cbce0c8cc3065e" +checksum = "a8d319f3e84ff679159f97e3baa1d918d369ba9e3ade5ad490e0a9e4eca19591" dependencies = [ - "cairo-lang-defs 2.5.0", - "cairo-lang-diagnostics 2.5.0", - "cairo-lang-filesystem 2.5.0", - "cairo-lang-parser 2.5.0", - "cairo-lang-syntax 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-defs 2.5.4", + "cairo-lang-diagnostics 2.5.4", + "cairo-lang-filesystem 2.5.4", + "cairo-lang-parser 2.5.4", + "cairo-lang-syntax 2.5.4", + "cairo-lang-utils 2.5.4", "indent", "indoc 2.0.4", "itertools 0.11.0", @@ -1156,11 +1155,11 @@ dependencies = [ [[package]] name = "cairo-lang-proc-macros" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49bc7b990207a91e756c2045015cd94ba366ed9fea467ab45358b4ed9e046326" +checksum = "fef002aac874d76492eb9577dab663f9a84fe4584b4215c7ebfda7d025fcadae" dependencies = [ - "cairo-lang-debug 2.5.0", + "cairo-lang-debug 2.5.4", "quote", "syn 2.0.48", ] @@ -1191,12 +1190,12 @@ dependencies = [ [[package]] name = "cairo-lang-project" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa408032bab9d665d02e5a5b60a5fe3414abb4ea49f7de4cdf606fec008b31e8" +checksum = "7f384c26e6907de9c94b44051e386498159e8c9e1567b9b1eae9c22e16ff17e5" dependencies = [ - "cairo-lang-filesystem 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-filesystem 2.5.4", + "cairo-lang-utils 2.5.4", "serde", "smol_str 0.2.1", "thiserror", @@ -1205,22 +1204,23 @@ dependencies = [ [[package]] name = "cairo-lang-runner" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab6ae5276016583e2912a9d323c0895a616ba2680977bc0f3f888074ae33a14" +checksum = "95ccd9dce6f931508a21ac4d29965dadcaf7c22bbf2a237239763128b8647a53" dependencies = [ "ark-ff", "ark-secp256k1", "ark-secp256r1", "ark-std", "cairo-felt 0.9.1", - "cairo-lang-casm 2.5.0", - "cairo-lang-sierra 2.5.0", - "cairo-lang-sierra-ap-change 2.5.0", - "cairo-lang-sierra-to-casm 2.5.0", + "cairo-lang-casm 2.5.4", + "cairo-lang-sierra 2.5.4", + "cairo-lang-sierra-ap-change 2.5.4", + "cairo-lang-sierra-generator 2.5.4", + "cairo-lang-sierra-to-casm 2.5.4", "cairo-lang-sierra-type-size", - "cairo-lang-starknet 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-starknet 2.5.4", + "cairo-lang-utils 2.5.4", "cairo-vm", "itertools 0.11.0", "keccak", @@ -1280,19 +1280,19 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea038491d2d6a46f4cbc053713c2a0a4aeffeb76d97ccea18f7260e459b4dc19" -dependencies = [ - "cairo-lang-debug 2.5.0", - "cairo-lang-defs 2.5.0", - "cairo-lang-diagnostics 2.5.0", - "cairo-lang-filesystem 2.5.0", - "cairo-lang-parser 2.5.0", - "cairo-lang-plugins 2.5.0", - "cairo-lang-proc-macros 2.5.0", - "cairo-lang-syntax 2.5.0", - "cairo-lang-utils 2.5.0", +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "311434caae9542b7c442ac69a04e3c8eaa477654f215abe0bd7dfd3c0de70669" +dependencies = [ + "cairo-lang-debug 2.5.4", + "cairo-lang-defs 2.5.4", + "cairo-lang-diagnostics 2.5.4", + "cairo-lang-filesystem 2.5.4", + "cairo-lang-parser 2.5.4", + "cairo-lang-plugins 2.5.4", + "cairo-lang-proc-macros 2.5.4", + "cairo-lang-syntax 2.5.4", + "cairo-lang-utils 2.5.4", "id-arena", "indoc 2.0.4", "itertools 0.11.0", @@ -1349,13 +1349,13 @@ dependencies = [ [[package]] name = "cairo-lang-sierra" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba35ff92b43872a8f89a8745e6fa911d964b47c145011d96b2d8ebf1aad8fa3" +checksum = "52c00c34fcaf97bbc4111d1631af8c65838841a38b3502b5bbc04355b7d46982" dependencies = [ "anyhow", "cairo-felt 0.9.1", - "cairo-lang-utils 2.5.0", + "cairo-lang-utils 2.5.4", "const-fnv1a-hash", "convert_case 0.6.0", "derivative", @@ -1399,14 +1399,14 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac25af35be8ee9b47d8db4d39b2c9359fc8013acb8ed933cc751bbb54e8fa78e" +checksum = "c99a0be021b359c51383cce4372cb1061f7d53438d80f208c56af2154583c98e" dependencies = [ - "cairo-lang-eq-solver 2.5.0", - "cairo-lang-sierra 2.5.0", + "cairo-lang-eq-solver 2.5.4", + "cairo-lang-sierra 2.5.4", "cairo-lang-sierra-type-size", - "cairo-lang-utils 2.5.0", + "cairo-lang-utils 2.5.4", "itertools 0.11.0", "num-traits 0.2.17", "thiserror", @@ -1438,14 +1438,14 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-gas" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e510821a12693b8486614d0a43b3e776163bc9dbeedcd9a9d949124a6789271c" +checksum = "f273d4de9d30e556e72ebe2751f9ed6bf3d84a70f6c76f52b178c24cddb12e43" dependencies = [ - "cairo-lang-eq-solver 2.5.0", - "cairo-lang-sierra 2.5.0", + "cairo-lang-eq-solver 2.5.4", + "cairo-lang-sierra 2.5.4", "cairo-lang-sierra-type-size", - "cairo-lang-utils 2.5.0", + "cairo-lang-utils 2.5.4", "itertools 0.11.0", "num-traits 0.2.17", "thiserror", @@ -1503,20 +1503,20 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-generator" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5b905f46390e4d5d26bfb632cdb747e8a2fc31866b39a082289d2cc7fa348c" -dependencies = [ - "cairo-lang-debug 2.5.0", - "cairo-lang-defs 2.5.0", - "cairo-lang-diagnostics 2.5.0", - "cairo-lang-filesystem 2.5.0", - "cairo-lang-lowering 2.5.0", - "cairo-lang-parser 2.5.0", - "cairo-lang-semantic 2.5.0", - "cairo-lang-sierra 2.5.0", - "cairo-lang-syntax 2.5.0", - "cairo-lang-utils 2.5.0", +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734f72e9e8b1ec7a96208aa8dfba87ca1614188e3646ae67c519afe707569490" +dependencies = [ + "cairo-lang-debug 2.5.4", + "cairo-lang-defs 2.5.4", + "cairo-lang-diagnostics 2.5.4", + "cairo-lang-filesystem 2.5.4", + "cairo-lang-lowering 2.5.4", + "cairo-lang-parser 2.5.4", + "cairo-lang-semantic 2.5.4", + "cairo-lang-sierra 2.5.4", + "cairo-lang-syntax 2.5.4", + "cairo-lang-utils 2.5.4", "itertools 0.11.0", "num-bigint", "once_cell", @@ -1570,18 +1570,18 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fa4bdbacf02bf4b13c2b891e2396567ad733f20d7e59526255e07c897a14405" +checksum = "842ae37ee3f1cd06b926aceb480fd70b84300aae82e9606b876678d30c21649a" dependencies = [ "assert_matches", "cairo-felt 0.9.1", - "cairo-lang-casm 2.5.0", - "cairo-lang-sierra 2.5.0", - "cairo-lang-sierra-ap-change 2.5.0", - "cairo-lang-sierra-gas 2.5.0", + "cairo-lang-casm 2.5.4", + "cairo-lang-sierra 2.5.4", + "cairo-lang-sierra-ap-change 2.5.4", + "cairo-lang-sierra-gas 2.5.4", "cairo-lang-sierra-type-size", - "cairo-lang-utils 2.5.0", + "cairo-lang-utils 2.5.4", "indoc 2.0.4", "itertools 0.11.0", "num-bigint", @@ -1591,12 +1591,12 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854d43c5e1c0cf7e24cc58e665b60f1bb3d603615c72e13aad872a9548b44359" +checksum = "f969cbaf81f3beb1dc693674fc792a815bf8fc13471227020a5faf309d5faf80" dependencies = [ - "cairo-lang-sierra 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-sierra 2.5.4", + "cairo-lang-utils 2.5.4", ] [[package]] @@ -1680,24 +1680,25 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fe48d254ffdce63c5f6eb001d663d4d9b77c3f30a4bcb0124be6ac8177830f" +checksum = "67cd2d120f39369c7bd7d124dee638c250495054030d01d4e1d1b88f0063bd80" dependencies = [ "anyhow", "cairo-felt 0.9.1", - "cairo-lang-casm 2.5.0", - "cairo-lang-compiler 2.5.0", - "cairo-lang-defs 2.5.0", - "cairo-lang-diagnostics 2.5.0", - "cairo-lang-filesystem 2.5.0", - "cairo-lang-lowering 2.5.0", - "cairo-lang-semantic 2.5.0", - "cairo-lang-sierra 2.5.0", - "cairo-lang-sierra-generator 2.5.0", - "cairo-lang-sierra-to-casm 2.5.0", - "cairo-lang-syntax 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-casm 2.5.4", + "cairo-lang-compiler 2.5.4", + "cairo-lang-defs 2.5.4", + "cairo-lang-diagnostics 2.5.4", + "cairo-lang-filesystem 2.5.4", + "cairo-lang-lowering 2.5.4", + "cairo-lang-plugins 2.5.4", + "cairo-lang-semantic 2.5.4", + "cairo-lang-sierra 2.5.4", + "cairo-lang-sierra-generator 2.5.4", + "cairo-lang-sierra-to-casm 2.5.4", + "cairo-lang-syntax 2.5.4", + "cairo-lang-utils 2.5.4", "const_format", "convert_case 0.6.0", "indent", @@ -1745,13 +1746,13 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "983fa8cc3d92ac4d80cba2a6a1511a03f71384a953464ccf7809cddcb1714e86" +checksum = "552d3438fec55832976bc7c7d7490100e8ce7385d3f3f1539f9a46fffa2197c6" dependencies = [ - "cairo-lang-debug 2.5.0", - "cairo-lang-filesystem 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-debug 2.5.4", + "cairo-lang-filesystem 2.5.4", + "cairo-lang-utils 2.5.4", "num-bigint", "num-traits 0.2.17", "salsa", @@ -1783,9 +1784,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa5e57952da2c330df7e63181d57b80e639096e061dff2c30730b7f7a124dda" +checksum = "9dab4d07bd78658f0fdc3fd20f1236bc3e6ebdd8a8fc72ece95a5dd03b7a09da" dependencies = [ "genco", "xshell", @@ -1793,24 +1794,24 @@ dependencies = [ [[package]] name = "cairo-lang-test-plugin" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3654b0312ed1fc61761526fc0cc4ebfa9120924b0023a1b4f7dd75ac96d4888" +checksum = "ab5e416a932754f190de2de011f3b3eb20dcb8093fb073cad15a8e70be833c3d" dependencies = [ "anyhow", "cairo-felt 0.9.1", - "cairo-lang-compiler 2.5.0", - "cairo-lang-debug 2.5.0", - "cairo-lang-defs 2.5.0", - "cairo-lang-diagnostics 2.5.0", - "cairo-lang-filesystem 2.5.0", - "cairo-lang-lowering 2.5.0", - "cairo-lang-semantic 2.5.0", - "cairo-lang-sierra 2.5.0", - "cairo-lang-sierra-generator 2.5.0", - "cairo-lang-starknet 2.5.0", - "cairo-lang-syntax 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-compiler 2.5.4", + "cairo-lang-debug 2.5.4", + "cairo-lang-defs 2.5.4", + "cairo-lang-diagnostics 2.5.4", + "cairo-lang-filesystem 2.5.4", + "cairo-lang-lowering 2.5.4", + "cairo-lang-semantic 2.5.4", + "cairo-lang-sierra 2.5.4", + "cairo-lang-sierra-generator 2.5.4", + "cairo-lang-starknet 2.5.4", + "cairo-lang-syntax 2.5.4", + "cairo-lang-utils 2.5.4", "indoc 2.0.4", "itertools 0.11.0", "num-bigint", @@ -1852,9 +1853,9 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.5.0" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fa45c5e537470c11f620576e80d1f3a8d0096e7d7070fcc3248fa960a186b6" +checksum = "12d0939f42d40fb1d975cae073d7d4f82d83de4ba2149293115525245425f909" dependencies = [ "hashbrown 0.14.3", "indexmap 2.1.0", @@ -1933,10 +1934,10 @@ dependencies = [ "anyhow", "blockifier", "cairo-felt 0.9.1", - "cairo-lang-casm 2.5.0", + "cairo-lang-casm 2.5.4", "cairo-lang-runner", - "cairo-lang-starknet 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-starknet 2.5.4", + "cairo-lang-utils 2.5.4", "cairo-vm", "camino", "conversions", @@ -2138,10 +2139,10 @@ dependencies = [ "anyhow", "blockifier", "cairo-felt 0.9.1", - "cairo-lang-casm 2.5.0", + "cairo-lang-casm 2.5.4", "cairo-lang-runner", - "cairo-lang-starknet 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-starknet 2.5.4", + "cairo-lang-utils 2.5.4", "cairo-vm", "ctor", "indoc 2.0.4", @@ -2776,15 +2777,15 @@ dependencies = [ "axum", "blockifier", "cairo-felt 0.9.1", - "cairo-lang-casm 2.5.0", - "cairo-lang-compiler 2.5.0", - "cairo-lang-filesystem 2.5.0", + "cairo-lang-casm 2.5.4", + "cairo-lang-compiler 2.5.4", + "cairo-lang-filesystem 2.5.4", "cairo-lang-runner", - "cairo-lang-sierra 2.5.0", - "cairo-lang-sierra-to-casm 2.5.0", - "cairo-lang-starknet 2.5.0", + "cairo-lang-sierra 2.5.4", + "cairo-lang-sierra-to-casm 2.5.4", + "cairo-lang-starknet 2.5.4", "cairo-lang-test-plugin", - "cairo-lang-utils 2.5.0", + "cairo-lang-utils 2.5.4", "cairo-vm", "camino", "cheatnet", @@ -2836,18 +2837,18 @@ dependencies = [ "bimap", "blockifier", "cairo-felt 0.9.1", - "cairo-lang-casm 2.5.0", - "cairo-lang-compiler 2.5.0", - "cairo-lang-filesystem 2.5.0", + "cairo-lang-casm 2.5.4", + "cairo-lang-compiler 2.5.4", + "cairo-lang-filesystem 2.5.4", "cairo-lang-runner", - "cairo-lang-sierra 2.5.0", - "cairo-lang-sierra-ap-change 2.5.0", - "cairo-lang-sierra-gas 2.5.0", - "cairo-lang-sierra-to-casm 2.5.0", + "cairo-lang-sierra 2.5.4", + "cairo-lang-sierra-ap-change 2.5.4", + "cairo-lang-sierra-gas 2.5.4", + "cairo-lang-sierra-to-casm 2.5.4", "cairo-lang-sierra-type-size", - "cairo-lang-starknet 2.5.0", + "cairo-lang-starknet 2.5.4", "cairo-lang-test-plugin", - "cairo-lang-utils 2.5.0", + "cairo-lang-utils 2.5.4", "cairo-vm", "camino", "cheatnet", @@ -4833,10 +4834,10 @@ dependencies = [ "anyhow", "blockifier", "cairo-felt 0.9.1", - "cairo-lang-casm 2.5.0", + "cairo-lang-casm 2.5.4", "cairo-lang-runner", - "cairo-lang-starknet 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-starknet 2.5.4", + "cairo-lang-utils 2.5.4", "cairo-vm", "num-bigint", "num-traits 0.2.17", @@ -5358,7 +5359,7 @@ dependencies = [ "anyhow", "cairo-lang-starknet 1.0.0-alpha.6", "cairo-lang-starknet 1.0.0-rc0", - "cairo-lang-starknet 2.5.0", + "cairo-lang-starknet 2.5.4", "serde", "serde_json", "test-case", @@ -5457,11 +5458,11 @@ dependencies = [ "anyhow", "blockifier", "cairo-felt 0.9.1", - "cairo-lang-casm 2.5.0", + "cairo-lang-casm 2.5.4", "cairo-lang-runner", - "cairo-lang-sierra 2.5.0", - "cairo-lang-sierra-to-casm 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-sierra 2.5.4", + "cairo-lang-sierra-to-casm 2.5.4", + "cairo-lang-utils 2.5.4", "cairo-vm", "camino", "clap", @@ -5791,7 +5792,7 @@ version = "0.7.0-dev.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88969610ab6ea9391e0e05a3e7c38acc49dc1cb49941b93ca52814075002b92f" dependencies = [ - "cairo-lang-starknet 2.5.0", + "cairo-lang-starknet 2.5.4", "derive_more", "hex", "indexmap 2.1.0", @@ -5975,14 +5976,14 @@ version = "0.1.0" dependencies = [ "anyhow", "assert_fs", - "cairo-lang-casm 2.5.0", - "cairo-lang-compiler 2.5.0", - "cairo-lang-filesystem 2.5.0", + "cairo-lang-casm 2.5.4", + "cairo-lang-compiler 2.5.4", + "cairo-lang-filesystem 2.5.4", "cairo-lang-runner", - "cairo-lang-sierra 2.5.0", - "cairo-lang-sierra-to-casm 2.5.0", - "cairo-lang-starknet 2.5.0", - "cairo-lang-utils 2.5.0", + "cairo-lang-sierra 2.5.4", + "cairo-lang-sierra-to-casm 2.5.4", + "cairo-lang-starknet 2.5.4", + "cairo-lang-utils 2.5.4", "camino", "forge", "forge_runner", diff --git a/Cargo.toml b/Cargo.toml index 703a4dfc08..a3da480dca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,27 +22,27 @@ license-file = "LICENSE" [workspace.dependencies] blockifier = "0.5.0-dev.0" starknet_api = "0.7.0-dev.0" -cairo-lang-casm = "2.5.0" -cairo-lang-runner = "2.5.0" -cairo-lang-sierra-to-casm = "2.5.0" -cairo-lang-sierra = "2.5.0" -cairo-lang-utils = "2.5.0" -cairo-lang-starknet = "2.5.0" -cairo-lang-compiler = "2.5.0" -cairo-lang-filesystem = "2.5.0" -cairo-lang-debug = "2.5.0" -cairo-lang-defs = "2.5.0" -cairo-lang-diagnostics = "2.5.0" -cairo-lang-lowering = "2.5.0" -cairo-lang-plugins = "2.5.0" -cairo-lang-project = "2.5.0" -cairo-lang-semantic = "2.5.0" -cairo-lang-sierra-ap-change = "2.5.0" -cairo-lang-sierra-gas = "2.5.0" -cairo-lang-sierra-type-size = "2.5.0" -cairo-lang-sierra-generator = "2.5.0" -cairo-lang-syntax = "2.5.0" -cairo-lang-test-plugin = "2.5.0" +cairo-lang-casm = "2.5.4" +cairo-lang-runner = "2.5.4" +cairo-lang-sierra-to-casm = "2.5.4" +cairo-lang-sierra = "2.5.4" +cairo-lang-utils = "2.5.4" +cairo-lang-starknet = "2.5.4" +cairo-lang-compiler = "2.5.4" +cairo-lang-filesystem = "2.5.4" +cairo-lang-debug = "2.5.4" +cairo-lang-defs = "2.5.4" +cairo-lang-diagnostics = "2.5.4" +cairo-lang-lowering = "2.5.4" +cairo-lang-plugins = "2.5.4" +cairo-lang-project = "2.5.4" +cairo-lang-semantic = "2.5.4" +cairo-lang-sierra-ap-change = "2.5.4" +cairo-lang-sierra-gas = "2.5.4" +cairo-lang-sierra-type-size = "2.5.4" +cairo-lang-sierra-generator = "2.5.4" +cairo-lang-syntax = "2.5.4" +cairo-lang-test-plugin = "2.5.4" cairo-vm = "0.9.1" cairo-felt = "0.9.1" anyhow = "1.0.79" diff --git a/crates/cheatnet/tests/contracts/src/segment_arena_user.cairo b/crates/cheatnet/tests/contracts/src/segment_arena_user.cairo index 6949cebf06..5d80f959b0 100644 --- a/crates/cheatnet/tests/contracts/src/segment_arena_user.cairo +++ b/crates/cheatnet/tests/contracts/src/segment_arena_user.cairo @@ -5,6 +5,6 @@ mod SegmentArenaUser { #[external(v0)] fn interface_function(ref self: ContractState) { - let felt_dict: Felt252Dict = Default::default(); + let _felt_dict: Felt252Dict = Default::default(); } } diff --git a/crates/forge-runner/src/compiled_runnable.rs b/crates/forge-runner/src/compiled_runnable.rs index 8eb7c78a3e..e8b1d4c16c 100644 --- a/crates/forge-runner/src/compiled_runnable.rs +++ b/crates/forge-runner/src/compiled_runnable.rs @@ -1,5 +1,5 @@ use crate::expected_result::ExpectedTestResult; -use cairo_lang_sierra::program::Program; +use cairo_lang_sierra::{ids::GenericTypeId, program::Program}; use serde::Deserialize; use starknet_api::block::BlockNumber; use url::Url; @@ -18,6 +18,14 @@ pub struct TestCaseRunnable { pub expected_result: ExpectedTestResult, pub fork_config: Option, pub fuzzer_config: Option, + pub test_details: TestDetails, +} + +#[derive(Debug, PartialEq, Clone, Deserialize, Default)] +pub struct TestDetails { + pub entry_point_offset: usize, + pub parameter_types: Vec<(GenericTypeId, i16)>, + pub return_types: Vec<(GenericTypeId, i16)>, } #[derive(Debug, Clone)] diff --git a/crates/forge-runner/src/lib.rs b/crates/forge-runner/src/lib.rs index 1c73d7363d..1ba5dee48f 100644 --- a/crates/forge-runner/src/lib.rs +++ b/crates/forge-runner/src/lib.rs @@ -7,13 +7,10 @@ use crate::test_crate_summary::TestCrateSummary; use anyhow::{anyhow, Result}; use cairo_lang_runner::RunnerError; -use cairo_lang_sierra::extensions::core::{CoreLibfunc, CoreType}; use cairo_lang_sierra::ids::ConcreteTypeId; use cairo_lang_sierra::program::{Function, Program}; -use cairo_lang_sierra::program_registry::ProgramRegistry; use cairo_lang_sierra_to_casm::compiler::CairoProgram; use cairo_lang_sierra_to_casm::metadata::{calc_metadata, MetadataComputationConfig}; -use cairo_lang_sierra_type_size::get_type_size_map; use camino::Utf8PathBuf; use contracts_data::ContractsData; @@ -21,7 +18,6 @@ use futures::stream::FuturesUnordered; use futures::StreamExt; use once_cell::sync::Lazy; -use running::TestDetails; use smol_str::SmolStr; use trace_data::save_trace_data; @@ -135,55 +131,6 @@ pub enum TestCrateRunResult { Interrupted(TestCrateSummary), } -fn build_test_details(test_name: &str, sierra_program: &Program) -> TestDetails { - let sierra_program_registry = - ProgramRegistry::::new(sierra_program).unwrap(); - let type_sizes = get_type_size_map(sierra_program, &sierra_program_registry).unwrap(); - let func = sierra_program - .funcs - .iter() - .find(|f| f.id.debug_name.clone().unwrap().ends_with(test_name)) - .unwrap(); - - let parameter_types = func - .signature - .param_types - .iter() - .map(|pt| { - let td = sierra_program - .type_declarations - .iter() - .find(|td| &td.id == pt) - .unwrap(); - let generic_id = &td.long_id.generic_id; - let size = type_sizes[&td.id]; - (generic_id.clone(), size) - }) - .collect::>(); - - let return_types = func - .signature - .ret_types - .iter() - .map(|pt| { - let td = sierra_program - .type_declarations - .iter() - .find(|td| &td.id == pt) - .unwrap(); - let generic_id = &td.long_id.generic_id; - let size = type_sizes[&td.id]; - (generic_id.clone(), size) - }) - .collect::>(); - - TestDetails { - entry_point_offset: func.entry_point.0, - parameter_types, - return_types, - } -} - fn compile_sierra_to_casm(sierra_program: &Program) -> CairoProgram { let metadata_config = MetadataComputationConfig::default(); let metadata = calc_metadata(sierra_program, metadata_config).unwrap(); @@ -233,13 +180,11 @@ pub async fn run_tests_from_crate( let case = Arc::new(case.clone()); let args: Vec = args.into_iter().cloned().collect(); - let test_details = Arc::new(build_test_details(&case.name, sierra_program)); tasks.push(choose_test_strategy_and_run( args, case.clone(), casm_program.clone(), - test_details.clone(), runner_config.clone(), runner_params.clone(), send.clone(), @@ -285,36 +230,20 @@ fn choose_test_strategy_and_run( args: Vec, case: Arc, casm_program: Arc, - test_details: Arc, runner_config: Arc, runner_params: Arc, send: Sender<()>, ) -> JoinHandle> { if args.is_empty() { tokio::task::spawn(async move { - let res = run_test( - case, - casm_program, - test_details, - runner_config, - runner_params, - send, - ) - .await??; + let res = run_test(case, casm_program, runner_config, runner_params, send).await??; Ok(AnyTestCaseSummary::Single(res)) }) } else { tokio::task::spawn(async move { - let res = run_with_fuzzing( - args, - case, - casm_program, - test_details, - runner_config, - runner_params, - send, - ) - .await??; + let res = + run_with_fuzzing(args, case, casm_program, runner_config, runner_params, send) + .await??; Ok(AnyTestCaseSummary::Fuzzing(res)) }) } @@ -324,7 +253,6 @@ fn run_with_fuzzing( args: Vec, case: Arc, casm_program: Arc, - test_details: Arc, runner_config: Arc, runner_params: Arc, send: Sender<()>, @@ -363,7 +291,6 @@ fn run_with_fuzzing( args, case.clone(), casm_program.clone(), - test_details.clone(), runner_config.clone(), runner_params.clone(), send.clone(), diff --git a/crates/forge-runner/src/running.rs b/crates/forge-runner/src/running.rs index 7afa189493..6bcd22adf5 100644 --- a/crates/forge-runner/src/running.rs +++ b/crates/forge-runner/src/running.rs @@ -48,7 +48,6 @@ use tokio::task::JoinHandle; pub fn run_test( case: Arc, casm_program: Arc, - test_details: Arc, runner_config: Arc, runner_params: Arc, send: Sender<()>, @@ -60,14 +59,8 @@ pub fn run_test( if send.is_closed() { return Ok(TestCaseSummary::Skipped {}); } - let run_result = run_test_case( - vec![], - &case, - &casm_program, - &test_details, - &runner_config, - &runner_params, - ); + let run_result = + run_test_case(vec![], &case, &casm_program, &runner_config, &runner_params); // TODO: code below is added to fix snforge tests // remove it after improve exit-first tests @@ -85,7 +78,6 @@ pub(crate) fn run_fuzz_test( args: Vec, case: Arc, casm_program: Arc, - test_details: Arc, runner_config: Arc, runner_params: Arc, send: Sender<()>, @@ -103,7 +95,6 @@ pub(crate) fn run_fuzz_test( args.clone(), &case, &casm_program, - &test_details, &runner_config, &runner_params, ); @@ -161,19 +152,12 @@ pub struct RunResultWithInfo { pub(crate) used_resources: UsedResources, } -pub struct TestDetails { - pub entry_point_offset: usize, - pub parameter_types: Vec<(GenericTypeId, i16)>, - pub return_types: Vec<(GenericTypeId, i16)>, -} - #[allow(clippy::too_many_arguments)] #[allow(clippy::too_many_lines)] pub fn run_test_case( args: Vec, case: &TestCaseRunnable, casm_program: &CairoProgram, - test_details: &TestDetails, runner_config: &Arc, runner_params: &Arc, ) -> Result { @@ -185,10 +169,11 @@ pub fn run_test_case( let initial_gas = usize::MAX; let runner_args: Vec = args.into_iter().map(Arg::Value).collect(); let (entry_code, builtins) = SierraCasmRunner::create_entry_code_from_params( - &test_details.parameter_types, + &case.test_details.parameter_types, &runner_args, initial_gas, - casm_program.debug_info.sierra_statement_info[test_details.entry_point_offset].code_offset, + casm_program.debug_info.sierra_statement_info[case.test_details.entry_point_offset] + .code_offset, ) .unwrap(); let footer = SierraCasmRunner::create_code_footer(); @@ -210,7 +195,7 @@ pub fn run_test_case( &string_to_hint, &mut execution_resources, &mut context, - get_syscall_segment_index(&test_details.parameter_types), + get_syscall_segment_index(&case.test_details.parameter_types), ); let mut cheatnet_state = CheatnetState { @@ -278,7 +263,7 @@ pub fn run_test_case( let ap = vm.get_relocated_trace().unwrap().last().unwrap().ap; let (results_data, gas_counter) = - SierraCasmRunner::get_results_data(&test_details.return_types, &cells, ap); + SierraCasmRunner::get_results_data(&case.test_details.return_types, &cells, ap); assert_eq!(results_data.len(), 1); let (_, values) = results_data[0].clone(); diff --git a/crates/forge/src/compiled_raw.rs b/crates/forge/src/compiled_raw.rs index 0d68250d48..9bfe55395b 100644 --- a/crates/forge/src/compiled_raw.rs +++ b/crates/forge/src/compiled_raw.rs @@ -1,5 +1,5 @@ use cairo_lang_sierra::program::Program; -use forge_runner::compiled_runnable::FuzzerConfig; +use forge_runner::compiled_runnable::{FuzzerConfig, TestDetails}; use forge_runner::expected_result::ExpectedTestResult; use serde::Deserialize; @@ -18,6 +18,7 @@ pub(crate) struct TestCaseRaw { pub expected_result: ExpectedTestResult, pub fork_config: Option, pub fuzzer_config: Option, + pub test_details: TestDetails, } #[derive(Debug, PartialEq, Clone, Copy, Deserialize)] diff --git a/crates/forge/src/lib.rs b/crates/forge/src/lib.rs index 3ea51d9668..8115450e86 100644 --- a/crates/forge/src/lib.rs +++ b/crates/forge/src/lib.rs @@ -70,6 +70,7 @@ async fn to_runnable( expected_result: case.expected_result, fork_config, fuzzer_config: case.fuzzer_config, + test_details: case.test_details, }); } @@ -175,8 +176,8 @@ pub async fn run( mod tests { use super::*; use crate::compiled_raw::{CompiledTestCrateRaw, CrateLocation, TestCaseRaw}; - use cairo_lang_sierra::program::Program; - use forge_runner::expected_result::ExpectedTestResult; + use cairo_lang_sierra::{ids::GenericTypeId, program::Program}; + use forge_runner::{compiled_runnable::TestDetails, expected_result::ExpectedTestResult}; #[tokio::test] async fn to_runnable_unparsable_url() { @@ -198,6 +199,18 @@ mod tests { block_id_value: "Latest".to_string(), })), fuzzer_config: None, + test_details: TestDetails { + entry_point_offset: 100, + parameter_types: vec![ + (GenericTypeId("RangeCheck".into()), 1), + (GenericTypeId("GasBuiltin".into()), 1), + ], + return_types: vec![ + (GenericTypeId("RangeCheck".into()), 1), + (GenericTypeId("GasBuiltin".into()), 1), + (GenericTypeId("Enum".into()), 3), + ], + }, }], tests_location: CrateLocation::Lib, }; @@ -225,6 +238,18 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: Some(RawForkConfig::Id("non_existent".to_string())), fuzzer_config: None, + test_details: TestDetails { + entry_point_offset: 100, + parameter_types: vec![ + (GenericTypeId("RangeCheck".into()), 1), + (GenericTypeId("GasBuiltin".into()), 1), + ], + return_types: vec![ + (GenericTypeId("RangeCheck".into()), 1), + (GenericTypeId("GasBuiltin".into()), 1), + (GenericTypeId("Enum".into()), 3), + ], + }, }], tests_location: CrateLocation::Lib, }; diff --git a/crates/forge/src/test_filter.rs b/crates/forge/src/test_filter.rs index db2beef23d..9122e08d17 100644 --- a/crates/forge/src/test_filter.rs +++ b/crates/forge/src/test_filter.rs @@ -130,6 +130,7 @@ mod tests { use crate::compiled_raw::{CompiledTestCrateRaw, CrateLocation, TestCaseRaw}; use crate::test_filter::TestsFilter; use cairo_lang_sierra::program::Program; + use forge_runner::compiled_runnable::TestDetails; use forge_runner::expected_result::ExpectedTestResult; fn program_for_testing() -> Program { @@ -166,6 +167,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, TestCaseRaw { name: "crate2::run_other_thing".to_string(), @@ -174,6 +176,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, TestCaseRaw { name: "outer::crate2::execute_next_thing".to_string(), @@ -182,6 +185,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, TestCaseRaw { name: "thing".to_string(), @@ -190,6 +194,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, ], tests_location: CrateLocation::Lib, @@ -212,7 +217,8 @@ mod tests { ignored: false, expected_result: ExpectedTestResult::Success, fork_config: None, - fuzzer_config: None + fuzzer_config: None, + test_details: TestDetails::default(), },] ); @@ -233,7 +239,8 @@ mod tests { ignored: true, expected_result: ExpectedTestResult::Success, fork_config: None, - fuzzer_config: None + fuzzer_config: None, + test_details: TestDetails::default(), },] ); @@ -256,6 +263,7 @@ mod tests { ignored: false, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, TestCaseRaw { name: "crate2::run_other_thing".to_string(), @@ -264,6 +272,7 @@ mod tests { ignored: true, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, TestCaseRaw { name: "outer::crate2::execute_next_thing".to_string(), @@ -272,6 +281,7 @@ mod tests { ignored: true, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, TestCaseRaw { name: "thing".to_string(), @@ -280,6 +290,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, ] ); @@ -314,6 +325,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, TestCaseRaw { name: "crate2::run_other_thing".to_string(), @@ -322,6 +334,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, TestCaseRaw { name: "outer::crate2::execute_next_thing".to_string(), @@ -330,6 +343,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, TestCaseRaw { name: "thing".to_string(), @@ -338,6 +352,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, ] ); @@ -387,6 +402,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, TestCaseRaw { name: "crate2::run_other_thing".to_string(), @@ -395,6 +411,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, TestCaseRaw { name: "outer::crate3::run_other_thing".to_string(), @@ -403,6 +420,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, TestCaseRaw { name: "do_thing".to_string(), @@ -411,6 +429,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, ], tests_location: CrateLocation::Tests, @@ -456,6 +475,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), },] ); @@ -477,6 +497,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), },] ); @@ -509,6 +530,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), },] ); } @@ -525,6 +547,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, TestCaseRaw { name: "crate2::run_other_thing".to_string(), @@ -533,6 +556,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, TestCaseRaw { name: "outer::crate3::run_other_thing".to_string(), @@ -541,6 +565,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, TestCaseRaw { name: "do_thing".to_string(), @@ -549,6 +574,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, ], tests_location: CrateLocation::Tests, @@ -567,6 +593,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, TestCaseRaw { name: "outer::crate3::run_other_thing".to_string(), @@ -575,6 +602,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, ] ); @@ -592,6 +620,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, TestCaseRaw { name: "crate2::run_other_thing".to_string(), @@ -600,6 +629,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, TestCaseRaw { name: "outer::crate3::run_other_thing".to_string(), @@ -608,6 +638,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, TestCaseRaw { name: "do_thing".to_string(), @@ -616,6 +647,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default(), }, ], tests_location: CrateLocation::Tests, @@ -634,6 +666,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, TestCaseRaw { name: "crate2::run_other_thing".to_string(), @@ -642,6 +675,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, TestCaseRaw { name: "outer::crate3::run_other_thing".to_string(), @@ -650,6 +684,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, TestCaseRaw { name: "do_thing".to_string(), @@ -658,6 +693,7 @@ mod tests { expected_result: ExpectedTestResult::Success, fork_config: None, fuzzer_config: None, + test_details: TestDetails::default() }, ] ); diff --git a/crates/forge/tests/data/trace/src/lib.cairo b/crates/forge/tests/data/trace/src/lib.cairo index 363aef30c1..c6d80e6149 100644 --- a/crates/forge/tests/data/trace/src/lib.cairo +++ b/crates/forge/tests/data/trace/src/lib.cairo @@ -30,15 +30,14 @@ mod SimpleContract { impl RecursiveCallerImpl of RecursiveCaller { fn execute_calls(self: @ContractState, calls: Array) { let mut i = 0; - while i < calls - .len() { - let serviced_call = calls.at(i); - RecursiveCallerDispatcher { - contract_address: serviced_call.contract_address.clone() - } - .execute_calls(serviced_call.payload.clone()); - i = i + 1; + while i < calls.len() { + let serviced_call = calls.at(i); + RecursiveCallerDispatcher { + contract_address: serviced_call.contract_address.clone() } + .execute_calls(serviced_call.payload.clone()); + i = i + 1; + } } } } diff --git a/crates/forge/tests/e2e/running.rs b/crates/forge/tests/e2e/running.rs index 6433b82929..0ee52eddc3 100644 --- a/crates/forge/tests/e2e/running.rs +++ b/crates/forge/tests/e2e/running.rs @@ -79,7 +79,7 @@ fn simple_package_with_git_dependency() { casm = true [dependencies] - starknet = "2.5.0" + starknet = "2.5.4" snforge_std = {{ git = "https://github.com/{}", branch = "{}" }} "#, remote_url, @@ -755,7 +755,7 @@ fn init_new_project_test() { [dependencies] snforge_std = {{ git = "https://github.com/foundry-rs/starknet-foundry", tag = "v{}" }} - starknet = "2.5.0" + starknet = "2.5.4" [[target.starknet-contract]] casm = true @@ -778,7 +778,7 @@ fn init_new_project_test() { casm = true [dependencies] - starknet = "2.5.0" + starknet = "2.5.4" snforge_std = {{ git = "https://github.com/{}", branch = "{}" }} "#, remote_url, diff --git a/crates/scarb-api/src/lib.rs b/crates/scarb-api/src/lib.rs index 53c1d5202e..a7bf6e9c46 100644 --- a/crates/scarb-api/src/lib.rs +++ b/crates/scarb-api/src/lib.rs @@ -321,7 +321,7 @@ mod tests { sierra = true [dependencies] - starknet = "2.5.0" + starknet = "2.5.4" "#, )) .unwrap(); diff --git a/crates/sncast/tests/data/multicall_configs/deploy_invoke.toml b/crates/sncast/tests/data/multicall_configs/deploy_invoke.toml index 5c289f586b..b5f45be9bf 100644 --- a/crates/sncast/tests/data/multicall_configs/deploy_invoke.toml +++ b/crates/sncast/tests/data/multicall_configs/deploy_invoke.toml @@ -1,13 +1,13 @@ [[call]] call_type = "deploy" -class_hash = "0x43a9554442216b8c5b551c6cae6357ce69fd9838e9bf40fb27b455cac5ba9f4" +class_hash = "0x02a09379665a749e609b4a8459c86fe954566a6beeaddd0950e43f6c700ed321" inputs = [] id = "map_contract" unique = false [[call]] call_type = "invoke" -contract_address = "0x59e877cd42aec5604601f81b5eabd346fc9b0fbbbfba3253859cb68e1d52614" +contract_address = "0x07537a17e169c96cf2b0392508b3a66cbc50c9a811a8a7896529004c5e93fdf6" function = "put" inputs = ["0x123", "234"] diff --git a/crates/sncast/tests/data/multicall_configs/deploy_invoke_calldata_ids.toml b/crates/sncast/tests/data/multicall_configs/deploy_invoke_calldata_ids.toml index 8dfc8deeaf..100ae5d593 100644 --- a/crates/sncast/tests/data/multicall_configs/deploy_invoke_calldata_ids.toml +++ b/crates/sncast/tests/data/multicall_configs/deploy_invoke_calldata_ids.toml @@ -1,20 +1,19 @@ [[call]] call_type = "deploy" -class_hash = "0x43a9554442216b8c5b551c6cae6357ce69fd9838e9bf40fb27b455cac5ba9f4" +class_hash = "0x02a09379665a749e609b4a8459c86fe954566a6beeaddd0950e43f6c700ed321" inputs = [] id = "map_contract" unique = false [[call]] call_type = "invoke" -contract_address = "0x59e877cd42aec5604601f81b5eabd346fc9b0fbbbfba3253859cb68e1d52614" +contract_address = "0x07537a17e169c96cf2b0392508b3a66cbc50c9a811a8a7896529004c5e93fdf6" function = "put" inputs = ["0x123", "map_contract"] [[call]] call_type = "deploy" -class_hash = "0x6d5e0eea81df9a6b03b9be2319a096d5322bd78ff1d2e6e315a91e9a4ac02ed" +class_hash = "0x059426c817fb8103edebdbf1712fa084c6744b2829db9c62d1ea4dce14ee6ded" inputs = ["map_contract", "0x1", "0x1"] id = "constructor-params" unique = false - diff --git a/crates/sncast/tests/data/scripts/deploy/src/with_calldata.cairo b/crates/sncast/tests/data/scripts/deploy/src/with_calldata.cairo index 1c6bc1e7fd..962fb5fca5 100644 --- a/crates/sncast/tests/data/scripts/deploy/src/with_calldata.cairo +++ b/crates/sncast/tests/data/scripts/deploy/src/with_calldata.cairo @@ -5,7 +5,7 @@ use traits::Into; fn main() { let max_fee = 99999999999999999; let salt = 0x3; - let class_hash: ClassHash = 0x6d5e0eea81df9a6b03b9be2319a096d5322bd78ff1d2e6e315a91e9a4ac02ed + let class_hash: ClassHash = 0x059426c817fb8103edebdbf1712fa084c6744b2829db9c62d1ea4dce14ee6ded .try_into() .expect('Invalid class hash value'); diff --git a/crates/sncast/tests/data/scripts/invoke/src/max_fee_too_low.cairo b/crates/sncast/tests/data/scripts/invoke/src/max_fee_too_low.cairo index 6c03493237..f5e5c4d667 100644 --- a/crates/sncast/tests/data/scripts/invoke/src/max_fee_too_low.cairo +++ b/crates/sncast/tests/data/scripts/invoke/src/max_fee_too_low.cairo @@ -3,7 +3,7 @@ use starknet::{ContractAddress, Felt252TryIntoContractAddress}; use traits::Into; fn main() { - let map_contract_address = 0x059e877cd42aec5604601f81b5eabd346fc9b0fbbbfba3253859cb68e1d52614 + let map_contract_address = 0x07537a17e169c96cf2b0392508b3a66cbc50c9a811a8a7896529004c5e93fdf6 .try_into() .expect('Invalid contract address value'); diff --git a/crates/sncast/tests/data/scripts/invoke/src/wrong_calldata.cairo b/crates/sncast/tests/data/scripts/invoke/src/wrong_calldata.cairo index 96a435851a..56fcb60c03 100644 --- a/crates/sncast/tests/data/scripts/invoke/src/wrong_calldata.cairo +++ b/crates/sncast/tests/data/scripts/invoke/src/wrong_calldata.cairo @@ -3,7 +3,7 @@ use starknet::{ContractAddress, Felt252TryIntoContractAddress}; use traits::Into; fn main() { - let map_contract_address = 0x059e877cd42aec5604601f81b5eabd346fc9b0fbbbfba3253859cb68e1d52614 + let map_contract_address = 0x07537a17e169c96cf2b0392508b3a66cbc50c9a811a8a7896529004c5e93fdf6 .try_into() .expect('Invalid contract address value'); diff --git a/crates/sncast/tests/data/scripts/invoke/src/wrong_function_name.cairo b/crates/sncast/tests/data/scripts/invoke/src/wrong_function_name.cairo index 65b24bb118..8fa93d86c3 100644 --- a/crates/sncast/tests/data/scripts/invoke/src/wrong_function_name.cairo +++ b/crates/sncast/tests/data/scripts/invoke/src/wrong_function_name.cairo @@ -3,7 +3,7 @@ use starknet::{ContractAddress, Felt252TryIntoContractAddress}; use traits::Into; fn main() { - let map_contract_address = 0x059e877cd42aec5604601f81b5eabd346fc9b0fbbbfba3253859cb68e1d52614 + let map_contract_address = 0x07537a17e169c96cf2b0392508b3a66cbc50c9a811a8a7896529004c5e93fdf6 .try_into() .expect('Invalid contract address value'); diff --git a/crates/sncast/tests/utils/build_contracts.sh b/crates/sncast/tests/utils/build_contracts.sh index f00a946329..7d9466eee6 100755 --- a/crates/sncast/tests/utils/build_contracts.sh +++ b/crates/sncast/tests/utils/build_contracts.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -SCARB_VERSION="2.5.0" +SCARB_VERSION="2.5.4" REPO_ROOT=$(git rev-parse --show-toplevel) CONTRACTS_DIRECTORY="${REPO_ROOT}/crates/sncast/tests/data/contracts/"