From ac0ab623bf47a05a990bb207a1a262407b38bbb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Mon, 9 Sep 2024 14:21:12 +0200 Subject: [PATCH 01/14] Bumped `starknet-rs` --- Cargo.lock | 1546 ++++++++--------- Cargo.toml | 4 +- crates/cheatnet/src/forking/state.rs | 12 +- .../cheatcodes/precalculate_address.rs | 4 +- .../cheatcodes/storage.rs | 12 +- .../forge_runtime_extension/mod.rs | 4 +- crates/conversions/src/class_hash.rs | 2 - crates/conversions/src/contract_address.rs | 2 - crates/conversions/src/entrypoint_selector.rs | 2 - crates/conversions/src/eth_address.rs | 5 +- crates/conversions/src/felt252.rs | 6 +- crates/conversions/src/field_element.rs | 15 - crates/conversions/src/lib.rs | 12 +- crates/conversions/src/nonce.rs | 2 - .../src/serde/deserialize/deserialize_impl.rs | 4 +- .../src/serde/serialize/serialize_impl.rs | 4 +- crates/conversions/tests/e2e/class_hash.rs | 8 +- .../conversions/tests/e2e/contract_address.rs | 17 +- .../tests/e2e/entrypoint_selector.rs | 8 +- crates/conversions/tests/e2e/felt252.rs | 8 +- .../conversions/tests/e2e/field_elements.rs | 12 +- crates/conversions/tests/e2e/nonce.rs | 8 +- crates/conversions/tests/e2e/string.rs | 8 +- crates/sncast/src/helpers/block_explorer.rs | 38 +- crates/sncast/src/helpers/braavos.rs | 72 +- crates/sncast/src/helpers/constants.rs | 12 +- crates/sncast/src/helpers/fee.rs | 52 +- crates/sncast/src/lib.rs | 90 +- crates/sncast/src/response/print.rs | 4 +- crates/sncast/src/response/structs.rs | 40 +- .../src/starknet_commands/account/add.rs | 14 +- .../src/starknet_commands/account/create.rs | 45 +- .../src/starknet_commands/account/deploy.rs | 34 +- .../src/starknet_commands/account/mod.rs | 10 +- crates/sncast/src/starknet_commands/call.rs | 20 +- .../sncast/src/starknet_commands/declare.rs | 16 +- crates/sncast/src/starknet_commands/deploy.rs | 18 +- crates/sncast/src/starknet_commands/invoke.rs | 26 +- .../src/starknet_commands/multicall/run.rs | 19 +- .../sncast/src/starknet_commands/tx_status.rs | 6 +- crates/sncast/src/starknet_commands/verify.rs | 15 +- crates/sncast/src/state/hashing.rs | 28 +- crates/sncast/src/state/state_file.rs | 23 +- crates/sncast/tests/e2e/account/add.rs | 2 +- crates/sncast/tests/e2e/declare.rs | 7 +- crates/sncast/tests/e2e/deploy.rs | 5 +- crates/sncast/tests/e2e/invoke.rs | 5 +- crates/sncast/tests/helpers/constants.rs | 4 +- crates/sncast/tests/helpers/fixtures.rs | 34 +- crates/sncast/tests/integration/lib_tests.rs | 19 +- .../sncast/tests/integration/wait_for_tx.rs | 6 +- crates/snforge-scarb-plugin/src/parse.rs | 6 +- 52 files changed, 1121 insertions(+), 1254 deletions(-) delete mode 100644 crates/conversions/src/field_element.rs diff --git a/Cargo.lock b/Cargo.lock index fed91b2636..d4795e752e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -17,28 +17,23 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aes" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", "cpufeatures", ] -[[package]] -name = "ahash" -version = "0.7.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a824f2aa7e75a0c98c5a504fceb80649e9c35265d44525b5f94de4771a395cd" -dependencies = [ - "getrandom", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.11" @@ -53,18 +48,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "allocator-api2" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "android-tzdata" @@ -83,47 +78,48 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.11" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.4" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.2" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", "windows-sys 0.52.0", @@ -265,9 +261,9 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii-canvas" @@ -290,9 +286,9 @@ dependencies = [ [[package]] name = "assert_fs" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd762e110c8ed629b11b6cde59458cc1c71de78ebbcc30099fc8e0403a2a2ec" +checksum = "7efdb1fdb47602827a342857666feb372712cbc64b414172bd6b167a02927674" dependencies = [ "anstyle", "doc-comment", @@ -311,13 +307,13 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -328,21 +324,20 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "auto_impl" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.76", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" @@ -354,10 +349,10 @@ dependencies = [ "axum-core", "bytes", "futures-util", - "http 1.0.0", - "http-body 1.0.0", + "http 1.1.0", + "http-body 1.0.1", "http-body-util", - "hyper 1.1.0", + "hyper 1.4.1", "hyper-util", "itoa", "matchit", @@ -370,7 +365,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper 1.0.0", + "sync_wrapper 1.0.1", "tokio", "tower", "tower-layer", @@ -387,8 +382,8 @@ dependencies = [ "async-trait", "bytes", "futures-util", - "http 1.0.0", - "http-body 1.0.0", + "http 1.1.0", + "http-body 1.0.1", "http-body-util", "mime", "pin-project-lite", @@ -401,15 +396,15 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -422,15 +417,15 @@ checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" -version = "0.13.1" +version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "base64" -version = "0.21.5" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" @@ -438,18 +433,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bigdecimal" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" -dependencies = [ - "num-bigint", - "num-integer", - "num-traits 0.2.19", - "serde", -] - [[package]] name = "bimap" version = "0.6.3" @@ -488,9 +471,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "bitvec" @@ -531,7 +514,7 @@ dependencies = [ "cairo-lang-utils", "cairo-vm", "derive_more", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools 0.10.5", "keccak", "log", @@ -555,9 +538,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "542f33a8835a0884b006a0c3df3dadd99c0c3f296ed26c2fdc8028e01ad6230c" +checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" dependencies = [ "memchr", "serde", @@ -565,9 +548,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.14.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-slice-cast" @@ -583,9 +566,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -640,15 +623,15 @@ dependencies = [ [[package]] name = "cached_proc_macro_types" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a4f925191b4367301851c6d99b09890311d74b0d43f274c0b34c86d308a3663" +checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" [[package]] name = "cairo-lang-casm" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4425280959f189d8a5ebf1f5363c10663bc9f843a4819253e6be87d183b583e" +checksum = "ad9e8fe95ee2add1537d00467b98bb8928334633eb01dcba7f33fb64769af259" dependencies = [ "cairo-lang-utils", "indoc", @@ -660,9 +643,9 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2698e2ca73db964e6d496a648fcbb2ace5559941b5179ab3310c9a0b6872b348" +checksum = "0db1ae47b4918a894b60160fac42e6fbcb5a8c0023dd6c290ba03a1bcdf5a554" dependencies = [ "anyhow", "cairo-lang-defs", @@ -677,7 +660,8 @@ dependencies = [ "cairo-lang-syntax", "cairo-lang-utils", "indoc", - "salsa", + "rayon", + "rust-analyzer-salsa", "semver", "smol_str", "thiserror", @@ -685,18 +669,18 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac7332f2b041ca28b24b0311a0b4a35f426bb52836a2d268a8374ea262e9e6b" +checksum = "b1c87b905b74516c33fc7e6d61b5243363ce65133054c30bd9531f47e30ca201" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "079a34b560a82b463cd12ae62022d70981e8ab56b6505f9499348ebeaf460de8" +checksum = "611996d85ec608bfec75d546a5c2ec44f664f4bd2514840a5b369d30a1a8bfdb" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -705,15 +689,15 @@ dependencies = [ "cairo-lang-syntax", "cairo-lang-utils", "itertools 0.12.1", - "salsa", + "rust-analyzer-salsa", "smol_str", ] [[package]] name = "cairo-lang-diagnostics" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c29625349297ad791942377763f5b04c779ea694f436488dc6ad194720b89487" +checksum = "d015a0790b1f5de8b22b4b4b60d392c35bed07b7aa9dd22361af2793835cee51" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -723,9 +707,9 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cb26cd75126db6eaf94d5dffe0ce750d030ac879a88de5a621551969e9b59e3" +checksum = "54c580e56e5857d51b6bf2ec5ed5fdd33fd3b74dad7e3cb6d7398396174a6c85" dependencies = [ "cairo-lang-utils", "good_lp", @@ -733,14 +717,14 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "651012f2956bea884c7a3ab9df21dc76112d7edd3f403b37ca5be62fc3f41b09" +checksum = "5368e66a742b8532d656171525bfea599490280ceee10bdac93ad60775fc4e59" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", "path-clean", - "salsa", + "rust-analyzer-salsa", "semver", "serde", "smol_str", @@ -748,9 +732,9 @@ dependencies = [ [[package]] name = "cairo-lang-formatter" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d09ffb9498368cf4e95d0b28662596331aef1677e4f759ab5e609d27dfcb587" +checksum = "c1200324728e7f4c4acedceee427d9b3ffce221af57e469a454f007cbc248255" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -761,7 +745,7 @@ dependencies = [ "diffy", "ignore", "itertools 0.12.1", - "salsa", + "rust-analyzer-salsa", "serde", "smol_str", "thiserror", @@ -769,9 +753,9 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4ffe6c197c35dec665029fcf695422f02c55b5118b4da1142e182b9fe77f87" +checksum = "2a7a3069c75e1aca7cf15f20d03baf71f5c86e5be26988f6c25656549aa8b54a" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -787,8 +771,7 @@ dependencies = [ "log", "num-bigint", "num-traits 0.2.19", - "once_cell", - "salsa", + "rust-analyzer-salsa", "smol_str", ] @@ -811,7 +794,7 @@ checksum = "e32e958decd95ae122ee64daa26721da2f76e83231047f947fd9cdc5d3c90cc6" dependencies = [ "quote", "scarb-stable-hash", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -822,9 +805,9 @@ checksum = "c49906d6b1c215e5814be7c5c65ecf2328898b335bee8c2409ec07cfb5530daf" [[package]] name = "cairo-lang-parser" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f262ad5f1110ff70c93deb81cce024cf160f4a4518762e7deb2047fe73846789" +checksum = "c13b245ddc740ebfed8b05e1bdb7805a06d267cf89d46486c9609306f92d45ce" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -835,16 +818,16 @@ dependencies = [ "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", - "salsa", + "rust-analyzer-salsa", "smol_str", "unescaper", ] [[package]] name = "cairo-lang-plugins" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18024b44b5edbc1f378ba85c1a4ff04e880ea465a33251053aec507f08250668" +checksum = "3b656552d0ab4a69be223e42c4e1c4028e512f506a237d04bbe4ccab9a1e13c5" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -855,26 +838,26 @@ dependencies = [ "indent", "indoc", "itertools 0.12.1", - "salsa", + "rust-analyzer-salsa", "smol_str", ] [[package]] name = "cairo-lang-proc-macros" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "124402d8fad2a033bb36910dd7d0651f3100845c63dce679c58797a8cb0448c2" +checksum = "05cc6adb49faa42ea825e041dff0496c2e72e4ddaf50734062a62383c0c8adbf" dependencies = [ "cairo-lang-debug", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] name = "cairo-lang-project" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f37dba9653eabf4dcb43a5e1436cd6bc093b5ad6f28ff42eaaef12549014213" +checksum = "ad123ba0e0dd5e1ea80977c0244ff4b0b6d8bf050d42ecb5ff0cf7f885e871f9" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -886,9 +869,9 @@ dependencies = [ [[package]] name = "cairo-lang-runner" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18df87ee986ca0e02e2ea63483875b791602809873c908bbf7b3d592e3833a3a" +checksum = "be1227ee50d291f4221f2befab3c107720bd9eb1a4da3783f61481a05ac055e2" dependencies = [ "ark-ff", "ark-secp256k1", @@ -917,9 +900,9 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1612476b548e9ab8ae89ee38a73d9875339f62f2f59d9ce8a719bc1761c54c3" +checksum = "0d528c79e4ff3e1364569c07e22660ddf60c0d1989705b8f0feed9949962b28a" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -936,17 +919,16 @@ dependencies = [ "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", - "once_cell", - "salsa", + "rust-analyzer-salsa", "smol_str", "toml", ] [[package]] name = "cairo-lang-sierra" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8209be8cf22263bf8a55df334a642b74fe563beecbbbefa55cda39fa4b131a61" +checksum = "1bdb0c2cc419f45ab7e413322502ca02c2a2c56aeabdd0885e3740f378d8b269" dependencies = [ "anyhow", "cairo-lang-utils", @@ -959,9 +941,8 @@ dependencies = [ "num-bigint", "num-integer", "num-traits 0.2.19", - "once_cell", "regex", - "salsa", + "rust-analyzer-salsa", "serde", "serde_json", "sha3", @@ -972,9 +953,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c9d1350366c23e4a9f6e18ea95939f18df52df455f06c0e3d7889f80ce18a94" +checksum = "7224cd827ccf69e742c90a60278876865a96b545a101248d9472d2e02f9190b3" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -988,9 +969,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-gas" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fe1ff15052b173537360b7dca5f9b2ccb10392b2a1c11af99add35d42632115" +checksum = "7e379e3010827fe983e66aa38a0d25fe24cfc11eaf8cadf4dc7bcb31fff031de" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -1004,9 +985,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-generator" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3802e7b6722fabc9cc0a61c86e7ad53138f6f41880aca80a60f889739fbf55" +checksum = "d6b353930676c06bb885a16ec3b120109aa15539c49f41b3370a5a6314dc29dc" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -1020,8 +1001,7 @@ dependencies = [ "cairo-lang-utils", "itertools 0.12.1", "num-traits 0.2.19", - "once_cell", - "salsa", + "rust-analyzer-salsa", "serde", "serde_json", "smol_str", @@ -1029,9 +1009,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355bde3b0a835bac2457af133a9042a7d039c934e678905b843bb6b420884428" +checksum = "83873751d489aae4674f3d755a4897429a664bdc4b0847283e13889f0b0c2a44" dependencies = [ "assert_matches", "cairo-lang-casm", @@ -1050,9 +1030,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ddddaacc814e0ffda9f176c913fb2a9cd74fe6594dea789e8281eef10cac201" +checksum = "5bd84b445715326e44832836732b6bda76a119116b296ac9b6b87e2a4177634a" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -1060,9 +1040,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10be5fd5fe78db232b032e25e4be786f8061606be4ab26371c869c5ab267699c" +checksum = "d8df3086f909d27a49d6706be835725df4e21fb50efe699cd763d1f782a31dea" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1081,7 +1061,6 @@ dependencies = [ "indent", "indoc", "itertools 0.12.1", - "once_cell", "serde", "serde_json", "smol_str", @@ -1091,9 +1070,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet-classes" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7bf919d0919fce727c6d53ee5cb37459c9db35c258521284523c53f5f907c07" +checksum = "41bcab650779b3431389dc52f1e643a7c9690a1aa2b072c8f01955503d094007" dependencies = [ "cairo-lang-casm", "cairo-lang-sierra", @@ -1104,7 +1083,6 @@ dependencies = [ "num-bigint", "num-integer", "num-traits 0.2.19", - "once_cell", "serde", "serde_json", "sha3", @@ -1115,25 +1093,25 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a376f88d815b63505be54a6afa93d75b67cfd65835922ec648cfcbb0a5e4b4" +checksum = "7e2dc876ec02a197b8d13dbfc0b2cf7a7e31dcfc6446761cbb85f5b42d589cdc" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", "cairo-lang-utils", "num-bigint", "num-traits 0.2.19", - "salsa", + "rust-analyzer-salsa", "smol_str", "unescaper", ] [[package]] name = "cairo-lang-syntax-codegen" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01f276bc28f6302fc63032046a12b60d18498906e65f646acb963244eed97f7c" +checksum = "a8727fe3f24ec0834ec6656c70a59f85233439f0a09ca53cf5e27fbdb1b40193" dependencies = [ "genco", "xshell", @@ -1141,15 +1119,14 @@ dependencies = [ [[package]] name = "cairo-lang-test-plugin" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4cc569e35642d48ba2c75ba500397887a54fa5ead441e005b59968445851b99" +checksum = "ad43180395d6e36bb8c43300c0a0175b67962161370857ce0f4ff1ea91ed7094" dependencies = [ "anyhow", "cairo-lang-compiler", "cairo-lang-debug", "cairo-lang-defs", - "cairo-lang-diagnostics", "cairo-lang-filesystem", "cairo-lang-lowering", "cairo-lang-semantic", @@ -1169,9 +1146,9 @@ dependencies = [ [[package]] name = "cairo-lang-test-utils" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e90b6236439e19077ec913351a17a33c7be199dcafdacd8389c4c5199400d6" +checksum = "7a7681562268173d74b1c8d2438a1d9ec3218c89a8e39a8be3f10e044fa46ebe" dependencies = [ "cairo-lang-formatter", "cairo-lang-utils", @@ -1182,12 +1159,12 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.7.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55a394e545f1500bea093d01be40895d3234faaa24d9585d08a509c514cabd88" +checksum = "37e6004780c42bf28ce5afd048cc628b3de34aaf24fd2c228ae73217c58999f9" dependencies = [ "hashbrown 0.14.5", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", @@ -1202,7 +1179,7 @@ version = "1.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -1230,7 +1207,7 @@ dependencies = [ "serde_json", "sha2", "sha3", - "starknet-crypto 0.6.1", + "starknet-crypto 0.6.2", "starknet-types-core", "thiserror-no-std", "zip", @@ -1238,21 +1215,22 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] [[package]] name = "cc" -version = "1.0.83" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -1308,15 +1286,15 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits 0.2.19", "serde", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -1331,9 +1309,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.13" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -1341,14 +1319,14 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.13" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim 0.11.0", + "strsim 0.11.1", ] [[package]] @@ -1360,14 +1338,14 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] name = "clap_lex" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "clipboard-win" @@ -1382,9 +1360,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "colored" @@ -1512,59 +1490,52 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.3.2" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-deque" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.16" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset 0.9.0", ] [[package]] name = "crossbeam-utils" -version = "0.8.17" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" -dependencies = [ - "cfg-if", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1601,7 +1572,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -1625,12 +1596,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.3", - "darling_macro 0.20.3", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -1649,16 +1620,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.72", + "strsim 0.11.1", + "syn 2.0.76", ] [[package]] @@ -1674,20 +1645,20 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.3" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.3", + "darling_core 0.20.10", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" [[package]] name = "deadpool" @@ -1709,9 +1680,9 @@ checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "pem-rfc7468", @@ -1720,9 +1691,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", "serde", @@ -1741,15 +1712,15 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.76", ] [[package]] @@ -1835,9 +1806,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "dyn-clone" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecdsa" @@ -1856,9 +1827,9 @@ dependencies = [ [[package]] name = "either" -version = "1.9.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -1883,9 +1854,9 @@ dependencies = [ [[package]] name = "ena" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" dependencies = [ "log", ] @@ -1898,9 +1869,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.33" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] @@ -1919,9 +1890,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1988,9 +1959,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fd-lock" @@ -2033,12 +2004,12 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -2134,7 +2105,7 @@ dependencies = [ "thiserror", "tokio", "tokio-util", - "toml_edit 0.22.12", + "toml_edit", "trace-data", "universal-sierra-compiler-api", "url", @@ -2288,7 +2259,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -2323,9 +2294,9 @@ dependencies = [ [[package]] name = "genco" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98d7af598790738fee616426e669360fa361273b1b9c9b7f30c92fa627605cad" +checksum = "afac3cbb14db69ac9fef9cdb60d8a87e39a7a527f85a81a923436efa40ad42c6" dependencies = [ "genco-macros", "relative-path", @@ -2334,13 +2305,13 @@ dependencies = [ [[package]] name = "genco-macros" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4cf186fea4af17825116f72932fe52cce9a13bae39ff63b4dc0cfdb3fb4bde1" +checksum = "553630feadf7b76442b0849fd25fdf89b860d933623aec9693fed19af0400c78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -2356,9 +2327,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -2369,9 +2340,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -2389,7 +2360,7 @@ dependencies = [ "bstr", "log", "regex-automata", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] @@ -2398,7 +2369,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "ignore", "walkdir", ] @@ -2426,17 +2397,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.22" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http 0.2.11", - "indexmap 2.2.6", + "http 0.2.12", + "indexmap 2.4.0", "slab", "tokio", "tokio-util", @@ -2445,17 +2416,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.0.0", - "indexmap 2.2.6", + "http 1.1.0", + "indexmap 2.4.0", "slab", "tokio", "tokio-util", @@ -2467,9 +2438,6 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.7", -] [[package]] name = "hashbrown" @@ -2477,7 +2445,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.11", + "ahash", ] [[package]] @@ -2486,20 +2454,11 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.11", + "ahash", "allocator-api2", "serde", ] -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "heck" version = "0.4.1" @@ -2514,9 +2473,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.3" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] name = "hex" @@ -2535,18 +2494,18 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -2555,9 +2514,9 @@ dependencies = [ [[package]] name = "http" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ "bytes", "fnv", @@ -2571,38 +2530,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http 0.2.11", + "http 0.2.12", "pin-project-lite", ] [[package]] name = "http-body" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.0.0", + "http 1.1.0", ] [[package]] name = "http-body-util" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.0.0", - "http-body 1.0.0", + "http 1.1.0", + "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -2612,22 +2571,22 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2 0.3.22", - "http 0.2.11", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.6", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.10", + "socket2", "tokio", "tower-service", "tracing", @@ -2636,20 +2595,21 @@ dependencies = [ [[package]] name = "hyper" -version = "1.1.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.5", - "http 1.0.0", - "http-body 1.0.0", + "h2 0.4.6", + "http 1.1.0", + "http-body 1.0.1", "httparse", "httpdate", "itoa", "pin-project-lite", + "smallvec", "tokio", "want", ] @@ -2661,8 +2621,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http 0.2.11", - "hyper 0.14.27", + "http 0.2.12", + "hyper 0.14.30", "rustls", "tokio", "tokio-rustls", @@ -2675,7 +2635,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper 0.14.27", + "hyper 0.14.30", "native-tls", "tokio", "tokio-native-tls", @@ -2683,25 +2643,24 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.3" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" dependencies = [ "bytes", "futures-util", - "http 1.0.0", - "http-body 1.0.0", - "hyper 1.1.0", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", "pin-project-lite", - "socket2 0.5.5", "tokio", ] [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2834,9 +2793,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2845,9 +2804,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" dependencies = [ "console", "instant", @@ -2873,9 +2832,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -2887,15 +2846,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] -name = "is-terminal" -version = "0.4.9" +name = "is_terminal_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys 0.48.0", -] +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -2926,24 +2880,24 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.66" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2974,25 +2928,24 @@ dependencies = [ [[package]] name = "lalrpop" -version = "0.20.0" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" dependencies = [ "ascii-canvas", "bit-set", - "diff", "ena", - "is-terminal", - "itertools 0.10.5", + "itertools 0.11.0", "lalrpop-util", "petgraph", "pico-args", "regex", - "regex-syntax 0.7.5", + "regex-syntax", "string_cache", "term", "tiny-keccak", "unicode-xid", + "walkdir", ] [[package]] @@ -3037,52 +2990,51 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.153" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "libc", - "redox_syscall 0.4.1", ] [[package]] name = "linkme" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2cfee0de9bd869589fb9a015e155946d1be5ff415cb844c2caccc6cc4b5db9" +checksum = "3c943daedff228392b791b33bba32e75737756e80a613e32e246c6ce9cbab20a" dependencies = [ "linkme-impl", ] [[package]] name = "linkme-impl" -version = "0.3.25" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adf157a4dc5a29b7b464aa8fe7edeff30076e07e13646a1c3874f58477dc99f8" +checksum = "cb26336e6dc7cc76e7927d2c9e7e3bb376d7af65a6f56a0b16c47d18a9b1abc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] name = "linux-raw-sys" -version = "0.4.12" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -3096,11 +3048,11 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.7.8" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" dependencies = [ - "hashbrown 0.12.3", + "hashbrown 0.14.5", ] [[package]] @@ -3120,9 +3072,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.4" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memoffset" @@ -3133,15 +3085,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - [[package]] name = "mime" version = "0.3.17" @@ -3166,31 +3109,40 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "0.8.10" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi", "libc", "wasi", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "native-tls" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" dependencies = [ - "lazy_static", "libc", "log", "openssl", @@ -3217,9 +3169,9 @@ dependencies = [ [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nibble_vec" @@ -3240,7 +3192,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "memoffset 0.6.5", + "memoffset", ] [[package]] @@ -3291,6 +3243,12 @@ dependencies = [ "num-traits 0.2.19", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-integer" version = "0.1.46" @@ -3313,9 +3271,9 @@ dependencies = [ [[package]] name = "num-prime" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4e3bc495f6e95bc15a6c0c55ac00421504a5a43d09e3cc455d1fea7015581d" +checksum = "e238432a7881ec7164503ccc516c014bf009be7984cde1ba56837862543bdec3" dependencies = [ "bitvec", "either", @@ -3329,11 +3287,10 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" dependencies = [ - "autocfg", "num-bigint", "num-integer", "num-traits 0.2.19", @@ -3376,9 +3333,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.1" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -3391,17 +3348,17 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "openssl" -version = "0.10.64" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "cfg-if", "foreign-types", "libc", @@ -3418,7 +3375,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -3429,18 +3386,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.2.3+3.2.1" +version = "300.3.1+3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cff92b6f71555b61bb9315f7c64da3ca43d87531622120fea0195fc761b4843" +checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.102" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -3502,50 +3459,25 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", - "parking_lot_core 0.9.9", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.9.9" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", + "redox_syscall", "smallvec", - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -3600,12 +3532,12 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "petgraph" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.4.0", ] [[package]] @@ -3638,7 +3570,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -3667,29 +3599,29 @@ checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315" [[package]] name = "pin-project" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -3709,15 +3641,15 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.27" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -3727,9 +3659,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -3739,27 +3674,26 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "predicates" -version = "3.0.4" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0" +checksum = "7e9086cc7640c29a356d1a29fd134380bee9d8f79a17410aa76e7ad295f42c97" dependencies = [ "anstyle", "difflib", - "itertools 0.11.0", "predicates-core", ] [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", @@ -3800,35 +3734,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" -dependencies = [ - "toml_edit 0.21.1", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "proc-macro2", - "quote", - "version_check", + "toml_edit", ] [[package]] @@ -3857,9 +3767,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3938,27 +3848,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", @@ -3967,44 +3868,38 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", "regex-automata", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - -[[package]] -name = "regex-syntax" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relative-path" -version = "1.9.0" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c707298afce11da2efef2f600116fa93ffa7a032b5d7b628aa17711ec81383ca" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" @@ -4012,15 +3907,15 @@ version = "0.11.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.3.22", - "http 0.2.11", + "h2 0.3.26", + "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.27", + "hyper 0.14.30", "hyper-rustls", "hyper-tls", "ipnet", @@ -4060,16 +3955,17 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", + "cfg-if", "getrandom", "libc", "spin", "untrusted", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4126,11 +4022,40 @@ dependencies = [ "thiserror", ] +[[package]] +name = "rust-analyzer-salsa" +version = "0.17.0-pre.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719825638c59fd26a55412a24561c7c5bcf54364c88b9a7a04ba08a6eafaba8d" +dependencies = [ + "indexmap 2.4.0", + "lock_api", + "oorandom", + "parking_lot", + "rust-analyzer-salsa-macros", + "rustc-hash", + "smallvec", + "tracing", + "triomphe", +] + +[[package]] +name = "rust-analyzer-salsa-macros" +version = "0.17.0-pre.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d96498e9684848c6676c399032ebc37c52da95ecbefa83d71ccc53b9f8a4a8e" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.76", +] + [[package]] name = "rust_decimal" -version = "1.35.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ "arrayvec", "num-traits 0.2.19", @@ -4138,9 +4063,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -4156,20 +4081,20 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ - "bitflags 2.4.1", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -4178,9 +4103,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring", @@ -4194,7 +4119,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", ] [[package]] @@ -4209,9 +4134,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "rustyline" @@ -4239,38 +4164,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "salsa" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b84d9f96071f3f3be0dc818eae3327625d8ebc95b58da37d6850724f31d3403" -dependencies = [ - "crossbeam-utils", - "indexmap 1.9.3", - "lock_api", - "log", - "oorandom", - "parking_lot 0.11.2", - "rustc-hash", - "salsa-macros", - "smallvec", -] - -[[package]] -name = "salsa-macros" -version = "0.16.0" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3904a4ba0a9d0211816177fd34b04c7095443f8cdacd11175064fe541c8fe2" -dependencies = [ - "heck 0.3.3", - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "salsa20" @@ -4352,11 +4248,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4381,7 +4277,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -4429,11 +4325,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -4442,9 +4338,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -4461,40 +4357,40 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.203" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] name = "serde_derive_internals" -version = "0.29.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] name = "serde_json" -version = "1.0.122" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", "memchr", @@ -4525,9 +4421,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.5" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", ] @@ -4546,15 +4442,17 @@ dependencies = [ [[package]] name = "serde_with" -version = "2.3.3" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" dependencies = [ - "base64 0.13.1", + "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", + "indexmap 2.4.0", "serde", + "serde_derive", "serde_json", "serde_with_macros", "time", @@ -4562,14 +4460,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "2.3.3" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" dependencies = [ - "darling 0.20.3", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -4638,11 +4536,17 @@ dependencies = [ "dirs", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" -version = "1.4.1" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" dependencies = [ "libc", ] @@ -4659,9 +4563,9 @@ dependencies = [ [[package]] name = "similar" -version = "2.3.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aeaf503862c419d66959f5d7ca015337d864e9c49485d771b732e2a20453597" +checksum = "1de1d4f81173b03af4c0cbed3c898f6bff5b870e4a7f5d6f4057d62a7a4b686e" [[package]] name = "siphasher" @@ -4680,9 +4584,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smol_str" @@ -4708,9 +4612,9 @@ dependencies = [ [[package]] name = "snapbox-macros" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1c4b838b05d15ab22754068cb73500b2f3b07bf09d310e15b27f88160f1de40" +checksum = "16569f53ca23a41bb6f62e0a5084aa1661f4814a67fa33696a79073e03a664af" dependencies = [ "anstream", ] @@ -4758,7 +4662,7 @@ dependencies = [ "shellexpand", "snapbox", "starknet", - "starknet-crypto 0.6.2", + "starknet-crypto 0.7.1", "starknet-types-core", "tempfile", "test-case", @@ -4792,22 +4696,12 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4837,16 +4731,21 @@ dependencies = [ "num-traits 0.1.43", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "starknet" -version = "0.10.0" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=56177d2#56177d2aaf98cf8b95ee5fb8c77e0229ca088ee3" +version = "0.11.0" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=660a732#660a7323169bbcdaea71b4f0e939631e3aaabd45" dependencies = [ "starknet-accounts", "starknet-contract", "starknet-core", - "starknet-crypto 0.6.2", - "starknet-ff 0.3.7", + "starknet-crypto 0.7.1", "starknet-macros", "starknet-providers", "starknet-signers", @@ -4854,13 +4753,13 @@ dependencies = [ [[package]] name = "starknet-accounts" -version = "0.9.0" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=56177d2#56177d2aaf98cf8b95ee5fb8c77e0229ca088ee3" +version = "0.10.0" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=660a732#660a7323169bbcdaea71b4f0e939631e3aaabd45" dependencies = [ "async-trait", "auto_impl", "starknet-core", - "starknet-crypto 0.6.2", + "starknet-crypto 0.7.1", "starknet-providers", "starknet-signers", "thiserror", @@ -4868,8 +4767,8 @@ dependencies = [ [[package]] name = "starknet-contract" -version = "0.9.0" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=56177d2#56177d2aaf98cf8b95ee5fb8c77e0229ca088ee3" +version = "0.10.0" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=660a732#660a7323169bbcdaea71b4f0e939631e3aaabd45" dependencies = [ "serde", "serde_json", @@ -4882,10 +4781,10 @@ dependencies = [ [[package]] name = "starknet-core" -version = "0.10.0" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=56177d2#56177d2aaf98cf8b95ee5fb8c77e0229ca088ee3" +version = "0.11.1" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=660a732#660a7323169bbcdaea71b4f0e939631e3aaabd45" dependencies = [ - "base64 0.21.5", + "base64 0.21.7", "crypto-bigint", "flate2", "hex", @@ -4894,8 +4793,8 @@ dependencies = [ "serde_json_pythonic", "serde_with", "sha3", - "starknet-crypto 0.6.2", - "starknet-ff 0.3.7", + "starknet-crypto 0.7.1", + "starknet-types-core", ] [[package]] @@ -4912,17 +4811,17 @@ dependencies = [ "num-traits 0.2.19", "rfc6979", "sha2", - "starknet-crypto-codegen 0.3.2", + "starknet-crypto-codegen", "starknet-curve 0.3.0", - "starknet-ff 0.3.5", + "starknet-ff", "zeroize", ] [[package]] name = "starknet-crypto" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c03f5ac70f9b067f48db7d2d70bdf18ee0f731e8192b6cfa679136becfcdb0" +checksum = "2e2c30c01e8eb0fc913c4ee3cf676389fffc1d1182bfe5bb9670e4e72e968064" dependencies = [ "crypto-bigint", "hex", @@ -4932,16 +4831,16 @@ dependencies = [ "num-traits 0.2.19", "rfc6979", "sha2", - "starknet-crypto-codegen 0.3.2", - "starknet-curve 0.4.0", - "starknet-ff 0.3.5", + "starknet-crypto-codegen", + "starknet-curve 0.4.2", + "starknet-ff", "zeroize", ] [[package]] name = "starknet-crypto" -version = "0.6.2" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=56177d2#56177d2aaf98cf8b95ee5fb8c77e0229ca088ee3" +version = "0.7.1" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=660a732#660a7323169bbcdaea71b4f0e939631e3aaabd45" dependencies = [ "crypto-bigint", "hex", @@ -4951,31 +4850,20 @@ dependencies = [ "num-traits 0.2.19", "rfc6979", "sha2", - "starknet-crypto-codegen 0.3.3", - "starknet-curve 0.4.2", - "starknet-ff 0.3.7", + "starknet-curve 0.5.0", + "starknet-types-core", "zeroize", ] -[[package]] -name = "starknet-crypto-codegen" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af6527b845423542c8a16e060ea1bc43f67229848e7cd4c4d80be994a84220ce" -dependencies = [ - "starknet-curve 0.4.0", - "starknet-ff 0.3.5", - "syn 2.0.72", -] - [[package]] name = "starknet-crypto-codegen" version = "0.3.3" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=56177d2#56177d2aaf98cf8b95ee5fb8c77e0229ca088ee3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve 0.4.2", - "starknet-ff 0.3.7", - "syn 2.0.72", + "starknet-ff", + "syn 2.0.76", ] [[package]] @@ -4984,70 +4872,57 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "252610baff59e4c4332ce3569f7469c5d3f9b415a2240d698fb238b2b4fc0942" dependencies = [ - "starknet-ff 0.3.5", + "starknet-ff", ] [[package]] name = "starknet-curve" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a68a0d87ae56572abf83ddbfd44259a7c90dbeeee1629a1ffe223e7f9a8f3052" +checksum = "d1c383518bb312751e4be80f53e8644034aa99a0afb29d7ac41b89a997db875b" dependencies = [ - "starknet-ff 0.3.5", + "starknet-ff", ] [[package]] name = "starknet-curve" -version = "0.4.2" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=56177d2#56177d2aaf98cf8b95ee5fb8c77e0229ca088ee3" -dependencies = [ - "starknet-ff 0.3.7", -] - -[[package]] -name = "starknet-ff" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7584bc732e4d2a8ccebdd1dda8236f7940a79a339e30ebf338d45c329659e36c" +version = "0.5.0" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=660a732#660a7323169bbcdaea71b4f0e939631e3aaabd45" dependencies = [ - "ark-ff", - "crypto-bigint", - "getrandom", - "hex", + "starknet-types-core", ] [[package]] name = "starknet-ff" version = "0.3.7" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=56177d2#56177d2aaf98cf8b95ee5fb8c77e0229ca088ee3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abf1b44ec5b18d87c1ae5f54590ca9d0699ef4dd5b2ffa66fc97f24613ec585" dependencies = [ "ark-ff", - "bigdecimal", "crypto-bigint", "getrandom", "hex", - "num-bigint", - "serde", ] [[package]] name = "starknet-macros" -version = "0.1.7" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=56177d2#56177d2aaf98cf8b95ee5fb8c77e0229ca088ee3" +version = "0.2.0" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=660a732#660a7323169bbcdaea71b4f0e939631e3aaabd45" dependencies = [ "starknet-core", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] name = "starknet-providers" -version = "0.10.0" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=56177d2#56177d2aaf98cf8b95ee5fb8c77e0229ca088ee3" +version = "0.11.0" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=660a732#660a7323169bbcdaea71b4f0e939631e3aaabd45" dependencies = [ "async-trait", "auto_impl", "ethereum-types", "flate2", + "getrandom", "log", "reqwest", "serde", @@ -5060,16 +4935,17 @@ dependencies = [ [[package]] name = "starknet-signers" -version = "0.8.0" -source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=56177d2#56177d2aaf98cf8b95ee5fb8c77e0229ca088ee3" +version = "0.9.0" +source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=660a732#660a7323169bbcdaea71b4f0e939631e3aaabd45" dependencies = [ "async-trait", "auto_impl", "crypto-bigint", "eth-keystore", + "getrandom", "rand", "starknet-core", - "starknet-crypto 0.6.2", + "starknet-crypto 0.7.1", "thiserror", ] @@ -5098,7 +4974,7 @@ dependencies = [ "cairo-lang-starknet-classes", "derive_more", "hex", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools 0.12.1", "once_cell", "primitive-types", @@ -5132,7 +5008,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "phf_shared 0.10.0", "precomputed-hash", ] @@ -5145,9 +5021,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strsim" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" @@ -5184,14 +5060,14 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -5206,9 +5082,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" dependencies = [ "proc-macro2", "quote", @@ -5223,9 +5099,9 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "sync_wrapper" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384595c11a4e2969895cad5a8c4029115f5ab956a9e5ef4de79d11a426e5f20c" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" [[package]] name = "tap" @@ -5235,14 +5111,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5280,7 +5157,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -5291,7 +5168,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", "test-case-core", ] @@ -5330,22 +5207,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -5370,12 +5247,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.30" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", + "num-conv", "powerfmt", "serde", "time-core", @@ -5390,10 +5268,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.15" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ + "num-conv", "time-core", ] @@ -5408,9 +5287,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] @@ -5423,32 +5302,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", - "parking_lot 0.12.1", + "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -5486,47 +5364,36 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.12" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.12", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow 0.5.28", -] - -[[package]] -name = "toml_edit" -version = "0.22.12" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.5", + "winnow", ] [[package]] @@ -5547,15 +5414,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "trace-data" @@ -5574,9 +5441,21 @@ checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "log", "pin-project-lite", + "tracing-attributes", "tracing-core", ] +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.76", +] + [[package]] name = "tracing-core" version = "0.1.32" @@ -5587,6 +5466,16 @@ dependencies = [ "valuable", ] +[[package]] +name = "triomphe" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6631e42e10b40c0690bf92f404ebcfe6e1fdb480391d15f17cc8e96eeed5369" +dependencies = [ + "serde", + "stable_deref_trait", +] + [[package]] name = "try-lock" version = "0.2.5" @@ -5613,18 +5502,18 @@ dependencies = [ [[package]] name = "unescaper" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f0f68e58d297ba8b22b8b5a96a87b863ba6bb46aaf51e19a4b02c5a6dd5b7f" +checksum = "c878a167baa8afd137494101a688ef8c67125089ff2249284bd2b5f9bfedb815" dependencies = [ "thiserror", ] [[package]] name = "unicode-bidi" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" @@ -5634,30 +5523,30 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.11" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "universal-sierra-compiler-api" @@ -5693,9 +5582,9 @@ dependencies = [ [[package]] name = "utf8parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" @@ -5721,9 +5610,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "walkdir" @@ -5752,34 +5641,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.89" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.89" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.39" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -5789,9 +5679,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.89" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5799,28 +5689,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.89" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.89" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.66" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -5876,11 +5766,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -5891,11 +5781,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.52.6", ] [[package]] @@ -5913,7 +5803,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -5933,17 +5832,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -5954,9 +5854,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -5966,9 +5866,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -5978,9 +5878,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -5990,9 +5896,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -6002,9 +5908,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -6014,9 +5920,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -6026,24 +5932,15 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" - -[[package]] -name = "winnow" -version = "0.5.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c830786f7720c2fd27a1a0e27a709dbd3c4d009b56d098fc742d4f4eab91fe2" -dependencies = [ - "memchr", -] +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.5" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" dependencies = [ "memchr", ] @@ -6065,12 +5962,12 @@ checksum = "6a59f8ae78a4737fb724f20106fb35ccb7cfe61ff335665d3042b3aa98e34717" dependencies = [ "assert-json-diff", "async-trait", - "base64 0.21.5", + "base64 0.21.7", "deadpool", "futures", - "http 1.0.0", + "http 1.1.0", "http-body-util", - "hyper 1.1.0", + "hyper 1.4.1", "hyper-util", "log", "once_cell", @@ -6107,9 +6004,9 @@ checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852" [[package]] name = "xxhash-rust" -version = "0.8.10" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" +checksum = "6a5cbf750400958819fb6178eaa83bee5cd9c29a26a40cc241df8c70fdd46984" [[package]] name = "yansi" @@ -6119,29 +6016,30 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "zerocopy" -version = "0.7.31" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.31" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] name = "zeroize" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" dependencies = [ "zeroize_derive", ] @@ -6154,7 +6052,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.76", ] [[package]] @@ -6198,9 +6096,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.11+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index f2b91ecc19..d98dcdb57d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,8 +64,8 @@ rayon = "1.10" regex = "1.10.5" serde = { version = "1.0.203", features = ["derive"] } serde_json = "1.0.119" -starknet = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "56177d2" } -starknet-crypto = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "56177d2" } +starknet = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "660a732" } +starknet-crypto = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "660a732" } trace-data = { git = "https://github.com/software-mansion/cairo-profiler/", rev = "e61a4a7" } tempfile = "3.10.1" thiserror = "1.0.61" diff --git a/crates/cheatnet/src/forking/state.rs b/crates/cheatnet/src/forking/state.rs index 328eb12cd6..86a99d53f8 100644 --- a/crates/cheatnet/src/forking/state.rs +++ b/crates/cheatnet/src/forking/state.rs @@ -16,7 +16,7 @@ use flate2::read::GzDecoder; use num_bigint::BigUint; use runtime::starknet::context::SerializableGasPrices; use starknet::core::types::{ - BlockId, ContractClass as ContractClassStarknet, FieldElement, MaybePendingBlockWithTxHashes, + BlockId, ContractClass as ContractClassStarknet, Felt, MaybePendingBlockWithTxHashes, StarknetError, }; use starknet::core::utils::parse_cairo_short_string; @@ -127,8 +127,8 @@ impl StateReader for ForkStateReader { } match self.runtime.block_on(self.client.get_storage_at( - FieldElement::from_(contract_address), - FieldElement::from_(*key.0.key()), + Felt::from_(contract_address), + Felt::from_(*key.0.key()), self.block_id(), )) { Ok(value) => { @@ -152,7 +152,7 @@ impl StateReader for ForkStateReader { match self.runtime.block_on( self.client - .get_nonce(self.block_id(), FieldElement::from_(contract_address)), + .get_nonce(self.block_id(), Felt::from_(contract_address)), ) { Ok(nonce) => { let nonce = nonce.into_(); @@ -178,7 +178,7 @@ impl StateReader for ForkStateReader { match self.runtime.block_on( self.client - .get_class_hash_at(self.block_id(), FieldElement::from_(contract_address)), + .get_class_hash_at(self.block_id(), Felt::from_(contract_address)), ) { Ok(class_hash) => { let class_hash = class_hash.into_(); @@ -209,7 +209,7 @@ impl StateReader for ForkStateReader { } else { match self.runtime.block_on( self.client - .get_class(self.block_id(), FieldElement::from_(class_hash)), + .get_class(self.block_id(), Felt::from_(class_hash)), ) { Ok(contract_class) => { Ok(cache.insert_compiled_contract_class(class_hash, contract_class)) diff --git a/crates/cheatnet/src/runtime_extensions/forge_runtime_extension/cheatcodes/precalculate_address.rs b/crates/cheatnet/src/runtime_extensions/forge_runtime_extension/cheatcodes/precalculate_address.rs index 16a0fb7ec0..f467bdb18c 100644 --- a/crates/cheatnet/src/runtime_extensions/forge_runtime_extension/cheatcodes/precalculate_address.rs +++ b/crates/cheatnet/src/runtime_extensions/forge_runtime_extension/cheatcodes/precalculate_address.rs @@ -1,7 +1,7 @@ use crate::CheatnetState; use cairo_vm::Felt252; use conversions::IntoConv; -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use starknet_api::core::{calculate_contract_address, ClassHash, ContractAddress}; use crate::constants as crate_constants; @@ -17,7 +17,7 @@ impl CheatnetState { let salt = self.get_salt(); let execute_calldata = create_execute_calldata(calldata); - let deployer_address = FieldElement::from_hex_be(crate_constants::TEST_ADDRESS).unwrap(); + let deployer_address = Felt::from_hex(crate_constants::TEST_ADDRESS).unwrap(); calculate_contract_address( salt, *class_hash, diff --git a/crates/cheatnet/src/runtime_extensions/forge_runtime_extension/cheatcodes/storage.rs b/crates/cheatnet/src/runtime_extensions/forge_runtime_extension/cheatcodes/storage.rs index 8826c02653..3db91b3f14 100644 --- a/crates/cheatnet/src/runtime_extensions/forge_runtime_extension/cheatcodes/storage.rs +++ b/crates/cheatnet/src/runtime_extensions/forge_runtime_extension/cheatcodes/storage.rs @@ -2,10 +2,11 @@ use blockifier::state::state_api::State; use cairo_vm::Felt252; use conversions::{FromConv, IntoConv}; use starknet::core::crypto::pedersen_hash; -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use starknet_api::core::{ContractAddress, PatriciaKey}; use starknet_api::hash::StarkHash; use starknet_api::state::StorageKey; +use starknet_types_core::felt::NonZeroFelt; /// /// # Arguments @@ -50,14 +51,15 @@ pub fn load( /// For details see: /// #[must_use] -fn normalize_storage_address(address: FieldElement) -> FieldElement { - let modulus: Felt252 = Felt252::from(2).pow(251_u128) - Felt252::from(256); - address % modulus.into_() +fn normalize_storage_address(address: Felt) -> Felt { + let modulus = + NonZeroFelt::from_felt_unchecked(Felt252::from(2).pow(251_u128) - Felt252::from(256)); + address.mod_floor(&modulus) } #[must_use] pub fn calculate_variable_address(selector: Felt252, key: Option<&[Felt252]>) -> Felt252 { - let mut address: FieldElement = selector.into_(); + let mut address: Felt = selector.into_(); match key { None => address.into_(), Some(key) => { diff --git a/crates/cheatnet/src/runtime_extensions/forge_runtime_extension/mod.rs b/crates/cheatnet/src/runtime_extensions/forge_runtime_extension/mod.rs index 68150d9624..f05bdbc8cd 100644 --- a/crates/cheatnet/src/runtime_extensions/forge_runtime_extension/mod.rs +++ b/crates/cheatnet/src/runtime_extensions/forge_runtime_extension/mod.rs @@ -43,7 +43,7 @@ use runtime::{ CheatcodeHandlingResult, EnhancedHintError, ExtendedRuntime, ExtensionLogic, SyscallHandlingResult, }; -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use starknet::signers::SigningKey; use starknet_api::{core::ClassHash, deprecated_contract_class::EntryPointType::L1Handler}; use std::collections::HashMap; @@ -324,7 +324,7 @@ impl<'a> ExtensionLogic for ForgeExtension<'a> { let private_key = input_reader.read()?; let message_hash = input_reader.read()?; - if private_key == FieldElement::from(0_u8) { + if private_key == Felt::from(0_u8) { return Ok(CheatcodeHandlingResult::from_serializable(Err::<(), _>( SignError::InvalidSecretKey, ))); diff --git a/crates/conversions/src/class_hash.rs b/crates/conversions/src/class_hash.rs index 34599fb481..bfcc70e250 100644 --- a/crates/conversions/src/class_hash.rs +++ b/crates/conversions/src/class_hash.rs @@ -1,5 +1,4 @@ use crate::{from_thru_felt252, FromConv, IntoConv}; -use starknet::core::types::FieldElement; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}; use starknet_types_core::felt::Felt as Felt252; @@ -9,7 +8,6 @@ impl FromConv for ClassHash { } } -from_thru_felt252!(FieldElement, ClassHash); from_thru_felt252!(ContractAddress, ClassHash); from_thru_felt252!(Nonce, ClassHash); from_thru_felt252!(EntryPointSelector, ClassHash); diff --git a/crates/conversions/src/contract_address.rs b/crates/conversions/src/contract_address.rs index cac98d6975..13aa7d2e64 100644 --- a/crates/conversions/src/contract_address.rs +++ b/crates/conversions/src/contract_address.rs @@ -1,5 +1,4 @@ use crate::{from_thru_felt252, FromConv}; -use starknet::core::types::FieldElement; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce, PatriciaKey}; use starknet_api::hash::StarkHash; use starknet_types_core::felt::Felt as Felt252; @@ -10,7 +9,6 @@ impl FromConv for ContractAddress { } } -from_thru_felt252!(FieldElement, ContractAddress); from_thru_felt252!(ClassHash, ContractAddress); from_thru_felt252!(Nonce, ContractAddress); from_thru_felt252!(EntryPointSelector, ContractAddress); diff --git a/crates/conversions/src/entrypoint_selector.rs b/crates/conversions/src/entrypoint_selector.rs index b7cc6e3d33..369b4076cb 100644 --- a/crates/conversions/src/entrypoint_selector.rs +++ b/crates/conversions/src/entrypoint_selector.rs @@ -1,5 +1,4 @@ use crate::{from_thru_felt252, FromConv, IntoConv}; -use starknet::core::types::FieldElement; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}; use starknet_types_core::felt::Felt as Felt252; @@ -9,7 +8,6 @@ impl FromConv for EntryPointSelector { } } -from_thru_felt252!(FieldElement, EntryPointSelector); from_thru_felt252!(ContractAddress, EntryPointSelector); from_thru_felt252!(Nonce, EntryPointSelector); from_thru_felt252!(ClassHash, EntryPointSelector); diff --git a/crates/conversions/src/eth_address.rs b/crates/conversions/src/eth_address.rs index 355f7796bf..2a6b7aee2c 100644 --- a/crates/conversions/src/eth_address.rs +++ b/crates/conversions/src/eth_address.rs @@ -1,5 +1,4 @@ -use crate::{from_thru_felt252, FromConv}; -use starknet::core::types::FieldElement; +use crate::FromConv; use starknet_api::core::EthAddress; use starknet_types_core::felt::Felt as Felt252; @@ -14,5 +13,3 @@ impl FromConv for Felt252 { value.into() } } - -from_thru_felt252!(FieldElement, EthAddress); diff --git a/crates/conversions/src/felt252.rs b/crates/conversions/src/felt252.rs index 4c0be28d7e..fc84dd5c74 100644 --- a/crates/conversions/src/felt252.rs +++ b/crates/conversions/src/felt252.rs @@ -4,13 +4,13 @@ use crate::{ string::{TryFromDecStr, TryFromHexStr}, FromConv, IntoConv, }; -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}; use starknet_types_core::felt::{Felt as Felt252, FromStrError}; use std::vec; -impl FromConv for Felt252 { - fn from_(value: FieldElement) -> Felt252 { +impl FromConv for Felt252 { + fn from_(value: Felt) -> Felt252 { Felt252::from_bytes_be(&value.to_bytes_be()) } } diff --git a/crates/conversions/src/field_element.rs b/crates/conversions/src/field_element.rs deleted file mode 100644 index 10a60387e3..0000000000 --- a/crates/conversions/src/field_element.rs +++ /dev/null @@ -1,15 +0,0 @@ -use crate::{from_thru_felt252, FromConv}; -use starknet::core::types::FieldElement; -use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}; -use starknet_types_core::felt::Felt as Felt252; - -impl FromConv for FieldElement { - fn from_(value: Felt252) -> FieldElement { - FieldElement::from_bytes_be(&value.to_bytes_be()).unwrap() - } -} - -from_thru_felt252!(ContractAddress, FieldElement); -from_thru_felt252!(ClassHash, FieldElement); -from_thru_felt252!(Nonce, FieldElement); -from_thru_felt252!(EntryPointSelector, FieldElement); diff --git a/crates/conversions/src/lib.rs b/crates/conversions/src/lib.rs index 981878fd3d..198e482a31 100644 --- a/crates/conversions/src/lib.rs +++ b/crates/conversions/src/lib.rs @@ -6,8 +6,8 @@ pub mod contract_address; pub mod entrypoint_selector; pub mod eth_address; pub mod felt252; -pub mod field_element; pub mod nonce; +pub mod primitive; pub mod serde; pub mod string; @@ -15,11 +15,11 @@ pub trait FromConv: Sized { fn from_(value: T) -> Self; } -impl FromConv for T { - fn from_(value: T) -> Self { - value - } -} +// impl FromConv for T { +// fn from_(value: T) -> Self { +// value +// } +// } pub trait IntoConv: Sized { fn into_(self) -> T; diff --git a/crates/conversions/src/nonce.rs b/crates/conversions/src/nonce.rs index e6919372a6..7d6ffc3565 100644 --- a/crates/conversions/src/nonce.rs +++ b/crates/conversions/src/nonce.rs @@ -1,5 +1,4 @@ use crate::{from_thru_felt252, FromConv, IntoConv}; -use starknet::core::types::FieldElement; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}; use starknet_types_core::felt::Felt as Felt252; @@ -9,7 +8,6 @@ impl FromConv for Nonce { } } -from_thru_felt252!(FieldElement, Nonce); from_thru_felt252!(ClassHash, Nonce); from_thru_felt252!(ContractAddress, Nonce); from_thru_felt252!(EntryPointSelector, Nonce); diff --git a/crates/conversions/src/serde/deserialize/deserialize_impl.rs b/crates/conversions/src/serde/deserialize/deserialize_impl.rs index afba00407e..800f4cd424 100644 --- a/crates/conversions/src/serde/deserialize/deserialize_impl.rs +++ b/crates/conversions/src/serde/deserialize/deserialize_impl.rs @@ -1,7 +1,7 @@ use super::{BufferReadError, BufferReadResult, BufferReader, CairoDeserialize}; use crate::{byte_array::ByteArray, IntoConv}; use num_traits::cast::ToPrimitive; -use starknet::{core::types::FieldElement, providers::Url}; +use starknet::providers::Url; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}; use starknet_types_core::felt::Felt as Felt252; use std::num::NonZeroU32; @@ -95,7 +95,7 @@ macro_rules! impl_deserialize_for_num_type { }; } -impl_deserialize_for_felt_type!(FieldElement); +// impl_deserialize_for_felt_type!(Felt); impl_deserialize_for_felt_type!(ClassHash); impl_deserialize_for_felt_type!(ContractAddress); impl_deserialize_for_felt_type!(Nonce); diff --git a/crates/conversions/src/serde/serialize/serialize_impl.rs b/crates/conversions/src/serde/serialize/serialize_impl.rs index eae99d0750..f4dd8081d7 100644 --- a/crates/conversions/src/serde/serialize/serialize_impl.rs +++ b/crates/conversions/src/serde/serialize/serialize_impl.rs @@ -1,7 +1,7 @@ use super::{BufferWriter, CairoSerialize}; use crate::{byte_array::ByteArray, IntoConv}; use blockifier::execution::entry_point::{CallEntryPoint, CallType}; -use starknet::core::types::{ContractErrorData, FieldElement, TransactionExecutionErrorData}; +use starknet::core::types::{ContractErrorData, TransactionExecutionErrorData}; use starknet_api::core::EthAddress; use starknet_api::{ core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}, @@ -216,7 +216,7 @@ macro_rules! impl_serialize_for_tuple { } impl_serialize_for_felt_type!(Felt252); -impl_serialize_for_felt_type!(FieldElement); +// impl_serialize_for_felt_type!(Felt); impl_serialize_for_felt_type!(ClassHash); impl_serialize_for_felt_type!(ContractAddress); impl_serialize_for_felt_type!(Nonce); diff --git a/crates/conversions/tests/e2e/class_hash.rs b/crates/conversions/tests/e2e/class_hash.rs index e21ccb1464..9493b5e1bf 100644 --- a/crates/conversions/tests/e2e/class_hash.rs +++ b/crates/conversions/tests/e2e/class_hash.rs @@ -3,7 +3,7 @@ mod tests_class_hash { use cairo_vm::utils::PRIME_STR; use conversions::string::{IntoDecStr, TryFromDecStr, TryFromHexStr}; use conversions::{FromConv, IntoConv}; - use starknet::core::types::FieldElement; + use starknet::core::types::Felt; use starknet_api::core::ClassHash; use starknet_api::core::{ContractAddress, EntryPointSelector, Nonce}; use starknet_api::hash::StarkHash; @@ -16,7 +16,7 @@ mod tests_class_hash { assert_eq!(class_hash, ContractAddress::from_(class_hash).into_()); assert_eq!(class_hash, Felt252::from_(class_hash).into_()); - assert_eq!(class_hash, FieldElement::from_(class_hash).into_()); + assert_eq!(class_hash, Felt::from_(class_hash).into_()); assert_eq!(class_hash, Nonce::from_(class_hash).into_()); assert_eq!(class_hash, EntryPointSelector::from_(class_hash).into_()); assert_eq!(class_hash, StarkHash::from_(class_hash).into_()); @@ -34,7 +34,7 @@ mod tests_class_hash { assert_eq!(class_hash, ContractAddress::from_(class_hash).into_()); assert_eq!(class_hash, Felt252::from_(class_hash).into_()); - assert_eq!(class_hash, FieldElement::from_(class_hash).into_()); + assert_eq!(class_hash, Felt::from_(class_hash).into_()); assert_eq!(class_hash, Nonce::from_(class_hash).into_()); assert_eq!(class_hash, EntryPointSelector::from_(class_hash).into_()); assert_eq!(class_hash, StarkHash::from_(class_hash).into_()); @@ -50,7 +50,7 @@ mod tests_class_hash { let mut class_hash: ClassHash = Felt252::MAX.into_(); assert_eq!(class_hash, Felt252::from_(class_hash).into_()); - assert_eq!(class_hash, FieldElement::from_(class_hash).into_()); + assert_eq!(class_hash, Felt::from_(class_hash).into_()); assert_eq!(class_hash, Nonce::from_(class_hash).into_()); assert_eq!(class_hash, EntryPointSelector::from_(class_hash).into_()); assert_eq!(class_hash, StarkHash::from_(class_hash).into_()); diff --git a/crates/conversions/tests/e2e/contract_address.rs b/crates/conversions/tests/e2e/contract_address.rs index 8b2c9caa5c..77e23f7873 100644 --- a/crates/conversions/tests/e2e/contract_address.rs +++ b/crates/conversions/tests/e2e/contract_address.rs @@ -3,7 +3,7 @@ mod tests_contract_address { use cairo_vm::utils::PRIME_STR; use conversions::string::{IntoDecStr, TryFromDecStr, TryFromHexStr}; use conversions::{FromConv, IntoConv}; - use starknet::core::types::FieldElement; + use starknet::core::types::Felt; use starknet_api::core::{ClassHash, EntryPointSelector, Nonce}; use starknet_api::core::{ContractAddress, PatriciaKey}; use starknet_api::hash::StarkHash; @@ -16,10 +16,7 @@ mod tests_contract_address { assert_eq!(contract_address, ClassHash::from_(contract_address).into_(),); assert_eq!(contract_address, Felt252::from_(contract_address).into_()); - assert_eq!( - contract_address, - FieldElement::from_(contract_address).into_() - ); + assert_eq!(contract_address, Felt::from_(contract_address).into_()); assert_eq!(contract_address, Nonce::from_(contract_address).into_()); assert_eq!( contract_address, @@ -40,10 +37,7 @@ mod tests_contract_address { assert_eq!(contract_address, ClassHash::from_(contract_address).into_(),); assert_eq!(contract_address, Felt252::from_(contract_address).into_()); - assert_eq!( - contract_address, - FieldElement::from_(contract_address).into_() - ); + assert_eq!(contract_address, Felt::from_(contract_address).into_()); assert_eq!(contract_address, Nonce::from_(contract_address).into_()); assert_eq!( contract_address, @@ -65,10 +59,7 @@ mod tests_contract_address { assert_eq!(contract_address, ClassHash::from_(contract_address).into_(),); assert_eq!(contract_address, Felt252::from_(contract_address).into_()); - assert_eq!( - contract_address, - FieldElement::from_(contract_address).into_() - ); + assert_eq!(contract_address, Felt::from_(contract_address).into_()); assert_eq!(contract_address, Nonce::from_(contract_address).into_()); assert_eq!( contract_address, diff --git a/crates/conversions/tests/e2e/entrypoint_selector.rs b/crates/conversions/tests/e2e/entrypoint_selector.rs index f2ecd84021..bdf0917b51 100644 --- a/crates/conversions/tests/e2e/entrypoint_selector.rs +++ b/crates/conversions/tests/e2e/entrypoint_selector.rs @@ -3,7 +3,7 @@ mod tests_entrypoint_selector { use cairo_vm::utils::PRIME_STR; use conversions::string::{IntoDecStr, TryFromDecStr, TryFromHexStr}; use conversions::{FromConv, IntoConv}; - use starknet::core::types::FieldElement; + use starknet::core::types::Felt; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}; use starknet_api::hash::StarkHash; use starknet_types_core::felt::Felt as Felt252; @@ -27,7 +27,7 @@ mod tests_entrypoint_selector { ); assert_eq!( entrypoint_selector, - FieldElement::from_(entrypoint_selector).into_() + Felt::from_(entrypoint_selector).into_() ); assert_eq!( entrypoint_selector, @@ -63,7 +63,7 @@ mod tests_entrypoint_selector { ); assert_eq!( entrypoint_selector, - FieldElement::from_(entrypoint_selector).into_() + Felt::from_(entrypoint_selector).into_() ); assert_eq!( entrypoint_selector, @@ -90,7 +90,7 @@ mod tests_entrypoint_selector { ); assert_eq!( entrypoint_selector, - FieldElement::from_(entrypoint_selector).into_() + Felt::from_(entrypoint_selector).into_() ); assert_eq!( entrypoint_selector, diff --git a/crates/conversions/tests/e2e/felt252.rs b/crates/conversions/tests/e2e/felt252.rs index ebaef519b5..a0c08295af 100644 --- a/crates/conversions/tests/e2e/felt252.rs +++ b/crates/conversions/tests/e2e/felt252.rs @@ -8,7 +8,7 @@ mod tests_felt252 { use conversions::string::{IntoDecStr, TryFromDecStr, TryFromHexStr}; use conversions::{FromConv, IntoConv}; use itertools::chain; - use starknet::core::types::FieldElement; + use starknet::core::types::Felt; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}; use starknet_api::hash::StarkHash; use starknet_types_core::felt::Felt as Felt252; @@ -19,7 +19,7 @@ mod tests_felt252 { assert_eq!(felt, ClassHash::from_(felt).into_()); assert_eq!(felt, ContractAddress::from_(felt).into_()); - assert_eq!(felt, FieldElement::from_(felt).into_()); + assert_eq!(felt, Felt::from_(felt).into_()); assert_eq!(felt, Nonce::from_(felt).into_()); assert_eq!(felt, EntryPointSelector::from_(felt).into_()); assert_eq!(felt, StarkHash::from_(felt).into_()); @@ -36,7 +36,7 @@ mod tests_felt252 { assert_eq!(felt, ClassHash::from_(felt).into_()); assert_eq!(felt, ContractAddress::from_(felt).into_()); - assert_eq!(felt, FieldElement::from_(felt).into_()); + assert_eq!(felt, Felt::from_(felt).into_()); assert_eq!(felt, Nonce::from_(felt).into_()); assert_eq!(felt, EntryPointSelector::from_(felt).into_()); assert_eq!(felt, StarkHash::from_(felt).into_()); @@ -53,7 +53,7 @@ mod tests_felt252 { assert_eq!(felt, Nonce::from_(felt).into_()); assert_eq!(felt, EntryPointSelector::from_(felt).into_()); - assert_eq!(felt, FieldElement::from_(felt).into_()); + assert_eq!(felt, Felt::from_(felt).into_()); assert_eq!(felt, ClassHash::from_(felt).into_()); assert_eq!(felt, StarkHash::from_(felt).into_()); diff --git a/crates/conversions/tests/e2e/field_elements.rs b/crates/conversions/tests/e2e/field_elements.rs index 7a8573734f..df08d009ac 100644 --- a/crates/conversions/tests/e2e/field_elements.rs +++ b/crates/conversions/tests/e2e/field_elements.rs @@ -3,14 +3,14 @@ mod tests_field_elements { use cairo_vm::utils::PRIME_STR; use conversions::string::{IntoDecStr, TryFromDecStr, TryFromHexStr}; use conversions::{FromConv, IntoConv}; - use starknet::core::types::FieldElement; + use starknet::core::types::Felt; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}; use starknet_api::hash::StarkHash; use starknet_types_core::felt::Felt as Felt252; #[test] fn test_field_elements_conversions_happy_case() { - let field_element = FieldElement::from(1u8); + let field_element = Felt::from(1u8); assert_eq!(field_element, ClassHash::from_(field_element).into_()); assert_eq!(field_element, ContractAddress::from_(field_element).into_()); @@ -24,13 +24,13 @@ mod tests_field_elements { assert_eq!( field_element, - FieldElement::try_from_dec_str(&field_element.into_dec_string()).unwrap() + Felt::try_from_dec_str(&field_element.into_dec_string()).unwrap() ); } #[test] fn test_field_elements_conversions_zero() { - let field_element = FieldElement::from(0u8); + let field_element = Felt::from(0u8); assert_eq!(field_element, ClassHash::from_(field_element).into_()); assert_eq!(field_element, ContractAddress::from_(field_element).into_()); @@ -44,12 +44,12 @@ mod tests_field_elements { assert_eq!( field_element, - FieldElement::try_from_dec_str(&field_element.into_dec_string()).unwrap() + Felt::try_from_dec_str(&field_element.into_dec_string()).unwrap() ); } #[test] fn test_field_element_conversions_out_of_range() { - assert!(FieldElement::try_from_hex_str(PRIME_STR).unwrap() == Felt252::from(0_u8).into_()); + assert!(Felt::try_from_hex_str(PRIME_STR).unwrap() == Felt252::from(0_u8).into_()); } } diff --git a/crates/conversions/tests/e2e/nonce.rs b/crates/conversions/tests/e2e/nonce.rs index cd0bbbc130..ac2c953372 100644 --- a/crates/conversions/tests/e2e/nonce.rs +++ b/crates/conversions/tests/e2e/nonce.rs @@ -3,7 +3,7 @@ mod tests_nonce { use cairo_vm::utils::PRIME_STR; use conversions::string::{IntoDecStr, TryFromDecStr, TryFromHexStr}; use conversions::{FromConv, IntoConv}; - use starknet::core::types::FieldElement; + use starknet::core::types::Felt; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}; use starknet_api::hash::StarkHash; use starknet_types_core::felt::Felt as Felt252; @@ -16,7 +16,7 @@ mod tests_nonce { assert_eq!(nonce, ClassHash::from_(nonce).into_()); assert_eq!(nonce, ContractAddress::from_(nonce).into_()); assert_eq!(nonce, Felt252::from_(nonce).into_()); - assert_eq!(nonce, FieldElement::from_(nonce).into_()); + assert_eq!(nonce, Felt::from_(nonce).into_()); assert_eq!(nonce, StarkHash::from_(nonce).into_()); assert_eq!(nonce, EntryPointSelector::from_(nonce).into_()); @@ -34,7 +34,7 @@ mod tests_nonce { assert_eq!(nonce, ClassHash::from_(nonce).into_()); assert_eq!(nonce, ContractAddress::from_(nonce).into_()); assert_eq!(nonce, Felt252::from_(nonce).into_()); - assert_eq!(nonce, FieldElement::from_(nonce).into_()); + assert_eq!(nonce, Felt::from_(nonce).into_()); assert_eq!(nonce, StarkHash::from_(nonce).into_()); assert_eq!(nonce, EntryPointSelector::from_(nonce).into_()); @@ -49,7 +49,7 @@ mod tests_nonce { let mut nonce: Nonce = Felt252::MAX.into_(); assert_eq!(nonce, Felt252::from_(nonce).into_()); - assert_eq!(nonce, FieldElement::from_(nonce).into_()); + assert_eq!(nonce, Felt::from_(nonce).into_()); assert_eq!(nonce, ClassHash::from_(nonce).into_()); assert_eq!(nonce, StarkHash::from_(nonce).into_()); assert_eq!(nonce, EntryPointSelector::from_(nonce).into_()); diff --git a/crates/conversions/tests/e2e/string.rs b/crates/conversions/tests/e2e/string.rs index 59a5868f56..4c7882ecb0 100644 --- a/crates/conversions/tests/e2e/string.rs +++ b/crates/conversions/tests/e2e/string.rs @@ -1,5 +1,5 @@ use conversions::string::{IntoDecStr, TryFromDecStr}; -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}; use starknet_api::hash::StarkHash; use starknet_types_core::felt::Felt as Felt252; @@ -22,7 +22,7 @@ fn test_short_strings_conversions_happy_case() { ); assert_eq!( short_string, - (FieldElement::try_from_dec_str(short_string).unwrap()).into_dec_string() + (Felt::try_from_dec_str(short_string).unwrap()).into_dec_string() ); assert_eq!( short_string, @@ -56,7 +56,7 @@ fn test_short_strings_conversions_zero() { ); assert_eq!( short_string, - (FieldElement::try_from_dec_str(short_string).unwrap()).into_dec_string() + (Felt::try_from_dec_str(short_string).unwrap()).into_dec_string() ); assert_eq!( short_string, @@ -87,7 +87,7 @@ fn test_short_string_conversions_limit() { ); assert_eq!( short_string, - (FieldElement::try_from_dec_str(short_string).unwrap()).into_dec_string() + (Felt::try_from_dec_str(short_string).unwrap()).into_dec_string() ); assert_eq!( short_string, diff --git a/crates/sncast/src/helpers/block_explorer.rs b/crates/sncast/src/helpers/block_explorer.rs index 53f08b57b0..8a7da6a3b2 100644 --- a/crates/sncast/src/helpers/block_explorer.rs +++ b/crates/sncast/src/helpers/block_explorer.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use starknet_crypto::FieldElement; +use starknet::core::types::Felt; const STARKSCAN: &str = "https://starkscan.co/search"; const VOYAGER: &str = "https://voyager.online"; @@ -31,23 +31,23 @@ impl Service { } pub trait LinkProvider { - fn transaction(&self, hash: FieldElement) -> String; - fn class(&self, hash: FieldElement) -> String; - fn contract(&self, address: FieldElement) -> String; + fn transaction(&self, hash: Felt) -> String; + fn class(&self, hash: Felt) -> String; + fn contract(&self, address: Felt) -> String; } pub struct StarkScan; impl LinkProvider for StarkScan { - fn transaction(&self, hash: FieldElement) -> String { + fn transaction(&self, hash: Felt) -> String { format!("{STARKSCAN}/{hash:x}") } - fn class(&self, hash: FieldElement) -> String { + fn class(&self, hash: Felt) -> String { format!("{STARKSCAN}/{hash:x}") } - fn contract(&self, address: FieldElement) -> String { + fn contract(&self, address: Felt) -> String { format!("{STARKSCAN}/{address:x}") } } @@ -55,15 +55,15 @@ impl LinkProvider for StarkScan { pub struct Voyager; impl LinkProvider for Voyager { - fn transaction(&self, hash: FieldElement) -> String { + fn transaction(&self, hash: Felt) -> String { format!("{VOYAGER}/tx/{hash:x}") } - fn class(&self, hash: FieldElement) -> String { + fn class(&self, hash: Felt) -> String { format!("{VOYAGER}/class/{hash:x}") } - fn contract(&self, address: FieldElement) -> String { + fn contract(&self, address: Felt) -> String { format!("{VOYAGER}/contract/{address:x}") } } @@ -71,15 +71,15 @@ impl LinkProvider for Voyager { pub struct ViewBlock; impl LinkProvider for ViewBlock { - fn transaction(&self, hash: FieldElement) -> String { + fn transaction(&self, hash: Felt) -> String { format!("{VIEWBLOCK}/tx/{hash:x}") } - fn class(&self, hash: FieldElement) -> String { + fn class(&self, hash: Felt) -> String { format!("{VIEWBLOCK}/class/{hash:x}") } - fn contract(&self, address: FieldElement) -> String { + fn contract(&self, address: Felt) -> String { format!("{VIEWBLOCK}/contract/{address:x}") } } @@ -87,15 +87,15 @@ impl LinkProvider for ViewBlock { pub struct OkLink; impl LinkProvider for OkLink { - fn transaction(&self, hash: FieldElement) -> String { + fn transaction(&self, hash: Felt) -> String { format!("{OKLINK}/tx/{hash:x}") } - fn class(&self, hash: FieldElement) -> String { + fn class(&self, hash: Felt) -> String { format!("{OKLINK}/class/{hash:x}") } - fn contract(&self, address: FieldElement) -> String { + fn contract(&self, address: Felt) -> String { format!("{OKLINK}/contract/{address:x}") } } @@ -103,15 +103,15 @@ impl LinkProvider for OkLink { pub struct NftScan; impl LinkProvider for NftScan { - fn transaction(&self, hash: FieldElement) -> String { + fn transaction(&self, hash: Felt) -> String { format!("{NFTSCAN}/{hash:x}") } - fn class(&self, hash: FieldElement) -> String { + fn class(&self, hash: Felt) -> String { format!("{NFTSCAN}/{hash:x}") } - fn contract(&self, address: FieldElement) -> String { + fn contract(&self, address: Felt) -> String { format!("{NFTSCAN}/{address:x}") } } diff --git a/crates/sncast/src/helpers/braavos.rs b/crates/sncast/src/helpers/braavos.rs index 2a88a08a7c..da407fff0a 100644 --- a/crates/sncast/src/helpers/braavos.rs +++ b/crates/sncast/src/helpers/braavos.rs @@ -4,7 +4,7 @@ use starknet::{ AccountFactory, PreparedAccountDeploymentV1, PreparedAccountDeploymentV3, RawAccountDeploymentV1, RawAccountDeploymentV3, }, - core::types::{BlockId, BlockTag, FieldElement}, + core::types::{BlockId, BlockTag, Felt}, providers::Provider, signers::Signer, }; @@ -12,10 +12,10 @@ use starknet_crypto::poseidon_hash_many; // Adapted from strakli as there is currently no implementation of braavos account factory in starknet-rs pub struct BraavosAccountFactory { - class_hash: FieldElement, - base_class_hash: FieldElement, - chain_id: FieldElement, - signer_public_key: FieldElement, + class_hash: Felt, + base_class_hash: Felt, + chain_id: Felt, + signer_public_key: Felt, signer: S, provider: P, block_id: BlockId, @@ -26,9 +26,9 @@ where S: Signer, { pub async fn new( - class_hash: FieldElement, - base_class_hash: FieldElement, - chain_id: FieldElement, + class_hash: Felt, + base_class_hash: Felt, + chain_id: Felt, signer: S, provider: P, ) -> Result { @@ -49,10 +49,7 @@ where self } - async fn sign_deployment( - &self, - tx_hash: FieldElement, - ) -> Result, S::SignError> { + async fn sign_deployment(&self, tx_hash: Felt) -> Result, S::SignError> { let signature = self.signer.sign_hash(&tx_hash).await?; // You can see params here: @@ -63,33 +60,32 @@ where // last 2 elements are sig on the aux data sent in the sig preceded by chain id: // [..., account_impl, ..., chain_id, aux(r, s)] // ref: https://github.com/myBraavos/braavos-account-cairo/blob/6efdfd597bb051e99c79a512fccd14ee2523c898/src/presets/braavos_base_account.cairo#L74 - let aux_data: Vec = vec![ + let aux_data: Vec = vec![ // account_implementation - self.class_hash, + self.class_hash.clone(), // signer_type - FieldElement::ZERO, + Felt::ZERO, // secp256r1_signer.x.low - FieldElement::ZERO, + Felt::ZERO, // secp256r1_signer.x.high - FieldElement::ZERO, + Felt::ZERO, // secp256r1_signer.y.low - FieldElement::ZERO, + Felt::ZERO, // secp256r1_signer.y.high - FieldElement::ZERO, + Felt::ZERO, // multisig_threshold - FieldElement::ZERO, + Felt::ZERO, // withdrawal_limit_low - FieldElement::ZERO, + Felt::ZERO, // fee_rate - FieldElement::ZERO, + Felt::ZERO, // stark_fee_rate - FieldElement::ZERO, + Felt::ZERO, // chain_id - self.chain_id, + self.chain_id.clone(), ]; - let aux_hash = poseidon_hash_many(&aux_data); - + let aux_hash = poseidon_hash_many(&aux_data[..]); let aux_signature = self.signer.sign_hash(&aux_hash).await?; Ok([ @@ -111,15 +107,15 @@ where type SignError = S::SignError; #[allow(clippy::misnamed_getters)] - fn class_hash(&self) -> FieldElement { + fn class_hash(&self) -> Felt { self.base_class_hash } - fn calldata(&self) -> Vec { + fn calldata(&self) -> Vec { vec![self.signer_public_key] } - fn chain_id(&self) -> FieldElement { + fn chain_id(&self) -> Felt { self.chain_id } @@ -134,18 +130,24 @@ where async fn sign_deployment_v1( &self, deployment: &RawAccountDeploymentV1, - ) -> Result, Self::SignError> { - let tx_hash = - PreparedAccountDeploymentV1::from_raw(deployment.clone(), self).transaction_hash(); + query_only: bool, + ) -> Result, Self::SignError> { + let tx_hash = PreparedAccountDeploymentV1::from_raw(deployment.clone(), self) + .transaction_hash(query_only); self.sign_deployment(tx_hash).await } async fn sign_deployment_v3( &self, deployment: &RawAccountDeploymentV3, - ) -> Result, Self::SignError> { - let tx_hash = - PreparedAccountDeploymentV3::from_raw(deployment.clone(), self).transaction_hash(); + query_only: bool, + ) -> Result, Self::SignError> { + let tx_hash = PreparedAccountDeploymentV3::from_raw(deployment.clone(), self) + .transaction_hash(query_only); self.sign_deployment(tx_hash).await } + + fn is_signer_interactive(&self) -> bool { + false + } } diff --git a/crates/sncast/src/helpers/constants.rs b/crates/sncast/src/helpers/constants.rs index bb3d664288..4bc97e4178 100644 --- a/crates/sncast/src/helpers/constants.rs +++ b/crates/sncast/src/helpers/constants.rs @@ -1,4 +1,4 @@ -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use starknet::macros::felt; pub static DEFAULT_MULTICALL_CONTENTS: &str = r#"[[call]] @@ -15,17 +15,17 @@ function = "" inputs = [] "#; -pub const UDC_ADDRESS: FieldElement = +pub const UDC_ADDRESS: Felt = felt!("0x041a78e741e5af2fec34b695679bc6891742439f7afb8484ecd7766661ad02bf"); -pub const OZ_CLASS_HASH: FieldElement = +pub const OZ_CLASS_HASH: Felt = felt!("0x00e2eb8f5672af4e6a4e8a8f1b44989685e668489b0a25437733756c5a34a1d6"); -pub const ARGENT_CLASS_HASH: FieldElement = +pub const ARGENT_CLASS_HASH: Felt = felt!("0x029927c8af6bccf3f6fda035981e765a7bdbf18a2dc0d630494f8758aa908e2b"); -pub const BRAAVOS_CLASS_HASH: FieldElement = +pub const BRAAVOS_CLASS_HASH: Felt = felt!("0x00816dd0297efc55dc1e7559020a3a825e81ef734b558f03c83325d4da7e6253"); -pub const BRAAVOS_BASE_ACCOUNT_CLASS_HASH: FieldElement = +pub const BRAAVOS_BASE_ACCOUNT_CLASS_HASH: Felt = felt!("0x013bfe114fb1cf405bfc3a7f8dbe2d91db146c17521d40dcf57e16d6b59fa8e6"); // used in wait_for_tx. Txs will be fetched every 5s with timeout of 300s - so 60 attempts diff --git a/crates/sncast/src/helpers/fee.rs b/crates/sncast/src/helpers/fee.rs index 11eb0b3b56..562ae791b0 100644 --- a/crates/sncast/src/helpers/fee.rs +++ b/crates/sncast/src/helpers/fee.rs @@ -1,8 +1,11 @@ +// use super::felt::Primitive; use anyhow::{bail, ensure, Result}; use clap::{Args, ValueEnum}; use conversions::serde::deserialize::CairoDeserialize; -use starknet::core::types::{BlockId, FieldElement}; +use conversions::TryIntoConv; +use starknet::core::types::{BlockId, Felt}; use starknet::providers::Provider; +use starknet_types_core::felt::NonZeroFelt; #[derive(Args, Debug, Clone)] pub struct FeeArgs { @@ -12,15 +15,15 @@ pub struct FeeArgs { /// Max fee for the transaction. If not provided, will be automatically estimated. #[clap(short, long)] - pub max_fee: Option, + pub max_fee: Option, /// Max gas amount. If not provided, will be automatically estimated. (Only for STRK fee payment) #[clap(long)] - pub max_gas: Option, + pub max_gas: Option, /// Max gas price in Fri. If not provided, will be automatically estimated. (Only for STRK fee payment) #[clap(long)] - pub max_gas_unit_price: Option, + pub max_gas_unit_price: Option, } impl From for FeeArgs { @@ -88,31 +91,44 @@ impl FeeArgs { bail!("--max-fee should be greater than or equal to --max-gas-unit-price") } (None, _, _) => FeeSettings::Strk { - max_gas: self.max_gas.map(TryInto::try_into).transpose()?, + max_gas: self.max_gas.map(TryIntoConv::try_into_).transpose()?, max_gas_unit_price: self .max_gas_unit_price - .map(TryInto::try_into) + .map(TryIntoConv::try_into_) .transpose()?, }, (Some(max_fee), None, Some(max_gas_unit_price)) => FeeSettings::Strk { - max_gas: Some(max_fee.floor_div(max_gas_unit_price).try_into()?), - max_gas_unit_price: Some(max_gas_unit_price.try_into()?), + max_gas: Some( + max_fee + .floor_div(&NonZeroFelt::from_felt_unchecked(max_gas_unit_price)) + .try_into_()?, + ), + max_gas_unit_price: Some(max_gas_unit_price.try_into_()?), }, (Some(max_fee), Some(max_gas), None) => FeeSettings::Strk { - max_gas: Some(max_gas.try_into()?), - max_gas_unit_price: Some(max_fee.floor_div(max_gas).try_into()?), + max_gas: Some(max_gas.try_into_()?), + max_gas_unit_price: Some( + max_fee + .floor_div(&NonZeroFelt::from_felt_unchecked(max_gas)) + .try_into_()?, + ), }, (Some(max_fee), None, None) => { - let max_gas_unit_price: u128 = provider + let max_gas_unit_price = provider .get_block_with_tx_hashes(block_id) .await? .l1_gas_price() - .price_in_fri - .try_into()?; + .price_in_fri; FeeSettings::Strk { - max_gas: Some(max_fee.floor_div(max_gas_unit_price.into()).try_into()?), - max_gas_unit_price: Some(max_gas_unit_price), + max_gas: Some( + max_fee + .floor_div(&NonZeroFelt::from_felt_unchecked( + max_gas_unit_price, + )) + .try_into_()?, + ), + max_gas_unit_price: Some(max_gas_unit_price.try_into_()?), } } }; @@ -134,10 +150,10 @@ pub enum FeeToken { #[derive(Debug, PartialEq, CairoDeserialize)] pub enum ScriptFeeSettings { Eth { - max_fee: Option, + max_fee: Option, }, Strk { - max_fee: Option, + max_fee: Option, max_gas: Option, max_gas_unit_price: Option, }, @@ -146,7 +162,7 @@ pub enum ScriptFeeSettings { #[derive(Debug, PartialEq)] pub enum FeeSettings { Eth { - max_fee: Option, + max_fee: Option, }, Strk { max_gas: Option, diff --git a/crates/sncast/src/lib.rs b/crates/sncast/src/lib.rs index a570dde4bf..e2d6cdcbb1 100644 --- a/crates/sncast/src/lib.rs +++ b/crates/sncast/src/lib.rs @@ -9,7 +9,7 @@ use serde_json::{Deserializer, Value}; use starknet::core::types::{ BlockId, BlockTag, BlockTag::{Latest, Pending}, - ContractClass, ContractErrorData, FieldElement, + ContractClass, ContractErrorData, Felt, StarknetError::{ClassHashNotFound, ContractNotFound, TransactionHashNotFound}, }; use starknet::core::utils::UdcUniqueness::{NotUnique, Unique}; @@ -77,12 +77,12 @@ pub enum Network { #[derive(Deserialize, Serialize, Clone, Debug)] pub struct AccountData { - pub private_key: FieldElement, - pub public_key: FieldElement, - pub address: Option, - pub salt: Option, + pub private_key: Felt, + pub public_key: Felt, + pub address: Option, + pub salt: Option, pub deployed: Option, - pub class_hash: Option, + pub class_hash: Option, pub legacy: Option, #[serde(default, rename(serialize = "type", deserialize = "type"))] @@ -177,7 +177,7 @@ pub fn get_provider(url: &str) -> Result> { create_rpc_client(url) } -pub async fn get_chain_id(provider: &JsonRpcClient) -> Result { +pub async fn get_chain_id(provider: &JsonRpcClient) -> Result { provider .chain_id() .await @@ -192,7 +192,7 @@ pub fn get_keystore_password(env_var: &str) -> std::io::Result { } #[must_use] -pub fn chain_id_to_network_name(chain_id: FieldElement) -> String { +pub fn chain_id_to_network_name(chain_id: Felt) -> String { let decoded = decode_chain_id(chain_id); match &decoded[..] { @@ -204,7 +204,7 @@ pub fn chain_id_to_network_name(chain_id: FieldElement) -> String { } #[must_use] -pub fn decode_chain_id(chain_id: FieldElement) -> String { +pub fn decode_chain_id(chain_id: Felt) -> String { let non_zero_bytes: Vec = chain_id .to_bytes_be() .iter() @@ -218,8 +218,8 @@ pub fn decode_chain_id(chain_id: FieldElement) -> String { pub async fn get_nonce( provider: &JsonRpcClient, block_id: &str, - address: FieldElement, -) -> Result { + address: Felt, +) -> Result { provider .get_nonce( get_block_id(block_id).context("Failed to obtain block id")?, @@ -249,7 +249,7 @@ pub async fn get_account<'a>( async fn build_account( account_data: AccountData, - chain_id: FieldElement, + chain_id: Felt, provider: &JsonRpcClient, ) -> Result, LocalWallet>> { let signer = LocalWallet::from(SigningKey::from_secret_scalar(account_data.private_key)); @@ -273,8 +273,8 @@ async fn build_account( } async fn verify_account_address( - address: FieldElement, - chain_id: FieldElement, + address: Felt, + chain_id: Felt, provider: &JsonRpcClient, ) -> Result<()> { match provider.get_nonce(BlockId::Tag(Pending), address).await { @@ -294,7 +294,7 @@ async fn verify_account_address( pub async fn check_class_hash_exists( provider: &JsonRpcClient, - class_hash: FieldElement, + class_hash: Felt, ) -> Result<()> { match provider.get_class(BlockId::Tag(BlockTag::Latest), class_hash).await { Ok(_) => Ok(()), @@ -320,7 +320,7 @@ pub fn get_account_data_from_keystore( let account_info: Value = read_and_parse_json_file(&path_to_account)?; - let parse_to_felt = |pointer: &str| -> Option { + let parse_to_felt = |pointer: &str| -> Option { get_string_value_from_json(&account_info, pointer).and_then(|value| value.parse().ok()) }; @@ -353,7 +353,7 @@ pub fn get_account_data_from_keystore( account_type, }) } -fn get_braavos_account_public_key(account_info: &Value) -> Result> { +fn get_braavos_account_public_key(account_info: &Value) -> Result> { get_string_value_from_json(account_info, "/variant/multisig/status") .filter(|status| status == "off") .context("Braavos accounts cannot be deployed with multisig on")?; @@ -376,7 +376,7 @@ fn get_string_value_from_json(json: &Value, pointer: &str) -> Option { } pub fn get_account_data_from_accounts_file( name: &str, - chain_id: FieldElement, + chain_id: Felt, path: &Utf8PathBuf, ) -> Result { raise_if_empty(name, "Account name")?; @@ -407,8 +407,8 @@ pub fn read_and_parse_json_file(path: &Utf8PathBuf) -> Resu async fn get_account_encoding( legacy: Option, - class_hash: Option, - address: FieldElement, + class_hash: Option, + address: Felt, provider: &JsonRpcClient, ) -> Result { if let Some(legacy) = legacy { @@ -420,8 +420,8 @@ async fn get_account_encoding( } pub async fn check_if_legacy_contract( - class_hash: Option, - address: FieldElement, + class_hash: Option, + address: Felt, provider: &JsonRpcClient, ) -> Result { let contract_class = match class_hash { @@ -435,8 +435,8 @@ pub async fn check_if_legacy_contract( pub async fn get_class_hash_by_address( provider: &JsonRpcClient, - address: FieldElement, -) -> Result> { + address: Felt, +) -> Result> { match provider .get_class_hash_at(BlockId::Tag(Pending), address) .await @@ -467,7 +467,7 @@ pub fn get_block_id(value: &str) -> Result { match value { "pending" => Ok(BlockId::Tag(Pending)), "latest" => Ok(BlockId::Tag(Latest)), - _ if value.starts_with("0x") => Ok(BlockId::Hash(FieldElement::from_hex_be(value)?)), + _ if value.starts_with("0x") => Ok(BlockId::Hash(Felt::from_hex(value)?)), _ => match value.parse::() { Ok(value) => Ok(BlockId::Number(value)), Err(_) => Err(anyhow::anyhow!( @@ -517,7 +517,7 @@ pub enum WaitForTransactionError { pub async fn wait_for_tx( provider: &JsonRpcClient, - tx_hash: FieldElement, + tx_hash: Felt, wait_params: ValidatedWaitParams, ) -> Result<&str, WaitForTransactionError> { println!("Transaction hash = {tx_hash:#x}"); @@ -561,7 +561,7 @@ pub async fn wait_for_tx( async fn get_revert_reason( provider: &JsonRpcClient, - tx_hash: FieldElement, + tx_hash: Felt, ) -> Result<&str, WaitForTransactionError> { let receipt_with_block_info = provider .get_transaction_receipt(tx_hash) @@ -600,7 +600,7 @@ where pub async fn handle_wait_for_tx( provider: &JsonRpcClient, - transaction_hash: FieldElement, + transaction_hash: Felt, return_value: T, wait_config: WaitForTx, ) -> Result { @@ -647,12 +647,12 @@ pub fn check_keystore_and_account_files_exist( } #[must_use] -pub fn extract_or_generate_salt(salt: Option) -> FieldElement { - salt.unwrap_or(FieldElement::from(OsRng.next_u64())) +pub fn extract_or_generate_salt(salt: Option) -> Felt { + salt.unwrap_or(Felt::from(OsRng.next_u64())) } #[must_use] -pub fn udc_uniqueness(unique: bool, account_address: FieldElement) -> UdcUniqueness { +pub fn udc_uniqueness(unique: bool, account_address: Felt) -> UdcUniqueness { if unique { Unique(UdcUniqueSettings { deployer_address: account_address, @@ -687,7 +687,7 @@ mod tests { use starknet::core::types::{ BlockId, BlockTag::{Latest, Pending}, - FieldElement, + Felt, }; use starknet::core::utils::UdcUniqueSettings; use starknet::core::utils::UdcUniqueness::{NotUnique, Unique}; @@ -709,7 +709,7 @@ mod tests { assert_eq!( block, BlockId::Hash( - FieldElement::from_hex_be( + Felt::from_hex( "0x0000000000000000000000000000000000000000000000000000000000000000" ) .unwrap() @@ -736,38 +736,36 @@ mod tests { fn test_generate_salt() { let salt = extract_or_generate_salt(None); - assert!(salt >= FieldElement::ZERO); + assert!(salt >= Felt::ZERO); } #[test] fn test_extract_salt() { - let salt = extract_or_generate_salt(Some(FieldElement::THREE)); + let salt = extract_or_generate_salt(Some(Felt::THREE)); - assert_eq!(salt, FieldElement::THREE); + assert_eq!(salt, Felt::THREE); } #[test] fn test_udc_uniqueness_unique() { - let uniqueness = udc_uniqueness(true, FieldElement::ONE); + let uniqueness = udc_uniqueness(true, Felt::ONE); assert!(matches!(uniqueness, Unique(UdcUniqueSettings { .. }))); } #[test] fn test_udc_uniqueness_not_unique() { - let uniqueness = udc_uniqueness(false, FieldElement::ONE); + let uniqueness = udc_uniqueness(false, Felt::ONE); assert!(matches!(uniqueness, NotUnique)); } #[test] fn test_chain_id_to_network_name() { - let network_name_katana = chain_id_to_network_name( - FieldElement::from_byte_slice_be("KATANA".as_bytes()).unwrap(), - ); - let network_name_sepolia = chain_id_to_network_name( - FieldElement::from_byte_slice_be("SN_SEPOLIA".as_bytes()).unwrap(), - ); + let network_name_katana = + chain_id_to_network_name(Felt::from_bytes_be_slice("KATANA".as_bytes())); + let network_name_sepolia = + chain_id_to_network_name(Felt::from_bytes_be_slice("SN_SEPOLIA".as_bytes())); assert_eq!(network_name_katana, "KATANA"); assert_eq!(network_name_sepolia, "alpha-sepolia"); } @@ -776,7 +774,7 @@ mod tests { fn test_get_account_data_from_accounts_file() { let account = get_account_data_from_accounts_file( "user1", - FieldElement::from_byte_slice_be("SN_SEPOLIA".as_bytes()).unwrap(), + Felt::from_bytes_be_slice("SN_SEPOLIA".as_bytes()), &Utf8PathBuf::from("tests/data/accounts/accounts.json"), ) .unwrap(); @@ -860,7 +858,7 @@ mod tests { fn test_get_account_data_wrong_chain_id() { let account = get_account_data_from_accounts_file( "user1", - FieldElement::from_hex_be("0x435553544f4d5f434841494e5f4944") + Felt::from_hex("0x435553544f4d5f434841494e5f4944") .expect("Failed to convert chain id from hex"), &Utf8PathBuf::from("tests/data/accounts/accounts.json"), ); diff --git a/crates/sncast/src/response/print.rs b/crates/sncast/src/response/print.rs index a4a8b313d3..0d4805584a 100644 --- a/crates/sncast/src/response/print.rs +++ b/crates/sncast/src/response/print.rs @@ -4,7 +4,7 @@ use anyhow::Result; use itertools::Itertools; use serde::{Serialize, Serializer}; use serde_json::Value; -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use std::{collections::HashMap, fmt::Display, str::FromStr}; #[derive(Debug, Clone, Copy)] @@ -84,7 +84,7 @@ impl Format for OutputValue { fn format_with(self, numbers: NumbersFormat) -> Self { match self { OutputValue::String(input) => { - if let Ok(field) = FieldElement::from_str(&input) { + if let Ok(field) = Felt::from_str(&input) { return match numbers { NumbersFormat::Decimal => OutputValue::String(format!("{field:#}")), NumbersFormat::Hex => OutputValue::String(format!("{field:#x}")), diff --git a/crates/sncast/src/response/structs.rs b/crates/sncast/src/response/structs.rs index 348b90e796..cc78b150a8 100644 --- a/crates/sncast/src/response/structs.rs +++ b/crates/sncast/src/response/structs.rs @@ -2,7 +2,7 @@ use camino::Utf8PathBuf; use conversions::serde::serialize::CairoSerialize; use indoc::formatdoc; use serde::{Deserialize, Serialize, Serializer}; -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use crate::helpers::block_explorer::LinkProvider; @@ -10,8 +10,8 @@ use super::explorer_link::OutputLink; pub struct Decimal(pub u64); -#[derive(Clone, Debug, Deserialize, CairoSerialize, PartialEq)] -pub struct Felt(pub FieldElement); +// #[derive(Clone, Debug, Deserialize, CairoSerialize, PartialEq)] +// pub struct Felt(pub FieldElement); impl Serialize for Decimal { fn serialize(&self, serializer: S) -> Result @@ -22,22 +22,22 @@ impl Serialize for Decimal { } } -impl Serialize for Felt { - fn serialize(&self, serializer: S) -> Result - where - S: Serializer, - { - let val = self.0; - serializer.serialize_str(&format!("{val:#x}")) - } -} +// impl Serialize for Felt { +// fn serialize(&self, serializer: S) -> Result +// where +// S: Serializer, +// { +// let val = self.0; +// serializer.serialize_str(&format!("{val:#x}")) +// } +// } fn serialize_as_decimal(value: &Felt, serializer: S) -> Result where S: Serializer, { - let val = value.0; - serializer.serialize_str(&format!("{val:#}")) + // let val = value.0; + serializer.serialize_str(&format!("{value:#}")) } pub trait CommandResponse: Serialize {} @@ -163,7 +163,7 @@ impl OutputLink for InvokeResponse { fn format_links(&self, provider: Box) -> String { format!( "transaction: {}", - provider.transaction(self.transaction_hash.0) + provider.transaction(self.transaction_hash) ) } } @@ -177,8 +177,8 @@ impl OutputLink for DeployResponse { contract: {} transaction: {} ", - provider.contract(self.contract_address.0), - provider.transaction(self.transaction_hash.0) + provider.contract(self.contract_address), + provider.transaction(self.transaction_hash) ) } } @@ -192,8 +192,8 @@ impl OutputLink for DeclareResponse { class: {} transaction: {} ", - provider.class(self.class_hash.0), - provider.transaction(self.transaction_hash.0) + provider.class(self.class_hash), + provider.transaction(self.transaction_hash) ) } } @@ -202,6 +202,6 @@ impl OutputLink for AccountCreateResponse { const TITLE: &'static str = "account creation"; fn format_links(&self, provider: Box) -> String { - format!("account: {}", provider.contract(self.address.0)) + format!("account: {}", provider.contract(self.address)) } } diff --git a/crates/sncast/src/starknet_commands/account/add.rs b/crates/sncast/src/starknet_commands/account/add.rs index 73b5e604a0..0ba9c25fd6 100644 --- a/crates/sncast/src/starknet_commands/account/add.rs +++ b/crates/sncast/src/starknet_commands/account/add.rs @@ -10,7 +10,7 @@ use sncast::helpers::rpc::RpcArgs; use sncast::response::structs::AccountAddResponse; use sncast::{check_class_hash_exists, get_chain_id}; use sncast::{check_if_legacy_contract, get_class_hash_by_address}; -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use starknet::providers::jsonrpc::{HttpTransport, JsonRpcClient}; use starknet::signers::SigningKey; @@ -23,7 +23,7 @@ pub struct Add { /// Address of the account #[clap(short, long, requires = "private_key_input")] - pub address: FieldElement, + pub address: Felt, /// Type of the account #[clap(short = 't', long = "type")] @@ -31,11 +31,11 @@ pub struct Add { /// Class hash of the account #[clap(short, long)] - pub class_hash: Option, + pub class_hash: Option, /// Account private key #[clap(long, group = "private_key_input")] - pub private_key: Option, + pub private_key: Option, /// Path to the file holding account private key #[clap(long = "private-key-file", group = "private_key_input")] @@ -43,11 +43,11 @@ pub struct Add { /// Account public key #[clap(long)] - pub public_key: Option, + pub public_key: Option, /// Salt for the address #[clap(short, long)] - pub salt: Option, + pub salt: Option, /// If passed, a profile with the provided name and corresponding data will be created in snfoundry.toml #[allow(clippy::struct_field_names)] @@ -136,7 +136,7 @@ pub async fn add( }) } -fn get_private_key_from_file(file_path: &Utf8PathBuf) -> Result { +fn get_private_key_from_file(file_path: &Utf8PathBuf) -> Result { let private_key_string = std::fs::read_to_string(file_path.clone())?; Ok(private_key_string.parse()?) } diff --git a/crates/sncast/src/starknet_commands/account/create.rs b/crates/sncast/src/starknet_commands/account/create.rs index 308fe065c5..754c5171fb 100644 --- a/crates/sncast/src/starknet_commands/account/create.rs +++ b/crates/sncast/src/starknet_commands/account/create.rs @@ -13,7 +13,7 @@ use sncast::helpers::constants::{ CREATE_KEYSTORE_PASSWORD_ENV_VAR, OZ_CLASS_HASH, }; use sncast::helpers::rpc::RpcArgs; -use sncast::response::structs::{AccountCreateResponse, Felt}; +use sncast::response::structs::AccountCreateResponse; use sncast::{ check_class_hash_exists, check_if_legacy_contract, extract_or_generate_salt, get_chain_id, get_keystore_password, handle_account_factory_error, @@ -21,7 +21,7 @@ use sncast::{ use starknet::accounts::{ AccountDeploymentV1, AccountFactory, ArgentAccountFactory, OpenZeppelinAccountFactory, }; -use starknet::core::types::{FeeEstimate, FieldElement}; +use starknet::core::types::{FeeEstimate, Felt}; use starknet::providers::jsonrpc::HttpTransport; use starknet::providers::JsonRpcClient; use starknet::signers::{LocalWallet, SigningKey}; @@ -39,7 +39,7 @@ pub struct Create { /// Salt for the address #[clap(short, long)] - pub salt: Option, + pub salt: Option, /// If passed, a profile with provided name and corresponding data will be created in snfoundry.toml #[clap(long)] @@ -47,7 +47,7 @@ pub struct Create { /// Custom contract class hash of declared contract #[clap(short, long, requires = "account_type")] - pub class_hash: Option, + pub class_hash: Option, #[clap(flatten)] pub rpc: RpcArgs, @@ -60,11 +60,11 @@ pub async fn create( accounts_file: &Utf8PathBuf, keystore: Option, provider: &JsonRpcClient, - chain_id: FieldElement, + chain_id: Felt, account_type: AccountType, - salt: Option, + salt: Option, add_profile: Option, - class_hash: Option, + class_hash: Option, ) -> Result { let salt = extract_or_generate_salt(salt); let class_hash = class_hash.unwrap_or(match account_type { @@ -121,8 +121,8 @@ pub async fn create( } Ok(AccountCreateResponse { - address: Felt(address), - max_fee: Felt(max_fee), + address, + max_fee, add_profile: if add_profile.is_some() { format!( "Profile {} successfully added to snfoundry.toml", @@ -141,10 +141,10 @@ pub async fn create( async fn generate_account( provider: &JsonRpcClient, - salt: FieldElement, - class_hash: FieldElement, + salt: Felt, + class_hash: Felt, account_type: &AccountType, -) -> Result<(serde_json::Value, FieldElement)> { +) -> Result<(serde_json::Value, Felt)> { let chain_id = get_chain_id(provider).await?; let private_key = SigningKey::from_random(); let signer = LocalWallet::from_signing_key(private_key.clone()); @@ -156,14 +156,9 @@ async fn generate_account( get_address_and_deployment_fee(factory, salt).await? } AccountType::Argent => { - let factory = ArgentAccountFactory::new( - class_hash, - chain_id, - FieldElement::ZERO, - signer, - provider, - ) - .await?; + let factory = + ArgentAccountFactory::new(class_hash, chain_id, Felt::ZERO, signer, provider) + .await?; get_address_and_deployment_fee(factory, salt).await? } AccountType::Braavos => { @@ -196,8 +191,8 @@ async fn generate_account( async fn get_address_and_deployment_fee( account_factory: T, - salt: FieldElement, -) -> Result<(FieldElement, FeeEstimate)> + salt: Felt, +) -> Result<(Felt, FeeEstimate)> where T: AccountFactory + Sync, { @@ -224,9 +219,9 @@ where #[allow(clippy::too_many_arguments)] fn create_to_keystore( - private_key: FieldElement, - salt: FieldElement, - class_hash: FieldElement, + private_key: Felt, + salt: Felt, + class_hash: Felt, account_type: &AccountType, keystore_path: &Utf8PathBuf, account_path: &Utf8PathBuf, diff --git a/crates/sncast/src/starknet_commands/account/deploy.rs b/crates/sncast/src/starknet_commands/account/deploy.rs index 78fa7e9cf9..0f23deaf6a 100644 --- a/crates/sncast/src/starknet_commands/account/deploy.rs +++ b/crates/sncast/src/starknet_commands/account/deploy.rs @@ -7,7 +7,7 @@ use sncast::helpers::constants::{BRAAVOS_BASE_ACCOUNT_CLASS_HASH, KEYSTORE_PASSW use sncast::helpers::error::token_not_supported_for_deployment; use sncast::helpers::fee::{FeeArgs, FeeSettings, FeeToken, PayableTransaction}; use sncast::helpers::rpc::RpcArgs; -use sncast::response::structs::{Felt, InvokeResponse}; +use sncast::response::structs::InvokeResponse; use sncast::{ apply_optional, chain_id_to_network_name, check_account_file_exists, get_account_data_from_accounts_file, get_account_data_from_keystore, get_keystore_password, @@ -18,7 +18,7 @@ use starknet::accounts::{ }; use starknet::accounts::{AccountFactoryError, ArgentAccountFactory}; use starknet::core::types::BlockTag::Pending; -use starknet::core::types::{BlockId, FieldElement, StarknetError::ClassHashNotFound}; +use starknet::core::types::{BlockId, Felt, StarknetError::ClassHashNotFound}; use starknet::core::utils::get_contract_address; use starknet::providers::jsonrpc::HttpTransport; use starknet::providers::ProviderError::StarknetError; @@ -59,7 +59,7 @@ pub async fn deploy( provider: &JsonRpcClient, accounts_file: Utf8PathBuf, deploy_args: Deploy, - chain_id: FieldElement, + chain_id: Felt, wait_config: WaitForTx, account: &str, keystore_path: Option, @@ -98,7 +98,7 @@ pub async fn deploy( async fn deploy_from_keystore( provider: &JsonRpcClient, - chain_id: FieldElement, + chain_id: Felt, fee_args: FeeArgs, wait_config: WaitForTx, account: &str, @@ -138,8 +138,8 @@ async fn deploy_from_keystore( AccountType::Argent => get_contract_address( salt, class_hash, - &[private_key.verifying_key().scalar(), FieldElement::ZERO], - FieldElement::ZERO, + &[private_key.verifying_key().scalar(), Felt::ZERO], + Felt::ZERO, ), AccountType::OpenZeppelin => get_contract_address( salt, @@ -161,7 +161,7 @@ async fn deploy_from_keystore( .is_ok() { InvokeResponse { - transaction_hash: Felt(FieldElement::ZERO), + transaction_hash: Felt::ZERO, } } else { get_deployment_result( @@ -186,7 +186,7 @@ async fn deploy_from_accounts_file( provider: &JsonRpcClient, accounts_file: Utf8PathBuf, name: String, - chain_id: FieldElement, + chain_id: Felt, fee_args: FeeArgs, wait_config: WaitForTx, ) -> Result { @@ -221,10 +221,10 @@ async fn deploy_from_accounts_file( async fn get_deployment_result( provider: &JsonRpcClient, account_type: AccountType, - class_hash: FieldElement, + class_hash: Felt, private_key: SigningKey, - salt: FieldElement, - chain_id: FieldElement, + salt: Felt, + chain_id: Felt, fee_args: FeeArgs, wait_config: WaitForTx, ) -> Result { @@ -233,7 +233,7 @@ async fn get_deployment_result( let factory = ArgentAccountFactory::new( class_hash, chain_id, - FieldElement::ZERO, + Felt::ZERO, LocalWallet::from_signing_key(private_key), provider, ) @@ -270,10 +270,10 @@ async fn get_deployment_result( async fn deploy_account( account_factory: T, provider: &JsonRpcClient, - salt: FieldElement, + salt: Felt, fee_args: FeeArgs, wait_config: WaitForTx, - class_hash: FieldElement, + class_hash: Felt, ) -> Result where T: AccountFactory + Sync, @@ -313,7 +313,7 @@ where Err(_) => Err(anyhow!("Unknown AccountFactoryError")), Ok(result) => { let return_value = InvokeResponse { - transaction_hash: Felt(result.transaction_hash), + transaction_hash: result.transaction_hash, }; if let Err(message) = handle_wait_for_tx( provider, @@ -334,7 +334,7 @@ where fn update_account_in_accounts_file( accounts_file: Utf8PathBuf, account_name: &str, - chain_id: FieldElement, + chain_id: Felt, ) -> Result<()> { let network_name = chain_id_to_network_name(chain_id); @@ -349,7 +349,7 @@ fn update_account_in_accounts_file( Ok(()) } -fn update_keystore_account(account: &str, address: FieldElement) -> Result<()> { +fn update_keystore_account(account: &str, address: Felt) -> Result<()> { let account_path = Utf8PathBuf::from(account.to_string()); let contents = std::fs::read_to_string(account_path.clone()).context("Failed to read account file")?; diff --git a/crates/sncast/src/starknet_commands/account/mod.rs b/crates/sncast/src/starknet_commands/account/mod.rs index 347fc75b2a..64aefc797f 100644 --- a/crates/sncast/src/starknet_commands/account/mod.rs +++ b/crates/sncast/src/starknet_commands/account/mod.rs @@ -11,7 +11,7 @@ use configuration::{ }; use serde_json::json; use sncast::{chain_id_to_network_name, decode_chain_id, helpers::configuration::CastConfig}; -use starknet::{core::types::FieldElement, signers::SigningKey}; +use starknet::{core::types::Felt, signers::SigningKey}; use std::{fmt, fs::OpenOptions, io::Write}; use toml::Value; @@ -60,12 +60,12 @@ impl fmt::Display for AccountType { pub fn prepare_account_json( private_key: &SigningKey, - address: FieldElement, + address: Felt, deployed: bool, legacy: bool, account_type: &AccountType, - class_hash: Option, - salt: Option, + class_hash: Option, + salt: Option, ) -> serde_json::Value { let mut account_json = json!({ "private_key": format!("{:#x}", private_key.secret_scalar()), @@ -90,7 +90,7 @@ pub fn prepare_account_json( pub fn write_account_to_accounts_file( account: &str, accounts_file: &Utf8PathBuf, - chain_id: FieldElement, + chain_id: Felt, account_json: serde_json::Value, ) -> Result<()> { if !accounts_file.exists() { diff --git a/crates/sncast/src/starknet_commands/call.rs b/crates/sncast/src/starknet_commands/call.rs index e225ce444e..5fce0c9d6d 100644 --- a/crates/sncast/src/starknet_commands/call.rs +++ b/crates/sncast/src/starknet_commands/call.rs @@ -2,8 +2,8 @@ use anyhow::Result; use clap::Args; use sncast::helpers::rpc::RpcArgs; use sncast::response::errors::StarknetCommandError; -use sncast::response::structs::{CallResponse, Felt}; -use starknet::core::types::{BlockId, FieldElement, FunctionCall}; +use sncast::response::structs::CallResponse; +use starknet::core::types::{BlockId, Felt, FunctionCall}; use starknet::providers::jsonrpc::HttpTransport; use starknet::providers::{JsonRpcClient, Provider}; @@ -12,7 +12,7 @@ use starknet::providers::{JsonRpcClient, Provider}; pub struct Call { /// Address of the called contract (hex) #[clap(short = 'a', long)] - pub contract_address: FieldElement, + pub contract_address: Felt, /// Name of the contract function to be called #[clap(short, long)] @@ -20,7 +20,7 @@ pub struct Call { /// Arguments of the called function (list of hex) #[clap(short, long, value_delimiter = ' ', num_args = 1..)] - pub calldata: Vec, + pub calldata: Vec, /// Block identifier on which call should be performed. /// Possible values: pending, latest, block hash (0x prefixed string) @@ -34,9 +34,9 @@ pub struct Call { #[allow(clippy::ptr_arg)] pub async fn call( - contract_address: FieldElement, - entry_point_selector: FieldElement, - calldata: Vec, + contract_address: Felt, + entry_point_selector: Felt, + calldata: Vec, provider: &JsonRpcClient, block_id: &BlockId, ) -> Result { @@ -45,10 +45,8 @@ pub async fn call( entry_point_selector, calldata, }; - let res = provider - .call(function_call, block_id) - .await - .map(|v| v.into_iter().map(Felt).collect()); + let res = provider.call(function_call, block_id).await; + // .map(|v| v.into_iter().map(Felt).collect()); match res { Ok(response) => Ok(CallResponse { response }), diff --git a/crates/sncast/src/starknet_commands/declare.rs b/crates/sncast/src/starknet_commands/declare.rs index 7078bb8e2f..2d09f85a54 100644 --- a/crates/sncast/src/starknet_commands/declare.rs +++ b/crates/sncast/src/starknet_commands/declare.rs @@ -6,11 +6,10 @@ use sncast::helpers::fee::{FeeArgs, FeeSettings, FeeToken, PayableTransaction}; use sncast::helpers::rpc::RpcArgs; use sncast::response::errors::StarknetCommandError; use sncast::response::structs::DeclareResponse; -use sncast::response::structs::Felt; use sncast::{apply_optional, handle_wait_for_tx, impl_payable_transaction, ErrorData, WaitForTx}; use starknet::accounts::AccountError::Provider; use starknet::accounts::{ConnectedAccount, DeclarationV2, DeclarationV3}; -use starknet::core::types::FieldElement; +use starknet::core::types::{DeclareTransactionResult, Felt}; use starknet::{ accounts::{Account, SingleOwnerAccount}, core::types::contract::{CompiledClass, SierraClass}, @@ -32,7 +31,7 @@ pub struct Declare { /// Nonce of the transaction. If not provided, nonce will be set automatically #[clap(short, long)] - pub nonce: Option, + pub nonce: Option, /// Specifies scarb package to be used #[clap(long)] @@ -118,12 +117,15 @@ pub async fn declare( }; match declared { - Ok(result) => handle_wait_for_tx( + Ok(DeclareTransactionResult { + transaction_hash, + class_hash, + }) => handle_wait_for_tx( account.provider(), - result.transaction_hash, + transaction_hash.clone(), DeclareResponse { - class_hash: Felt(result.class_hash), - transaction_hash: Felt(result.transaction_hash), + class_hash, + transaction_hash, }, wait_config, ) diff --git a/crates/sncast/src/starknet_commands/deploy.rs b/crates/sncast/src/starknet_commands/deploy.rs index 90494a9ff5..b2a5ab96ce 100644 --- a/crates/sncast/src/starknet_commands/deploy.rs +++ b/crates/sncast/src/starknet_commands/deploy.rs @@ -4,13 +4,13 @@ use sncast::helpers::error::token_not_supported_for_deployment; use sncast::helpers::fee::{FeeArgs, FeeSettings, FeeToken, PayableTransaction}; use sncast::helpers::rpc::RpcArgs; use sncast::response::errors::StarknetCommandError; -use sncast::response::structs::{DeployResponse, Felt}; +use sncast::response::structs::DeployResponse; use sncast::{extract_or_generate_salt, impl_payable_transaction, udc_uniqueness}; use sncast::{handle_wait_for_tx, WaitForTx}; use starknet::accounts::AccountError::Provider; use starknet::accounts::{Account, ConnectedAccount, SingleOwnerAccount}; use starknet::contract::ContractFactory; -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use starknet::core::utils::get_udc_deployed_address; use starknet::providers::jsonrpc::HttpTransport; use starknet::providers::JsonRpcClient; @@ -21,15 +21,15 @@ use starknet::signers::LocalWallet; pub struct Deploy { /// Class hash of contract to deploy #[clap(short = 'g', long)] - pub class_hash: FieldElement, + pub class_hash: Felt, /// Calldata for the contract constructor #[clap(short, long, value_delimiter = ' ', num_args = 1..)] - pub constructor_calldata: Vec, + pub constructor_calldata: Vec, /// Salt for the address #[clap(short, long)] - pub salt: Option, + pub salt: Option, /// If true, salt will be modified with an account address #[clap(long)] @@ -40,7 +40,7 @@ pub struct Deploy { /// Nonce of the transaction. If not provided, nonce will be set automatically #[clap(short, long)] - pub nonce: Option, + pub nonce: Option, /// Version of the deployment (can be inferred from fee token) #[clap(short, long)] @@ -117,13 +117,13 @@ pub async fn deploy( account.provider(), result.transaction_hash, DeployResponse { - contract_address: Felt(get_udc_deployed_address( + contract_address: get_udc_deployed_address( salt, deploy.class_hash, &udc_uniqueness(deploy.unique, account.address()), &deploy.constructor_calldata, - )), - transaction_hash: Felt(result.transaction_hash), + ), + transaction_hash: result.transaction_hash, }, wait_config, ) diff --git a/crates/sncast/src/starknet_commands/invoke.rs b/crates/sncast/src/starknet_commands/invoke.rs index 1d23c3f63b..c18db601d9 100644 --- a/crates/sncast/src/starknet_commands/invoke.rs +++ b/crates/sncast/src/starknet_commands/invoke.rs @@ -4,13 +4,11 @@ use sncast::helpers::error::token_not_supported_for_invoke; use sncast::helpers::fee::{FeeArgs, FeeSettings, FeeToken, PayableTransaction}; use sncast::helpers::rpc::RpcArgs; use sncast::response::errors::StarknetCommandError; -use sncast::response::structs::{Felt, InvokeResponse}; +use sncast::response::structs::InvokeResponse; use sncast::{apply_optional, handle_wait_for_tx, impl_payable_transaction, WaitForTx}; use starknet::accounts::AccountError::Provider; -use starknet::accounts::{ - Account, Call, ConnectedAccount, ExecutionV1, ExecutionV3, SingleOwnerAccount, -}; -use starknet::core::types::FieldElement; +use starknet::accounts::{Account, ConnectedAccount, ExecutionV1, ExecutionV3, SingleOwnerAccount}; +use starknet::core::types::{Call, Felt, InvokeTransactionResult}; use starknet::providers::jsonrpc::HttpTransport; use starknet::providers::JsonRpcClient; use starknet::signers::LocalWallet; @@ -20,7 +18,7 @@ use starknet::signers::LocalWallet; pub struct Invoke { /// Address of contract to invoke #[clap(short = 'a', long)] - pub contract_address: FieldElement, + pub contract_address: Felt, /// Name of the function to invoke #[clap(short, long)] @@ -28,14 +26,14 @@ pub struct Invoke { /// Calldata for the invoked function #[clap(short, long, value_delimiter = ' ', num_args = 1..)] - pub calldata: Vec, + pub calldata: Vec, #[clap(flatten)] pub fee_args: FeeArgs, /// Nonce of the transaction. If not provided, nonce will be set automatically #[clap(short, long)] - pub nonce: Option, + pub nonce: Option, /// Version of invoke (can be inferred from fee token) #[clap(short, long)] @@ -58,7 +56,7 @@ impl_payable_transaction!(Invoke, token_not_supported_for_invoke, pub async fn invoke( invoke: Invoke, - function_selector: FieldElement, + function_selector: Felt, account: &SingleOwnerAccount<&JsonRpcClient, LocalWallet>, wait_config: WaitForTx, ) -> Result { @@ -80,7 +78,7 @@ pub async fn execute_calls( account: &SingleOwnerAccount<&JsonRpcClient, LocalWallet>, calls: Vec, fee_args: FeeArgs, - nonce: Option, + nonce: Option, wait_config: WaitForTx, ) -> Result { let fee_settings = fee_args @@ -109,12 +107,10 @@ pub async fn execute_calls( }; match result { - Ok(result) => handle_wait_for_tx( + Ok(InvokeTransactionResult { transaction_hash }) => handle_wait_for_tx( account.provider(), - result.transaction_hash, - InvokeResponse { - transaction_hash: Felt(result.transaction_hash), - }, + transaction_hash.clone(), + InvokeResponse { transaction_hash }, wait_config, ) .await diff --git a/crates/sncast/src/starknet_commands/multicall/run.rs b/crates/sncast/src/starknet_commands/multicall/run.rs index 5b11c489b7..2e2fd89e5a 100644 --- a/crates/sncast/src/starknet_commands/multicall/run.rs +++ b/crates/sncast/src/starknet_commands/multicall/run.rs @@ -11,8 +11,8 @@ use sncast::helpers::rpc::RpcArgs; use sncast::response::errors::handle_starknet_command_error; use sncast::response::structs::InvokeResponse; use sncast::{extract_or_generate_salt, impl_payable_transaction, udc_uniqueness, WaitForTx}; -use starknet::accounts::{Account, Call, SingleOwnerAccount}; -use starknet::core::types::FieldElement; +use starknet::accounts::{Account, SingleOwnerAccount}; +use starknet::core::types::{Call, Felt}; use starknet::core::utils::{get_selector_from_name, get_udc_deployed_address}; use starknet::providers::jsonrpc::HttpTransport; use starknet::providers::JsonRpcClient; @@ -44,10 +44,10 @@ impl_payable_transaction!(Run, token_not_supported_for_invoke, #[derive(Deserialize, Debug)] struct DeployCall { - class_hash: FieldElement, + class_hash: Felt, inputs: Vec, unique: bool, - salt: Option, + salt: Option, id: String, } @@ -87,7 +87,7 @@ pub async fn run( let mut calldata = vec![ deploy_call.class_hash, salt, - FieldElement::from(u8::from(deploy_call.unique)), + Felt::from(u8::from(deploy_call.unique)), deploy_call.inputs.len().into(), ]; @@ -121,7 +121,7 @@ pub async fn run( parsed_calls.push(Call { to: contract_address .parse() - .context("Failed to parse contract address to FieldElement")?, + .context("Failed to parse contract address to Felt")?, selector: get_selector_from_name(&invoke_call.function)?, calldata, }); @@ -138,17 +138,14 @@ pub async fn run( .map_err(handle_starknet_command_error) } -fn parse_inputs( - inputs: &Vec, - contracts: &HashMap, -) -> Result> { +fn parse_inputs(inputs: &Vec, contracts: &HashMap) -> Result> { let mut parsed_inputs = Vec::new(); for input in inputs { let current_input = contracts.get(input).unwrap_or(input); parsed_inputs.push( current_input .parse() - .context("Failed to parse input to FieldElement")?, + .context("Failed to parse input to Felt")?, ); } diff --git a/crates/sncast/src/starknet_commands/tx_status.rs b/crates/sncast/src/starknet_commands/tx_status.rs index 597ede9f5e..f60526a8da 100644 --- a/crates/sncast/src/starknet_commands/tx_status.rs +++ b/crates/sncast/src/starknet_commands/tx_status.rs @@ -2,7 +2,7 @@ use clap::Args; use sncast::helpers::rpc::RpcArgs; use sncast::response::errors::StarknetCommandError; use sncast::response::structs::{ExecutionStatus, FinalityStatus, TransactionStatusResponse}; -use starknet::core::types::{FieldElement, TransactionExecutionStatus, TransactionStatus}; +use starknet::core::types::{Felt, TransactionExecutionStatus, TransactionStatus}; use starknet::providers::jsonrpc::HttpTransport; use starknet::providers::{JsonRpcClient, Provider}; @@ -10,7 +10,7 @@ use starknet::providers::{JsonRpcClient, Provider}; #[command(about = "Get the status of a transaction")] pub struct TxStatus { /// Hash of the transaction - pub transaction_hash: FieldElement, + pub transaction_hash: Felt, #[clap(flatten)] pub rpc: RpcArgs, @@ -18,7 +18,7 @@ pub struct TxStatus { pub async fn tx_status( provider: &JsonRpcClient, - transaction_hash: FieldElement, + transaction_hash: Felt, ) -> Result { provider .get_transaction_status(transaction_hash) diff --git a/crates/sncast/src/starknet_commands/verify.rs b/crates/sncast/src/starknet_commands/verify.rs index 41f57238fb..52d6435b31 100644 --- a/crates/sncast/src/starknet_commands/verify.rs +++ b/crates/sncast/src/starknet_commands/verify.rs @@ -8,7 +8,7 @@ use scarb_api::StarknetContractArtifacts; use serde::Serialize; use sncast::response::structs::VerifyResponse; use sncast::Network; -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use std::collections::HashMap; use std::ffi::OsStr; use std::{env, fmt}; @@ -22,11 +22,8 @@ struct WalnutVerificationInterface { #[async_trait::async_trait] trait VerificationInterface { fn new(network: Network, workspace_dir: Utf8PathBuf) -> Self; - async fn verify( - &self, - contract_address: FieldElement, - contract_name: String, - ) -> Result; + async fn verify(&self, contract_address: Felt, contract_name: String) + -> Result; fn gen_explorer_url(&self) -> Result; } @@ -41,7 +38,7 @@ impl VerificationInterface for WalnutVerificationInterface { async fn verify( &self, - contract_address: FieldElement, + contract_address: Felt, contract_name: String, ) -> Result { // Read all files name along with their contents in a JSON format @@ -118,7 +115,7 @@ impl VerificationInterface for WalnutVerificationInterface { pub struct Verify { /// Address of a contract to be verified #[clap(short = 'a', long)] - pub contract_address: FieldElement, + pub contract_address: Felt, /// Name of the contract that is being verified #[clap(short, long)] @@ -162,7 +159,7 @@ struct VerificationPayload { } pub async fn verify( - contract_address: FieldElement, + contract_address: Felt, contract_name: String, verifier: Verifier, network: Network, diff --git a/crates/sncast/src/state/hashing.rs b/crates/sncast/src/state/hashing.rs index 5b877e353c..26141b5c08 100644 --- a/crates/sncast/src/state/hashing.rs +++ b/crates/sncast/src/state/hashing.rs @@ -1,7 +1,7 @@ #![allow(dead_code)] use sha3::Digest; use sha3::Sha3_256; -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use std::vec; trait SerialiseAsBytes { @@ -37,7 +37,7 @@ impl SerialiseAsBytes for str { } } -impl SerialiseAsBytes for FieldElement { +impl SerialiseAsBytes for Felt { fn serialise_as_bytes(&self) -> Vec { self.to_bytes_be().to_vec() } @@ -65,9 +65,9 @@ pub fn generate_declare_tx_id(contract_name: &str) -> String { #[must_use] pub fn generate_deploy_tx_id( - class_hash: FieldElement, - constructor_calldata: &[FieldElement], - salt: Option, + class_hash: Felt, + constructor_calldata: &[Felt], + salt: Option, unique: bool, ) -> String { let bytes = [ @@ -82,9 +82,9 @@ pub fn generate_deploy_tx_id( #[must_use] pub fn generate_invoke_tx_id( - contract_address: FieldElement, - function_selector: FieldElement, - calldata: &[FieldElement], + contract_address: Felt, + function_selector: Felt, + calldata: &[Felt], ) -> String { let bytes = [ contract_address.serialise_as_bytes(), @@ -101,7 +101,7 @@ mod tests { generate_declare_tx_id, generate_deploy_tx_id, generate_id, generate_invoke_tx_id, }; use conversions::IntoConv; - use starknet::core::types::FieldElement; + use starknet::core::types::Felt; use starknet_types_core::felt::Felt as Felt252; #[test] @@ -125,13 +125,13 @@ mod tests { #[test] fn deploy() { - let class_hash: FieldElement = Felt252::from_dec_str( + let class_hash: Felt = Felt252::from_dec_str( "3372465304726137760522924034754430320558984443503992760655017624209518336998", ) .unwrap() .into_(); - let constructor_calldata = vec![FieldElement::from(12u32), FieldElement::from(4u32)]; - let salt = Some(FieldElement::from(89u32)); + let constructor_calldata = vec![Felt::from(12u32), Felt::from(4u32)]; + let salt = Some(Felt::from(89u32)); let unique = true; let hash = generate_deploy_tx_id(class_hash, &constructor_calldata, salt, unique); @@ -148,8 +148,8 @@ mod tests { ) .unwrap() .into_(); - let function_selector = FieldElement::from(890u32); - let calldata = vec![FieldElement::from(1809u32), FieldElement::from(14u32)]; + let function_selector = Felt::from(890u32); + let calldata = vec![Felt::from(1809u32), Felt::from(14u32)]; let hash = generate_invoke_tx_id(contract_address, function_selector, &calldata); assert_eq!( hash, diff --git a/crates/sncast/src/state/state_file.rs b/crates/sncast/src/state/state_file.rs index de46128b74..e57068116e 100644 --- a/crates/sncast/src/state/state_file.rs +++ b/crates/sncast/src/state/state_file.rs @@ -310,9 +310,10 @@ fn verify_version(version: u8) -> Result<()> { #[cfg(test)] mod tests { use super::*; - use crate::response::structs::Felt; use crate::state::state_file::ScriptTransactionOutput::ErrorResponse; use camino::Utf8PathBuf; + use conversions::string::TryFromHexStr; + use starknet::core::types::Felt; use tempfile::TempDir; #[test] @@ -405,8 +406,8 @@ mod tests { let transaction = ScriptTransactionEntry { name: "declare".to_string(), output: ScriptTransactionOutput::DeclareResponse(DeclareResponse { - class_hash: Felt("0x123".parse().unwrap()), - transaction_hash: Felt("0x321".parse().unwrap()), + class_hash: Felt::try_from_hex_str("0x123").unwrap(), + transaction_hash: Felt::try_from_hex_str("0x321").unwrap(), }), status: ScriptTransactionStatus::Success, timestamp: 0, @@ -442,8 +443,8 @@ mod tests { let transaction1 = ScriptTransactionEntry { name: "declare".to_string(), output: ScriptTransactionOutput::DeclareResponse(DeclareResponse { - class_hash: Felt("0x1".parse().unwrap()), - transaction_hash: Felt("0x2".parse().unwrap()), + class_hash: Felt::try_from_hex_str("0x1").unwrap(), + transaction_hash: Felt::try_from_hex_str("0x2").unwrap(), }), status: ScriptTransactionStatus::Success, timestamp: 0, @@ -457,7 +458,7 @@ mod tests { let transaction2 = ScriptTransactionEntry { name: "invoke".to_string(), output: ScriptTransactionOutput::InvokeResponse(InvokeResponse { - transaction_hash: Felt("0x3".parse().unwrap()), + transaction_hash: Felt::try_from_hex_str("0x3").unwrap(), }), status: ScriptTransactionStatus::Success, timestamp: 1, @@ -513,8 +514,8 @@ mod tests { let transaction1 = ScriptTransactionEntry { name: "declare".to_string(), output: ScriptTransactionOutput::DeclareResponse(DeclareResponse { - class_hash: Felt("0x1".parse().unwrap()), - transaction_hash: Felt("0x2".parse().unwrap()), + class_hash: Felt::try_from_hex_str("0x1").unwrap(), + transaction_hash: Felt::try_from_hex_str("0x2").unwrap(), }), status: ScriptTransactionStatus::Success, timestamp: 2, @@ -527,7 +528,7 @@ mod tests { let transaction2 = ScriptTransactionEntry { name: "invoke".to_string(), output: ScriptTransactionOutput::InvokeResponse(InvokeResponse { - transaction_hash: Felt("0x3".parse().unwrap()), + transaction_hash: Felt::try_from_hex_str("0x3").unwrap(), }), status: ScriptTransactionStatus::Success, timestamp: 3, @@ -589,8 +590,8 @@ mod tests { let new_transaction = ScriptTransactionEntry { name: "deploy".to_string(), output: ScriptTransactionOutput::DeployResponse(DeployResponse { - transaction_hash: Felt("0x3".parse().unwrap()), - contract_address: Felt("0x333".parse().unwrap()), + transaction_hash: Felt::try_from_hex_str("0x3").unwrap(), + contract_address: Felt::try_from_hex_str("0x333").unwrap(), }), status: ScriptTransactionStatus::Success, timestamp: 1, diff --git a/crates/sncast/tests/e2e/account/add.rs b/crates/sncast/tests/e2e/account/add.rs index 8be65e4e94..4a89340a22 100644 --- a/crates/sncast/tests/e2e/account/add.rs +++ b/crates/sncast/tests/e2e/account/add.rs @@ -524,7 +524,7 @@ pub async fn test_invalid_private_key_in_file() { output, indoc! {r" command: account add - error: Failed to obtain private key from the file my_private_key: invalid character + error: Failed to obtain private key from the file my_private_key: Failed to create Felt from string "}, ); } diff --git a/crates/sncast/tests/e2e/declare.rs b/crates/sncast/tests/e2e/declare.rs index 02e7a002ee..305fa83808 100644 --- a/crates/sncast/tests/e2e/declare.rs +++ b/crates/sncast/tests/e2e/declare.rs @@ -10,8 +10,8 @@ use indoc::indoc; use shared::test_utils::output_assert::{assert_stderr_contains, assert_stdout_contains}; use sncast::helpers::constants::{ARGENT_CLASS_HASH, BRAAVOS_CLASS_HASH, OZ_CLASS_HASH}; use sncast::AccountType; +use starknet::core::types::Felt; use starknet::core::types::TransactionReceipt::Declare; -use starknet_crypto::FieldElement; use std::fs; use test_case::test_case; @@ -57,7 +57,7 @@ async fn test_happy_case_eth(account: &str) { #[test_case(ARGENT_CLASS_HASH, AccountType::Argent; "argent_class_hash")] #[test_case(BRAAVOS_CLASS_HASH, AccountType::Braavos; "braavos_class_hash")] #[tokio::test] -async fn test_happy_case_strk(class_hash: FieldElement, account_type: AccountType) { +async fn test_happy_case_strk(class_hash: Felt, account_type: AccountType) { let contract_path = duplicate_contract_directory_with_salt( CONTRACTS_DIR.to_string() + "/map", "put", @@ -228,8 +228,9 @@ async fn test_invalid_version_and_token_combination(fee_token: &str, version: &s format!("Error: {fee_token} fee token is not supported for {version} declaration."), ); } + #[tokio::test] -#[ignore = "Expand the contract's code to more complex or wait for fix: https://github.com/xJonathanLEI/starknet-rs/issues/649#issue-2469861847"] +// #[ignore = "Expand the contract's code to more complex or wait for fix: https://github.com/xJonathanLEI/starknet-rs/issues/649#issue-2469861847"] async fn test_happy_case_specify_package() { let tempdir = copy_directory_to_tempdir(CONTRACTS_DIR.to_string() + "/multiple_packages"); let accounts_json_path = get_accounts_path("tests/data/accounts/accounts.json"); diff --git a/crates/sncast/tests/e2e/deploy.rs b/crates/sncast/tests/e2e/deploy.rs index 0828165851..c95c62da99 100644 --- a/crates/sncast/tests/e2e/deploy.rs +++ b/crates/sncast/tests/e2e/deploy.rs @@ -11,8 +11,7 @@ use indoc::indoc; use shared::test_utils::output_assert::{assert_stderr_contains, assert_stdout_contains}; use sncast::helpers::constants::{ARGENT_CLASS_HASH, BRAAVOS_CLASS_HASH, OZ_CLASS_HASH}; use sncast::AccountType; -use starknet::core::types::TransactionReceipt::Deploy; -use starknet_crypto::FieldElement; +use starknet::core::types::{Felt, TransactionReceipt::Deploy}; use test_case::test_case; #[test_case("oz_cairo_0"; "cairo_0_account")] @@ -100,7 +99,7 @@ async fn test_happy_case_human_readable() { #[test_case(ARGENT_CLASS_HASH, AccountType::Argent; "argent_class_hash")] #[test_case(BRAAVOS_CLASS_HASH, AccountType::Braavos; "braavos_class_hash")] #[tokio::test] -async fn test_happy_case_strk(class_hash: FieldElement, account_type: AccountType) { +async fn test_happy_case_strk(class_hash: Felt, account_type: AccountType) { let tempdir = create_and_deploy_account(class_hash, account_type).await; let args = vec![ "--accounts-file", diff --git a/crates/sncast/tests/e2e/invoke.rs b/crates/sncast/tests/e2e/invoke.rs index 8489283b31..555a88bdf0 100644 --- a/crates/sncast/tests/e2e/invoke.rs +++ b/crates/sncast/tests/e2e/invoke.rs @@ -10,8 +10,7 @@ use indoc::indoc; use shared::test_utils::output_assert::{assert_stderr_contains, assert_stdout_contains}; use sncast::helpers::constants::{ARGENT_CLASS_HASH, BRAAVOS_CLASS_HASH, OZ_CLASS_HASH}; use sncast::AccountType; -use starknet::core::types::TransactionReceipt::Invoke; -use starknet_crypto::FieldElement; +use starknet::core::types::{Felt, TransactionReceipt::Invoke}; use test_case::test_case; #[test_case("oz_cairo_0"; "cairo_0_account")] @@ -100,7 +99,7 @@ async fn test_happy_case_human_readable() { #[test_case(ARGENT_CLASS_HASH, AccountType::Argent; "argent_class_hash")] #[test_case(BRAAVOS_CLASS_HASH, AccountType::Braavos; "braavos_class_hash")] #[tokio::test] -async fn test_happy_case_strk(class_hash: FieldElement, account_type: AccountType) { +async fn test_happy_case_strk(class_hash: Felt, account_type: AccountType) { let tempdir = create_and_deploy_account(class_hash, account_type).await; let args = vec![ "--accounts-file", diff --git a/crates/sncast/tests/helpers/constants.rs b/crates/sncast/tests/helpers/constants.rs index 5a9a5e144a..3844b65d4b 100644 --- a/crates/sncast/tests/helpers/constants.rs +++ b/crates/sncast/tests/helpers/constants.rs @@ -1,4 +1,4 @@ -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; use starknet::macros::felt; pub const ACCOUNT: &str = "user1"; @@ -22,7 +22,7 @@ pub const DEVNET_PREDEPLOYED_ACCOUNT_ADDRESS: &str = "0x691a61b12a7105b1372cc377f135213c11e8400a546f6b0e7ea0296046690ce"; // OpenZeppelin account contract v0.8.1 -pub const DEVNET_OZ_CLASS_HASH_CAIRO_1: FieldElement = +pub const DEVNET_OZ_CLASS_HASH_CAIRO_1: Felt = felt!("0x061dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f"); pub const MAP_CONTRACT_ADDRESS_SEPOLIA: &str = diff --git a/crates/sncast/tests/helpers/fixtures.rs b/crates/sncast/tests/helpers/fixtures.rs index 65def75130..c97c0a5f0c 100644 --- a/crates/sncast/tests/helpers/fixtures.rs +++ b/crates/sncast/tests/helpers/fixtures.rs @@ -19,10 +19,9 @@ use sncast::state::state_file::{ use sncast::{apply_optional, get_chain_id, get_keystore_password, AccountType}; use sncast::{get_account, get_provider}; use starknet::accounts::{ - Account, AccountFactory, ArgentAccountFactory, Call, ExecutionV1, OpenZeppelinAccountFactory, + Account, AccountFactory, ArgentAccountFactory, ExecutionV1, OpenZeppelinAccountFactory, }; -use starknet::core::types::TransactionReceipt; -use starknet::core::types::{FieldElement, InvokeTransactionResult}; +use starknet::core::types::{Call, Felt, InvokeTransactionResult, TransactionReceipt}; use starknet::core::utils::get_contract_address; use starknet::core::utils::get_selector_from_name; use starknet::providers::jsonrpc::HttpTransport; @@ -94,7 +93,7 @@ pub async fn deploy_argent_account() { let factory = ArgentAccountFactory::new( ARGENT_CLASS_HASH, chain_id, - FieldElement::ZERO, + Felt::ZERO, LocalWallet::from_signing_key(private_key), provider, ) @@ -169,7 +168,7 @@ fn get_account_deployment_data(account: &str) -> (String, String, SigningKey) { let private_key = SigningKey::from_secret_scalar( private_key .parse() - .expect("Failed to convert private key to FieldElement"), + .expect("Failed to convert private key to Felt"), ); (address.to_string(), salt.to_string(), private_key) @@ -186,7 +185,7 @@ pub async fn invoke_contract( account: &str, contract_address: &str, entry_point_name: &str, - max_fee: Option, + max_fee: Option, constructor_calldata: &[&str], ) -> InvokeTransactionResult { let provider = get_provider(URL).expect("Could not get the provider"); @@ -199,10 +198,10 @@ pub async fn invoke_contract( .await .expect("Could not get the account"); - let mut calldata: Vec = vec![]; + let mut calldata: Vec = vec![]; for value in constructor_calldata { - let value: FieldElement = value.parse().expect("Could not parse the calldata"); + let value: Felt = value.parse().expect("Could not parse the calldata"); calldata.push(value); } @@ -270,7 +269,7 @@ struct TransactionHashOutput { } #[must_use] -pub fn get_transaction_hash(output: &[u8]) -> FieldElement { +pub fn get_transaction_hash(output: &[u8]) -> Felt { let output = parse_output::(output); output .transaction_hash @@ -278,7 +277,7 @@ pub fn get_transaction_hash(output: &[u8]) -> FieldElement { .expect("Could not parse a number") } -pub async fn get_transaction_receipt(tx_hash: FieldElement) -> TransactionReceipt { +pub async fn get_transaction_receipt(tx_hash: Felt) -> TransactionReceipt { let client = reqwest::Client::new(); let json = json!( { @@ -473,7 +472,7 @@ pub fn get_address_from_keystore( account_path: impl AsRef, password: &str, account_type: &AccountType, -) -> FieldElement { +) -> Felt { let contents = std::fs::read_to_string(account_path).unwrap(); let items: Map = serde_json::from_str(&contents).unwrap(); let deployment = items.get("deployment").unwrap(); @@ -483,7 +482,7 @@ pub fn get_address_from_keystore( get_keystore_password(password).unwrap().as_str(), ) .unwrap(); - let salt = FieldElement::from_hex_be( + let salt = Felt::from_hex( deployment .get("salt") .and_then(serde_json::Value::as_str) @@ -492,7 +491,7 @@ pub fn get_address_from_keystore( .unwrap(); let class_hash = match account_type { AccountType::Braavos => BRAAVOS_BASE_ACCOUNT_CLASS_HASH, - AccountType::OpenZeppelin | AccountType::Argent => FieldElement::from_hex_be( + AccountType::OpenZeppelin | AccountType::Argent => Felt::from_hex( deployment .get("class_hash") .and_then(serde_json::Value::as_str) @@ -505,10 +504,10 @@ pub fn get_address_from_keystore( AccountType::OpenZeppelin | AccountType::Braavos => { vec![private_key.verifying_key().scalar()] } - AccountType::Argent => vec![private_key.verifying_key().scalar(), FieldElement::ZERO], + AccountType::Argent => vec![private_key.verifying_key().scalar(), Felt::ZERO], }; - get_contract_address(salt, class_hash, &calldata, FieldElement::ZERO) + get_contract_address(salt, class_hash, &calldata, Felt::ZERO) } #[must_use] pub fn get_accounts_path(relative_path_from_cargo_toml: &str) -> String { @@ -568,10 +567,7 @@ pub fn assert_tx_entry_success(tx_entry: &ScriptTransactionEntry, name: &str) { pub async fn create_and_deploy_oz_account() -> TempDir { create_and_deploy_account(OZ_CLASS_HASH, AccountType::OpenZeppelin).await } -pub async fn create_and_deploy_account( - class_hash: FieldElement, - account_type: AccountType, -) -> TempDir { +pub async fn create_and_deploy_account(class_hash: Felt, account_type: AccountType) -> TempDir { let class_hash = &class_hash.into_hex_string(); let account_type = match account_type { AccountType::OpenZeppelin => "oz", diff --git a/crates/sncast/tests/integration/lib_tests.rs b/crates/sncast/tests/integration/lib_tests.rs index 2b0e42a9f3..772df5cc5c 100644 --- a/crates/sncast/tests/integration/lib_tests.rs +++ b/crates/sncast/tests/integration/lib_tests.rs @@ -6,7 +6,8 @@ use crate::helpers::fixtures::create_test_provider; use camino::Utf8PathBuf; use shared::rpc::{get_rpc_version, is_expected_version}; use sncast::{check_if_legacy_contract, get_account, get_provider}; -use std::fs; +use starknet::accounts::Account; +use starknet::macros::felt; use url::ParseError; #[tokio::test] @@ -40,14 +41,14 @@ async fn test_get_account() { &provider, None, ) - .await; - - assert!(account.is_ok()); + .await + .unwrap(); - let expected = fs::read_to_string("tests/data/accounts/user1_representation") - .expect("Failed to read expected debug representation"); - let returned = format!("{:?}", account.unwrap()); - assert_eq!(returned.trim(), expected.trim()); + assert_eq!(account.chain_id(), felt!("0x534e5f5345504f4c4941")); + assert_eq!( + account.address(), + felt!("0xf6ecd22832b7c3713cfa7826ee309ce96a2769833f093795fafa1b8f20c48b") + ); } #[tokio::test] @@ -127,7 +128,7 @@ async fn test_get_account_failed_to_convert_field_elements() { .await; let err = account1.unwrap_err(); assert!(err.to_string().contains( - "Failed to parse field `alpha-sepolia.with_invalid_private_key.private_key` in file 'tests/data/accounts/faulty_accounts_invalid_felt.json': invalid character at line 4 column 40" + "Failed to parse field `alpha-sepolia.with_invalid_private_key.private_key` in file 'tests/data/accounts/faulty_accounts_invalid_felt.json': Expected hex string to be prefixed by '0x' at line 4 column 40" )); } diff --git a/crates/sncast/tests/integration/wait_for_tx.rs b/crates/sncast/tests/integration/wait_for_tx.rs index e03f24d787..47f17653f5 100644 --- a/crates/sncast/tests/integration/wait_for_tx.rs +++ b/crates/sncast/tests/integration/wait_for_tx.rs @@ -13,7 +13,7 @@ use conversions::string::IntoHexStr; use sncast::{get_account, ValidatedWaitParams}; use sncast::{handle_wait_for_tx, wait_for_tx, WaitForTx}; use starknet::contract::ContractFactory; -use starknet::core::types::FieldElement; +use starknet::core::types::Felt; #[tokio::test] async fn test_happy_path() { @@ -43,8 +43,8 @@ async fn test_rejected_transaction() { let factory = ContractFactory::new(MAP_CONTRACT_CLASS_HASH_SEPOLIA.parse().unwrap(), account); let deployment = factory - .deploy_v1(Vec::new(), FieldElement::ONE, false) - .max_fee(FieldElement::ONE); + .deploy_v1(Vec::new(), Felt::ONE, false) + .max_fee(Felt::ONE); let resp = deployment.send().await.unwrap_err(); assert!(resp.to_string().contains("InsufficientMaxFee")); diff --git a/crates/snforge-scarb-plugin/src/parse.rs b/crates/snforge-scarb-plugin/src/parse.rs index 7073421216..4dde5359b8 100644 --- a/crates/snforge-scarb-plugin/src/parse.rs +++ b/crates/snforge-scarb-plugin/src/parse.rs @@ -31,7 +31,11 @@ pub fn parse( .items(db) .elements(db); - if let Some(ModuleItem::FreeFunction(func)) = elements.into_iter().next() { + if let Some(ModuleItem::FreeFunction(func)) = elements + .into_iter() + .skip_while(|element| matches!(element, ModuleItem::HeaderDoc(_))) + .next() + { Ok((simple_db, func)) } else { Err(T::error("can be used only on a function")) From 65bb2ae391f00698855a0780538baf26c5dd1501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Mon, 9 Sep 2024 14:39:41 +0200 Subject: [PATCH 02/14] Removed commented test ignore --- crates/sncast/tests/e2e/declare.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/sncast/tests/e2e/declare.rs b/crates/sncast/tests/e2e/declare.rs index 305fa83808..027db23e6c 100644 --- a/crates/sncast/tests/e2e/declare.rs +++ b/crates/sncast/tests/e2e/declare.rs @@ -230,7 +230,6 @@ async fn test_invalid_version_and_token_combination(fee_token: &str, version: &s } #[tokio::test] -// #[ignore = "Expand the contract's code to more complex or wait for fix: https://github.com/xJonathanLEI/starknet-rs/issues/649#issue-2469861847"] async fn test_happy_case_specify_package() { let tempdir = copy_directory_to_tempdir(CONTRACTS_DIR.to_string() + "/multiple_packages"); let accounts_json_path = get_accounts_path("tests/data/accounts/accounts.json"); From 916ebe6d7c03cbcc2f8a818273b684d13e040ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Mon, 9 Sep 2024 14:53:36 +0200 Subject: [PATCH 03/14] Added missing module to git --- crates/conversions/src/primitive.rs | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 crates/conversions/src/primitive.rs diff --git a/crates/conversions/src/primitive.rs b/crates/conversions/src/primitive.rs new file mode 100644 index 0000000000..8296aea32e --- /dev/null +++ b/crates/conversions/src/primitive.rs @@ -0,0 +1,30 @@ +use super::TryFromConv; +use starknet::core::types::Felt; +use thiserror; + +#[derive(Debug, thiserror::Error)] +pub enum PrimitiveConversionError { + #[error("Felt overflow")] + Overflow, +} + +#[macro_export] +macro_rules! impl_try_from_felt { + ($to:ty) => { + impl TryFromConv for $to { + type Error = PrimitiveConversionError; + fn try_from_(value: Felt) -> Result<$to, Self::Error> { + if value.ge(&Felt::from(<$to>::MAX)) { + Err(PrimitiveConversionError::Overflow) + } else { + Ok(<$to>::from_le_bytes( + value.to_bytes_le()[..size_of::<$to>()].try_into().unwrap(), + )) + } + } + } + }; +} + +impl_try_from_felt!(u64); +impl_try_from_felt!(u128); From a8e95784f555c6ff8bd86eef1c0776a661d57ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Mon, 9 Sep 2024 14:56:18 +0200 Subject: [PATCH 04/14] Removed commented code --- crates/conversions/src/lib.rs | 6 ------ .../src/serde/deserialize/deserialize_impl.rs | 1 - .../src/serde/serialize/serialize_impl.rs | 1 - crates/sncast/src/response/structs.rs | 19 ++----------------- 4 files changed, 2 insertions(+), 25 deletions(-) diff --git a/crates/conversions/src/lib.rs b/crates/conversions/src/lib.rs index 198e482a31..4e29e6cb79 100644 --- a/crates/conversions/src/lib.rs +++ b/crates/conversions/src/lib.rs @@ -15,12 +15,6 @@ pub trait FromConv: Sized { fn from_(value: T) -> Self; } -// impl FromConv for T { -// fn from_(value: T) -> Self { -// value -// } -// } - pub trait IntoConv: Sized { fn into_(self) -> T; } diff --git a/crates/conversions/src/serde/deserialize/deserialize_impl.rs b/crates/conversions/src/serde/deserialize/deserialize_impl.rs index 800f4cd424..42c605b081 100644 --- a/crates/conversions/src/serde/deserialize/deserialize_impl.rs +++ b/crates/conversions/src/serde/deserialize/deserialize_impl.rs @@ -95,7 +95,6 @@ macro_rules! impl_deserialize_for_num_type { }; } -// impl_deserialize_for_felt_type!(Felt); impl_deserialize_for_felt_type!(ClassHash); impl_deserialize_for_felt_type!(ContractAddress); impl_deserialize_for_felt_type!(Nonce); diff --git a/crates/conversions/src/serde/serialize/serialize_impl.rs b/crates/conversions/src/serde/serialize/serialize_impl.rs index f4dd8081d7..b944492e4e 100644 --- a/crates/conversions/src/serde/serialize/serialize_impl.rs +++ b/crates/conversions/src/serde/serialize/serialize_impl.rs @@ -216,7 +216,6 @@ macro_rules! impl_serialize_for_tuple { } impl_serialize_for_felt_type!(Felt252); -// impl_serialize_for_felt_type!(Felt); impl_serialize_for_felt_type!(ClassHash); impl_serialize_for_felt_type!(ContractAddress); impl_serialize_for_felt_type!(Nonce); diff --git a/crates/sncast/src/response/structs.rs b/crates/sncast/src/response/structs.rs index cc78b150a8..6fc293f7fb 100644 --- a/crates/sncast/src/response/structs.rs +++ b/crates/sncast/src/response/structs.rs @@ -1,18 +1,13 @@ +use super::explorer_link::OutputLink; +use crate::helpers::block_explorer::LinkProvider; use camino::Utf8PathBuf; use conversions::serde::serialize::CairoSerialize; use indoc::formatdoc; use serde::{Deserialize, Serialize, Serializer}; use starknet::core::types::Felt; -use crate::helpers::block_explorer::LinkProvider; - -use super::explorer_link::OutputLink; - pub struct Decimal(pub u64); -// #[derive(Clone, Debug, Deserialize, CairoSerialize, PartialEq)] -// pub struct Felt(pub FieldElement); - impl Serialize for Decimal { fn serialize(&self, serializer: S) -> Result where @@ -22,16 +17,6 @@ impl Serialize for Decimal { } } -// impl Serialize for Felt { -// fn serialize(&self, serializer: S) -> Result -// where -// S: Serializer, -// { -// let val = self.0; -// serializer.serialize_str(&format!("{val:#x}")) -// } -// } - fn serialize_as_decimal(value: &Felt, serializer: S) -> Result where S: Serializer, From a6e72d8ea64fc12ae85b8969fff7311ec225e45a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Mon, 9 Sep 2024 15:01:23 +0200 Subject: [PATCH 05/14] Fixed `clippy` --- crates/sncast/src/helpers/braavos.rs | 4 ++-- crates/sncast/src/starknet_commands/declare.rs | 2 +- crates/sncast/src/starknet_commands/invoke.rs | 2 +- crates/snforge-scarb-plugin/src/parse.rs | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/sncast/src/helpers/braavos.rs b/crates/sncast/src/helpers/braavos.rs index da407fff0a..2dccdcc05c 100644 --- a/crates/sncast/src/helpers/braavos.rs +++ b/crates/sncast/src/helpers/braavos.rs @@ -62,7 +62,7 @@ where // ref: https://github.com/myBraavos/braavos-account-cairo/blob/6efdfd597bb051e99c79a512fccd14ee2523c898/src/presets/braavos_base_account.cairo#L74 let aux_data: Vec = vec![ // account_implementation - self.class_hash.clone(), + self.class_hash, // signer_type Felt::ZERO, // secp256r1_signer.x.low @@ -82,7 +82,7 @@ where // stark_fee_rate Felt::ZERO, // chain_id - self.chain_id.clone(), + self.chain_id, ]; let aux_hash = poseidon_hash_many(&aux_data[..]); diff --git a/crates/sncast/src/starknet_commands/declare.rs b/crates/sncast/src/starknet_commands/declare.rs index 2d09f85a54..822c669512 100644 --- a/crates/sncast/src/starknet_commands/declare.rs +++ b/crates/sncast/src/starknet_commands/declare.rs @@ -122,7 +122,7 @@ pub async fn declare( class_hash, }) => handle_wait_for_tx( account.provider(), - transaction_hash.clone(), + transaction_hash, DeclareResponse { class_hash, transaction_hash, diff --git a/crates/sncast/src/starknet_commands/invoke.rs b/crates/sncast/src/starknet_commands/invoke.rs index c18db601d9..99558c8e47 100644 --- a/crates/sncast/src/starknet_commands/invoke.rs +++ b/crates/sncast/src/starknet_commands/invoke.rs @@ -109,7 +109,7 @@ pub async fn execute_calls( match result { Ok(InvokeTransactionResult { transaction_hash }) => handle_wait_for_tx( account.provider(), - transaction_hash.clone(), + transaction_hash, InvokeResponse { transaction_hash }, wait_config, ) diff --git a/crates/snforge-scarb-plugin/src/parse.rs b/crates/snforge-scarb-plugin/src/parse.rs index 4dde5359b8..4f98b25ab9 100644 --- a/crates/snforge-scarb-plugin/src/parse.rs +++ b/crates/snforge-scarb-plugin/src/parse.rs @@ -12,6 +12,7 @@ use cairo_lang_utils::Upcast; use indoc::formatdoc; use std::sync::Arc; +#[allow(clippy::skip_while_next)] pub fn parse( code: &str, ) -> Result<(SimpleParserDatabase, FunctionWithBody), Diagnostic> { From 09b207c97e57e36d1360e19e26731d73886a7bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Tue, 10 Sep 2024 16:39:57 +0200 Subject: [PATCH 06/14] Ignored problematic test --- crates/sncast/tests/e2e/declare.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/sncast/tests/e2e/declare.rs b/crates/sncast/tests/e2e/declare.rs index 027db23e6c..36b4f6d623 100644 --- a/crates/sncast/tests/e2e/declare.rs +++ b/crates/sncast/tests/e2e/declare.rs @@ -230,6 +230,7 @@ async fn test_invalid_version_and_token_combination(fee_token: &str, version: &s } #[tokio::test] +#[ignore = "#2352"] async fn test_happy_case_specify_package() { let tempdir = copy_directory_to_tempdir(CONTRACTS_DIR.to_string() + "/multiple_packages"); let accounts_json_path = get_accounts_path("tests/data/accounts/accounts.json"); From c5e78350b17806da7542ab4f3b26cb5ac4a72027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Tue, 10 Sep 2024 17:30:40 +0200 Subject: [PATCH 07/14] Updated dependencies --- Cargo.lock | 331 +++++++++++++++++++++++++---------------------------- Cargo.toml | 26 ++--- 2 files changed, 171 insertions(+), 186 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d4795e752e..2ba03fae0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,19 +4,13 @@ version = 3 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -127,9 +121,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "10f00e1f6e58a40e807377c75c6a7f97bf9044fab57816f2414e6f5f4499d7b8" [[package]] name = "ark-ec" @@ -307,13 +301,13 @@ checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -330,7 +324,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -396,17 +390,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -498,9 +492,9 @@ dependencies = [ [[package]] name = "blockifier" -version = "0.8.0-rc.2" +version = "0.8.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee25790785713833ed52ecbf39032abfc59fbcc4440feb7062fcf33fb596423" +checksum = "0fb99b6d20e12f5dff17a2b53e3e6cab54766357a638f90dafcb43c0ac933d4b" dependencies = [ "anyhow", "ark-ec", @@ -514,7 +508,7 @@ dependencies = [ "cairo-lang-utils", "cairo-vm", "derive_more", - "indexmap 2.4.0", + "indexmap 2.5.0", "itertools 0.10.5", "keccak", "log", @@ -629,9 +623,9 @@ checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" [[package]] name = "cairo-lang-casm" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9e8fe95ee2add1537d00467b98bb8928334633eb01dcba7f33fb64769af259" +checksum = "60a4b4ca8473c25d1e760c83c2a49d953197556f82f6feb636004d3b6d6cc4a7" dependencies = [ "cairo-lang-utils", "indoc", @@ -643,9 +637,9 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0db1ae47b4918a894b60160fac42e6fbcb5a8c0023dd6c290ba03a1bcdf5a554" +checksum = "5852668d1c6966b34d6e4fe249732769ab9cb2012c201e3889d8119f206760a0" dependencies = [ "anyhow", "cairo-lang-defs", @@ -669,18 +663,18 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c87b905b74516c33fc7e6d61b5243363ce65133054c30bd9531f47e30ca201" +checksum = "b0644fab571f598547993936918c85f0e89b0bbc15140ca3ea723bff376be07d" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611996d85ec608bfec75d546a5c2ec44f664f4bd2514840a5b369d30a1a8bfdb" +checksum = "7f5f437d75ac25644880458effde562edcac45a888d27f2e497d30c6450fa97d" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -695,9 +689,9 @@ dependencies = [ [[package]] name = "cairo-lang-diagnostics" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d015a0790b1f5de8b22b4b4b60d392c35bed07b7aa9dd22361af2793835cee51" +checksum = "6ec5b44d3eaf50e28e068d163e56b9effcea6afe3625c32dd96418d2d4ebc34c" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -707,9 +701,9 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c580e56e5857d51b6bf2ec5ed5fdd33fd3b74dad7e3cb6d7398396174a6c85" +checksum = "a0cd844e568f51e39729e8ac18bd27ada2e2b6dc9138f8c81adad48456480681" dependencies = [ "cairo-lang-utils", "good_lp", @@ -717,9 +711,9 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5368e66a742b8532d656171525bfea599490280ceee10bdac93ad60775fc4e59" +checksum = "323a2385e000589f7591f8a46599b4a462db6e36e5935bad3bceddcc1a1608e1" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", @@ -732,9 +726,9 @@ dependencies = [ [[package]] name = "cairo-lang-formatter" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1200324728e7f4c4acedceee427d9b3ffce221af57e469a454f007cbc248255" +checksum = "1cf9cf637e12d41260dc59f3d988c76a6347424913ac8b6b8449ff3e79b59750" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -753,9 +747,9 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a7a3069c75e1aca7cf15f20d03baf71f5c86e5be26988f6c25656549aa8b54a" +checksum = "5d71bc5b1f19a00eb662c2cac33259b16b9cdbf9c005047aca0d538c13936407" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -794,7 +788,7 @@ checksum = "e32e958decd95ae122ee64daa26721da2f76e83231047f947fd9cdc5d3c90cc6" dependencies = [ "quote", "scarb-stable-hash", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -805,9 +799,9 @@ checksum = "c49906d6b1c215e5814be7c5c65ecf2328898b335bee8c2409ec07cfb5530daf" [[package]] name = "cairo-lang-parser" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13b245ddc740ebfed8b05e1bdb7805a06d267cf89d46486c9609306f92d45ce" +checksum = "5d939d258e26ace0f3cb1e50338ae18981a7505e3c20eabd24a62d70ee862d6c" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -825,9 +819,9 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b656552d0ab4a69be223e42c4e1c4028e512f506a237d04bbe4ccab9a1e13c5" +checksum = "b67a553a6d2d2b54264e77e3c8cb5bc866b40b32d5e2144a58b74c559c7e289f" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -844,20 +838,20 @@ dependencies = [ [[package]] name = "cairo-lang-proc-macros" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05cc6adb49faa42ea825e041dff0496c2e72e4ddaf50734062a62383c0c8adbf" +checksum = "c33b5f4502b7efde6ac07fd5468f6dae15d88760aeece3d57a7bc4c224ba693e" dependencies = [ "cairo-lang-debug", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] name = "cairo-lang-project" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad123ba0e0dd5e1ea80977c0244ff4b0b6d8bf050d42ecb5ff0cf7f885e871f9" +checksum = "b63d6a3cc86a79a29978acaaf6f94738c5487e265247fe06c7bf359645d8c200" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -869,9 +863,9 @@ dependencies = [ [[package]] name = "cairo-lang-runner" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be1227ee50d291f4221f2befab3c107720bd9eb1a4da3783f61481a05ac055e2" +checksum = "528a247ac59cb35b2f99d64605a81de815fa5fb0b0e7f7ece1d4e7fcf267d4ea" dependencies = [ "ark-ff", "ark-secp256k1", @@ -900,9 +894,9 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d528c79e4ff3e1364569c07e22660ddf60c0d1989705b8f0feed9949962b28a" +checksum = "00c284031fd14796dad91483c3039d7929f8440e1e9e334017744b1d22df5aa8" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -926,9 +920,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bdb0c2cc419f45ab7e413322502ca02c2a2c56aeabdd0885e3740f378d8b269" +checksum = "891488c1a3184ce91679f5bdb63015a1d24769a48bd07e5d51a1779d0031dfbe" dependencies = [ "anyhow", "cairo-lang-utils", @@ -953,9 +947,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7224cd827ccf69e742c90a60278876865a96b545a101248d9472d2e02f9190b3" +checksum = "ea7752cd48c86b2cde8603b753a6df4da086dacd16a73d288854d5f040b51171" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -969,9 +963,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-gas" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e379e3010827fe983e66aa38a0d25fe24cfc11eaf8cadf4dc7bcb31fff031de" +checksum = "340892a09c9421414b2ac45b03c705f16e2bd737e4559dfd98ee1d20718dec9e" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -985,9 +979,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-generator" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6b353930676c06bb885a16ec3b120109aa15539c49f41b3370a5a6314dc29dc" +checksum = "c5cc616e8df44c4d685fe3c5f81f35ebbda57225098b35cea8602457c45c9e96" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -1009,9 +1003,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83873751d489aae4674f3d755a4897429a664bdc4b0847283e13889f0b0c2a44" +checksum = "1c22ff7e8113a46a907f82f191096c96935cc48247e3079971ddf536ccc2f4f8" dependencies = [ "assert_matches", "cairo-lang-casm", @@ -1030,9 +1024,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd84b445715326e44832836732b6bda76a119116b296ac9b6b87e2a4177634a" +checksum = "5bf41941776e7410a8853a8e2a116292fc24d219df1989a92ffe5ab0e98037eb" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -1040,9 +1034,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8df3086f909d27a49d6706be835725df4e21fb50efe699cd763d1f782a31dea" +checksum = "b5508fa5ee8d24adf7d2c65505d0ac35efc892eac16d1449c6f7e314a0288cb8" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1070,9 +1064,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet-classes" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41bcab650779b3431389dc52f1e643a7c9690a1aa2b072c8f01955503d094007" +checksum = "482b8f9d7f8cc7140f1260ee71f3308a66d15bd228a06281067ca3f8f4410db2" dependencies = [ "cairo-lang-casm", "cairo-lang-sierra", @@ -1093,9 +1087,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e2dc876ec02a197b8d13dbfc0b2cf7a7e31dcfc6446761cbb85f5b42d589cdc" +checksum = "7db0776c3d06cea65d7afe7a3c7685f6867eb6d951cf505caf35abfd1746773b" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -1109,9 +1103,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8727fe3f24ec0834ec6656c70a59f85233439f0a09ca53cf5e27fbdb1b40193" +checksum = "8ce0f7fa01c26cc731bc1d6350ac02fae91a68b5fdf60e684f991e861715adc4" dependencies = [ "genco", "xshell", @@ -1119,9 +1113,9 @@ dependencies = [ [[package]] name = "cairo-lang-test-plugin" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad43180395d6e36bb8c43300c0a0175b67962161370857ce0f4ff1ea91ed7094" +checksum = "74f1597b8229a3649183ff33b19f0aeca5d86505253ebbbce377b271d1732835" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1146,9 +1140,9 @@ dependencies = [ [[package]] name = "cairo-lang-test-utils" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a7681562268173d74b1c8d2438a1d9ec3218c89a8e39a8be3f10e044fa46ebe" +checksum = "630a070a69c387eee9c0eda65e4f2508d129d4fbe081091077e661020ab95637" dependencies = [ "cairo-lang-formatter", "cairo-lang-utils", @@ -1159,12 +1153,12 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e6004780c42bf28ce5afd048cc628b3de34aaf24fd2c228ae73217c58999f9" +checksum = "73104609a7d865e4cd1de9cbf4e750683d076b6d0233bf81be511df274a26916" dependencies = [ "hashbrown 0.14.5", - "indexmap 2.4.0", + "indexmap 2.5.0", "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", @@ -1179,7 +1173,7 @@ version = "1.0.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1224,9 +1218,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.15" +version = "1.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" dependencies = [ "jobserver", "libc", @@ -1309,9 +1303,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.16" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" +checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" dependencies = [ "clap_builder", "clap_derive", @@ -1319,9 +1313,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.15" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" +checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" dependencies = [ "anstream", "anstyle", @@ -1338,7 +1332,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1414,18 +1408,18 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_format" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +checksum = "50c655d81ff1114fb0dcdea9225ea9f0cc712a6f8d189378e82bdf62a473a64b" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +checksum = "eff1a44b93f47b1bac19a27932f5c591e43d1ba357ee4f61526c8a25603f0eb1" dependencies = [ "proc-macro2", "quote", @@ -1496,9 +1490,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -1572,7 +1566,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1629,7 +1623,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1651,7 +1645,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -1720,7 +1714,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -2009,7 +2003,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -2044,7 +2038,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "forge" -version = "0.29.0" +version = "0.30.0" dependencies = [ "anyhow", "ark-ff", @@ -2114,7 +2108,7 @@ dependencies = [ [[package]] name = "forge_runner" -version = "0.29.0" +version = "0.30.0" dependencies = [ "anyhow", "bimap", @@ -2259,7 +2253,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -2311,7 +2305,7 @@ checksum = "553630feadf7b76442b0849fd25fdf89b860d933623aec9693fed19af0400c78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -2340,9 +2334,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "glob" @@ -2352,9 +2346,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", @@ -2407,7 +2401,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.4.0", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -2426,7 +2420,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.4.0", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -2643,9 +2637,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" dependencies = [ "bytes", "futures-util", @@ -2703,9 +2697,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", @@ -2793,9 +2787,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2841,9 +2835,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "is_terminal_polyfill" @@ -3021,7 +3015,7 @@ checksum = "cb26336e6dc7cc76e7927d2c9e7e3bb376d7af65a6f56a0b16c47d18a9b1abc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3107,15 +3101,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" -[[package]] -name = "miniz_oxide" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - [[package]] name = "miniz_oxide" version = "0.8.0" @@ -3375,7 +3360,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3386,9 +3371,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.3.1+3.3.1" +version = "300.3.2+3.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" +checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" dependencies = [ "cc", ] @@ -3537,7 +3522,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.4.0", + "indexmap 2.5.0", ] [[package]] @@ -3570,7 +3555,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -3614,7 +3599,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -4028,7 +4013,7 @@ version = "0.17.0-pre.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719825638c59fd26a55412a24561c7c5bcf54364c88b9a7a04ba08a6eafaba8d" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "lock_api", "oorandom", "parking_lot", @@ -4048,7 +4033,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -4090,9 +4075,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.35" +version = "0.38.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" +checksum = "3f55e80d50763938498dd5ebb18647174e0c76dc38c5505294bb224624f30f36" dependencies = [ "bitflags 2.6.0", "errno", @@ -4248,11 +4233,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4277,7 +4262,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -4357,22 +4342,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -4383,14 +4368,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -4450,7 +4435,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_derive", "serde_json", @@ -4467,7 +4452,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -4621,7 +4606,7 @@ dependencies = [ [[package]] name = "sncast" -version = "0.29.0" +version = "0.30.0" dependencies = [ "anyhow", "async-trait", @@ -4863,7 +4848,7 @@ checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve 0.4.2", "starknet-ff", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -4910,7 +4895,7 @@ version = "0.2.0" source = "git+https://github.com/xJonathanLEI/starknet-rs?rev=660a732#660a7323169bbcdaea71b4f0e939631e3aaabd45" dependencies = [ "starknet-core", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -4974,7 +4959,7 @@ dependencies = [ "cairo-lang-starknet-classes", "derive_more", "hex", - "indexmap 2.4.0", + "indexmap 2.5.0", "itertools 0.12.1", "once_cell", "primitive-types", @@ -5060,7 +5045,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -5082,9 +5067,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.76" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -5157,7 +5142,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -5168,7 +5153,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", "test-case-core", ] @@ -5222,7 +5207,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -5326,7 +5311,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -5351,9 +5336,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -5389,7 +5374,7 @@ version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", @@ -5453,7 +5438,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -5661,7 +5646,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", "wasm-bindgen-shared", ] @@ -5695,7 +5680,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5956,13 +5941,13 @@ dependencies = [ [[package]] name = "wiremock" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a59f8ae78a4737fb724f20106fb35ccb7cfe61ff335665d3042b3aa98e34717" +checksum = "7fff469918e7ca034884c7fd8f93fe27bacb7fcb599fd879df6c7b429a29b646" dependencies = [ "assert-json-diff", "async-trait", - "base64 0.21.7", + "base64 0.22.1", "deadpool", "futures", "http 1.1.0", @@ -6032,7 +6017,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] @@ -6052,7 +6037,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.77", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d98dcdb57d..d370fcfc0b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,14 +16,14 @@ members = [ ] [workspace.package] -version = "0.29.0" +version = "0.30.0" edition = "2021" repository = "https://github.com/foundry-rs/starknet-foundry" license = "MIT" license-file = "LICENSE" [workspace.dependencies] -blockifier = "0.8.0-rc.2" +blockifier = "0.8.0-rc.3" starknet_api = "0.13.0-dev.7" cairo-lang-casm = { version = "2.7.0", features = ["serde"] } cairo-lang-runner = "2.7.0" @@ -52,26 +52,26 @@ cairo-lang-macro = "0.1.0" cairo-vm = "1.0.0-rc3" starknet-types-core = { version = "0.1.2", features = ["hash", "prime-bigint"] } anyhow = "1.0.86" -assert_fs = "1.1.1" -camino = { version = "1.1.7", features = ["serde1"] } -clap = { version = "4.5.8", features = ["derive"] } +assert_fs = "1.1.2" +camino = { version = "1.1.9", features = ["serde1"] } +clap = { version = "4.5.16", features = ["derive"] } console = "0.15.8" include_dir = "0.7.4" indoc = "2" itertools = "0.12.1" num-traits = "0.2.19" rayon = "1.10" -regex = "1.10.5" -serde = { version = "1.0.203", features = ["derive"] } -serde_json = "1.0.119" +regex = "1.10.6" +serde = { version = "1.0.209", features = ["derive"] } +serde_json = "1.0.127" starknet = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "660a732" } starknet-crypto = { git = "https://github.com/xJonathanLEI/starknet-rs", rev = "660a732" } trace-data = { git = "https://github.com/software-mansion/cairo-profiler/", rev = "e61a4a7" } -tempfile = "3.10.1" -thiserror = "1.0.61" +tempfile = "3.12.0" +thiserror = "1.0.63" ctor = "0.2.8" url = "2.5.2" -tokio = { version = "1.38.0", features = ["full"] } +tokio = { version = "1.40.0", features = ["full"] } tokio-util = "0.7.11" futures = "0.3.30" num-bigint = { version = "0.4.6", features = ["rand"] } @@ -108,13 +108,13 @@ toml_edit = "0.22.12" axum = "0.7.5" lazy_static = "1.5.0" fs2 = "0.4.3" -flate2 = "1.0.30" +flate2 = "1.0.33" k256 = { version = "0.13.2", features = ["sha256", "ecdsa", "serde"] } p256 = { version = "0.13.2", features = ["sha256", "ecdsa", "serde"] } glob = "0.3.1" sha3 = "0.10.8" base16ct = { version = "0.2.0", features = ["alloc"] } fs4 = "0.7" -async-trait = "0.1.80" +async-trait = "0.1.82" serde_path_to_error = "0.1.16" wiremock = "0.6.0" From 06cdb616f78d5abb4d664644c15d26058675ff7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Tue, 10 Sep 2024 17:36:10 +0200 Subject: [PATCH 08/14] Fixed `Cargo.lock` --- Cargo.lock | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cbd3b0db91..2ba03fae0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,12 +17,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - [[package]] name = "aes" version = "0.8.4" @@ -403,7 +397,7 @@ dependencies = [ "addr2line", "cfg-if", "libc", - "miniz_oxide 0.7.1", + "miniz_oxide", "object", "rustc-demangle", "windows-targets 0.52.6", @@ -2009,7 +2003,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] @@ -3116,15 +3110,6 @@ dependencies = [ "adler2", ] -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - [[package]] name = "mio" version = "1.0.2" From f3d01e7caec8deb68330887843e6a7d4db8842d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Wed, 11 Sep 2024 10:27:45 +0200 Subject: [PATCH 09/14] Updated changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bacf3500ae..eb6d69290a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Cast + +- `sncast declare` no longer fails for flat contracts (i.e. CASM artifacts with `bytecode_segment_lengths` being a number) + ## [0.30.0] - 2024-09-04 ### Forge From 5b6736bfb0cd7d3ccb819e3d49156d035a9a1830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Wed, 11 Sep 2024 19:01:58 +0200 Subject: [PATCH 10/14] Changed issue tag --- crates/sncast/tests/e2e/declare.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/sncast/tests/e2e/declare.rs b/crates/sncast/tests/e2e/declare.rs index 36b4f6d623..02ff403443 100644 --- a/crates/sncast/tests/e2e/declare.rs +++ b/crates/sncast/tests/e2e/declare.rs @@ -230,7 +230,7 @@ async fn test_invalid_version_and_token_combination(fee_token: &str, version: &s } #[tokio::test] -#[ignore = "#2352"] +#[ignore = "#2459"] async fn test_happy_case_specify_package() { let tempdir = copy_directory_to_tempdir(CONTRACTS_DIR.to_string() + "/multiple_packages"); let accounts_json_path = get_accounts_path("tests/data/accounts/accounts.json"); From f4692a24040a40b71e62aa000566c9a863431ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Thu, 12 Sep 2024 12:14:11 +0200 Subject: [PATCH 11/14] Fixed nits --- crates/conversions/src/felt252.rs | 7 ------- crates/conversions/src/lib.rs | 6 ++++++ crates/sncast/src/response/structs.rs | 1 - crates/sncast/src/starknet_commands/call.rs | 1 - crates/snforge-scarb-plugin/src/parse.rs | 19 ++++++++++--------- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/crates/conversions/src/felt252.rs b/crates/conversions/src/felt252.rs index fc84dd5c74..58684f6de5 100644 --- a/crates/conversions/src/felt252.rs +++ b/crates/conversions/src/felt252.rs @@ -4,17 +4,10 @@ use crate::{ string::{TryFromDecStr, TryFromHexStr}, FromConv, IntoConv, }; -use starknet::core::types::Felt; use starknet_api::core::{ClassHash, ContractAddress, EntryPointSelector, Nonce}; use starknet_types_core::felt::{Felt as Felt252, FromStrError}; use std::vec; -impl FromConv for Felt252 { - fn from_(value: Felt) -> Felt252 { - Felt252::from_bytes_be(&value.to_bytes_be()) - } -} - impl FromConv for Felt252 { fn from_(value: ClassHash) -> Felt252 { value.0.into_() diff --git a/crates/conversions/src/lib.rs b/crates/conversions/src/lib.rs index 4e29e6cb79..5209b14002 100644 --- a/crates/conversions/src/lib.rs +++ b/crates/conversions/src/lib.rs @@ -15,6 +15,12 @@ pub trait FromConv: Sized { fn from_(value: T) -> Self; } +impl FromConv for T { + fn from_(value: T) -> Self { + value + } +} + pub trait IntoConv: Sized { fn into_(self) -> T; } diff --git a/crates/sncast/src/response/structs.rs b/crates/sncast/src/response/structs.rs index 6fc293f7fb..9da90ae1b3 100644 --- a/crates/sncast/src/response/structs.rs +++ b/crates/sncast/src/response/structs.rs @@ -21,7 +21,6 @@ fn serialize_as_decimal(value: &Felt, serializer: S) -> Result Ok(CallResponse { response }), diff --git a/crates/snforge-scarb-plugin/src/parse.rs b/crates/snforge-scarb-plugin/src/parse.rs index 4f98b25ab9..08dde7920a 100644 --- a/crates/snforge-scarb-plugin/src/parse.rs +++ b/crates/snforge-scarb-plugin/src/parse.rs @@ -12,7 +12,6 @@ use cairo_lang_utils::Upcast; use indoc::formatdoc; use std::sync::Arc; -#[allow(clippy::skip_while_next)] pub fn parse( code: &str, ) -> Result<(SimpleParserDatabase, FunctionWithBody), Diagnostic> { @@ -32,15 +31,17 @@ pub fn parse( .items(db) .elements(db); - if let Some(ModuleItem::FreeFunction(func)) = elements + elements .into_iter() - .skip_while(|element| matches!(element, ModuleItem::HeaderDoc(_))) - .next() - { - Ok((simple_db, func)) - } else { - Err(T::error("can be used only on a function")) - } + .find_map(|element| { + if let ModuleItem::FreeFunction(func) = element { + Some(func) + } else { + None + } + }) + .map(|func| (simple_db, func)) + .ok_or_else(|| T::error("can be used only on a function")) } struct InternalCollector; From 001f6d1c6f7a9e769f5dbd04b9291557c3ec1520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Thu, 12 Sep 2024 12:18:00 +0200 Subject: [PATCH 12/14] Fixed signer interactivity check implementation --- crates/sncast/src/helpers/braavos.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/sncast/src/helpers/braavos.rs b/crates/sncast/src/helpers/braavos.rs index 2dccdcc05c..c5db45d71e 100644 --- a/crates/sncast/src/helpers/braavos.rs +++ b/crates/sncast/src/helpers/braavos.rs @@ -148,6 +148,7 @@ where } fn is_signer_interactive(&self) -> bool { - false + self.signer + .is_interactive(SignerInteractivityContext::Other) } } From cb3f4f6c5014e97d07ff87ba67b5f4225d484825 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Thu, 12 Sep 2024 12:30:55 +0200 Subject: [PATCH 13/14] Fixed import --- crates/sncast/src/helpers/braavos.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/sncast/src/helpers/braavos.rs b/crates/sncast/src/helpers/braavos.rs index c5db45d71e..a46883611e 100644 --- a/crates/sncast/src/helpers/braavos.rs +++ b/crates/sncast/src/helpers/braavos.rs @@ -6,7 +6,7 @@ use starknet::{ }, core::types::{BlockId, BlockTag, Felt}, providers::Provider, - signers::Signer, + signers::{Signer, SignerInteractivityContext}, }; use starknet_crypto::poseidon_hash_many; From e68230b4ec46184ef01e08e16ea97315d9aeab2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sm=C3=B3=C5=82ka?= Date: Thu, 12 Sep 2024 14:40:16 +0200 Subject: [PATCH 14/14] Removed unnecessary `user1_representation` file --- crates/sncast/src/helpers/fee.rs | 1 - crates/sncast/tests/data/accounts/user1_representation | 1 - 2 files changed, 2 deletions(-) delete mode 100644 crates/sncast/tests/data/accounts/user1_representation diff --git a/crates/sncast/src/helpers/fee.rs b/crates/sncast/src/helpers/fee.rs index 562ae791b0..cbfae691c0 100644 --- a/crates/sncast/src/helpers/fee.rs +++ b/crates/sncast/src/helpers/fee.rs @@ -1,4 +1,3 @@ -// use super::felt::Primitive; use anyhow::{bail, ensure, Result}; use clap::{Args, ValueEnum}; use conversions::serde::deserialize::CairoDeserialize; diff --git a/crates/sncast/tests/data/accounts/user1_representation b/crates/sncast/tests/data/accounts/user1_representation deleted file mode 100644 index c693df6e78..0000000000 --- a/crates/sncast/tests/data/accounts/user1_representation +++ /dev/null @@ -1 +0,0 @@ -SingleOwnerAccount { provider: JsonRpcClient { transport: HttpTransport { client: Client { accepts: Accepts, proxies: [Proxy(System({}), None)], referer: true, default_headers: {"accept": "*/*"} }, url: Url { scheme: "http", cannot_be_a_base: false, username: "", password: None, host: Some(Ipv4(127.0.0.1)), port: Some(5055), path: "/rpc", query: None, fragment: None }, headers: [] } }, signer: LocalWallet { private_key: SigningKey { secret_scalar: FieldElement { inner: 0x00000000000000000000000000000000ffd33878eed7767e7c546ce3fc026295 } } }, address: FieldElement { inner: 0x00f6ecd22832b7c3713cfa7826ee309ce96a2769833f093795fafa1b8f20c48b }, chain_id: FieldElement { inner: 0x00000000000000000000000000000000000000000000534e5f5345504f4c4941 }, block_id: Tag(Pending), encoding: New }