diff --git a/Cargo.lock b/Cargo.lock index dc44fb494c..f983612f9e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -532,7 +532,7 @@ dependencies = [ "futures-lite 2.1.0", "parking", "polling 3.3.1", - "rustix 0.38.27", + "rustix 0.38.28", "slab", "tracing", "windows-sys 0.52.0", @@ -920,19 +920,23 @@ dependencies = [ [[package]] name = "blockifier" -version = "0.1.0-rc0" -source = "git+https://github.com/dojoengine/blockifier?rev=3357e69#3357e69d701e02d90766302b7d2315060ef0dbef" +version = "0.4.0-rc9.2" +source = "git+https://github.com/dojoengine/blockifier?rev=e6e9c90#e6e9c902ce699269e38aecda49dc50bd11a9bec0" dependencies = [ + "ark-ec", "ark-ff", "ark-secp256k1", + "ark-secp256r1", + "cached", "cairo-felt", "cairo-lang-casm", "cairo-lang-runner", "cairo-lang-starknet", + "cairo-lang-utils", "cairo-vm", "ctor", "derive_more", - "indexmap 1.9.3", + "indexmap 2.1.0", "itertools 0.10.5", "keccak", "log", @@ -1050,12 +1054,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" -[[package]] -name = "byteyarn" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7534301c0ea17abb4db06d75efc7b4b0fa360fce8e175a4330d721c71c942ff" - [[package]] name = "bzip2" version = "0.4.4" @@ -1077,6 +1075,42 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "cached" +version = "0.44.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b195e4fbc4b6862bbd065b991a34750399c119797efff72492f28a5864de8700" +dependencies = [ + "async-trait", + "cached_proc_macro", + "cached_proc_macro_types", + "futures", + "hashbrown 0.13.2", + "instant", + "once_cell", + "thiserror", + "tokio", +] + +[[package]] +name = "cached_proc_macro" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b48814962d2fd604c50d2b9433c2a41a0ab567779ee2c02f7fba6eca1221f082" +dependencies = [ + "cached_proc_macro_types", + "darling 0.14.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "cached_proc_macro_types" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a4f925191b4367301851c6d99b09890311d74b0d43f274c0b34c86d308a3663" + [[package]] name = "cairo-felt" version = "0.8.2" @@ -1234,11 +1268,11 @@ dependencies = [ "log", "lsp-types", "salsa", - "scarb-metadata 1.9.0", + "scarb-metadata 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde", "serde_json", "tokio", - "tower-lsp 0.20.0", + "tower-lsp", ] [[package]] @@ -2055,7 +2089,7 @@ dependencies = [ [[package]] name = "create-output-dir" version = "1.0.0" -source = "git+https://github.com/software-mansion/scarb?rev=0c8def3#0c8def3aa0cd94d988336340202b24bfa52fff08" +source = "git+https://github.com/software-mansion/scarb?tag=v2.4.0#cba988e685f2f9b07a8ea0b5f056009f91c6c9ed" dependencies = [ "anyhow", "core-foundation", @@ -2299,9 +2333,9 @@ dependencies = [ [[package]] name = "deno_task_shell" -version = "0.13.2" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dbbad0a7ba06a961df3cd638ab117f5d67787607f627defa65629a4ef29d576" +checksum = "cc333d47d4ec12897c2efd25031c02191ec115b4099470daeee10f8300035e0d" dependencies = [ "anyhow", "futures", @@ -2527,6 +2561,7 @@ dependencies = [ "cairo-lang-sierra-generator", "cairo-lang-starknet", "cairo-lang-syntax", + "cairo-lang-test-plugin", "cairo-lang-test-utils", "cairo-lang-utils", "camino", @@ -2556,7 +2591,7 @@ dependencies = [ ] [[package]] -name = "dojo-languge-server" +name = "dojo-language-server" version = "0.4.0-rc0" dependencies = [ "anyhow", @@ -2574,7 +2609,7 @@ dependencies = [ "salsa", "smol_str", "tokio", - "tower-lsp 0.19.0", + "tower-lsp", ] [[package]] @@ -3276,6 +3311,21 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -3301,10 +3351,18 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29f9df8a11882c4e3335eb2d18a0137c505d9ca927470b0cac9c6f0ae07d28f7" dependencies = [ - "rustix 0.38.27", + "async-trait", + "rustix 0.38.28", + "tokio", "windows-sys 0.48.0", ] +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + [[package]] name = "fsevent-sys" version = "4.1.0" @@ -3531,13 +3589,14 @@ checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "gix" -version = "0.54.1" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6d32e74454459690d57d18ea4ebec1629936e6b130b51d12cb4a81630ac953" +checksum = "5b0dcdc9c60d66535897fa40a7ea2a635e72f99456b1d9ae86b7e170e80618cb" dependencies = [ "gix-actor", "gix-archive", "gix-attributes", + "gix-command", "gix-commitgraph", "gix-config", "gix-credentials", @@ -3589,9 +3648,9 @@ dependencies = [ [[package]] name = "gix-actor" -version = "0.27.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c60e982c5290897122d4e2622447f014a2dadd5a18cb73d50bb91b31645e27" +checksum = "2eadca029ef716b4378f7afb19f7ee101fde9e58ba1f1445971315ac866db417" dependencies = [ "bstr", "btoi", @@ -3603,9 +3662,9 @@ dependencies = [ [[package]] name = "gix-archive" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab71635f7fb38ad4cc7da7e98af79e3010e35b05de5cb6eb79b2da68ab93eac7" +checksum = "c9d1095b8cbc9369f1cd59dc73f7e37fab2252294265705da8bc80e42a2ecc38" dependencies = [ "bstr", "gix-date", @@ -3616,16 +3675,16 @@ dependencies = [ [[package]] name = "gix-attributes" -version = "0.19.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2451665e70709ba4753b623ef97511ee98c4a73816b2c5b5df25678d607ed820" +checksum = "0f395469d38c76ec47cd1a6c5a53fbc3f13f737b96eaf7535f4e6b367e643381" dependencies = [ "bstr", - "byteyarn", "gix-glob", "gix-path", "gix-quote", "gix-trace", + "kstring", "smallvec", "thiserror", "unicode-bom", @@ -3651,18 +3710,21 @@ dependencies = [ [[package]] name = "gix-command" -version = "0.2.10" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c576cfbf577f72c097b5f88aedea502cd62952bdc1fb3adcab4531d5525a4c7" +checksum = "b3b54c1d8d63e6ef2adbd9b94d6e49ff168858510b44d3811cdd02dfacc4f0c9" dependencies = [ "bstr", + "gix-path", + "gix-trace", + "shell-words", ] [[package]] name = "gix-commitgraph" -version = "0.21.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e75a975ee22cf0a002bfe9b5d5cb3d2a88e263a8a178cd7509133cff10f4df8a" +checksum = "85a7007ba021f059803afaf6f8a48872422abc20550ac12ede6ddea2936cec36" dependencies = [ "bstr", "gix-chunk", @@ -3674,9 +3736,9 @@ dependencies = [ [[package]] name = "gix-config" -version = "0.30.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c171514b40487d3f677ae37efc0f45ac980e3169f23c27eb30a70b47fdf88ab5" +checksum = "0341471d55d8676e98b88e121d7065dfa4c9c5acea4b6d6ecdd2846e85cce0c3" dependencies = [ "bstr", "gix-config-value", @@ -3708,9 +3770,9 @@ dependencies = [ [[package]] name = "gix-credentials" -version = "0.20.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46900b884cc5af6a6c141ee741607c0c651a4e1d33614b8d888a1ba81cc0bc8a" +checksum = "513dac42450b27946bd0a0535a3a5a88e473d6522e5e3439a129cab779c88f3d" dependencies = [ "bstr", "gix-command", @@ -3718,6 +3780,7 @@ dependencies = [ "gix-path", "gix-prompt", "gix-sec", + "gix-trace", "gix-url", "thiserror", ] @@ -3736,21 +3799,29 @@ dependencies = [ [[package]] name = "gix-diff" -version = "0.36.0" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "788ddb152c388206e81f36bcbb574e7ed7827c27d8fa62227b34edc333d8928c" +checksum = "8119a985887cfe68f4bdf92e51bd64bc758a73882d82fcfc03ebcb164441c85d" dependencies = [ + "bstr", + "gix-command", + "gix-filter", + "gix-fs", "gix-hash", "gix-object", + "gix-path", + "gix-tempfile", + "gix-trace", + "gix-worktree", "imara-diff", "thiserror", ] [[package]] name = "gix-discover" -version = "0.25.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69507643d75a0ea9a402fcf73ced517d2b95cc95385904ac09d03e0b952fde33" +checksum = "6fad89416ebe0b3b7df78464124e2a02417b6cd3743d48ad93df86f4d2929c07" dependencies = [ "bstr", "dunce", @@ -3763,9 +3834,9 @@ dependencies = [ [[package]] name = "gix-features" -version = "0.35.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b9ff423ae4983f762659040d13dd7a5defbd54b6a04ac3cc7347741cec828cd" +checksum = "4d46a4a5c6bb5bebec9c0d18b65ada20e6517dbd7cf855b87dd4bbdce3a771b2" dependencies = [ "bytes", "bytesize", @@ -3786,9 +3857,9 @@ dependencies = [ [[package]] name = "gix-filter" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be40d28cd41445bb6cd52c4d847d915900e5466f7433eaee6a9e0a3d1d88b08" +checksum = "6d6a5c9d8e55c364e7c226919c19c9a28be1392d6208b5008059fa94ff7e2bf0" dependencies = [ "bstr", "encoding_rs", @@ -3800,24 +3871,25 @@ dependencies = [ "gix-path", "gix-quote", "gix-trace", + "gix-utils", "smallvec", "thiserror", ] [[package]] name = "gix-fs" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09815faba62fe9b32d918b75a554686c98e43f7d48c43a80df58eb718e5c6635" +checksum = "20e86eb040f5776a5ade092282e51cdcad398adb77d948b88d17583c2ae4e107" dependencies = [ "gix-features", ] [[package]] name = "gix-glob" -version = "0.13.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d76e85f11251dcf751d2c5e918a14f562db5be6f727fd24775245653e9b19d" +checksum = "5db19298c5eeea2961e5b3bf190767a2d1f09b8802aeb5f258e42276350aff19" dependencies = [ "bitflags 2.4.1", "bstr", @@ -3848,9 +3920,9 @@ dependencies = [ [[package]] name = "gix-ignore" -version = "0.8.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048f443a1f6b02da4205c34d2e287e3fd45d75e8e2f06cfb216630ea9bff5e3" +checksum = "a215cc8cf21645bca131fcf6329d3ebd46299c47dbbe27df71bb1ca9e328b879" dependencies = [ "bstr", "gix-glob", @@ -3860,9 +3932,9 @@ dependencies = [ [[package]] name = "gix-index" -version = "0.25.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54d63a9d13c13088f41f5a3accbec284e492ac8f4f707fcc307c139622e17b7" +checksum = "65ce8d03ec25de952be7d2a9adce2a4c2cb8f7fc2d4c25be91301be9707f380b" dependencies = [ "bitflags 2.4.1", "bstr", @@ -3876,16 +3948,18 @@ dependencies = [ "gix-object", "gix-traverse", "itoa", + "libc", "memmap2", + "rustix 0.38.28", "smallvec", "thiserror", ] [[package]] name = "gix-lock" -version = "10.0.0" +version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47fc96fa8b6b6d33555021907c81eb3b27635daecf6e630630bdad44f8feaa95" +checksum = "7e5c65e6a29830a435664891ced3f3c1af010f14900226019590ee0971a22f37" dependencies = [ "gix-tempfile", "gix-utils", @@ -3905,9 +3979,9 @@ dependencies = [ [[package]] name = "gix-mailmap" -version = "0.19.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40f00fa96e29e066ef208f5d13e0f5f95fa70c3ae4bd4f0234272ed4d708a7db" +checksum = "e2325fec0d5e6b2dd758083a6f560bfeabc73ff7a12ffe378986baf890fe9f07" dependencies = [ "bstr", "gix-actor", @@ -3917,9 +3991,9 @@ dependencies = [ [[package]] name = "gix-negotiate" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f1697bf9911c6d1b8d709b9e6ef718cb5ea5821a1b7991520125a8134448004" +checksum = "979f6accd9c051b3dd018b50adf29c0a2459edddf6105cc70b767976cd6f8014" dependencies = [ "bitflags 2.4.1", "gix-commitgraph", @@ -3933,9 +4007,9 @@ dependencies = [ [[package]] name = "gix-object" -version = "0.37.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7e19616c67967374137bae83e950e9b518a9ea8a605069bd6716ada357fd6f" +checksum = "febf79c5825720c1c63fe974c7bbe695d0cb54aabad73f45671c60ce0e501e33" dependencies = [ "bstr", "btoi", @@ -3952,9 +4026,9 @@ dependencies = [ [[package]] name = "gix-odb" -version = "0.53.0" +version = "0.55.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d6a392c6ba3a2f133cdc63120e9bc7aec81eef763db372c817de31febfe64bf" +checksum = "1fae5f971540c99c6ecc8d4368ecc9d18a9dc8b9391025c68c4399747dc93bac" dependencies = [ "arc-swap", "gix-date", @@ -3971,9 +4045,9 @@ dependencies = [ [[package]] name = "gix-pack" -version = "0.43.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7536203a45b31e1bc5694bbf90ba8da1b736c77040dd6a520db369f371eb1ab3" +checksum = "4569491c92446fddf373456ff360aff9a9effd627b40a70f2d7914dcd75a3205" dependencies = [ "clru", "gix-chunk", @@ -3992,12 +4066,13 @@ dependencies = [ [[package]] name = "gix-packetline-blocking" -version = "0.16.6" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d8395f7501c84d6a1fe902035fdfd8cd86d89e2dd6be0200ec1a72fd3c92d39" +checksum = "50052c0f76c5af5acda41177fb55b60c1e484cc246ae919d8d21129cd1000a4e" dependencies = [ "bstr", "faster-hex", + "gix-trace", "thiserror", ] @@ -4016,9 +4091,9 @@ dependencies = [ [[package]] name = "gix-pathspec" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e26c9b47c51be73f98d38c84494bd5fb99334c5d6fda14ef5d036d50a9e5fd" +checksum = "1dbbb92f75a38ef043c8bb830b339b38d0698d7f3746968b5fcbade7a880494d" dependencies = [ "bitflags 2.4.1", "bstr", @@ -4031,14 +4106,14 @@ dependencies = [ [[package]] name = "gix-prompt" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c9a913769516f5e9d937afac206fb76428e3d7238e538845842887fda584678" +checksum = "4967b921304a5355e65a6257280eddf6e0f9ce3df111256531460adca3771305" dependencies = [ "gix-command", "gix-config-value", "parking_lot 0.12.1", - "rustix 0.38.27", + "rustix 0.38.28", "thiserror", ] @@ -4055,9 +4130,9 @@ dependencies = [ [[package]] name = "gix-ref" -version = "0.37.0" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e6b749660b613641769edc1954132eb8071a13c32224891686091bef078de4" +checksum = "1ac23ed741583c792f573c028785db683496a6dfcd672ec701ee54ba6a77e1ff" dependencies = [ "gix-actor", "gix-date", @@ -4076,9 +4151,9 @@ dependencies = [ [[package]] name = "gix-refspec" -version = "0.18.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0895cb7b1e70f3c3bd4550c329e9f5caf2975f97fcd4238e05754e72208ef61e" +checksum = "76d9d3b82e1ee78fc0dc1c37ea5ea76c2dbc73f407db155f0dfcea285e583bee" dependencies = [ "bstr", "gix-hash", @@ -4090,9 +4165,9 @@ dependencies = [ [[package]] name = "gix-revision" -version = "0.22.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8c4b15cf2ab7a35f5bcb3ef146187c8d36df0177e171ca061913cbaaa890e89" +checksum = "fe5dd51710ce5434bc315ea30394fab483c5377276494edd79222b321a5a9544" dependencies = [ "bstr", "gix-date", @@ -4106,9 +4181,9 @@ dependencies = [ [[package]] name = "gix-revwalk" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9870c6b1032f2084567710c3b2106ac603377f8d25766b8a6b7c33e6e3ca279" +checksum = "69d4ed2493ca94a475fdf147138e1ef8bab3b6ebb56abf3d9bda1c05372ec1dd" dependencies = [ "gix-commitgraph", "gix-date", @@ -4133,27 +4208,28 @@ dependencies = [ [[package]] name = "gix-status" -version = "0.1.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "082801c42ba707f2407b5cce3d99b89cfa84f3794962946dc94cfdc00ae522fa" +checksum = "255a11459330a9a6ef59a5614b90c5661f04836c0f715cf68f8ca53726843d24" dependencies = [ "bstr", "filetime", "gix-features", + "gix-filter", "gix-fs", "gix-hash", "gix-index", "gix-object", "gix-path", - "gix-pathspec", + "gix-worktree", "thiserror", ] [[package]] name = "gix-submodule" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0150e82e9282d3f2ab2dd57a22f9f6c3447b9d9856e5321ac92d38e3e0e2b7" +checksum = "02a3d7f60a95bdcaeb8981663c99d1c9f4de42aab1169524c949e948989809f9" dependencies = [ "bstr", "gix-config", @@ -4166,10 +4242,11 @@ dependencies = [ [[package]] name = "gix-tempfile" -version = "10.0.0" +version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ae0978f3e11dc57290ee75ac2477c815bca1ce2fa7ed5dc5f16db067410ac4d" +checksum = "388dd29114a86ec69b28d1e26d6d63a662300ecf61ab3f4cc578f7d7dc9e7e23" dependencies = [ + "dashmap", "gix-fs", "libc", "once_cell", @@ -4187,9 +4264,9 @@ checksum = "b686a35799b53a9825575ca3f06481d0a053a409c4d97ffcf5ddd67a8760b497" [[package]] name = "gix-traverse" -version = "0.33.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ef04ab3643acba289b5cedd25d6f53c0430770b1d689d1d654511e6fb81ba0" +checksum = "df2112088122a0206592c84fbd42020db63b2ccaed66a0293779f2e5fbf80474" dependencies = [ "gix-commitgraph", "gix-date", @@ -4203,9 +4280,9 @@ dependencies = [ [[package]] name = "gix-url" -version = "0.24.0" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6125ecf46e8c68bf7202da6cad239831daebf0247ffbab30210d72f3856e420f" +checksum = "0c427a1a11ccfa53a4a2da47d9442c2241deee63a154bc15cc14b8312fbc4005" dependencies = [ "bstr", "gix-features", @@ -4236,9 +4313,9 @@ dependencies = [ [[package]] name = "gix-worktree" -version = "0.26.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f5e32972801bd82d56609e6fc84efc358fa1f11f25c5e83b7807ee2280f14fe" +checksum = "7f1d0ae01dee14abe8c8117d78d7518f9a507de2dc4522546fbf4c444e9860b4" dependencies = [ "bstr", "gix-attributes", @@ -4254,9 +4331,9 @@ dependencies = [ [[package]] name = "gix-worktree-state" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3aeb06960f2c5ac9e4cdb6b38eb3c2b99d5e525e68285fef21ed17dfbd597ad" +checksum = "afef3c1cfe610ccfbca391515a1254662a648ce2635c9f60511eb1feb751fa01" dependencies = [ "bstr", "gix-features", @@ -4274,9 +4351,9 @@ dependencies = [ [[package]] name = "gix-worktree-stream" -version = "0.5.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89fe93a12e45cc3ad6ba429a7dd7506b03d7d406374a65ad9998b5cb2627569" +checksum = "3c783c269ed30193a00becb20209aa89fb48dadbaf30c9f66082472da966106c" dependencies = [ "gix-attributes", "gix-features", @@ -4665,6 +4742,19 @@ dependencies = [ "tokio-io-timeout", ] +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + [[package]] name = "iana-time-zone" version = "0.1.58" @@ -4975,7 +5065,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi", - "rustix 0.38.27", + "rustix 0.38.28", "windows-sys 0.48.0", ] @@ -5008,9 +5098,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" @@ -5371,6 +5461,15 @@ dependencies = [ "libc", ] +[[package]] +name = "kstring" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3066350882a1cd6d950d055997f379ac37fd39f81cd4d8ed186032eb3c5747" +dependencies = [ + "static_assertions", +] + [[package]] name = "kv-log-macro" version = "1.0.7" @@ -5576,9 +5675,9 @@ checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memmap2" -version = "0.7.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49388d20533534cd19360ad3d6a7dadc885944aa802ba3995040c5ec11288c6" +checksum = "deaba38d7abf1d4cca21cc89e932e542ba2b9258664d2a9ef0e61512039c9375" dependencies = [ "libc", ] @@ -5739,6 +5838,24 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +[[package]] +name = "native-tls" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + [[package]] name = "ndarray" version = "0.13.1" @@ -6029,12 +6146,50 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "openssl" +version = "0.10.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" +dependencies = [ + "bitflags 2.4.1", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.39", +] + [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-sys" +version = "0.9.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3eaad34cdd97d81de97964fc7f29e2d104f483840d906ef56daa1912338460b" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "option-ext" version = "0.2.0" @@ -6472,7 +6627,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "pin-project-lite", - "rustix 0.38.27", + "rustix 0.38.28", "tracing", "windows-sys 0.52.0", ] @@ -6694,7 +6849,7 @@ dependencies = [ "regex", "syn 1.0.109", "tempfile", - "which", + "which 4.4.2", ] [[package]] @@ -6716,7 +6871,7 @@ dependencies = [ "regex", "syn 2.0.39", "tempfile", - "which", + "which 4.4.2", ] [[package]] @@ -6849,6 +7004,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "redb" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08837f9a129bde83c51953b8c96cbb3422b940166b730caa954836106eb1dfd2" +dependencies = [ + "libc", +] + [[package]] name = "redox_syscall" version = "0.2.16" @@ -6940,6 +7104,7 @@ version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ + "async-compression", "base64 0.21.5", "bytes", "encoding_rs", @@ -6950,25 +7115,31 @@ dependencies = [ "http-body", "hyper", "hyper-rustls 0.24.2", + "hyper-tls", "ipnet", "js-sys", "log", "mime", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", "rustls 0.21.10", + "rustls-native-certs", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "system-configuration", "tokio", + "tokio-native-tls", "tokio-rustls 0.24.1", + "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "webpki-roots", "winreg", @@ -6977,7 +7148,7 @@ dependencies = [ [[package]] name = "reth-libmdbx" version = "0.1.0-alpha.13" -source = "git+https://github.com/paradigmxyz/reth.git#cf5006108c5ed2b774f09fbf02a694ec67e95ba0" +source = "git+https://github.com/paradigmxyz/reth.git#8a670d57ec1c8f3cdf617e09f939d7d2624b6ded" dependencies = [ "bitflags 2.4.1", "byteorder", @@ -6992,7 +7163,7 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" version = "0.1.0-alpha.13" -source = "git+https://github.com/paradigmxyz/reth.git#cf5006108c5ed2b774f09fbf02a694ec67e95ba0" +source = "git+https://github.com/paradigmxyz/reth.git#8a670d57ec1c8f3cdf617e09f939d7d2624b6ded" dependencies = [ "bindgen", "cc", @@ -7132,9 +7303,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.27" +version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfeae074e687625746172d639330f1de242a178bf3189b51e35a7a21573513ac" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ "bitflags 2.4.1", "errno", @@ -7295,8 +7466,8 @@ dependencies = [ [[package]] name = "scarb" -version = "2.3.1" -source = "git+https://github.com/software-mansion/scarb?rev=0c8def3#0c8def3aa0cd94d988336340202b24bfa52fff08" +version = "2.4.0" +source = "git+https://github.com/software-mansion/scarb?tag=v2.4.0#cba988e685f2f9b07a8ea0b5f056009f91c6c9ed" dependencies = [ "anyhow", "async-trait", @@ -7320,18 +7491,21 @@ dependencies = [ "directories", "dunce", "fs4", + "fs_extra", "futures", "gix", "glob", "ignore", "include_dir", "indoc 2.0.4", - "itertools 0.11.0", + "itertools 0.12.0", "once_cell", "pathdiff", "petgraph", + "redb", + "reqwest", "scarb-build-metadata", - "scarb-metadata 1.8.0", + "scarb-metadata 1.9.0 (git+https://github.com/software-mansion/scarb?tag=v2.4.0)", "scarb-ui", "semver", "serde", @@ -7346,35 +7520,35 @@ dependencies = [ "thiserror", "tokio", "toml 0.8.8", - "toml_edit 0.20.7", + "toml_edit 0.21.0", "tracing", - "tracing-log 0.1.4", + "tracing-log 0.2.0", "tracing-subscriber", "typed-builder", "url", "walkdir", - "which", + "which 5.0.0", "windows-sys 0.48.0", "xxhash-rust", "zip", - "zstd 0.12.4", + "zstd 0.13.0", ] [[package]] name = "scarb-build-metadata" -version = "2.3.1" -source = "git+https://github.com/software-mansion/scarb?rev=0c8def3#0c8def3aa0cd94d988336340202b24bfa52fff08" +version = "2.4.0" +source = "git+https://github.com/software-mansion/scarb?tag=v2.4.0#cba988e685f2f9b07a8ea0b5f056009f91c6c9ed" dependencies = [ "cargo_metadata", ] [[package]] name = "scarb-metadata" -version = "1.8.0" -source = "git+https://github.com/software-mansion/scarb?rev=0c8def3#0c8def3aa0cd94d988336340202b24bfa52fff08" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf294b35e5abed4510b98150fbdfad402111cb05532b38d8569a1c3edea6d1a6" dependencies = [ "camino", - "derive_builder", "semver", "serde", "serde_json", @@ -7384,10 +7558,10 @@ dependencies = [ [[package]] name = "scarb-metadata" version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf294b35e5abed4510b98150fbdfad402111cb05532b38d8569a1c3edea6d1a6" +source = "git+https://github.com/software-mansion/scarb?tag=v2.4.0#cba988e685f2f9b07a8ea0b5f056009f91c6c9ed" dependencies = [ "camino", + "derive_builder", "semver", "serde", "serde_json", @@ -7396,15 +7570,15 @@ dependencies = [ [[package]] name = "scarb-ui" -version = "0.1.0" -source = "git+https://github.com/software-mansion/scarb?rev=0c8def3#0c8def3aa0cd94d988336340202b24bfa52fff08" +version = "0.1.2" +source = "git+https://github.com/software-mansion/scarb?tag=v2.4.0#cba988e685f2f9b07a8ea0b5f056009f91c6c9ed" dependencies = [ "anyhow", "camino", "clap", "console", "indicatif", - "scarb-metadata 1.8.0", + "scarb-metadata 1.9.0 (git+https://github.com/software-mansion/scarb?tag=v2.4.0)", "serde", "serde_json", ] @@ -7763,6 +7937,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" + [[package]] name = "shlex" version = "1.2.0" @@ -7935,6 +8115,7 @@ dependencies = [ "cairo-lang-starknet", "cairo-lang-test-plugin", "cairo-lang-test-runner", + "cairo-lang-utils", "camino", "clap", "clap-verbosity-flag", @@ -8226,7 +8407,7 @@ checksum = "351ffff1bcf6a1dc569a1b330dfd85779e16506e7d4a87baa8be3744cb5415a6" dependencies = [ "starknet-accounts", "starknet-contract", - "starknet-core", + "starknet-core 0.7.2", "starknet-crypto 0.6.1", "starknet-ff", "starknet-macros", @@ -8242,7 +8423,7 @@ checksum = "c7062b020f65d9da7f9dd9f1d97bfb644e881cda8ddb999799a799e6f2e408dd" dependencies = [ "async-trait", "auto_impl", - "starknet-core", + "starknet-core 0.7.2", "starknet-providers", "starknet-signers", "thiserror", @@ -8258,7 +8439,7 @@ dependencies = [ "serde_json", "serde_with", "starknet-accounts", - "starknet-core", + "starknet-core 0.7.2", "starknet-providers", "thiserror", ] @@ -8281,6 +8462,24 @@ dependencies = [ "starknet-ff", ] +[[package]] +name = "starknet-core" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff50e281d4fdb97988a3d5c7b7cae22b9d67bb2ef9be2cfafc17a1e35542cb53" +dependencies = [ + "base64 0.21.5", + "flate2", + "hex", + "serde", + "serde_json", + "serde_json_pythonic", + "serde_with", + "sha3", + "starknet-crypto 0.6.1", + "starknet-ff", +] + [[package]] name = "starknet-crypto" version = "0.5.2" @@ -8367,11 +8566,11 @@ dependencies = [ [[package]] name = "starknet-macros" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66fe05edab7ee6752a0aff3e14508001191083f3c6d0b6fa14f7008a96839b0" +checksum = "840be1a7eb5735863eee47d3a3f26df45b9be2c519e8da294e74b4d0524d77d1" dependencies = [ - "starknet-core", + "starknet-core 0.8.0", "syn 2.0.39", ] @@ -8390,7 +8589,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "starknet-core", + "starknet-core 0.7.2", "thiserror", "url", ] @@ -8406,25 +8605,28 @@ dependencies = [ "crypto-bigint", "eth-keystore", "rand", - "starknet-core", + "starknet-core 0.7.2", "starknet-crypto 0.6.1", "thiserror", ] [[package]] name = "starknet_api" -version = "0.2.0" -source = "git+https://github.com/starkware-libs/starknet-api?rev=ecc9b6946ef13003da202838e4124a9ad2efabb0#ecc9b6946ef13003da202838e4124a9ad2efabb0" +version = "0.6.0-rc3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874475a79285b03525dcb6773c5b6436d0bb937de9791c43a02a682a0fcbefd4" dependencies = [ "cairo-lang-starknet", "derive_more", "hex", - "indexmap 1.9.3", + "indexmap 2.1.0", "once_cell", "primitive-types", "serde", "serde_json", "starknet-crypto 0.5.2", + "strum 0.24.1", + "strum_macros 0.24.3", "thiserror", ] @@ -8618,7 +8820,7 @@ dependencies = [ "cfg-if", "fastrand 2.0.1", "redox_syscall 0.4.1", - "rustix 0.38.27", + "rustix 0.38.28", "windows-sys 0.48.0", ] @@ -8776,9 +8978,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" dependencies = [ "backtrace", "bytes", @@ -8814,6 +9016,16 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + [[package]] name = "tokio-rustls" version = "0.23.4" @@ -8938,8 +9150,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ "indexmap 2.1.0", - "serde", - "serde_spanned", "toml_datetime", "winnow", ] @@ -9326,29 +9536,6 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" -[[package]] -name = "tower-lsp" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b38fb0e6ce037835174256518aace3ca621c4f96383c56bb846cfc11b341910" -dependencies = [ - "async-trait", - "auto_impl", - "bytes", - "dashmap", - "futures", - "httparse", - "lsp-types", - "memchr", - "serde", - "serde_json", - "tokio", - "tokio-util", - "tower", - "tower-lsp-macros 0.8.0", - "tracing", -] - [[package]] name = "tower-lsp" version = "0.20.0" @@ -9368,21 +9555,10 @@ dependencies = [ "tokio", "tokio-util", "tower", - "tower-lsp-macros 0.9.0", + "tower-lsp-macros", "tracing", ] -[[package]] -name = "tower-lsp-macros" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34723c06344244474fdde365b76aebef8050bf6be61a935b91ee9ff7c4e91157" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "tower-lsp-macros" version = "0.9.0" @@ -9524,18 +9700,18 @@ dependencies = [ [[package]] name = "typed-builder" -version = "0.16.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34085c17941e36627a879208083e25d357243812c30e7d7387c3b954f30ade16" +checksum = "e47c0496149861b7c95198088cbf36645016b1a0734cf350c50e2a38e070f38a" dependencies = [ "typed-builder-macro", ] [[package]] name = "typed-builder-macro" -version = "0.16.2" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f03ca4cb38206e2bef0700092660bb74d696f808514dae47fa1467cbfe26e96e" +checksum = "982ee4197351b5c9782847ef5ec1fdcaf50503fb19d68f9771adae314e72b492" dependencies = [ "proc-macro2", "quote", @@ -9926,7 +10102,20 @@ dependencies = [ "either", "home", "once_cell", - "rustix 0.38.27", + "rustix 0.38.28", +] + +[[package]] +name = "which" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bf3ea8596f3a0dd5980b46430f2058dfe2c36a27ccfbb1845d6fbfcd9ba6e14" +dependencies = [ + "either", + "home", + "once_cell", + "rustix 0.38.28", + "windows-sys 0.48.0", ] [[package]] @@ -10231,9 +10420,9 @@ dependencies = [ [[package]] name = "xattr" -version = "1.0.1" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" +checksum = "fbc6ab6ec1907d1a901cdbcd2bd4cb9e7d64ce5c9739cbb97d3c391acd8c7fae" dependencies = [ "libc", ] @@ -10334,15 +10523,6 @@ dependencies = [ "zstd-safe 5.0.2+zstd.1.5.2", ] -[[package]] -name = "zstd" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" -dependencies = [ - "zstd-safe 6.0.6", -] - [[package]] name = "zstd" version = "0.13.0" @@ -10362,16 +10542,6 @@ dependencies = [ "zstd-sys", ] -[[package]] -name = "zstd-safe" -version = "6.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" -dependencies = [ - "libc", - "zstd-sys", -] - [[package]] name = "zstd-safe" version = "7.0.0" diff --git a/Cargo.toml b/Cargo.toml index 77c076c2ab..6426b9f723 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,29 +42,29 @@ anyhow = "1.0.75" assert_matches = "1.5.0" async-trait = "0.1.68" base64 = "0.21.2" -blockifier = { git = "https://github.com/starkware-libs/blockifier" } -cairo-lang-casm = "2.3.1" -cairo-lang-compiler = "2.3.1" -cairo-lang-debug = "2.3.1" -cairo-lang-defs = "2.3.1" -cairo-lang-diagnostics = "2.3.1" -cairo-lang-filesystem = "2.3.1" -cairo-lang-formatter = "2.3.1" -cairo-lang-language-server = "2.3.1" -cairo-lang-lowering = "2.3.1" -cairo-lang-parser = "2.3.1" -cairo-lang-plugins = "2.3.1" -cairo-lang-project = "2.3.1" -cairo-lang-semantic = { version = "2.3.1", features = [ "testing" ] } -cairo-lang-sierra = "2.3.1" -cairo-lang-sierra-generator = "2.3.1" -cairo-lang-sierra-to-casm = "2.3.1" -cairo-lang-starknet = "2.3.1" -cairo-lang-syntax = "2.3.1" -cairo-lang-test-plugin = "2.3.1" -cairo-lang-test-runner = "2.3.1" -cairo-lang-test-utils = "2.3.1" -cairo-lang-utils = "2.3.1" +blockifier = { git = "https://github.com/starkware-libs/blockifier", tag = "v0.4.0-rc9.2" } +cairo-lang-casm = "2.4.0" +cairo-lang-compiler = "2.4.0" +cairo-lang-debug = "2.4.0" +cairo-lang-defs = "2.4.0" +cairo-lang-diagnostics = "2.4.0" +cairo-lang-filesystem = "2.4.0" +cairo-lang-formatter = "2.4.0" +cairo-lang-language-server = "2.4.0" +cairo-lang-lowering = "2.4.0" +cairo-lang-parser = "2.4.0" +cairo-lang-plugins = "2.4.0" +cairo-lang-project = "2.4.0" +cairo-lang-semantic = { version = "2.4.0", features = [ "testing" ] } +cairo-lang-sierra = "2.4.0" +cairo-lang-sierra-generator = "2.4.0" +cairo-lang-sierra-to-casm = "2.4.0" +cairo-lang-starknet = "2.4.0" +cairo-lang-syntax = "2.4.0" +cairo-lang-test-plugin = "2.4.0" +cairo-lang-test-runner = "2.4.0" +cairo-lang-test-utils = "2.4.0" +cairo-lang-utils = "2.4.0" cairo-vm = "0.8.2" camino = { version = "1.1.2", features = [ "serde1" ] } chrono = { version = "0.4.24", features = [ "serde" ] } @@ -88,17 +88,17 @@ parking_lot = "0.12.1" pretty_assertions = "1.2.1" rayon = "1.8.0" salsa = "0.16.1" -scarb = { git = "https://github.com/software-mansion/scarb", rev = "0c8def3" } -scarb-ui = { git = "https://github.com/software-mansion/scarb", rev = "0c8def3" } +scarb = { git = "https://github.com/software-mansion/scarb", tag = "v2.4.0" } +scarb-ui = { git = "https://github.com/software-mansion/scarb", tag = "v2.4.0" } semver = "1.0.5" serde = { version = "1.0.156", features = [ "derive" ] } serde_json = "1.0" serde_with = "2.3.1" smol_str = { version = "0.2.0", features = [ "serde" ] } -sqlx = { version = "0.7.2", features = [ "chrono", "macros", "runtime-async-std", "runtime-tokio", "sqlite", "uuid", "regexp" ] } +sqlx = { version = "0.7.2", features = [ "chrono", "macros", "regexp", "runtime-async-std", "runtime-tokio", "sqlite", "uuid" ] } starknet = "0.7.0" starknet-crypto = "0.6.1" -starknet_api = { git = "https://github.com/starkware-libs/starknet-api", rev = "ecc9b6946ef13003da202838e4124a9ad2efabb0" } +starknet_api = "0.6.0-rc3" strum = "0.25" strum_macros = "0.25" test-log = "0.2.11" @@ -127,7 +127,7 @@ wasm-tonic = { version = "0.9.2", default-features = false, features = [ "codege wasm-tonic-build = { version = "0.9.2", default-features = false, features = [ "prost" ], package = "tonic-build" } [patch."https://github.com/starkware-libs/blockifier"] -blockifier = { git = "https://github.com/dojoengine/blockifier", rev = "3357e69" } +blockifier = { git = "https://github.com/dojoengine/blockifier", rev = "e6e9c90" } [patch.crates-io] cairo-felt = { git = "https://github.com/dojoengine/cairo-rs.git", rev = "262b7eb4b11ab165a2a936a5f914e78aa732d4a2" } diff --git a/crates/benches/contracts/Scarb.toml b/crates/benches/contracts/Scarb.toml index 81f563c57f..dda6203781 100644 --- a/crates/benches/contracts/Scarb.toml +++ b/crates/benches/contracts/Scarb.toml @@ -1,5 +1,5 @@ [package] -cairo-version = "2.2.0" +cairo-version = "2.4.0" name = "benches" version = "0.3.2" diff --git a/crates/dojo-core/Scarb.toml b/crates/dojo-core/Scarb.toml index cf78540539..8790f62c3d 100644 --- a/crates/dojo-core/Scarb.toml +++ b/crates/dojo-core/Scarb.toml @@ -1,9 +1,9 @@ [package] -cairo-version = "2.3.1" +cairo-version = "2.4.0" description = "The Dojo Core library for autonomous worlds." name = "dojo" version = "0.4.0-rc0" [dependencies] dojo_plugin = { git = "https://github.com/dojoengine/dojo", tag = "v0.3.11" } -starknet = "2.3.1" +starknet = "2.4.0" diff --git a/crates/dojo-lang/Cargo.toml b/crates/dojo-lang/Cargo.toml index 244e81a1ef..1d1da8d84c 100644 --- a/crates/dojo-lang/Cargo.toml +++ b/crates/dojo-lang/Cargo.toml @@ -24,6 +24,7 @@ cairo-lang-semantic.workspace = true cairo-lang-sierra-generator.workspace = true cairo-lang-starknet.workspace = true cairo-lang-syntax.workspace = true +cairo-lang-test-plugin.workspace = true cairo-lang-utils.workspace = true camino.workspace = true convert_case.workspace = true diff --git a/crates/dojo-lang/README.md b/crates/dojo-lang/README.md index 2868ce5cb4..8f1f5da0b5 100644 --- a/crates/dojo-lang/README.md +++ b/crates/dojo-lang/README.md @@ -12,4 +12,8 @@ To run the tests, run: cargo test --package dojo-lang --lib -- plugin::test::expand_contract::model --exact --nocapture ``` -To regenerate, set `CAIRO_FIX_TESTS=1`. +To regenerate, set `CAIRO_FIX_TESTS=1`: + +``` +CAIRO_FIX_TESTS=1 cargo test --package dojo-lang +``` diff --git a/crates/dojo-lang/Scarb.toml b/crates/dojo-lang/Scarb.toml index d6108e0735..6824d0ffd4 100644 --- a/crates/dojo-lang/Scarb.toml +++ b/crates/dojo-lang/Scarb.toml @@ -1,5 +1,5 @@ [package] name = "dojo_plugin" -version = "0.3.11" +version = "0.4.0" [cairo-plugin] diff --git a/crates/dojo-lang/src/compiler_test.rs b/crates/dojo-lang/src/compiler_test.rs index 39e84950d5..e124ac014d 100644 --- a/crates/dojo-lang/src/compiler_test.rs +++ b/crates/dojo-lang/src/compiler_test.rs @@ -7,11 +7,12 @@ use cairo_lang_utils::ordered_hash_map::OrderedHashMap; use dojo_test_utils::compiler::build_test_config; use dojo_world::manifest::{BASE_CONTRACT_NAME, EXECUTOR_CONTRACT_NAME, WORLD_CONTRACT_NAME}; use scarb::core::TargetKind; -use scarb::ops::{self, CompileOpts}; +use scarb::ops::CompileOpts; use smol_str::SmolStr; use starknet::macros::felt; use super::do_update_manifest; +use crate::scarb_internal::{self}; fn build_mock_manifest() -> dojo_world::manifest::Manifest { dojo_world::manifest::Manifest { @@ -152,13 +153,10 @@ fn update_manifest_correctly() { #[test] fn test_compiler() { let config = build_test_config("../../examples/spawn-and-move/Scarb.toml").unwrap(); - let ws = ops::read_workspace(config.manifest_path(), &config).unwrap(); - let packages = ws.members().map(|p| p.id).collect(); assert!( - ops::compile( - packages, + scarb_internal::compile_workspace( + &config, CompileOpts { include_targets: vec![], exclude_targets: vec![TargetKind::TEST] }, - &ws ) .is_ok(), "compilation failed" @@ -179,15 +177,12 @@ pub fn test_manifest_file( _args: &OrderedHashMap, ) -> TestRunnerResult { let config = build_test_config("./src/manifest_test_data/spawn-and-move/Scarb.toml").unwrap(); - let ws = ops::read_workspace(config.manifest_path(), &config).unwrap(); - let packages = ws.members().map(|p| p.id).collect(); - ops::compile( - packages, + scarb_internal::compile_workspace( + &config, CompileOpts { include_targets: vec![], exclude_targets: vec![TargetKind::TEST] }, - &ws, ) - .unwrap_or_else(|op| panic!("Error compiling: {op:?}")); + .unwrap_or_else(|err| panic!("Error compiling: {err:?}")); let target_dir = config.target_dir_override().unwrap(); diff --git a/crates/dojo-lang/src/inline_macros/emit.rs b/crates/dojo-lang/src/inline_macros/emit.rs index c0a08888bc..8cd306775d 100644 --- a/crates/dojo-lang/src/inline_macros/emit.rs +++ b/crates/dojo-lang/src/inline_macros/emit.rs @@ -1,15 +1,17 @@ use cairo_lang_defs::patcher::PatchBuilder; use cairo_lang_defs::plugin::{ - InlineMacroExprPlugin, InlinePluginResult, PluginDiagnostic, PluginGeneratedFile, + InlineMacroExprPlugin, InlinePluginResult, NamedPlugin, PluginDiagnostic, PluginGeneratedFile, }; use cairo_lang_semantic::inline_macros::unsupported_bracket_diagnostic; use cairo_lang_syntax::node::{ast, TypedSyntaxNode}; -#[derive(Debug)] +#[derive(Debug, Default)] pub struct EmitMacro; -impl EmitMacro { - pub const NAME: &'static str = "emit"; + +impl NamedPlugin for EmitMacro { + const NAME: &'static str = "emit"; } + impl InlineMacroExprPlugin for EmitMacro { fn generate_code( &self, @@ -26,13 +28,13 @@ impl InlineMacroExprPlugin for EmitMacro { let mut data = Default::::default();", ); - let args = arg_list.args(db).elements(db); + let args = arg_list.arguments(db).elements(db); if args.len() != 2 { return InlinePluginResult { code: None, diagnostics: vec![PluginDiagnostic { - stable_ptr: arg_list.args(db).stable_ptr().untyped(), + stable_ptr: arg_list.arguments(db).stable_ptr().untyped(), message: "Invalid arguments. Expected \"emit!(world, event)\"".to_string(), }], }; diff --git a/crates/dojo-lang/src/inline_macros/get.rs b/crates/dojo-lang/src/inline_macros/get.rs index ecb3aec87a..cc249627f9 100644 --- a/crates/dojo-lang/src/inline_macros/get.rs +++ b/crates/dojo-lang/src/inline_macros/get.rs @@ -1,6 +1,6 @@ use cairo_lang_defs::patcher::PatchBuilder; use cairo_lang_defs::plugin::{ - InlineMacroExprPlugin, InlinePluginResult, PluginDiagnostic, PluginGeneratedFile, + InlineMacroExprPlugin, InlinePluginResult, NamedPlugin, PluginDiagnostic, PluginGeneratedFile, }; use cairo_lang_semantic::inline_macros::unsupported_bracket_diagnostic; use cairo_lang_syntax::node::ast::{Expr, ItemModule}; @@ -11,11 +11,13 @@ use itertools::Itertools; use super::utils::{parent_of_kind, SYSTEM_READS}; use super::{extract_models, unsupported_arg_diagnostic, CAIRO_ERR_MSG_LEN}; -#[derive(Debug)] +#[derive(Debug, Default)] pub struct GetMacro; -impl GetMacro { - pub const NAME: &'static str = "get"; + +impl NamedPlugin for GetMacro { + const NAME: &'static str = "get"; } + impl InlineMacroExprPlugin for GetMacro { fn generate_code( &self, @@ -31,7 +33,7 @@ impl InlineMacroExprPlugin for GetMacro { let mut __get_macro_keys__ = array::ArrayTrait::new();\n", ); - let args = arg_list.args(db).elements(db); + let args = arg_list.arguments(db).elements(db); if args.len() != 3 { return InlinePluginResult { diff --git a/crates/dojo-lang/src/inline_macros/set.rs b/crates/dojo-lang/src/inline_macros/set.rs index d95eb1bab5..d17c7cb48f 100644 --- a/crates/dojo-lang/src/inline_macros/set.rs +++ b/crates/dojo-lang/src/inline_macros/set.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use cairo_lang_defs::patcher::PatchBuilder; use cairo_lang_defs::plugin::{ - InlineMacroExprPlugin, InlinePluginResult, PluginDiagnostic, PluginGeneratedFile, + InlineMacroExprPlugin, InlinePluginResult, NamedPlugin, PluginDiagnostic, PluginGeneratedFile, }; use cairo_lang_semantic::inline_macros::unsupported_bracket_diagnostic; use cairo_lang_syntax::node::ast::{ExprPath, ExprStructCtorCall, FunctionWithBody, ItemModule}; @@ -12,10 +12,11 @@ use cairo_lang_syntax::node::{ast, TypedSyntaxNode}; use super::unsupported_arg_diagnostic; use super::utils::{parent_of_kind, SystemRWOpRecord, SYSTEM_WRITES}; -#[derive(Debug)] +#[derive(Debug, Default)] pub struct SetMacro; -impl SetMacro { - pub const NAME: &'static str = "set"; + +impl NamedPlugin for SetMacro { + const NAME: &'static str = "set"; // Parents of set!() // ----------------- // StatementExpr @@ -31,6 +32,7 @@ impl SetMacro { // ItemList // SyntaxFile } + impl InlineMacroExprPlugin for SetMacro { fn generate_code( &self, @@ -43,13 +45,13 @@ impl InlineMacroExprPlugin for SetMacro { let mut builder = PatchBuilder::new(db); builder.add_str("{"); - let args = arg_list.args(db).elements(db); + let args = arg_list.arguments(db).elements(db); if args.len() != 2 { return InlinePluginResult { code: None, diagnostics: vec![PluginDiagnostic { - stable_ptr: arg_list.args(db).stable_ptr().untyped(), + stable_ptr: arg_list.arguments(db).stable_ptr().untyped(), message: "Invalid arguments. Expected \"(world, (models,))\"".to_string(), }], }; @@ -83,7 +85,7 @@ impl InlineMacroExprPlugin for SetMacro { code: None, diagnostics: vec![PluginDiagnostic { message: "Invalid arguments. Expected \"(world, (models,))\"".to_string(), - stable_ptr: arg_list.args(db).stable_ptr().untyped(), + stable_ptr: arg_list.arguments(db).stable_ptr().untyped(), }], }; } @@ -94,7 +96,7 @@ impl InlineMacroExprPlugin for SetMacro { code: None, diagnostics: vec![PluginDiagnostic { message: "Invalid arguments: No models provided.".to_string(), - stable_ptr: arg_list.args(db).stable_ptr().untyped(), + stable_ptr: arg_list.arguments(db).stable_ptr().untyped(), }], }; } diff --git a/crates/dojo-lang/src/lib.rs b/crates/dojo-lang/src/lib.rs index 218e499037..ced65c7cde 100644 --- a/crates/dojo-lang/src/lib.rs +++ b/crates/dojo-lang/src/lib.rs @@ -12,3 +12,7 @@ pub mod plugin; pub mod print; pub mod semantics; pub(crate) mod version; + +// Copy of non pub functions from scarb + extension. +// Also used by `sozo`. +pub mod scarb_internal; diff --git a/crates/dojo-lang/src/manifest_test_data/manifest b/crates/dojo-lang/src/manifest_test_data/manifest index 587db37a3a..0a737a9b4f 100644 --- a/crates/dojo-lang/src/manifest_test_data/manifest +++ b/crates/dojo-lang/src/manifest_test_data/manifest @@ -8,7 +8,7 @@ test_manifest_file "world": { "name": "world", "address": null, - "class_hash": "0x99b08b2ff33750916e36b5e241b5d4a63e8d48862bf90a68fec2ff58a8de6", + "class_hash": "0x5ac623f0c96059936bd2d0904bdd31799e430fe08a0caff7a5f497260b16497", "abi": [ { "type": "impl", @@ -791,7 +791,7 @@ test_manifest_file "executor": { "name": "executor", "address": null, - "class_hash": "0x54ee9d99457d82d53e21030920f7e6f43509b98ea62282b5c2520050264a28c", + "class_hash": "0x585507fa2818fe78e66da6ea4c5915376739f4abf509d41153f60a16cb1f68d", "abi": [ { "type": "impl", @@ -851,7 +851,7 @@ test_manifest_file }, "base": { "name": "base", - "class_hash": "0x77638e9a645209ac1e32e143bfdbfe9caf723c4f7645fcf465c38967545ea2f", + "class_hash": "0x6c458453d35753703ad25632deec20a29faf8531942ec109e6eb0650316a2bc", "abi": [ { "type": "impl", @@ -955,7 +955,7 @@ test_manifest_file { "name": "actions", "address": null, - "class_hash": "0x1f740b30fc835ecf509a40e8dc8e4eb7ada046243833d2060f17ab961e4e154", + "class_hash": "0x69c6bec7de74fc2404fe6b68ad8ece7be81ad6d861b38a8ba8fa583bfc3666b", "abi": [ { "type": "impl", @@ -1198,49 +1198,14 @@ test_manifest_file ] } ], - "reads": [ - "Moves", - "Position" - ], - "writes": [ - "Moves", - "Position" - ], - "computed": [ - { - "contract": "actions", - "entrypoint": "tile_terrain", - "model": null - }, - { - "contract": "actions", - "entrypoint": "quadrant", - "model": "Position" - } - ] - } - ], - "models": [ + "reads": [], + "writes": [], + "computed": [] + }, { - "name": "Moves", - "members": [ - { - "name": "player", - "type": "ContractAddress", - "key": true - }, - { - "name": "remaining", - "type": "u8", - "key": false - }, - { - "name": "last_direction", - "type": "Direction", - "key": false - } - ], - "class_hash": "0x509a65bd8cc5516176a694a3b3c809011f1f0680959c567b3189e60ddab7ce1", + "name": "moves", + "address": null, + "class_hash": "0x64495ca6dc1dc328972697b30468cea364bcb7452bbb6e4aaad3e4b3f190147", "abi": [ { "type": "function", @@ -1401,23 +1366,15 @@ test_manifest_file "kind": "enum", "variants": [] } - ] + ], + "reads": [], + "writes": [], + "computed": [] }, { - "name": "Position", - "members": [ - { - "name": "player", - "type": "ContractAddress", - "key": true - }, - { - "name": "vec", - "type": "Vec2", - "key": false - } - ], - "class_hash": "0x52a1da1853c194683ca5d6d154452d0654d23f2eacd4267c555ff2338e144d6", + "name": "position", + "address": null, + "class_hash": "0x2b233bba9a232a5e891c85eca9f67beedca7a12f9768729ff017bcb62d25c9d", "abi": [ { "type": "function", @@ -1578,7 +1535,11 @@ test_manifest_file "kind": "enum", "variants": [] } - ] + ], + "reads": [], + "writes": [], + "computed": [] } - ] + ], + "models": [] } diff --git a/crates/dojo-lang/src/manifest_test_data/simple_crate/Scarb.toml b/crates/dojo-lang/src/manifest_test_data/simple_crate/Scarb.toml index b6861d3661..f62b9266ab 100644 --- a/crates/dojo-lang/src/manifest_test_data/simple_crate/Scarb.toml +++ b/crates/dojo-lang/src/manifest_test_data/simple_crate/Scarb.toml @@ -1,5 +1,5 @@ [package] -cairo-version = "2.3.1" +cairo-version = "2.4.0" name = "test_crate" version = "0.4.0-rc0" diff --git a/crates/dojo-lang/src/plugin.rs b/crates/dojo-lang/src/plugin.rs index 0c350b829d..725a0e1b93 100644 --- a/crates/dojo-lang/src/plugin.rs +++ b/crates/dojo-lang/src/plugin.rs @@ -1,10 +1,8 @@ -use std::sync::Arc; - use anyhow::Result; use cairo_lang_defs::patcher::PatchBuilder; use cairo_lang_defs::plugin::{ - DynGeneratedFileAuxData, GeneratedFileAuxData, InlineMacroExprPlugin, MacroPlugin, - PluginDiagnostic, PluginGeneratedFile, PluginResult, + DynGeneratedFileAuxData, GeneratedFileAuxData, MacroPlugin, PluginDiagnostic, + PluginGeneratedFile, PluginResult, PluginSuite, }; use cairo_lang_syntax::attribute::structured::{ AttributeArg, AttributeArgVariant, AttributeStructurize, @@ -188,7 +186,8 @@ impl BuiltinDojoPlugin { impl CairoPlugin for BuiltinDojoPlugin { fn id(&self) -> PackageId { let url = Url::parse("https://github.com/dojoengine/dojo").unwrap(); - let version = "0.3.11"; + let version = "0.4.0"; + // TODO: update this once pushed. let rev = "1e651b5d4d3b79b14a7d8aa29a92062fcb9e6659"; let source_id = @@ -207,17 +206,21 @@ impl CairoPlugin for BuiltinDojoPlugin { struct BuiltinDojoPluginInstance; impl CairoPluginInstance for BuiltinDojoPluginInstance { - fn macro_plugins(&self) -> Vec> { - vec![Arc::new(BuiltinDojoPlugin)] + fn plugin_suite(&self) -> PluginSuite { + dojo_plugin_suite() } +} - fn inline_macro_plugins(&self) -> Vec<(String, Arc)> { - vec![ - (GetMacro::NAME.into(), Arc::new(GetMacro)), - (SetMacro::NAME.into(), Arc::new(SetMacro)), - (EmitMacro::NAME.into(), Arc::new(EmitMacro)), - ] - } +pub fn dojo_plugin_suite() -> PluginSuite { + let mut suite = PluginSuite::default(); + + suite + .add_plugin::() + .add_inline_macro_plugin::() + .add_inline_macro_plugin::() + .add_inline_macro_plugin::(); + + suite } impl MacroPlugin for BuiltinDojoPlugin { diff --git a/crates/dojo-lang/src/plugin_test.rs b/crates/dojo-lang/src/plugin_test.rs index 338cbbc8eb..d789ff5a5b 100644 --- a/crates/dojo-lang/src/plugin_test.rs +++ b/crates/dojo-lang/src/plugin_test.rs @@ -6,11 +6,11 @@ use cairo_lang_defs::plugin::MacroPlugin; use cairo_lang_diagnostics::{format_diagnostics, DiagnosticLocation}; use cairo_lang_filesystem::cfg::CfgSet; use cairo_lang_filesystem::db::{ - init_files_group, AsFilesGroupMut, FilesDatabase, FilesGroup, FilesGroupEx, + init_files_group, AsFilesGroupMut, CrateConfiguration, FilesDatabase, FilesGroup, FilesGroupEx, }; use cairo_lang_filesystem::ids::{CrateLongId, Directory, FileLongId}; use cairo_lang_parser::db::ParserDatabase; -use cairo_lang_plugins::get_default_plugins; +use cairo_lang_plugins::get_base_plugins; use cairo_lang_syntax::node::db::{SyntaxDatabase, SyntaxGroup}; use cairo_lang_syntax::node::kind::SyntaxKind; use cairo_lang_syntax::node::{ast, TypedSyntaxNode}; @@ -50,7 +50,7 @@ impl Default for DatabaseForTesting { fn default() -> Self { let mut res = Self { storage: Default::default() }; init_files_group(&mut res); - res.set_macro_plugins(get_default_plugins()); + res.set_macro_plugins(get_base_plugins()); res } } @@ -96,7 +96,8 @@ pub fn test_expand_plugin_inner( let crate_id = db.intern_crate(CrateLongId::Real("test".into())); let root = Directory::Real("test_src".into()); - db.set_crate_root(crate_id, Some(root)); + + db.set_crate_config(crate_id, Some(CrateConfiguration::default_for_root(root))); // Main module file. let file_id = db.intern_file(FileLongId::OnDisk("test_src/lib.cairo".into())); diff --git a/crates/dojo-lang/src/plugin_test_data/introspect b/crates/dojo-lang/src/plugin_test_data/introspect index 7ee8be69f3..15fd1b5f07 100644 --- a/crates/dojo-lang/src/plugin_test_data/introspect +++ b/crates/dojo-lang/src/plugin_test_data/introspect @@ -4,7 +4,7 @@ test_expand_plugin //! > cairo_code -use serde::Serde; +use core::serde::Serde; #[derive(Copy, Drop, Serde, Introspect)] struct Vec2 { @@ -51,7 +51,7 @@ struct GenericStruct { } //! > expanded_cairo_code -use serde::Serde; +use core::serde::Serde; #[derive(Copy, Drop, Serde, Introspect)] struct Vec2 { @@ -96,17 +96,17 @@ struct Position { struct GenericStruct { t: T, } -impl Vec2Copy of Copy::; -impl Vec2Drop of Drop::; -impl Vec2Serde of Serde:: { - fn serialize(self: @Vec2, ref output: array::Array) { - serde::Serde::serialize(self.x, ref output); - serde::Serde::serialize(self.y, ref output) - } - fn deserialize(ref serialized: array::Span) -> Option { - Option::Some(Vec2 { - x: serde::Serde::deserialize(ref serialized)?, - y: serde::Serde::deserialize(ref serialized)?, +impl Vec2Copy of core::traits::Copy::; +impl Vec2Drop of core::traits::Drop::; +impl Vec2Serde of core::serde::Serde:: { + fn serialize(self: @Vec2, ref output: core::array::Array) { + core::serde::Serde::serialize(self.x, ref output); + core::serde::Serde::serialize(self.y, ref output) + } + fn deserialize(ref serialized: core::array::Span) -> core::option::Option { + core::option::Option::Some(Vec2 { + x: core::serde::Serde::deserialize(ref serialized)?, + y: core::serde::Serde::deserialize(ref serialized)?, }) } } @@ -141,24 +141,24 @@ layout.append(32); }) } } -impl PlainEnumSerde of Serde:: { - fn serialize(self: @PlainEnum, ref output: array::Array) { +impl PlainEnumSerde of core::serde::Serde:: { + fn serialize(self: @PlainEnum, ref output: core::array::Array) { match self { - PlainEnum::Left(x) => { serde::Serde::serialize(@0, ref output); serde::Serde::serialize(x, ref output); }, - PlainEnum::Right(x) => { serde::Serde::serialize(@1, ref output); serde::Serde::serialize(x, ref output); }, + PlainEnum::Left(x) => { core::serde::Serde::serialize(@0, ref output); core::serde::Serde::serialize(x, ref output); }, + PlainEnum::Right(x) => { core::serde::Serde::serialize(@1, ref output); core::serde::Serde::serialize(x, ref output); }, } } - fn deserialize(ref serialized: array::Span) -> Option { - let idx: felt252 = serde::Serde::deserialize(ref serialized)?; - Option::Some( - if idx == 0 { PlainEnum::Left(serde::Serde::deserialize(ref serialized)?) } - else if idx == 1 { PlainEnum::Right(serde::Serde::deserialize(ref serialized)?) } - else { return Option::None; } + fn deserialize(ref serialized: core::array::Span) -> core::option::Option { + let idx: felt252 = core::serde::Serde::deserialize(ref serialized)?; + core::option::Option::Some( + if idx == 0 { PlainEnum::Left(core::serde::Serde::deserialize(ref serialized)?) } + else if idx == 1 { PlainEnum::Right(core::serde::Serde::deserialize(ref serialized)?) } + else { return core::option::Option::None; } ) } } -impl PlainEnumCopy of Copy::; -impl PlainEnumDrop of Drop::; +impl PlainEnumCopy of core::traits::Copy::; +impl PlainEnumDrop of core::traits::Drop::; impl PlainEnumIntrospect<> of dojo::database::introspect::Introspect> { #[inline(always)] @@ -192,24 +192,24 @@ impl PlainEnumIntrospect<> of dojo::database::introspect::Introspect ) } } -impl EnumPrimitiveSerde of Serde:: { - fn serialize(self: @EnumPrimitive, ref output: array::Array) { +impl EnumPrimitiveSerde of core::serde::Serde:: { + fn serialize(self: @EnumPrimitive, ref output: core::array::Array) { match self { - EnumPrimitive::Left(x) => { serde::Serde::serialize(@0, ref output); serde::Serde::serialize(x, ref output); }, - EnumPrimitive::Right(x) => { serde::Serde::serialize(@1, ref output); serde::Serde::serialize(x, ref output); }, + EnumPrimitive::Left(x) => { core::serde::Serde::serialize(@0, ref output); core::serde::Serde::serialize(x, ref output); }, + EnumPrimitive::Right(x) => { core::serde::Serde::serialize(@1, ref output); core::serde::Serde::serialize(x, ref output); }, } } - fn deserialize(ref serialized: array::Span) -> Option { - let idx: felt252 = serde::Serde::deserialize(ref serialized)?; - Option::Some( - if idx == 0 { EnumPrimitive::Left(serde::Serde::deserialize(ref serialized)?) } - else if idx == 1 { EnumPrimitive::Right(serde::Serde::deserialize(ref serialized)?) } - else { return Option::None; } + fn deserialize(ref serialized: core::array::Span) -> core::option::Option { + let idx: felt252 = core::serde::Serde::deserialize(ref serialized)?; + core::option::Option::Some( + if idx == 0 { EnumPrimitive::Left(core::serde::Serde::deserialize(ref serialized)?) } + else if idx == 1 { EnumPrimitive::Right(core::serde::Serde::deserialize(ref serialized)?) } + else { return core::option::Option::None; } ) } } -impl EnumPrimitiveCopy of Copy::; -impl EnumPrimitiveDrop of Drop::; +impl EnumPrimitiveCopy of core::traits::Copy::; +impl EnumPrimitiveDrop of core::traits::Drop::; impl EnumPrimitiveIntrospect<> of dojo::database::introspect::Introspect> { #[inline(always)] @@ -248,24 +248,24 @@ layout.append(16); ) } } -impl EnumTupleSerde of Serde:: { - fn serialize(self: @EnumTuple, ref output: array::Array) { +impl EnumTupleSerde of core::serde::Serde:: { + fn serialize(self: @EnumTuple, ref output: core::array::Array) { match self { - EnumTuple::Left(x) => { serde::Serde::serialize(@0, ref output); serde::Serde::serialize(x, ref output); }, - EnumTuple::Right(x) => { serde::Serde::serialize(@1, ref output); serde::Serde::serialize(x, ref output); }, + EnumTuple::Left(x) => { core::serde::Serde::serialize(@0, ref output); core::serde::Serde::serialize(x, ref output); }, + EnumTuple::Right(x) => { core::serde::Serde::serialize(@1, ref output); core::serde::Serde::serialize(x, ref output); }, } } - fn deserialize(ref serialized: array::Span) -> Option { - let idx: felt252 = serde::Serde::deserialize(ref serialized)?; - Option::Some( - if idx == 0 { EnumTuple::Left(serde::Serde::deserialize(ref serialized)?) } - else if idx == 1 { EnumTuple::Right(serde::Serde::deserialize(ref serialized)?) } - else { return Option::None; } + fn deserialize(ref serialized: core::array::Span) -> core::option::Option { + let idx: felt252 = core::serde::Serde::deserialize(ref serialized)?; + core::option::Option::Some( + if idx == 0 { EnumTuple::Left(core::serde::Serde::deserialize(ref serialized)?) } + else if idx == 1 { EnumTuple::Right(core::serde::Serde::deserialize(ref serialized)?) } + else { return core::option::Option::None; } ) } } -impl EnumTupleCopy of Copy::; -impl EnumTupleDrop of Drop::; +impl EnumTupleCopy of core::traits::Copy::; +impl EnumTupleDrop of core::traits::Drop::; impl EnumTupleIntrospect<> of dojo::database::introspect::Introspect> { #[inline(always)] @@ -309,24 +309,24 @@ layout.append(8); ) } } -impl EnumCustomSerde of Serde:: { - fn serialize(self: @EnumCustom, ref output: array::Array) { +impl EnumCustomSerde of core::serde::Serde:: { + fn serialize(self: @EnumCustom, ref output: core::array::Array) { match self { - EnumCustom::Left(x) => { serde::Serde::serialize(@0, ref output); serde::Serde::serialize(x, ref output); }, - EnumCustom::Right(x) => { serde::Serde::serialize(@1, ref output); serde::Serde::serialize(x, ref output); }, + EnumCustom::Left(x) => { core::serde::Serde::serialize(@0, ref output); core::serde::Serde::serialize(x, ref output); }, + EnumCustom::Right(x) => { core::serde::Serde::serialize(@1, ref output); core::serde::Serde::serialize(x, ref output); }, } } - fn deserialize(ref serialized: array::Span) -> Option { - let idx: felt252 = serde::Serde::deserialize(ref serialized)?; - Option::Some( - if idx == 0 { EnumCustom::Left(serde::Serde::deserialize(ref serialized)?) } - else if idx == 1 { EnumCustom::Right(serde::Serde::deserialize(ref serialized)?) } - else { return Option::None; } + fn deserialize(ref serialized: core::array::Span) -> core::option::Option { + let idx: felt252 = core::serde::Serde::deserialize(ref serialized)?; + core::option::Option::Some( + if idx == 0 { EnumCustom::Left(core::serde::Serde::deserialize(ref serialized)?) } + else if idx == 1 { EnumCustom::Right(core::serde::Serde::deserialize(ref serialized)?) } + else { return core::option::Option::None; } ) } } -impl EnumCustomCopy of Copy::; -impl EnumCustomDrop of Drop::; +impl EnumCustomCopy of core::traits::Copy::; +impl EnumCustomDrop of core::traits::Drop::; impl EnumCustomIntrospect<> of dojo::database::introspect::Introspect> { #[inline(always)] @@ -365,8 +365,8 @@ dojo::database::introspect::Introspect::::layout(ref layout); ) } } -impl PositionCopy of Copy::; -impl PositionDrop of Drop::; +impl PositionCopy of core::traits::Copy::; +impl PositionDrop of core::traits::Drop::; impl PositionIntrospect<> of dojo::database::introspect::Introspect> { #[inline(always)] @@ -407,15 +407,15 @@ layout.append(16); }) } } -impl GenericStructCopy> of Copy::>; -impl GenericStructDrop> of Drop::>; -impl GenericStructSerde, impl TDestruct: Destruct> of Serde::> { - fn serialize(self: @GenericStruct, ref output: array::Array) { - serde::Serde::serialize(self.t, ref output) - } - fn deserialize(ref serialized: array::Span) -> Option> { - Option::Some(GenericStruct { - t: serde::Serde::deserialize(ref serialized)?, +impl GenericStructCopy> of core::traits::Copy::>; +impl GenericStructDrop> of core::traits::Drop::>; +impl GenericStructSerde, +core::traits::Destruct> of core::serde::Serde::> { + fn serialize(self: @GenericStruct, ref output: core::array::Array) { + core::serde::Serde::serialize(self.t, ref output) + } + fn deserialize(ref serialized: core::array::Span) -> core::option::Option> { + core::option::Option::Some(GenericStruct { + t: core::serde::Serde::deserialize(ref serialized)?, }) } } diff --git a/crates/dojo-lang/src/plugin_test_data/model b/crates/dojo-lang/src/plugin_test_data/model index 00a549b83f..2072615d16 100644 --- a/crates/dojo-lang/src/plugin_test_data/model +++ b/crates/dojo-lang/src/plugin_test_data/model @@ -4,7 +4,7 @@ test_expand_plugin //! > cairo_code -use serde::Serde; +use core::serde::Serde; #[derive(Introspect, Copy, Drop, Serde)] struct Vec3 { @@ -56,7 +56,7 @@ struct Player { } //! > generated_cairo_code -use serde::Serde; +use core::serde::Serde; #[derive(Introspect, Copy, Drop, Serde)] @@ -139,7 +139,7 @@ impl PositionModel of dojo::model::Model { #[inline(always)] fn values(self: @Position) -> Span { let mut serialized = ArrayTrait::new(); - serde::Serde::serialize(self.v, ref serialized); + core::serde::Serde::serialize(self.v, ref serialized); array::ArrayTrait::span(@serialized) } @@ -284,7 +284,7 @@ impl RolesModel of dojo::model::Model { #[inline(always)] fn values(self: @Roles) -> Span { let mut serialized = ArrayTrait::new(); - serde::Serde::serialize(self.role_ids, ref serialized); + core::serde::Serde::serialize(self.role_ids, ref serialized); array::ArrayTrait::span(@serialized) } @@ -403,7 +403,7 @@ impl PlayerModel of dojo::model::Model { fn keys(self: @Player) -> Span { let mut serialized = ArrayTrait::new(); array::ArrayTrait::append(ref serialized, *self.game); - serde::Serde::serialize(self.player, ref serialized); + core::serde::Serde::serialize(self.player, ref serialized); array::ArrayTrait::span(@serialized) } @@ -631,7 +631,7 @@ error: Unsupported attribute. ^*************^ //! > expanded_cairo_code -use serde::Serde; +use core::serde::Serde; #[derive(Introspect, Copy, Drop, Serde)] struct Vec3 { @@ -681,19 +681,19 @@ struct Player { name: felt252, } -impl Vec3Copy of Copy::; -impl Vec3Drop of Drop::; -impl Vec3Serde of Serde:: { - fn serialize(self: @Vec3, ref output: array::Array) { - serde::Serde::serialize(self.x, ref output); - serde::Serde::serialize(self.y, ref output); - serde::Serde::serialize(self.z, ref output) - } - fn deserialize(ref serialized: array::Span) -> Option { - Option::Some(Vec3 { - x: serde::Serde::deserialize(ref serialized)?, - y: serde::Serde::deserialize(ref serialized)?, - z: serde::Serde::deserialize(ref serialized)?, +impl Vec3Copy of core::traits::Copy::; +impl Vec3Drop of core::traits::Drop::; +impl Vec3Serde of core::serde::Serde:: { + fn serialize(self: @Vec3, ref output: core::array::Array) { + core::serde::Serde::serialize(self.x, ref output); + core::serde::Serde::serialize(self.y, ref output); + core::serde::Serde::serialize(self.z, ref output) + } + fn deserialize(ref serialized: core::array::Span) -> core::option::Option { + core::option::Option::Some(Vec3 { + x: core::serde::Serde::deserialize(ref serialized)?, + y: core::serde::Serde::deserialize(ref serialized)?, + z: core::serde::Serde::deserialize(ref serialized)?, }) } } @@ -733,17 +733,17 @@ layout.append(8); }) } } -impl PositionCopy of Copy::; -impl PositionDrop of Drop::; -impl PositionSerde of Serde:: { - fn serialize(self: @Position, ref output: array::Array) { - serde::Serde::serialize(self.id, ref output); - serde::Serde::serialize(self.v, ref output) - } - fn deserialize(ref serialized: array::Span) -> Option { - Option::Some(Position { - id: serde::Serde::deserialize(ref serialized)?, - v: serde::Serde::deserialize(ref serialized)?, +impl PositionCopy of core::traits::Copy::; +impl PositionDrop of core::traits::Drop::; +impl PositionSerde of core::serde::Serde:: { + fn serialize(self: @Position, ref output: core::array::Array) { + core::serde::Serde::serialize(self.id, ref output); + core::serde::Serde::serialize(self.v, ref output) + } + fn deserialize(ref serialized: core::array::Span) -> core::option::Option { + core::option::Option::Some(Position { + id: core::serde::Serde::deserialize(ref serialized)?, + v: core::serde::Serde::deserialize(ref serialized)?, }) } } @@ -856,13 +856,13 @@ impl PositionIntrospect<> of dojo::database::introspect::Introspect> dojo::database::introspect::Introspect::::ty() } } -impl RolesSerde of Serde:: { - fn serialize(self: @Roles, ref output: array::Array) { - serde::Serde::serialize(self.role_ids, ref output) +impl RolesSerde of core::serde::Serde:: { + fn serialize(self: @Roles, ref output: core::array::Array) { + core::serde::Serde::serialize(self.role_ids, ref output) } - fn deserialize(ref serialized: array::Span) -> Option { - Option::Some(Roles { - role_ids: serde::Serde::deserialize(ref serialized)?, + fn deserialize(ref serialized: core::array::Span) -> core::option::Option { + core::option::Option::Some(Roles { + role_ids: core::serde::Serde::deserialize(ref serialized)?, }) } } @@ -971,19 +971,19 @@ impl RolesIntrospect<> of dojo::database::introspect::Introspect> { dojo::database::introspect::Introspect::::ty() } } -impl PlayerCopy of Copy::; -impl PlayerDrop of Drop::; -impl PlayerSerde of Serde:: { - fn serialize(self: @Player, ref output: array::Array) { - serde::Serde::serialize(self.game, ref output); - serde::Serde::serialize(self.player, ref output); - serde::Serde::serialize(self.name, ref output) - } - fn deserialize(ref serialized: array::Span) -> Option { - Option::Some(Player { - game: serde::Serde::deserialize(ref serialized)?, - player: serde::Serde::deserialize(ref serialized)?, - name: serde::Serde::deserialize(ref serialized)?, +impl PlayerCopy of core::traits::Copy::; +impl PlayerDrop of core::traits::Drop::; +impl PlayerSerde of core::serde::Serde:: { + fn serialize(self: @Player, ref output: core::array::Array) { + core::serde::Serde::serialize(self.game, ref output); + core::serde::Serde::serialize(self.player, ref output); + core::serde::Serde::serialize(self.name, ref output) + } + fn deserialize(ref serialized: core::array::Span) -> core::option::Option { + core::option::Option::Some(Player { + game: core::serde::Serde::deserialize(ref serialized)?, + player: core::serde::Serde::deserialize(ref serialized)?, + name: core::serde::Serde::deserialize(ref serialized)?, }) } } diff --git a/crates/dojo-lang/src/plugin_test_data/print b/crates/dojo-lang/src/plugin_test_data/print index f8611ec183..394b02bad8 100644 --- a/crates/dojo-lang/src/plugin_test_data/print +++ b/crates/dojo-lang/src/plugin_test_data/print @@ -126,45 +126,45 @@ struct Player { name: felt252, } -impl PositionCopy of Copy::; -impl PositionDrop of Drop::; -impl PositionSerde of Serde:: { - fn serialize(self: @Position, ref output: array::Array) { - serde::Serde::serialize(self.id, ref output); - serde::Serde::serialize(self.x, ref output); - serde::Serde::serialize(self.y, ref output) +impl PositionCopy of core::traits::Copy::; +impl PositionDrop of core::traits::Drop::; +impl PositionSerde of core::serde::Serde:: { + fn serialize(self: @Position, ref output: core::array::Array) { + core::serde::Serde::serialize(self.id, ref output); + core::serde::Serde::serialize(self.x, ref output); + core::serde::Serde::serialize(self.y, ref output) } - fn deserialize(ref serialized: array::Span) -> Option { - Option::Some(Position { - id: serde::Serde::deserialize(ref serialized)?, - x: serde::Serde::deserialize(ref serialized)?, - y: serde::Serde::deserialize(ref serialized)?, + fn deserialize(ref serialized: core::array::Span) -> core::option::Option { + core::option::Option::Some(Position { + id: core::serde::Serde::deserialize(ref serialized)?, + x: core::serde::Serde::deserialize(ref serialized)?, + y: core::serde::Serde::deserialize(ref serialized)?, }) } } -impl RolesSerde of Serde:: { - fn serialize(self: @Roles, ref output: array::Array) { - serde::Serde::serialize(self.role_ids, ref output) +impl RolesSerde of core::serde::Serde:: { + fn serialize(self: @Roles, ref output: core::array::Array) { + core::serde::Serde::serialize(self.role_ids, ref output) } - fn deserialize(ref serialized: array::Span) -> Option { - Option::Some(Roles { - role_ids: serde::Serde::deserialize(ref serialized)?, + fn deserialize(ref serialized: core::array::Span) -> core::option::Option { + core::option::Option::Some(Roles { + role_ids: core::serde::Serde::deserialize(ref serialized)?, }) } } -impl PlayerCopy of Copy::; -impl PlayerDrop of Drop::; -impl PlayerSerde of Serde:: { - fn serialize(self: @Player, ref output: array::Array) { - serde::Serde::serialize(self.game, ref output); - serde::Serde::serialize(self.player, ref output); - serde::Serde::serialize(self.name, ref output) +impl PlayerCopy of core::traits::Copy::; +impl PlayerDrop of core::traits::Drop::; +impl PlayerSerde of core::serde::Serde:: { + fn serialize(self: @Player, ref output: core::array::Array) { + core::serde::Serde::serialize(self.game, ref output); + core::serde::Serde::serialize(self.player, ref output); + core::serde::Serde::serialize(self.name, ref output) } - fn deserialize(ref serialized: array::Span) -> Option { - Option::Some(Player { - game: serde::Serde::deserialize(ref serialized)?, - player: serde::Serde::deserialize(ref serialized)?, - name: serde::Serde::deserialize(ref serialized)?, + fn deserialize(ref serialized: core::array::Span) -> core::option::Option { + core::option::Option::Some(Player { + game: core::serde::Serde::deserialize(ref serialized)?, + player: core::serde::Serde::deserialize(ref serialized)?, + name: core::serde::Serde::deserialize(ref serialized)?, }) } } diff --git a/crates/dojo-lang/src/plugin_test_data/system b/crates/dojo-lang/src/plugin_test_data/system index 13d26fa0c8..605557666b 100644 --- a/crates/dojo-lang/src/plugin_test_data/system +++ b/crates/dojo-lang/src/plugin_test_data/system @@ -499,7 +499,7 @@ mod testcomponent2 { #[substorage(v0)] upgradeable: dojo::components::upgradeable::upgradeable::Storage, } -impl EventDrop of Drop::; +impl EventDrop of core::traits::Drop::; } @@ -541,7 +541,7 @@ impl EventDrop of Drop::; #[substorage(v0)] upgradeable: dojo::components::upgradeable::upgradeable::Storage, } -impl EventDrop of Drop::; +impl EventDrop of core::traits::Drop::; } @@ -586,7 +586,7 @@ impl EventDrop of Drop::; #[substorage(v0)] upgradeable: dojo::components::upgradeable::upgradeable::Storage, } -impl EventDrop of Drop::; +impl EventDrop of core::traits::Drop::; } @@ -636,8 +636,8 @@ impl EventDrop of Drop::; #[substorage(v0)] upgradeable: dojo::components::upgradeable::upgradeable::Storage, } -impl EventDrop of Drop::; -impl TestEventDrop of Drop::; +impl EventDrop of core::traits::Drop::; +impl TestEventDrop of core::traits::Drop::; } @@ -682,6 +682,6 @@ impl TestEventDrop of Drop::; testcomponent1_event: testcomponent1::Event, testcomponent2_event: testcomponent2::Event } -impl EventDrop of Drop::; +impl EventDrop of core::traits::Drop::; } diff --git a/crates/dojo-lang/src/scarb_internal/mod.rs b/crates/dojo-lang/src/scarb_internal/mod.rs new file mode 100644 index 0000000000..bf104e7457 --- /dev/null +++ b/crates/dojo-lang/src/scarb_internal/mod.rs @@ -0,0 +1,100 @@ +// I have copied source code from https://github.com/software-mansion/scarb/blob/main/scarb/src/compiler/db.rs +// since build_scarb_root_database is not public. +// +// NOTE: This files needs to be updated whenever scarb version is updated. +// NOTE: This file was moved here from `sozo` as we need to compile here too, +// and `sozo` has `dojo-lang` as dependency. +use anyhow::Result; +use cairo_lang_compiler::db::RootDatabase; +use cairo_lang_compiler::project::{ProjectConfig, ProjectConfigContent}; +use cairo_lang_filesystem::ids::Directory; +use cairo_lang_project::{AllCratesConfig, SingleCrateConfig}; +use cairo_lang_starknet::starknet_plugin_suite; +use cairo_lang_test_plugin::test_plugin_suite; +use cairo_lang_utils::ordered_hash_map::OrderedHashMap; +use scarb::compiler::CompilationUnit; +use scarb::core::Config; +use scarb::ops::CompileOpts; +use smol_str::SmolStr; +use tracing::trace; + +use crate::plugin::dojo_plugin_suite; + +pub fn crates_config_for_compilation_unit(unit: &CompilationUnit) -> AllCratesConfig { + let crates_config: OrderedHashMap = unit + .components + .iter() + .map(|component| { + ( + component.cairo_package_name(), + SingleCrateConfig { edition: component.package.manifest.edition }, + ) + }) + .collect(); + + AllCratesConfig { override_map: crates_config, ..Default::default() } +} + +// TODO(mkaput): ScarbDatabase? +pub fn build_scarb_root_database(unit: &CompilationUnit) -> Result { + let mut b = RootDatabase::builder(); + b.with_project_config(build_project_config(unit)?); + b.with_cfg(unit.cfg_set.clone()); + + // TODO: Is it fair to consider only those plugins at the moment? + b.with_plugin_suite(test_plugin_suite()); + b.with_plugin_suite(dojo_plugin_suite()); + b.with_plugin_suite(starknet_plugin_suite()); + + b.build() +} + +/// This function is an alternative to `ops::compile`, it's doing the same job. +/// However, we can control the injection of the plugins, required to have dojo plugin present +/// for each compilation. +pub fn compile_workspace(config: &Config, opts: CompileOpts) -> Result<()> { + let ws = scarb::ops::read_workspace(config.manifest_path(), config)?; + let packages: Vec = ws.members().map(|p| p.id).collect(); + let resolve = scarb::ops::resolve_workspace(&ws)?; + let compilation_units = scarb::ops::generate_compilation_units(&resolve, &ws)? + .into_iter() + .filter(|cu| !opts.exclude_targets.contains(&cu.target().kind)) + .filter(|cu| { + opts.include_targets.is_empty() || opts.include_targets.contains(&cu.target().kind) + }) + .filter(|cu| packages.contains(&cu.main_package_id)) + .collect::>(); + + for unit in compilation_units { + let mut db = build_scarb_root_database(&unit).unwrap(); + + if let Err(err) = ws.config().compilers().compile(unit.clone(), &mut (db), &ws) { + ws.config().ui().anyhow(&err) + } + } + + Ok(()) +} + +fn build_project_config(unit: &CompilationUnit) -> Result { + let crate_roots = unit + .components + .iter() + .filter(|model| !model.package.id.is_core()) + .map(|model| (model.cairo_package_name(), model.target.source_root().into())) + .collect(); + + let corelib = Some(Directory::Real(unit.core_package_component().target.source_root().into())); + + let content = ProjectConfigContent { + crate_roots, + crates_config: crates_config_for_compilation_unit(unit), + }; + + let project_config = + ProjectConfig { base_path: unit.main_component().package.root().into(), corelib, content }; + + trace!(?project_config); + + Ok(project_config) +} diff --git a/crates/dojo-lang/src/semantics/test_data/get b/crates/dojo-lang/src/semantics/test_data/get index da5f04e60e..f08b775721 100644 --- a/crates/dojo-lang/src/semantics/test_data/get +++ b/crates/dojo-lang/src/semantics/test_data/get @@ -34,11 +34,6 @@ error: Plugin diagnostic: Invalid arguments. Expected "get!(world, keys, (models get!() ^****^ -error: Inline macro `get` failed. - --> lib.cairo:12:1 -get!() -^****^ - //! > ========================================================================== //! > Test wrong params @@ -77,11 +72,6 @@ error: Plugin diagnostic: Invalid arguments. Expected "get!(world, keys, (models get!(world) ^*********^ -error: Inline macro `get` failed. - --> lib.cairo:12:1 -get!(world) -^*********^ - //! > ========================================================================== //! > Test world and keys diff --git a/crates/dojo-lang/src/semantics/test_data/set b/crates/dojo-lang/src/semantics/test_data/set index 4633cf5ef8..cca850737a 100644 --- a/crates/dojo-lang/src/semantics/test_data/set +++ b/crates/dojo-lang/src/semantics/test_data/set @@ -29,14 +29,9 @@ Missing( //! > semantic_diagnostics error: Plugin diagnostic: Invalid arguments. Expected "(world, (models,))" - --> lib.cairo:11:1 + --> lib.cairo:11:6 set!() -^****^ - -error: Inline macro `set` failed. - --> lib.cairo:11:1 -set!() -^****^ + ^ //! > ========================================================================== @@ -71,14 +66,9 @@ Missing( //! > semantic_diagnostics error: Plugin diagnostic: Invalid arguments. Expected "(world, (models,))" - --> lib.cairo:11:1 -set!(world) -^*********^ - -error: Inline macro `set` failed. - --> lib.cairo:11:1 + --> lib.cairo:11:6 set!(world) -^*********^ + ^***^ //! > ========================================================================== diff --git a/crates/dojo-lang/src/semantics/test_utils.rs b/crates/dojo-lang/src/semantics/test_utils.rs index ad74412d33..6ab997153b 100644 --- a/crates/dojo-lang/src/semantics/test_utils.rs +++ b/crates/dojo-lang/src/semantics/test_utils.rs @@ -6,19 +6,18 @@ use cairo_lang_defs::db::{DefsDatabase, DefsGroup}; use cairo_lang_defs::ids::{FunctionWithBodyId, ModuleId}; use cairo_lang_diagnostics::{Diagnostics, DiagnosticsBuilder}; use cairo_lang_filesystem::db::{ - init_dev_corelib, init_files_group, AsFilesGroupMut, FilesDatabase, FilesGroup, FilesGroupEx, + init_dev_corelib, init_files_group, AsFilesGroupMut, CrateConfiguration, FilesDatabase, + FilesGroup, FilesGroupEx, }; use cairo_lang_filesystem::ids::{ CrateId, CrateLongId, Directory, FileKind, FileLongId, VirtualFile, }; use cairo_lang_parser::db::ParserDatabase; -use cairo_lang_plugins::get_default_plugins; use cairo_lang_semantic::db::{SemanticDatabase, SemanticGroup}; -use cairo_lang_semantic::inline_macros::get_default_inline_macro_plugins; +use cairo_lang_semantic::inline_macros::get_default_plugin_suite; use cairo_lang_semantic::items::functions::GenericFunctionId; use cairo_lang_semantic::{ConcreteFunctionWithBodyId, SemanticDiagnostic}; -use cairo_lang_starknet::inline_macros::selector::SelectorMacro; -use cairo_lang_starknet::plugin::StarkNetPlugin; +use cairo_lang_starknet::starknet_plugin_suite; use cairo_lang_syntax::node::db::{SyntaxDatabase, SyntaxGroup}; use cairo_lang_utils::ordered_hash_map::OrderedHashMap; use cairo_lang_utils::{extract_matches, OptionFrom, Upcast}; @@ -26,10 +25,7 @@ use camino::Utf8PathBuf; use dojo_test_utils::compiler::corelib; use once_cell::sync::Lazy; -use crate::inline_macros::emit::EmitMacro; -use crate::inline_macros::get::GetMacro; -use crate::inline_macros::set::SetMacro; -use crate::plugin::BuiltinDojoPlugin; +use crate::plugin::dojo_plugin_suite; #[salsa::database(SemanticDatabase, DefsDatabase, ParserDatabase, SyntaxDatabase, FilesDatabase)] pub struct DojoSemanticDatabase { @@ -46,25 +42,21 @@ impl DojoSemanticDatabase { pub fn new_empty() -> Self { let mut db = DojoSemanticDatabase { storage: Default::default() }; init_files_group(&mut db); - let mut plugins = get_default_plugins(); - plugins.push(Arc::new(StarkNetPlugin::default())); - plugins.push(Arc::new(BuiltinDojoPlugin)); - db.set_macro_plugins(plugins); - let mut inline_plugins = get_default_inline_macro_plugins(); - inline_plugins.insert(SelectorMacro::NAME.into(), Arc::new(SelectorMacro)); - inline_plugins.insert(GetMacro::NAME.into(), Arc::new(GetMacro)); - inline_plugins.insert(SetMacro::NAME.into(), Arc::new(SetMacro)); - inline_plugins.insert(EmitMacro::NAME.into(), Arc::new(EmitMacro)); + let mut suite = get_default_plugin_suite(); + suite.add(starknet_plugin_suite()); + suite.add(dojo_plugin_suite()); - db.set_inline_macro_plugins(inline_plugins.into()); + db.set_macro_plugins(suite.plugins); + db.set_inline_macro_plugins(suite.inline_macro_plugins.into()); init_dev_corelib(&mut db, corelib()); let dojo_path = Utf8PathBuf::from_path_buf("../../crates/dojo-core/src".into()).unwrap(); let dojo_path: PathBuf = dojo_path.canonicalize_utf8().unwrap().into(); let core_crate = db.intern_crate(CrateLongId::Real("dojo".into())); let core_root_dir = Directory::Real(dojo_path); - db.set_crate_root(core_crate, Some(core_root_dir)); + + db.set_crate_config(core_crate, Some(CrateConfiguration::default_for_root(core_root_dir))); db } diff --git a/crates/dojo-language-server/Cargo.toml b/crates/dojo-language-server/Cargo.toml index 9726b11355..5d742aa035 100644 --- a/crates/dojo-language-server/Cargo.toml +++ b/crates/dojo-language-server/Cargo.toml @@ -1,6 +1,6 @@ [package] edition.workspace = true -name = "dojo-languge-server" +name = "dojo-language-server" version.workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -24,4 +24,4 @@ log = "0.4.14" salsa = "0.16.1" smol_str.workspace = true tokio = { version = "1.18.2", features = [ "full", "sync" ] } -tower-lsp = "0.19.0" +tower-lsp = "0.20.0" diff --git a/crates/dojo-language-server/src/bin/language_server.rs b/crates/dojo-language-server/src/bin/language_server.rs index d9a78c4316..0539a0bf27 100644 --- a/crates/dojo-language-server/src/bin/language_server.rs +++ b/crates/dojo-language-server/src/bin/language_server.rs @@ -1,17 +1,11 @@ -use std::sync::Arc; - use cairo_lang_compiler::db::RootDatabase; use cairo_lang_filesystem::cfg::{Cfg, CfgSet}; use cairo_lang_language_server::Backend; -use cairo_lang_starknet::inline_macros::selector::SelectorMacro; -use cairo_lang_starknet::plugin::StarkNetPlugin; -use cairo_lang_test_plugin::TestPlugin; +use cairo_lang_starknet::starknet_plugin_suite; +use cairo_lang_test_plugin::test_plugin_suite; use cairo_lang_utils::logging::init_logging; use clap::Parser; -use dojo_lang::inline_macros::emit::EmitMacro; -use dojo_lang::inline_macros::get::GetMacro; -use dojo_lang::inline_macros::set::SetMacro; -use dojo_lang::plugin::BuiltinDojoPlugin; +use dojo_lang::plugin::dojo_plugin_suite; use tower_lsp::{LspService, Server}; /// Dojo Language Server @@ -34,13 +28,9 @@ async fn main() { let db = RootDatabase::builder() .with_cfg(CfgSet::from_iter([Cfg::name("test")])) - .with_macro_plugin(Arc::new(BuiltinDojoPlugin)) - .with_macro_plugin(Arc::new(StarkNetPlugin::default())) - .with_macro_plugin(Arc::new(TestPlugin::default())) - .with_inline_macro_plugin(EmitMacro::NAME, Arc::new(EmitMacro)) - .with_inline_macro_plugin(GetMacro::NAME, Arc::new(GetMacro)) - .with_inline_macro_plugin(SetMacro::NAME, Arc::new(SetMacro)) - .with_inline_macro_plugin(SelectorMacro::NAME, Arc::new(SelectorMacro)) + .with_plugin_suite(dojo_plugin_suite()) + .with_plugin_suite(test_plugin_suite()) + .with_plugin_suite(starknet_plugin_suite()) .build() .unwrap_or_else(|error| { panic!("Problem creating language database: {error:?}"); diff --git a/crates/dojo-test-utils/build.rs b/crates/dojo-test-utils/build.rs index 64b0e8db1f..3f6b9592f8 100644 --- a/crates/dojo-test-utils/build.rs +++ b/crates/dojo-test-utils/build.rs @@ -5,9 +5,10 @@ fn main() { use camino::{Utf8Path, Utf8PathBuf}; use dojo_lang::compiler::DojoCompiler; use dojo_lang::plugin::CairoPluginRepository; + use dojo_lang::scarb_internal::compile_workspace; use scarb::compiler::CompilerRepository; use scarb::core::{Config, TargetKind}; - use scarb::ops::{self, CompileOpts}; + use scarb::ops::CompileOpts; use scarb_ui::Verbosity; let project_paths = ["../../examples/spawn-and-move", "../torii/graphql/src/tests/types-test"]; @@ -39,12 +40,9 @@ fn main() { .build() .unwrap(); - let ws = ops::read_workspace(config.manifest_path(), &config).unwrap(); - let packages = ws.members().map(|p| p.id).collect(); - ops::compile( - packages, + compile_workspace( + &config, CompileOpts { include_targets: vec![], exclude_targets: vec![TargetKind::TEST] }, - &ws, ) .unwrap(); } diff --git a/crates/dojo-world/Cargo.toml b/crates/dojo-world/Cargo.toml index ef0cc482e8..d6da3ff3b0 100644 --- a/crates/dojo-world/Cargo.toml +++ b/crates/dojo-world/Cargo.toml @@ -27,7 +27,7 @@ tracing.workspace = true dojo-types = { path = "../dojo-types", optional = true } http = { version = "0.2.9", optional = true } ipfs-api-backend-hyper = { git = "https://github.com/ferristseng/rust-ipfs-api", rev = "af2c17f7b19ef5b9898f458d97a90055c3605633", features = [ "with-hyper-rustls" ], optional = true } -scarb = { git = "https://github.com/software-mansion/scarb", rev = "0c8def3", optional = true } +scarb = { git = "https://github.com/software-mansion/scarb", tag = "v2.4.0", optional = true } tokio = { version = "1.32.0", features = [ "time" ], default-features = false, optional = true } url = { version = "2.2.2", optional = true } diff --git a/crates/dojo-world/src/contracts/model_test.rs b/crates/dojo-world/src/contracts/model_test.rs index 887310faf0..cd235080da 100644 --- a/crates/dojo-world/src/contracts/model_test.rs +++ b/crates/dojo-world/src/contracts/model_test.rs @@ -63,7 +63,7 @@ async fn test_model() { assert_eq!( position.class_hash(), FieldElement::from_hex_be( - "0x052a1da1853c194683ca5d6d154452d0654d23f2eacd4267c555ff2338e144d6" + "0x02b233bba9a232a5e891c85eca9f67beedca7a12f9768729ff017bcb62d25c9d" ) .unwrap() ); diff --git a/crates/katana/core/src/backend/config.rs b/crates/katana/core/src/backend/config.rs index 56df2a129b..54f1d4ba49 100644 --- a/crates/katana/core/src/backend/config.rs +++ b/crates/katana/core/src/backend/config.rs @@ -1,4 +1,4 @@ -use blockifier::block_context::BlockContext; +use blockifier::block_context::{BlockContext, FeeTokenAddresses, GasPrices}; use starknet_api::block::{BlockNumber, BlockTimestamp}; use starknet_api::core::ChainId; use url::Url; @@ -26,9 +26,19 @@ impl StarknetConfig { chain_id: ChainId(self.env.chain_id.clone()), block_timestamp: BlockTimestamp::default(), sequencer_address: (*SEQUENCER_ADDRESS).into(), - fee_token_address: (*FEE_TOKEN_ADDRESS).into(), + // As the fee has two currencies, we also have to adjust their addresses. + // https://github.com/starkware-libs/blockifier/blob/51b343fe38139a309a69b2482f4b484e8caa5edf/crates/blockifier/src/block_context.rs#L34 + fee_token_addresses: FeeTokenAddresses { + eth_fee_token_address: (*FEE_TOKEN_ADDRESS).into(), + strk_fee_token_address: Default::default(), + }, vm_resource_fee_cost: get_default_vm_resource_fee_cost().into(), - gas_price: self.env.gas_price, + // Gas prices are dual too. + // https://github.com/starkware-libs/blockifier/blob/51b343fe38139a309a69b2482f4b484e8caa5edf/crates/blockifier/src/block_context.rs#L49 + gas_prices: GasPrices { + eth_l1_gas_price: self.env.gas_price, + strk_l1_gas_price: Default::default(), + }, validate_max_n_steps: self.env.validate_max_steps, invoke_tx_max_n_steps: self.env.invoke_max_steps, max_recursion_depth: 1000, diff --git a/crates/katana/core/src/backend/mod.rs b/crates/katana/core/src/backend/mod.rs index 3dcf35c6c0..32343541e0 100644 --- a/crates/katana/core/src/backend/mod.rs +++ b/crates/katana/core/src/backend/mod.rs @@ -149,7 +149,7 @@ impl Backend { let partial_header = PartialHeader { parent_hash: prev_hash, - gas_price: block_context.gas_price, + gas_price: block_context.gas_prices.eth_l1_gas_price, number: block_context.block_number.0, timestamp: block_context.block_timestamp.0, sequencer_address: block_context.sequencer_address.into(), diff --git a/crates/katana/core/src/backend/storage.rs b/crates/katana/core/src/backend/storage.rs index 545e06a453..49b59c8b3a 100644 --- a/crates/katana/core/src/backend/storage.rs +++ b/crates/katana/core/src/backend/storage.rs @@ -66,8 +66,9 @@ impl Blockchain { pub fn new_with_genesis(provider: impl Database, block_context: &BlockContext) -> Result { let header = PartialHeader { + // TODO: need to be adjusted, eth is used for compatibility for now. parent_hash: 0u8.into(), - gas_price: block_context.gas_price, + gas_price: block_context.gas_prices.eth_l1_gas_price, number: block_context.block_number.0, timestamp: block_context.block_timestamp.0, sequencer_address: *SEQUENCER_ADDRESS, @@ -94,7 +95,7 @@ impl Blockchain { let header = Header { state_root, parent_hash, - gas_price: block_context.gas_price, + gas_price: block_context.gas_prices.eth_l1_gas_price, number: block_context.block_number.0, timestamp: block_context.block_timestamp.0, sequencer_address: *SEQUENCER_ADDRESS, @@ -124,7 +125,7 @@ impl Blockchain { #[cfg(test)] mod tests { - use blockifier::block_context::BlockContext; + use blockifier::block_context::{BlockContext, FeeTokenAddresses, GasPrices}; use katana_primitives::block::FinalityStatus; use katana_primitives::FieldElement; use katana_provider::providers::in_memory::InMemoryProvider; @@ -145,7 +146,7 @@ mod tests { fn blockchain_from_genesis_states() { let provider = InMemoryProvider::new(); let block_context = BlockContext { - gas_price: 0, + gas_prices: GasPrices { eth_l1_gas_price: 0, strk_l1_gas_price: 0 }, max_recursion_depth: 0, validate_max_n_steps: 0, invoke_tx_max_n_steps: 0, @@ -153,7 +154,10 @@ mod tests { chain_id: ChainId("test".into()), block_timestamp: BlockTimestamp(0), sequencer_address: Default::default(), - fee_token_address: Default::default(), + fee_token_addresses: FeeTokenAddresses { + eth_fee_token_address: Default::default(), + strk_fee_token_address: Default::default(), + }, vm_resource_fee_cost: Default::default(), }; @@ -176,7 +180,7 @@ mod tests { let provider = InMemoryProvider::new(); let block_context = BlockContext { - gas_price: 9090, + gas_prices: GasPrices { eth_l1_gas_price: 9090, strk_l1_gas_price: 0 }, max_recursion_depth: 0, validate_max_n_steps: 0, invoke_tx_max_n_steps: 0, @@ -184,7 +188,10 @@ mod tests { block_number: BlockNumber(23), block_timestamp: BlockTimestamp(6868), sequencer_address: Default::default(), - fee_token_address: Default::default(), + fee_token_addresses: FeeTokenAddresses { + eth_fee_token_address: Default::default(), + strk_fee_token_address: Default::default(), + }, vm_resource_fee_cost: Default::default(), }; diff --git a/crates/katana/core/src/env.rs b/crates/katana/core/src/env.rs index 951e65d2d9..464b317831 100644 --- a/crates/katana/core/src/env.rs +++ b/crates/katana/core/src/env.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use blockifier::block_context::BlockContext; +use blockifier::block_context::{BlockContext, FeeTokenAddresses, GasPrices}; use cairo_vm::vm::runners::builtin_runner::{ BITWISE_BUILTIN_NAME, EC_OP_BUILTIN_NAME, HASH_BUILTIN_NAME, KECCAK_BUILTIN_NAME, OUTPUT_BUILTIN_NAME, POSEIDON_BUILTIN_NAME, RANGE_CHECK_BUILTIN_NAME, @@ -33,9 +33,15 @@ impl Default for Env { block_number: BlockNumber::default(), block_timestamp: BlockTimestamp::default(), sequencer_address: (*SEQUENCER_ADDRESS).into(), - fee_token_address: (*FEE_TOKEN_ADDRESS).into(), + fee_token_addresses: FeeTokenAddresses { + eth_fee_token_address: (*FEE_TOKEN_ADDRESS).into(), + strk_fee_token_address: Default::default(), + }, vm_resource_fee_cost: get_default_vm_resource_fee_cost().into(), - gas_price: DEFAULT_GAS_PRICE, + gas_prices: GasPrices { + eth_l1_gas_price: DEFAULT_GAS_PRICE, + strk_l1_gas_price: Default::default(), + }, invoke_tx_max_n_steps: 1_000_000, validate_max_n_steps: 1_000_000, max_recursion_depth: 100, diff --git a/crates/katana/core/src/sequencer.rs b/crates/katana/core/src/sequencer.rs index 53d688d20f..b5b648cc0c 100644 --- a/crates/katana/core/src/sequencer.rs +++ b/crates/katana/core/src/sequencer.rs @@ -5,6 +5,7 @@ use std::sync::Arc; use anyhow::Result; use blockifier::execution::errors::{EntryPointExecutionError, PreExecutionError}; +use blockifier::transaction::errors::TransactionExecutionError; use katana_executor::blockifier::state::StateRefDb; use katana_executor::blockifier::utils::EntryPointCall; use katana_executor::blockifier::PendingState; @@ -268,11 +269,13 @@ impl KatanaSequencer { let retdata = katana_executor::blockifier::utils::call(request, block_context, state) .map_err(|e| match e { - EntryPointExecutionError::PreExecutionError( - PreExecutionError::UninitializedStorageAddress(addr), - ) => SequencerError::ContractNotFound(addr.into()), - - _ => SequencerError::EntryPointExecution(e), + TransactionExecutionError::ExecutionError(exe) => match exe { + EntryPointExecutionError::PreExecutionError( + PreExecutionError::UninitializedStorageAddress(addr), + ) => SequencerError::ContractNotFound(addr.into()), + _ => SequencerError::EntryPointExecution(exe), + }, + _ => SequencerError::TransactionExecution(e), })?; Ok(retdata) diff --git a/crates/katana/executor/src/blockifier/mod.rs b/crates/katana/executor/src/blockifier/mod.rs index 0dc61e0aaf..124a74197c 100644 --- a/crates/katana/executor/src/blockifier/mod.rs +++ b/crates/katana/executor/src/blockifier/mod.rs @@ -143,6 +143,9 @@ fn execute_tx( block_context: &BlockContext, charge_fee: bool, ) -> TxExecutionResult { + // TODO: check how this value must be controlled. + let validate = true; + let sierra = if let ExecutableTx::Declare(DeclareTxWithClass { transaction, sierra_class: Some(sierra_class), @@ -156,10 +159,10 @@ fn execute_tx( let res = match BlockifierTx::from(tx).0 { Transaction::AccountTransaction(tx) => { - tx.execute(&mut state.inner(), block_context, charge_fee) + tx.execute(&mut state.inner(), block_context, charge_fee, validate) } Transaction::L1HandlerTransaction(tx) => { - tx.execute(&mut state.inner(), block_context, charge_fee) + tx.execute(&mut state.inner(), block_context, charge_fee, validate) } }; diff --git a/crates/katana/executor/src/blockifier/state.rs b/crates/katana/executor/src/blockifier/state.rs index efba599a7f..1037b3a7f6 100644 --- a/crates/katana/executor/src/blockifier/state.rs +++ b/crates/katana/executor/src/blockifier/state.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use blockifier::state::cached_state::CachedState; +use blockifier::state::cached_state::{CachedState, GlobalContractCache}; use blockifier::state::errors::StateError; use blockifier::state::state_api::StateReader; use katana_primitives::contract::SierraClass; @@ -99,11 +99,14 @@ pub struct CachedStateWrapper { impl CachedStateWrapper { pub fn new(db: S) -> Self { - Self { sierra_class: Default::default(), inner: Mutex::new(CachedState::new(db)) } + Self { + sierra_class: Default::default(), + inner: Mutex::new(CachedState::new(db, GlobalContractCache::default())), + } } pub fn reset_with_new_state(&self, db: S) { - *self.inner() = CachedState::new(db); + *self.inner() = CachedState::new(db, GlobalContractCache::default()); self.sierra_class_mut().clear(); } diff --git a/crates/katana/executor/src/blockifier/transactions.rs b/crates/katana/executor/src/blockifier/transactions.rs index 70f4b0c37d..04722e3505 100644 --- a/crates/katana/executor/src/blockifier/transactions.rs +++ b/crates/katana/executor/src/blockifier/transactions.rs @@ -1,14 +1,16 @@ use std::sync::Arc; use ::blockifier::transaction::transaction_execution::Transaction; -use ::blockifier::transaction::transactions::DeployAccountTransaction; +use ::blockifier::transaction::transactions::{DeployAccountTransaction, InvokeTransaction}; use blockifier::transaction::account_transaction::AccountTransaction; use blockifier::transaction::transactions::{DeclareTransaction, L1HandlerTransaction}; use katana_primitives::transaction::{DeclareTx, ExecutableTx, ExecutableTxWithHash}; use starknet_api::core::{ClassHash, CompiledClassHash, EntryPointSelector, Nonce}; use starknet_api::transaction::{ - Calldata, ContractAddressSalt, DeclareTransactionV0V1, DeclareTransactionV2, Fee, - InvokeTransaction, InvokeTransactionV1, TransactionHash, TransactionSignature, + Calldata, ContractAddressSalt, DeclareTransaction as ApiDeclareTransaction, + DeclareTransactionV0V1, DeclareTransactionV2, + DeployAccountTransaction as ApiDeployAccountTransaction, DeployAccountTransactionV1, Fee, + InvokeTransaction as ApiInvokeTransaction, TransactionHash, TransactionSignature, TransactionVersion, }; @@ -23,16 +25,17 @@ impl From for BlockifierTx { ExecutableTx::Invoke(tx) => { let calldata = tx.calldata.into_iter().map(|f| f.into()).collect(); let signature = tx.signature.into_iter().map(|f| f.into()).collect(); - Transaction::AccountTransaction(AccountTransaction::Invoke(InvokeTransaction::V1( - InvokeTransactionV1 { + Transaction::AccountTransaction(AccountTransaction::Invoke(InvokeTransaction { + tx: ApiInvokeTransaction::V1(starknet_api::transaction::InvokeTransactionV1 { max_fee: Fee(tx.max_fee), nonce: Nonce(tx.nonce.into()), sender_address: tx.sender_address.into(), signature: TransactionSignature(signature), calldata: Calldata(Arc::new(calldata)), - transaction_hash: TransactionHash(hash.into()), - }, - ))) + }), + tx_hash: TransactionHash(hash.into()), + only_query: false, + })) } ExecutableTx::DeployAccount(tx) => { @@ -41,18 +44,18 @@ impl From for BlockifierTx { Transaction::AccountTransaction(AccountTransaction::DeployAccount( DeployAccountTransaction { contract_address: tx.contract_address.into(), - tx: starknet_api::transaction::DeployAccountTransaction { + tx: ApiDeployAccountTransaction::V1(DeployAccountTransactionV1 { max_fee: Fee(tx.max_fee), nonce: Nonce(tx.nonce.into()), - version: TransactionVersion(1u128.into()), signature: TransactionSignature(signature), class_hash: ClassHash(tx.class_hash.into()), - transaction_hash: TransactionHash(hash.into()), constructor_calldata: Calldata(Arc::new(calldata)), contract_address_salt: ContractAddressSalt( tx.contract_address_salt.into(), ), - }, + }), + tx_hash: TransactionHash(hash.into()), + only_query: false, }, )) } @@ -63,31 +66,30 @@ impl From for BlockifierTx { let tx = match tx.transaction { DeclareTx::V1(tx) => { let signature = tx.signature.into_iter().map(|f| f.into()).collect(); - starknet_api::transaction::DeclareTransaction::V1(DeclareTransactionV0V1 { + ApiDeclareTransaction::V1(DeclareTransactionV0V1 { max_fee: Fee(tx.max_fee), nonce: Nonce(tx.nonce.into()), sender_address: tx.sender_address.into(), signature: TransactionSignature(signature), class_hash: ClassHash(tx.class_hash.into()), - transaction_hash: TransactionHash(hash.into()), }) } DeclareTx::V2(tx) => { let signature = tx.signature.into_iter().map(|f| f.into()).collect(); - starknet_api::transaction::DeclareTransaction::V2(DeclareTransactionV2 { + ApiDeclareTransaction::V2(DeclareTransactionV2 { max_fee: Fee(tx.max_fee), nonce: Nonce(tx.nonce.into()), sender_address: tx.sender_address.into(), signature: TransactionSignature(signature), class_hash: ClassHash(tx.class_hash.into()), - transaction_hash: TransactionHash(hash.into()), compiled_class_hash: CompiledClassHash(tx.compiled_class_hash.into()), }) } }; - let tx = DeclareTransaction::new(tx, contract_class).expect("class mismatch"); + let tx = DeclareTransaction::new(tx, TransactionHash(hash.into()), contract_class) + .expect("class mismatch"); Transaction::AccountTransaction(AccountTransaction::Declare(tx)) } @@ -100,9 +102,9 @@ impl From for BlockifierTx { calldata: Calldata(Arc::new(calldata)), version: TransactionVersion(1u128.into()), contract_address: tx.contract_address.into(), - transaction_hash: TransactionHash(hash.into()), entry_point_selector: EntryPointSelector(tx.entry_point_selector.into()), }, + tx_hash: TransactionHash(hash.into()), }) } }; diff --git a/crates/katana/executor/src/blockifier/utils.rs b/crates/katana/executor/src/blockifier/utils.rs index cf8edbffb8..f0607992c9 100644 --- a/crates/katana/executor/src/blockifier/utils.rs +++ b/crates/katana/executor/src/blockifier/utils.rs @@ -2,16 +2,20 @@ use std::collections::HashMap; use std::sync::Arc; use ::blockifier::block_context::BlockContext; +use ::blockifier::execution::call_info::CallInfo; +use ::blockifier::execution::common_hints::ExecutionMode; use ::blockifier::execution::entry_point::{ - CallEntryPoint, CallInfo, EntryPointExecutionContext, ExecutionResources, + CallEntryPoint, EntryPointExecutionContext, ExecutionResources, }; use ::blockifier::execution::errors::EntryPointExecutionError; -use ::blockifier::state::cached_state::{CachedState, MutRefState}; +use ::blockifier::state::cached_state::{CachedState, GlobalContractCache, MutRefState}; use ::blockifier::transaction::objects::AccountTransactionContext; use blockifier::fee::fee_utils::{calculate_l1_gas_by_vm_usage, extract_l1_gas_and_vm_usage}; use blockifier::state::state_api::State; use blockifier::transaction::errors::TransactionExecutionError; -use blockifier::transaction::objects::{ResourcesMapping, TransactionExecutionInfo}; +use blockifier::transaction::objects::{ + DeprecatedAccountTransactionContext, ResourcesMapping, TransactionExecutionInfo, +}; use convert_case::{Case, Casing}; use katana_primitives::contract::ContractAddress; use katana_primitives::state::{StateUpdates, StateUpdatesWithDeclaredClasses}; @@ -43,8 +47,8 @@ pub fn call( request: EntryPointCall, block_context: BlockContext, state: Box, -) -> Result, EntryPointExecutionError> { - let res = raw_call(request, block_context, state, 1_000_000_000, 1_000_000_000)?; +) -> Result, TransactionExecutionError> { + let res = raw_call(request, block_context, state, 1_000_000_000)?; let retdata = res.execution.retdata.0; let retdata = retdata.into_iter().map(|f| f.into()).collect::>(); Ok(retdata) @@ -83,10 +87,9 @@ pub fn raw_call( block_context: BlockContext, state: Box, initial_gas: u64, - max_n_steps: usize, -) -> Result { - let mut state = CachedState::new(StateRefDb::from(state)); - let mut state = CachedState::new(MutRefState::new(&mut state)); +) -> Result { + let mut state = CachedState::new(StateRefDb::from(state), GlobalContractCache::default()); + let mut state = CachedState::new(MutRefState::new(&mut state), GlobalContractCache::default()); let call = CallEntryPoint { initial_gas, @@ -96,15 +99,28 @@ pub fn raw_call( ..Default::default() }; + // TODO: this must be false if fees are disabled I assume. + let limit_steps_by_resources = true; + + // Now, the max step is not given directly to this function. + // It's computed by a new function max_steps, and it tooks the values + // from teh block context itself instead of the input give. + // https://github.com/starkware-libs/blockifier/blob/51b343fe38139a309a69b2482f4b484e8caa5edf/crates/blockifier/src/execution/entry_point.rs#L165 + // The blockifier patch must be adjusted to modify this function to return + // the limit we have into the block context without min applied: + // https://github.com/starkware-libs/blockifier/blob/51b343fe38139a309a69b2482f4b484e8caa5edf/crates/blockifier/src/execution/entry_point.rs#L215 call.execute( &mut state, &mut ExecutionResources::default(), &mut EntryPointExecutionContext::new( - block_context, - AccountTransactionContext::default(), - max_n_steps, - ), + &block_context, + // TODO: the current does not have Default, let's use the old one for now. + &AccountTransactionContext::Deprecated(DeprecatedAccountTransactionContext::default()), + ExecutionMode::Execute, + limit_steps_by_resources, + )?, ) + .map_err(TransactionExecutionError::ExecutionError) } /// Calculate the fee of a transaction execution. @@ -117,7 +133,11 @@ pub fn calculate_execution_fee( let total_l1_gas_usage = l1_gas_usage as f64 + l1_gas_by_vm_usage; - let gas_price = block_context.gas_price as u64; + // Gas prices are now in two currencies: eth and strk. + // For now let's only consider eth to be compatible with V2. + // https://github.com/starkware-libs/blockifier/blob/51b343fe38139a309a69b2482f4b484e8caa5edf/crates/blockifier/src/block_context.rs#L19C26-L19C26 + // https://github.com/starkware-libs/blockifier/blob/51b343fe38139a309a69b2482f4b484e8caa5edf/crates/blockifier/src/block_context.rs#L49 + let gas_price = block_context.gas_prices.eth_l1_gas_price as u64; let gas_consumed = total_l1_gas_usage.ceil() as u64; let overall_fee = total_l1_gas_usage.ceil() as u64 * gas_price; @@ -126,8 +146,7 @@ pub fn calculate_execution_fee( pub(crate) fn warn_message_transaction_error_exec_error(err: &TransactionExecutionError) { match err { - TransactionExecutionError::EntryPointExecutionError(ref eperr) - | TransactionExecutionError::ExecutionError(ref eperr) => match eperr { + TransactionExecutionError::ExecutionError(ref eperr) => match eperr { EntryPointExecutionError::ExecutionFailed { error_data } => { let mut reasons: Vec = vec![]; error_data.iter().for_each(|felt| { diff --git a/crates/katana/rpc/src/starknet.rs b/crates/katana/rpc/src/starknet.rs index 7aac882eac..a10e6c56dd 100644 --- a/crates/katana/rpc/src/starknet.rs +++ b/crates/katana/rpc/src/starknet.rs @@ -122,7 +122,7 @@ impl StarknetApiServer for StarknetApi { let header = PartialHeader { parent_hash: latest_hash, - gas_price: block_context.gas_price, + gas_price: block_context.gas_prices.eth_l1_gas_price, number: block_context.block_number.0, timestamp: block_context.block_timestamp.0, sequencer_address: block_context.sequencer_address.into(), @@ -191,7 +191,7 @@ impl StarknetApiServer for StarknetApi { let header = PartialHeader { parent_hash: latest_hash, - gas_price: block_context.gas_price, + gas_price: block_context.gas_prices.eth_l1_gas_price, number: block_context.block_number.0, timestamp: block_context.block_timestamp.0, sequencer_address: block_context.sequencer_address.into(), diff --git a/crates/katana/runner/logs/katana-21370.log b/crates/katana/runner/logs/katana-21370.log deleted file mode 100644 index 1c0d3179f3..0000000000 --- a/crates/katana/runner/logs/katana-21370.log +++ /dev/null @@ -1,11 +0,0 @@ -{"timestamp":"2023-12-08T21:16:54.407601Z","level":"INFO","fields":{"message":"{\"accounts\":[{\"address\":\"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1800000000300000180000000000030000000000003006001800006600\",\"public_key\":\"0x2b191c2f3ecf685a91af7cf72a43e7b90e2e41220175de5c4f7498981b10053\"},{\"address\":\"0x5686a647a9cdd63ade617e0baf3b364856b813b508f03903eb58a7e622d5855\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x33003003001800009900180300d206308b0070db00121318d17b5e6262150b\",\"public_key\":\"0x4c0f884b8e5b4f00d97a3aad26b2e5de0c0c76a555060c837da2e287403c01d\"},{\"address\":\"0x765149d6bc63271df7b0316537888b81aa021523f9516a05306f10fd36914da\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1c9053c053edf324aec366a34c6901b1095b07af69495bffec7d7fe21effb1b\",\"public_key\":\"0x4c339f18b9d1b95b64a6d378abd1480b2e0d5d5bd33cd0828cbce4d65c27284\"},{\"address\":\"0x5006399928dad095cc39818cae15dc022592d47d883701e7814c9db19e96efc\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x736adbbcdac7cc600f89051db1abbc16b9996b46f6b58a9752a11c1028a8ec8\",\"public_key\":\"0x570258e7277eb345ab80803c1dc5847591efd028916fc826bc7cd47ccd8f20d\"},{\"address\":\"0x586364c42cf7f6c968172ba0806b7403c567544266821c8cd28c292a08b2346\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a\",\"public_key\":\"0x640466ebd2ce505209d3e5c4494b4276ed8f1cde764d757eb48831961f7cdea\"},{\"address\":\"0x70038d685013781745f0ac6fe44f23465f9c55a836fceb119b0d7d379f21026\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x283d1e73776cd4ac1ac5f0b879f561bded25eceb2cc589c674af0cec41df441\",\"public_key\":\"0x73c8a29ba0e6a368422d0551b3f45a30a27166b809ba07a41a1bc434b000ba7\"},{\"address\":\"0x5ae5b8925c1568f3ec6ab5f4d4ea4b5467e6d6a18f0944608a0d368ac15bdc7\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4\",\"public_key\":\"0x1e8965b7d0b20b91a62fe515dd991dc9fcb748acddf6b2cf18cec3bdd0f9f9a\"},{\"address\":\"0x456b9e6dbbfbfc59e23a80e5ff5ecc59bc02c3c5b9c78ab667471f52c018e87\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x6bf3604bcb41fed6c42bcca5436eeb65083a982ff65db0dc123f65358008b51\",\"public_key\":\"0x4b076e402835913e3f6812ed28cef8b757d4643ebf2714471a387cb10f22be3\"},{\"address\":\"0x5c47b38f788ec9d382b5079165bc96c0f49647250199a78d34c436d54d12217\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x14d6672dcb4b77ca36a887e9a11cd9d637d5012468175829e9c6e770c61642\",\"public_key\":\"0x16e375df37a7653038bd9eccd767e780c2c4d4c66b4c85f455236a3fd75673a\"},{\"address\":\"0x74bfdb5562f91764fddbbf3f4fb322de114a00d6d6889b19a4dd7b45d5ba24d\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912\",\"public_key\":\"0x33246ce85ebdc292e6a5c5b4dd51fab2757be34b8ffda847ca6925edf31cb67\"}],\"address\":\"0.0.0.0:21370\",\"seed\":\"0\"}"},"target":"katana"} -{"timestamp":"2023-12-08T21:16:54.532748Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} -{"timestamp":"2023-12-08T21:16:54.553141Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} -{"timestamp":"2023-12-08T21:16:54.573063Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} -{"timestamp":"2023-12-08T21:16:54.592919Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} -{"timestamp":"2023-12-08T21:16:54.613540Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} -{"timestamp":"2023-12-08T21:16:54.633873Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} -{"timestamp":"2023-12-08T21:16:54.654484Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} -{"timestamp":"2023-12-08T21:16:54.673949Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} -{"timestamp":"2023-12-08T21:16:54.694190Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} -{"timestamp":"2023-12-08T21:16:54.714432Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} diff --git a/crates/katana/runner/logs/katana-56219.log b/crates/katana/runner/logs/katana-56219.log deleted file mode 100644 index 8b77d4dfeb..0000000000 --- a/crates/katana/runner/logs/katana-56219.log +++ /dev/null @@ -1,2 +0,0 @@ -{"timestamp":"2023-12-08T21:16:54.529596Z","level":"INFO","fields":{"message":"{\"accounts\":[{\"address\":\"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1800000000300000180000000000030000000000003006001800006600\",\"public_key\":\"0x2b191c2f3ecf685a91af7cf72a43e7b90e2e41220175de5c4f7498981b10053\"},{\"address\":\"0x5686a647a9cdd63ade617e0baf3b364856b813b508f03903eb58a7e622d5855\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x33003003001800009900180300d206308b0070db00121318d17b5e6262150b\",\"public_key\":\"0x4c0f884b8e5b4f00d97a3aad26b2e5de0c0c76a555060c837da2e287403c01d\"},{\"address\":\"0x765149d6bc63271df7b0316537888b81aa021523f9516a05306f10fd36914da\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1c9053c053edf324aec366a34c6901b1095b07af69495bffec7d7fe21effb1b\",\"public_key\":\"0x4c339f18b9d1b95b64a6d378abd1480b2e0d5d5bd33cd0828cbce4d65c27284\"},{\"address\":\"0x5006399928dad095cc39818cae15dc022592d47d883701e7814c9db19e96efc\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x736adbbcdac7cc600f89051db1abbc16b9996b46f6b58a9752a11c1028a8ec8\",\"public_key\":\"0x570258e7277eb345ab80803c1dc5847591efd028916fc826bc7cd47ccd8f20d\"},{\"address\":\"0x586364c42cf7f6c968172ba0806b7403c567544266821c8cd28c292a08b2346\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a\",\"public_key\":\"0x640466ebd2ce505209d3e5c4494b4276ed8f1cde764d757eb48831961f7cdea\"},{\"address\":\"0x70038d685013781745f0ac6fe44f23465f9c55a836fceb119b0d7d379f21026\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x283d1e73776cd4ac1ac5f0b879f561bded25eceb2cc589c674af0cec41df441\",\"public_key\":\"0x73c8a29ba0e6a368422d0551b3f45a30a27166b809ba07a41a1bc434b000ba7\"},{\"address\":\"0x5ae5b8925c1568f3ec6ab5f4d4ea4b5467e6d6a18f0944608a0d368ac15bdc7\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4\",\"public_key\":\"0x1e8965b7d0b20b91a62fe515dd991dc9fcb748acddf6b2cf18cec3bdd0f9f9a\"},{\"address\":\"0x456b9e6dbbfbfc59e23a80e5ff5ecc59bc02c3c5b9c78ab667471f52c018e87\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x6bf3604bcb41fed6c42bcca5436eeb65083a982ff65db0dc123f65358008b51\",\"public_key\":\"0x4b076e402835913e3f6812ed28cef8b757d4643ebf2714471a387cb10f22be3\"},{\"address\":\"0x5c47b38f788ec9d382b5079165bc96c0f49647250199a78d34c436d54d12217\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x14d6672dcb4b77ca36a887e9a11cd9d637d5012468175829e9c6e770c61642\",\"public_key\":\"0x16e375df37a7653038bd9eccd767e780c2c4d4c66b4c85f455236a3fd75673a\"},{\"address\":\"0x74bfdb5562f91764fddbbf3f4fb322de114a00d6d6889b19a4dd7b45d5ba24d\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912\",\"public_key\":\"0x33246ce85ebdc292e6a5c5b4dd51fab2757be34b8ffda847ca6925edf31cb67\"}],\"address\":\"0.0.0.0:56219\",\"seed\":\"0\"}"},"target":"katana"} -{"timestamp":"2023-12-08T21:16:54.531764Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} diff --git a/crates/katana/runner/logs/katana-56222.log b/crates/katana/runner/logs/katana-56222.log deleted file mode 100644 index 0953e33747..0000000000 --- a/crates/katana/runner/logs/katana-56222.log +++ /dev/null @@ -1,2 +0,0 @@ -{"timestamp":"2023-12-08T21:16:54.552070Z","level":"INFO","fields":{"message":"{\"accounts\":[{\"address\":\"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1800000000300000180000000000030000000000003006001800006600\",\"public_key\":\"0x2b191c2f3ecf685a91af7cf72a43e7b90e2e41220175de5c4f7498981b10053\"},{\"address\":\"0x5686a647a9cdd63ade617e0baf3b364856b813b508f03903eb58a7e622d5855\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x33003003001800009900180300d206308b0070db00121318d17b5e6262150b\",\"public_key\":\"0x4c0f884b8e5b4f00d97a3aad26b2e5de0c0c76a555060c837da2e287403c01d\"},{\"address\":\"0x765149d6bc63271df7b0316537888b81aa021523f9516a05306f10fd36914da\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1c9053c053edf324aec366a34c6901b1095b07af69495bffec7d7fe21effb1b\",\"public_key\":\"0x4c339f18b9d1b95b64a6d378abd1480b2e0d5d5bd33cd0828cbce4d65c27284\"},{\"address\":\"0x5006399928dad095cc39818cae15dc022592d47d883701e7814c9db19e96efc\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x736adbbcdac7cc600f89051db1abbc16b9996b46f6b58a9752a11c1028a8ec8\",\"public_key\":\"0x570258e7277eb345ab80803c1dc5847591efd028916fc826bc7cd47ccd8f20d\"},{\"address\":\"0x586364c42cf7f6c968172ba0806b7403c567544266821c8cd28c292a08b2346\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a\",\"public_key\":\"0x640466ebd2ce505209d3e5c4494b4276ed8f1cde764d757eb48831961f7cdea\"},{\"address\":\"0x70038d685013781745f0ac6fe44f23465f9c55a836fceb119b0d7d379f21026\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x283d1e73776cd4ac1ac5f0b879f561bded25eceb2cc589c674af0cec41df441\",\"public_key\":\"0x73c8a29ba0e6a368422d0551b3f45a30a27166b809ba07a41a1bc434b000ba7\"},{\"address\":\"0x5ae5b8925c1568f3ec6ab5f4d4ea4b5467e6d6a18f0944608a0d368ac15bdc7\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4\",\"public_key\":\"0x1e8965b7d0b20b91a62fe515dd991dc9fcb748acddf6b2cf18cec3bdd0f9f9a\"},{\"address\":\"0x456b9e6dbbfbfc59e23a80e5ff5ecc59bc02c3c5b9c78ab667471f52c018e87\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x6bf3604bcb41fed6c42bcca5436eeb65083a982ff65db0dc123f65358008b51\",\"public_key\":\"0x4b076e402835913e3f6812ed28cef8b757d4643ebf2714471a387cb10f22be3\"},{\"address\":\"0x5c47b38f788ec9d382b5079165bc96c0f49647250199a78d34c436d54d12217\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x14d6672dcb4b77ca36a887e9a11cd9d637d5012468175829e9c6e770c61642\",\"public_key\":\"0x16e375df37a7653038bd9eccd767e780c2c4d4c66b4c85f455236a3fd75673a\"},{\"address\":\"0x74bfdb5562f91764fddbbf3f4fb322de114a00d6d6889b19a4dd7b45d5ba24d\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912\",\"public_key\":\"0x33246ce85ebdc292e6a5c5b4dd51fab2757be34b8ffda847ca6925edf31cb67\"}],\"address\":\"0.0.0.0:56222\",\"seed\":\"0\"}"},"target":"katana"} -{"timestamp":"2023-12-08T21:16:54.552815Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} diff --git a/crates/katana/runner/logs/katana-56224.log b/crates/katana/runner/logs/katana-56224.log deleted file mode 100644 index fe039150de..0000000000 --- a/crates/katana/runner/logs/katana-56224.log +++ /dev/null @@ -1,2 +0,0 @@ -{"timestamp":"2023-12-08T21:16:54.572018Z","level":"INFO","fields":{"message":"{\"accounts\":[{\"address\":\"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1800000000300000180000000000030000000000003006001800006600\",\"public_key\":\"0x2b191c2f3ecf685a91af7cf72a43e7b90e2e41220175de5c4f7498981b10053\"},{\"address\":\"0x5686a647a9cdd63ade617e0baf3b364856b813b508f03903eb58a7e622d5855\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x33003003001800009900180300d206308b0070db00121318d17b5e6262150b\",\"public_key\":\"0x4c0f884b8e5b4f00d97a3aad26b2e5de0c0c76a555060c837da2e287403c01d\"},{\"address\":\"0x765149d6bc63271df7b0316537888b81aa021523f9516a05306f10fd36914da\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1c9053c053edf324aec366a34c6901b1095b07af69495bffec7d7fe21effb1b\",\"public_key\":\"0x4c339f18b9d1b95b64a6d378abd1480b2e0d5d5bd33cd0828cbce4d65c27284\"},{\"address\":\"0x5006399928dad095cc39818cae15dc022592d47d883701e7814c9db19e96efc\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x736adbbcdac7cc600f89051db1abbc16b9996b46f6b58a9752a11c1028a8ec8\",\"public_key\":\"0x570258e7277eb345ab80803c1dc5847591efd028916fc826bc7cd47ccd8f20d\"},{\"address\":\"0x586364c42cf7f6c968172ba0806b7403c567544266821c8cd28c292a08b2346\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a\",\"public_key\":\"0x640466ebd2ce505209d3e5c4494b4276ed8f1cde764d757eb48831961f7cdea\"},{\"address\":\"0x70038d685013781745f0ac6fe44f23465f9c55a836fceb119b0d7d379f21026\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x283d1e73776cd4ac1ac5f0b879f561bded25eceb2cc589c674af0cec41df441\",\"public_key\":\"0x73c8a29ba0e6a368422d0551b3f45a30a27166b809ba07a41a1bc434b000ba7\"},{\"address\":\"0x5ae5b8925c1568f3ec6ab5f4d4ea4b5467e6d6a18f0944608a0d368ac15bdc7\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4\",\"public_key\":\"0x1e8965b7d0b20b91a62fe515dd991dc9fcb748acddf6b2cf18cec3bdd0f9f9a\"},{\"address\":\"0x456b9e6dbbfbfc59e23a80e5ff5ecc59bc02c3c5b9c78ab667471f52c018e87\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x6bf3604bcb41fed6c42bcca5436eeb65083a982ff65db0dc123f65358008b51\",\"public_key\":\"0x4b076e402835913e3f6812ed28cef8b757d4643ebf2714471a387cb10f22be3\"},{\"address\":\"0x5c47b38f788ec9d382b5079165bc96c0f49647250199a78d34c436d54d12217\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x14d6672dcb4b77ca36a887e9a11cd9d637d5012468175829e9c6e770c61642\",\"public_key\":\"0x16e375df37a7653038bd9eccd767e780c2c4d4c66b4c85f455236a3fd75673a\"},{\"address\":\"0x74bfdb5562f91764fddbbf3f4fb322de114a00d6d6889b19a4dd7b45d5ba24d\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912\",\"public_key\":\"0x33246ce85ebdc292e6a5c5b4dd51fab2757be34b8ffda847ca6925edf31cb67\"}],\"address\":\"0.0.0.0:56224\",\"seed\":\"0\"}"},"target":"katana"} -{"timestamp":"2023-12-08T21:16:54.572765Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} diff --git a/crates/katana/runner/logs/katana-56226.log b/crates/katana/runner/logs/katana-56226.log deleted file mode 100644 index 3df28c0732..0000000000 --- a/crates/katana/runner/logs/katana-56226.log +++ /dev/null @@ -1,2 +0,0 @@ -{"timestamp":"2023-12-08T21:16:54.591736Z","level":"INFO","fields":{"message":"{\"accounts\":[{\"address\":\"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1800000000300000180000000000030000000000003006001800006600\",\"public_key\":\"0x2b191c2f3ecf685a91af7cf72a43e7b90e2e41220175de5c4f7498981b10053\"},{\"address\":\"0x5686a647a9cdd63ade617e0baf3b364856b813b508f03903eb58a7e622d5855\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x33003003001800009900180300d206308b0070db00121318d17b5e6262150b\",\"public_key\":\"0x4c0f884b8e5b4f00d97a3aad26b2e5de0c0c76a555060c837da2e287403c01d\"},{\"address\":\"0x765149d6bc63271df7b0316537888b81aa021523f9516a05306f10fd36914da\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1c9053c053edf324aec366a34c6901b1095b07af69495bffec7d7fe21effb1b\",\"public_key\":\"0x4c339f18b9d1b95b64a6d378abd1480b2e0d5d5bd33cd0828cbce4d65c27284\"},{\"address\":\"0x5006399928dad095cc39818cae15dc022592d47d883701e7814c9db19e96efc\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x736adbbcdac7cc600f89051db1abbc16b9996b46f6b58a9752a11c1028a8ec8\",\"public_key\":\"0x570258e7277eb345ab80803c1dc5847591efd028916fc826bc7cd47ccd8f20d\"},{\"address\":\"0x586364c42cf7f6c968172ba0806b7403c567544266821c8cd28c292a08b2346\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a\",\"public_key\":\"0x640466ebd2ce505209d3e5c4494b4276ed8f1cde764d757eb48831961f7cdea\"},{\"address\":\"0x70038d685013781745f0ac6fe44f23465f9c55a836fceb119b0d7d379f21026\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x283d1e73776cd4ac1ac5f0b879f561bded25eceb2cc589c674af0cec41df441\",\"public_key\":\"0x73c8a29ba0e6a368422d0551b3f45a30a27166b809ba07a41a1bc434b000ba7\"},{\"address\":\"0x5ae5b8925c1568f3ec6ab5f4d4ea4b5467e6d6a18f0944608a0d368ac15bdc7\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4\",\"public_key\":\"0x1e8965b7d0b20b91a62fe515dd991dc9fcb748acddf6b2cf18cec3bdd0f9f9a\"},{\"address\":\"0x456b9e6dbbfbfc59e23a80e5ff5ecc59bc02c3c5b9c78ab667471f52c018e87\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x6bf3604bcb41fed6c42bcca5436eeb65083a982ff65db0dc123f65358008b51\",\"public_key\":\"0x4b076e402835913e3f6812ed28cef8b757d4643ebf2714471a387cb10f22be3\"},{\"address\":\"0x5c47b38f788ec9d382b5079165bc96c0f49647250199a78d34c436d54d12217\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x14d6672dcb4b77ca36a887e9a11cd9d637d5012468175829e9c6e770c61642\",\"public_key\":\"0x16e375df37a7653038bd9eccd767e780c2c4d4c66b4c85f455236a3fd75673a\"},{\"address\":\"0x74bfdb5562f91764fddbbf3f4fb322de114a00d6d6889b19a4dd7b45d5ba24d\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912\",\"public_key\":\"0x33246ce85ebdc292e6a5c5b4dd51fab2757be34b8ffda847ca6925edf31cb67\"}],\"address\":\"0.0.0.0:56226\",\"seed\":\"0\"}"},"target":"katana"} -{"timestamp":"2023-12-08T21:16:54.592541Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} diff --git a/crates/katana/runner/logs/katana-56228.log b/crates/katana/runner/logs/katana-56228.log deleted file mode 100644 index 0168eb803e..0000000000 --- a/crates/katana/runner/logs/katana-56228.log +++ /dev/null @@ -1,2 +0,0 @@ -{"timestamp":"2023-12-08T21:16:54.612386Z","level":"INFO","fields":{"message":"{\"accounts\":[{\"address\":\"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1800000000300000180000000000030000000000003006001800006600\",\"public_key\":\"0x2b191c2f3ecf685a91af7cf72a43e7b90e2e41220175de5c4f7498981b10053\"},{\"address\":\"0x5686a647a9cdd63ade617e0baf3b364856b813b508f03903eb58a7e622d5855\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x33003003001800009900180300d206308b0070db00121318d17b5e6262150b\",\"public_key\":\"0x4c0f884b8e5b4f00d97a3aad26b2e5de0c0c76a555060c837da2e287403c01d\"},{\"address\":\"0x765149d6bc63271df7b0316537888b81aa021523f9516a05306f10fd36914da\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1c9053c053edf324aec366a34c6901b1095b07af69495bffec7d7fe21effb1b\",\"public_key\":\"0x4c339f18b9d1b95b64a6d378abd1480b2e0d5d5bd33cd0828cbce4d65c27284\"},{\"address\":\"0x5006399928dad095cc39818cae15dc022592d47d883701e7814c9db19e96efc\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x736adbbcdac7cc600f89051db1abbc16b9996b46f6b58a9752a11c1028a8ec8\",\"public_key\":\"0x570258e7277eb345ab80803c1dc5847591efd028916fc826bc7cd47ccd8f20d\"},{\"address\":\"0x586364c42cf7f6c968172ba0806b7403c567544266821c8cd28c292a08b2346\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a\",\"public_key\":\"0x640466ebd2ce505209d3e5c4494b4276ed8f1cde764d757eb48831961f7cdea\"},{\"address\":\"0x70038d685013781745f0ac6fe44f23465f9c55a836fceb119b0d7d379f21026\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x283d1e73776cd4ac1ac5f0b879f561bded25eceb2cc589c674af0cec41df441\",\"public_key\":\"0x73c8a29ba0e6a368422d0551b3f45a30a27166b809ba07a41a1bc434b000ba7\"},{\"address\":\"0x5ae5b8925c1568f3ec6ab5f4d4ea4b5467e6d6a18f0944608a0d368ac15bdc7\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4\",\"public_key\":\"0x1e8965b7d0b20b91a62fe515dd991dc9fcb748acddf6b2cf18cec3bdd0f9f9a\"},{\"address\":\"0x456b9e6dbbfbfc59e23a80e5ff5ecc59bc02c3c5b9c78ab667471f52c018e87\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x6bf3604bcb41fed6c42bcca5436eeb65083a982ff65db0dc123f65358008b51\",\"public_key\":\"0x4b076e402835913e3f6812ed28cef8b757d4643ebf2714471a387cb10f22be3\"},{\"address\":\"0x5c47b38f788ec9d382b5079165bc96c0f49647250199a78d34c436d54d12217\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x14d6672dcb4b77ca36a887e9a11cd9d637d5012468175829e9c6e770c61642\",\"public_key\":\"0x16e375df37a7653038bd9eccd767e780c2c4d4c66b4c85f455236a3fd75673a\"},{\"address\":\"0x74bfdb5562f91764fddbbf3f4fb322de114a00d6d6889b19a4dd7b45d5ba24d\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912\",\"public_key\":\"0x33246ce85ebdc292e6a5c5b4dd51fab2757be34b8ffda847ca6925edf31cb67\"}],\"address\":\"0.0.0.0:56228\",\"seed\":\"0\"}"},"target":"katana"} -{"timestamp":"2023-12-08T21:16:54.613184Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} diff --git a/crates/katana/runner/logs/katana-56230.log b/crates/katana/runner/logs/katana-56230.log deleted file mode 100644 index df2630f471..0000000000 --- a/crates/katana/runner/logs/katana-56230.log +++ /dev/null @@ -1,2 +0,0 @@ -{"timestamp":"2023-12-08T21:16:54.632668Z","level":"INFO","fields":{"message":"{\"accounts\":[{\"address\":\"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1800000000300000180000000000030000000000003006001800006600\",\"public_key\":\"0x2b191c2f3ecf685a91af7cf72a43e7b90e2e41220175de5c4f7498981b10053\"},{\"address\":\"0x5686a647a9cdd63ade617e0baf3b364856b813b508f03903eb58a7e622d5855\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x33003003001800009900180300d206308b0070db00121318d17b5e6262150b\",\"public_key\":\"0x4c0f884b8e5b4f00d97a3aad26b2e5de0c0c76a555060c837da2e287403c01d\"},{\"address\":\"0x765149d6bc63271df7b0316537888b81aa021523f9516a05306f10fd36914da\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1c9053c053edf324aec366a34c6901b1095b07af69495bffec7d7fe21effb1b\",\"public_key\":\"0x4c339f18b9d1b95b64a6d378abd1480b2e0d5d5bd33cd0828cbce4d65c27284\"},{\"address\":\"0x5006399928dad095cc39818cae15dc022592d47d883701e7814c9db19e96efc\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x736adbbcdac7cc600f89051db1abbc16b9996b46f6b58a9752a11c1028a8ec8\",\"public_key\":\"0x570258e7277eb345ab80803c1dc5847591efd028916fc826bc7cd47ccd8f20d\"},{\"address\":\"0x586364c42cf7f6c968172ba0806b7403c567544266821c8cd28c292a08b2346\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a\",\"public_key\":\"0x640466ebd2ce505209d3e5c4494b4276ed8f1cde764d757eb48831961f7cdea\"},{\"address\":\"0x70038d685013781745f0ac6fe44f23465f9c55a836fceb119b0d7d379f21026\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x283d1e73776cd4ac1ac5f0b879f561bded25eceb2cc589c674af0cec41df441\",\"public_key\":\"0x73c8a29ba0e6a368422d0551b3f45a30a27166b809ba07a41a1bc434b000ba7\"},{\"address\":\"0x5ae5b8925c1568f3ec6ab5f4d4ea4b5467e6d6a18f0944608a0d368ac15bdc7\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4\",\"public_key\":\"0x1e8965b7d0b20b91a62fe515dd991dc9fcb748acddf6b2cf18cec3bdd0f9f9a\"},{\"address\":\"0x456b9e6dbbfbfc59e23a80e5ff5ecc59bc02c3c5b9c78ab667471f52c018e87\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x6bf3604bcb41fed6c42bcca5436eeb65083a982ff65db0dc123f65358008b51\",\"public_key\":\"0x4b076e402835913e3f6812ed28cef8b757d4643ebf2714471a387cb10f22be3\"},{\"address\":\"0x5c47b38f788ec9d382b5079165bc96c0f49647250199a78d34c436d54d12217\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x14d6672dcb4b77ca36a887e9a11cd9d637d5012468175829e9c6e770c61642\",\"public_key\":\"0x16e375df37a7653038bd9eccd767e780c2c4d4c66b4c85f455236a3fd75673a\"},{\"address\":\"0x74bfdb5562f91764fddbbf3f4fb322de114a00d6d6889b19a4dd7b45d5ba24d\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912\",\"public_key\":\"0x33246ce85ebdc292e6a5c5b4dd51fab2757be34b8ffda847ca6925edf31cb67\"}],\"address\":\"0.0.0.0:56230\",\"seed\":\"0\"}"},"target":"katana"} -{"timestamp":"2023-12-08T21:16:54.633495Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} diff --git a/crates/katana/runner/logs/katana-56232.log b/crates/katana/runner/logs/katana-56232.log deleted file mode 100644 index d50b6d461b..0000000000 --- a/crates/katana/runner/logs/katana-56232.log +++ /dev/null @@ -1,2 +0,0 @@ -{"timestamp":"2023-12-08T21:16:54.653425Z","level":"INFO","fields":{"message":"{\"accounts\":[{\"address\":\"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1800000000300000180000000000030000000000003006001800006600\",\"public_key\":\"0x2b191c2f3ecf685a91af7cf72a43e7b90e2e41220175de5c4f7498981b10053\"},{\"address\":\"0x5686a647a9cdd63ade617e0baf3b364856b813b508f03903eb58a7e622d5855\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x33003003001800009900180300d206308b0070db00121318d17b5e6262150b\",\"public_key\":\"0x4c0f884b8e5b4f00d97a3aad26b2e5de0c0c76a555060c837da2e287403c01d\"},{\"address\":\"0x765149d6bc63271df7b0316537888b81aa021523f9516a05306f10fd36914da\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1c9053c053edf324aec366a34c6901b1095b07af69495bffec7d7fe21effb1b\",\"public_key\":\"0x4c339f18b9d1b95b64a6d378abd1480b2e0d5d5bd33cd0828cbce4d65c27284\"},{\"address\":\"0x5006399928dad095cc39818cae15dc022592d47d883701e7814c9db19e96efc\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x736adbbcdac7cc600f89051db1abbc16b9996b46f6b58a9752a11c1028a8ec8\",\"public_key\":\"0x570258e7277eb345ab80803c1dc5847591efd028916fc826bc7cd47ccd8f20d\"},{\"address\":\"0x586364c42cf7f6c968172ba0806b7403c567544266821c8cd28c292a08b2346\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a\",\"public_key\":\"0x640466ebd2ce505209d3e5c4494b4276ed8f1cde764d757eb48831961f7cdea\"},{\"address\":\"0x70038d685013781745f0ac6fe44f23465f9c55a836fceb119b0d7d379f21026\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x283d1e73776cd4ac1ac5f0b879f561bded25eceb2cc589c674af0cec41df441\",\"public_key\":\"0x73c8a29ba0e6a368422d0551b3f45a30a27166b809ba07a41a1bc434b000ba7\"},{\"address\":\"0x5ae5b8925c1568f3ec6ab5f4d4ea4b5467e6d6a18f0944608a0d368ac15bdc7\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4\",\"public_key\":\"0x1e8965b7d0b20b91a62fe515dd991dc9fcb748acddf6b2cf18cec3bdd0f9f9a\"},{\"address\":\"0x456b9e6dbbfbfc59e23a80e5ff5ecc59bc02c3c5b9c78ab667471f52c018e87\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x6bf3604bcb41fed6c42bcca5436eeb65083a982ff65db0dc123f65358008b51\",\"public_key\":\"0x4b076e402835913e3f6812ed28cef8b757d4643ebf2714471a387cb10f22be3\"},{\"address\":\"0x5c47b38f788ec9d382b5079165bc96c0f49647250199a78d34c436d54d12217\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x14d6672dcb4b77ca36a887e9a11cd9d637d5012468175829e9c6e770c61642\",\"public_key\":\"0x16e375df37a7653038bd9eccd767e780c2c4d4c66b4c85f455236a3fd75673a\"},{\"address\":\"0x74bfdb5562f91764fddbbf3f4fb322de114a00d6d6889b19a4dd7b45d5ba24d\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912\",\"public_key\":\"0x33246ce85ebdc292e6a5c5b4dd51fab2757be34b8ffda847ca6925edf31cb67\"}],\"address\":\"0.0.0.0:56232\",\"seed\":\"0\"}"},"target":"katana"} -{"timestamp":"2023-12-08T21:16:54.654160Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} diff --git a/crates/katana/runner/logs/katana-56234.log b/crates/katana/runner/logs/katana-56234.log deleted file mode 100644 index d136f2083e..0000000000 --- a/crates/katana/runner/logs/katana-56234.log +++ /dev/null @@ -1,2 +0,0 @@ -{"timestamp":"2023-12-08T21:16:54.672950Z","level":"INFO","fields":{"message":"{\"accounts\":[{\"address\":\"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1800000000300000180000000000030000000000003006001800006600\",\"public_key\":\"0x2b191c2f3ecf685a91af7cf72a43e7b90e2e41220175de5c4f7498981b10053\"},{\"address\":\"0x5686a647a9cdd63ade617e0baf3b364856b813b508f03903eb58a7e622d5855\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x33003003001800009900180300d206308b0070db00121318d17b5e6262150b\",\"public_key\":\"0x4c0f884b8e5b4f00d97a3aad26b2e5de0c0c76a555060c837da2e287403c01d\"},{\"address\":\"0x765149d6bc63271df7b0316537888b81aa021523f9516a05306f10fd36914da\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1c9053c053edf324aec366a34c6901b1095b07af69495bffec7d7fe21effb1b\",\"public_key\":\"0x4c339f18b9d1b95b64a6d378abd1480b2e0d5d5bd33cd0828cbce4d65c27284\"},{\"address\":\"0x5006399928dad095cc39818cae15dc022592d47d883701e7814c9db19e96efc\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x736adbbcdac7cc600f89051db1abbc16b9996b46f6b58a9752a11c1028a8ec8\",\"public_key\":\"0x570258e7277eb345ab80803c1dc5847591efd028916fc826bc7cd47ccd8f20d\"},{\"address\":\"0x586364c42cf7f6c968172ba0806b7403c567544266821c8cd28c292a08b2346\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a\",\"public_key\":\"0x640466ebd2ce505209d3e5c4494b4276ed8f1cde764d757eb48831961f7cdea\"},{\"address\":\"0x70038d685013781745f0ac6fe44f23465f9c55a836fceb119b0d7d379f21026\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x283d1e73776cd4ac1ac5f0b879f561bded25eceb2cc589c674af0cec41df441\",\"public_key\":\"0x73c8a29ba0e6a368422d0551b3f45a30a27166b809ba07a41a1bc434b000ba7\"},{\"address\":\"0x5ae5b8925c1568f3ec6ab5f4d4ea4b5467e6d6a18f0944608a0d368ac15bdc7\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4\",\"public_key\":\"0x1e8965b7d0b20b91a62fe515dd991dc9fcb748acddf6b2cf18cec3bdd0f9f9a\"},{\"address\":\"0x456b9e6dbbfbfc59e23a80e5ff5ecc59bc02c3c5b9c78ab667471f52c018e87\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x6bf3604bcb41fed6c42bcca5436eeb65083a982ff65db0dc123f65358008b51\",\"public_key\":\"0x4b076e402835913e3f6812ed28cef8b757d4643ebf2714471a387cb10f22be3\"},{\"address\":\"0x5c47b38f788ec9d382b5079165bc96c0f49647250199a78d34c436d54d12217\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x14d6672dcb4b77ca36a887e9a11cd9d637d5012468175829e9c6e770c61642\",\"public_key\":\"0x16e375df37a7653038bd9eccd767e780c2c4d4c66b4c85f455236a3fd75673a\"},{\"address\":\"0x74bfdb5562f91764fddbbf3f4fb322de114a00d6d6889b19a4dd7b45d5ba24d\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912\",\"public_key\":\"0x33246ce85ebdc292e6a5c5b4dd51fab2757be34b8ffda847ca6925edf31cb67\"}],\"address\":\"0.0.0.0:56234\",\"seed\":\"0\"}"},"target":"katana"} -{"timestamp":"2023-12-08T21:16:54.673674Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} diff --git a/crates/katana/runner/logs/katana-56236.log b/crates/katana/runner/logs/katana-56236.log deleted file mode 100644 index 4947581358..0000000000 --- a/crates/katana/runner/logs/katana-56236.log +++ /dev/null @@ -1,2 +0,0 @@ -{"timestamp":"2023-12-08T21:16:54.692918Z","level":"INFO","fields":{"message":"{\"accounts\":[{\"address\":\"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1800000000300000180000000000030000000000003006001800006600\",\"public_key\":\"0x2b191c2f3ecf685a91af7cf72a43e7b90e2e41220175de5c4f7498981b10053\"},{\"address\":\"0x5686a647a9cdd63ade617e0baf3b364856b813b508f03903eb58a7e622d5855\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x33003003001800009900180300d206308b0070db00121318d17b5e6262150b\",\"public_key\":\"0x4c0f884b8e5b4f00d97a3aad26b2e5de0c0c76a555060c837da2e287403c01d\"},{\"address\":\"0x765149d6bc63271df7b0316537888b81aa021523f9516a05306f10fd36914da\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1c9053c053edf324aec366a34c6901b1095b07af69495bffec7d7fe21effb1b\",\"public_key\":\"0x4c339f18b9d1b95b64a6d378abd1480b2e0d5d5bd33cd0828cbce4d65c27284\"},{\"address\":\"0x5006399928dad095cc39818cae15dc022592d47d883701e7814c9db19e96efc\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x736adbbcdac7cc600f89051db1abbc16b9996b46f6b58a9752a11c1028a8ec8\",\"public_key\":\"0x570258e7277eb345ab80803c1dc5847591efd028916fc826bc7cd47ccd8f20d\"},{\"address\":\"0x586364c42cf7f6c968172ba0806b7403c567544266821c8cd28c292a08b2346\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a\",\"public_key\":\"0x640466ebd2ce505209d3e5c4494b4276ed8f1cde764d757eb48831961f7cdea\"},{\"address\":\"0x70038d685013781745f0ac6fe44f23465f9c55a836fceb119b0d7d379f21026\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x283d1e73776cd4ac1ac5f0b879f561bded25eceb2cc589c674af0cec41df441\",\"public_key\":\"0x73c8a29ba0e6a368422d0551b3f45a30a27166b809ba07a41a1bc434b000ba7\"},{\"address\":\"0x5ae5b8925c1568f3ec6ab5f4d4ea4b5467e6d6a18f0944608a0d368ac15bdc7\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4\",\"public_key\":\"0x1e8965b7d0b20b91a62fe515dd991dc9fcb748acddf6b2cf18cec3bdd0f9f9a\"},{\"address\":\"0x456b9e6dbbfbfc59e23a80e5ff5ecc59bc02c3c5b9c78ab667471f52c018e87\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x6bf3604bcb41fed6c42bcca5436eeb65083a982ff65db0dc123f65358008b51\",\"public_key\":\"0x4b076e402835913e3f6812ed28cef8b757d4643ebf2714471a387cb10f22be3\"},{\"address\":\"0x5c47b38f788ec9d382b5079165bc96c0f49647250199a78d34c436d54d12217\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x14d6672dcb4b77ca36a887e9a11cd9d637d5012468175829e9c6e770c61642\",\"public_key\":\"0x16e375df37a7653038bd9eccd767e780c2c4d4c66b4c85f455236a3fd75673a\"},{\"address\":\"0x74bfdb5562f91764fddbbf3f4fb322de114a00d6d6889b19a4dd7b45d5ba24d\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912\",\"public_key\":\"0x33246ce85ebdc292e6a5c5b4dd51fab2757be34b8ffda847ca6925edf31cb67\"}],\"address\":\"0.0.0.0:56236\",\"seed\":\"0\"}"},"target":"katana"} -{"timestamp":"2023-12-08T21:16:54.693864Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} diff --git a/crates/katana/runner/logs/katana-56238.log b/crates/katana/runner/logs/katana-56238.log deleted file mode 100644 index a982cb2a0e..0000000000 --- a/crates/katana/runner/logs/katana-56238.log +++ /dev/null @@ -1,2 +0,0 @@ -{"timestamp":"2023-12-08T21:16:54.713209Z","level":"INFO","fields":{"message":"{\"accounts\":[{\"address\":\"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1800000000300000180000000000030000000000003006001800006600\",\"public_key\":\"0x2b191c2f3ecf685a91af7cf72a43e7b90e2e41220175de5c4f7498981b10053\"},{\"address\":\"0x5686a647a9cdd63ade617e0baf3b364856b813b508f03903eb58a7e622d5855\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x33003003001800009900180300d206308b0070db00121318d17b5e6262150b\",\"public_key\":\"0x4c0f884b8e5b4f00d97a3aad26b2e5de0c0c76a555060c837da2e287403c01d\"},{\"address\":\"0x765149d6bc63271df7b0316537888b81aa021523f9516a05306f10fd36914da\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x1c9053c053edf324aec366a34c6901b1095b07af69495bffec7d7fe21effb1b\",\"public_key\":\"0x4c339f18b9d1b95b64a6d378abd1480b2e0d5d5bd33cd0828cbce4d65c27284\"},{\"address\":\"0x5006399928dad095cc39818cae15dc022592d47d883701e7814c9db19e96efc\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x736adbbcdac7cc600f89051db1abbc16b9996b46f6b58a9752a11c1028a8ec8\",\"public_key\":\"0x570258e7277eb345ab80803c1dc5847591efd028916fc826bc7cd47ccd8f20d\"},{\"address\":\"0x586364c42cf7f6c968172ba0806b7403c567544266821c8cd28c292a08b2346\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a\",\"public_key\":\"0x640466ebd2ce505209d3e5c4494b4276ed8f1cde764d757eb48831961f7cdea\"},{\"address\":\"0x70038d685013781745f0ac6fe44f23465f9c55a836fceb119b0d7d379f21026\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x283d1e73776cd4ac1ac5f0b879f561bded25eceb2cc589c674af0cec41df441\",\"public_key\":\"0x73c8a29ba0e6a368422d0551b3f45a30a27166b809ba07a41a1bc434b000ba7\"},{\"address\":\"0x5ae5b8925c1568f3ec6ab5f4d4ea4b5467e6d6a18f0944608a0d368ac15bdc7\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x3e3979c1ed728490308054fe357a9f49cf67f80f9721f44cc57235129e090f4\",\"public_key\":\"0x1e8965b7d0b20b91a62fe515dd991dc9fcb748acddf6b2cf18cec3bdd0f9f9a\"},{\"address\":\"0x456b9e6dbbfbfc59e23a80e5ff5ecc59bc02c3c5b9c78ab667471f52c018e87\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x6bf3604bcb41fed6c42bcca5436eeb65083a982ff65db0dc123f65358008b51\",\"public_key\":\"0x4b076e402835913e3f6812ed28cef8b757d4643ebf2714471a387cb10f22be3\"},{\"address\":\"0x5c47b38f788ec9d382b5079165bc96c0f49647250199a78d34c436d54d12217\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0x14d6672dcb4b77ca36a887e9a11cd9d637d5012468175829e9c6e770c61642\",\"public_key\":\"0x16e375df37a7653038bd9eccd767e780c2c4d4c66b4c85f455236a3fd75673a\"},{\"address\":\"0x74bfdb5562f91764fddbbf3f4fb322de114a00d6d6889b19a4dd7b45d5ba24d\",\"balance\":\"0x3635c9adc5dea00000\",\"class_hash\":\"0x4d07e40e93398ed3c76981e72dd1fd22557a78ce36c0515f679e27f0bb5bc5f\",\"private_key\":\"0xc5b2fcab997346f3ea1c00b002ecf6f382c5f9c9659a3894eb783c5320f912\",\"public_key\":\"0x33246ce85ebdc292e6a5c5b4dd51fab2757be34b8ffda847ca6925edf31cb67\"}],\"address\":\"0.0.0.0:56238\",\"seed\":\"0\"}"},"target":"katana"} -{"timestamp":"2023-12-08T21:16:54.714027Z","level":"DEBUG","fields":{"method":"\"starknet_blockNumber\""},"target":"server"} diff --git a/crates/katana/src/args.rs b/crates/katana/src/args.rs index 0bbdce35e7..ed2b8238ee 100644 --- a/crates/katana/src/args.rs +++ b/crates/katana/src/args.rs @@ -63,7 +63,7 @@ pub struct KatanaArgs { #[arg(help = "Configure the messaging with an other chain.")] #[arg(long_help = "Configure the messaging to allow Katana listening/sending messages on a \ settlement chain that can be Ethereum or an other Starknet sequencer. \ - The configuration file details and examples can be found here: TODO.")] + The configuration file details and examples can be found here: https://book.dojoengine.org/toolchain/katana/reference.html#messaging")] pub messaging: Option, #[command(flatten)] @@ -231,7 +231,7 @@ mod test { fn default_block_context_from_args() { let args = KatanaArgs::parse_from(["katana"]); let block_context = args.starknet_config().block_context(); - assert_eq!(block_context.gas_price, DEFAULT_GAS_PRICE); + assert_eq!(block_context.gas_prices.eth_l1_gas_price, DEFAULT_GAS_PRICE); assert_eq!(block_context.chain_id.0, "KATANA".to_string()); assert_eq!(block_context.validate_max_n_steps, DEFAULT_VALIDATE_MAX_STEPS); assert_eq!(block_context.invoke_tx_max_n_steps, DEFAULT_INVOKE_MAX_STEPS); @@ -253,7 +253,7 @@ mod test { let block_context = args.starknet_config().block_context(); - assert_eq!(block_context.gas_price, 10); + assert_eq!(block_context.gas_prices.eth_l1_gas_price, 10); assert_eq!(block_context.chain_id.0, "SN_GOERLI".to_string()); assert_eq!(block_context.validate_max_n_steps, 100); assert_eq!(block_context.invoke_tx_max_n_steps, 200); diff --git a/crates/katana/src/main.rs b/crates/katana/src/main.rs index eabb82ff6d..45da67f74b 100644 --- a/crates/katana/src/main.rs +++ b/crates/katana/src/main.rs @@ -60,7 +60,7 @@ async fn main() -> Result<(), Box> { "🚀 JSON-RPC server started: {}", Style::new().red().apply_to(format!("http://{addr}")) ), - format!("{}", account_class_hash), + format!("{:#064x}", account_class_hash), ); } } @@ -102,11 +102,11 @@ PREDEPLOYED CONTRACTS | Contract | Fee Token | Address | {} -| Class Hash | {} +| Class Hash | {:#064x} | Contract | Universal Deployer | Address | {} -| Class Hash | {} +| Class Hash | {:#064x} | Contract | Account Contract | Class Hash | {} diff --git a/crates/sozo/Cargo.toml b/crates/sozo/Cargo.toml index 24418dabef..d6fbb86796 100644 --- a/crates/sozo/Cargo.toml +++ b/crates/sozo/Cargo.toml @@ -18,6 +18,7 @@ cairo-lang-sierra.workspace = true cairo-lang-starknet.workspace = true cairo-lang-test-plugin.workspace = true cairo-lang-test-runner.workspace = true +cairo-lang-utils.workspace = true camino.workspace = true clap-verbosity-flag = "2.0.1" clap.workspace = true diff --git a/crates/sozo/src/commands/build.rs b/crates/sozo/src/commands/build.rs index 860978b49d..6c5695fd0f 100644 --- a/crates/sozo/src/commands/build.rs +++ b/crates/sozo/src/commands/build.rs @@ -1,19 +1,17 @@ use anyhow::Result; use clap::Args; +use dojo_lang::scarb_internal::compile_workspace; use scarb::core::{Config, TargetKind}; -use scarb::ops::{self, CompileOpts}; +use scarb::ops::CompileOpts; #[derive(Args, Debug)] pub struct BuildArgs; impl BuildArgs { pub fn run(self, config: &Config) -> Result<()> { - let ws = scarb::ops::read_workspace(config.manifest_path(), config)?; - let packages = ws.members().map(|p| p.id).collect(); - ops::compile( - packages, + compile_workspace( + config, CompileOpts { include_targets: vec![], exclude_targets: vec![TargetKind::TEST] }, - &ws, ) } } diff --git a/crates/sozo/src/commands/dev.rs b/crates/sozo/src/commands/dev.rs index 744bfffb99..b55a24b9af 100644 --- a/crates/sozo/src/commands/dev.rs +++ b/crates/sozo/src/commands/dev.rs @@ -8,6 +8,7 @@ use cairo_lang_compiler::db::RootDatabase; use cairo_lang_filesystem::db::{AsFilesGroupMut, FilesGroupEx, PrivRawFileContentQuery}; use cairo_lang_filesystem::ids::FileId; use clap::Args; +use dojo_lang::scarb_internal::build_scarb_root_database; use dojo_world::manifest::Manifest; use dojo_world::migration::world::WorldDiff; use notify_debouncer_mini::notify::RecursiveMode; @@ -23,7 +24,6 @@ use tracing_log::log; use super::options::account::AccountOptions; use super::options::starknet::StarknetOptions; use super::options::world::WorldOptions; -use super::scarb_internal::build_scarb_root_database; use crate::ops::migration; #[derive(Args)] @@ -85,9 +85,11 @@ fn load_context(config: &Config) -> Result> { .into_iter() .filter(|cu| packages.contains(&cu.main_package_id)) .collect::>(); + // we have only 1 unit in projects + // TODO: double check if we always have one with the new version and the order if many. let unit = compilation_units.first().unwrap(); - let db = build_scarb_root_database(unit, &ws).unwrap(); + let db = build_scarb_root_database(unit).unwrap(); Ok(DevContext { db, unit: unit.clone(), ws }) } diff --git a/crates/sozo/src/commands/migrate.rs b/crates/sozo/src/commands/migrate.rs index a37e578fa2..7664d5bb8d 100644 --- a/crates/sozo/src/commands/migrate.rs +++ b/crates/sozo/src/commands/migrate.rs @@ -1,5 +1,6 @@ use anyhow::Result; use clap::Args; +use dojo_lang::scarb_internal::compile_workspace; use scarb::core::{Config, TargetKind}; use scarb::ops::CompileOpts; @@ -49,11 +50,9 @@ impl MigrateArgs { let target_dir = target_dir.join(ws.config().profile().as_str()); if !target_dir.join("manifest.json").exists() { - let packages = ws.members().map(|p| p.id).collect(); - scarb::ops::compile( - packages, + compile_workspace( + config, CompileOpts { include_targets: vec![], exclude_targets: vec![TargetKind::TEST] }, - &ws, )?; } diff --git a/crates/sozo/src/commands/mod.rs b/crates/sozo/src/commands/mod.rs index e093ab8ab8..8281d5cc41 100644 --- a/crates/sozo/src/commands/mod.rs +++ b/crates/sozo/src/commands/mod.rs @@ -16,9 +16,6 @@ pub(crate) mod options; pub(crate) mod register; pub(crate) mod test; -// copy of non pub functions from scarb -pub(crate) mod scarb_internal; - pub fn run(command: Commands, config: &Config) -> Result<()> { match command { Commands::Init(args) => args.run(config), diff --git a/crates/sozo/src/commands/scarb_internal/mod.rs b/crates/sozo/src/commands/scarb_internal/mod.rs deleted file mode 100644 index a7f3379580..0000000000 --- a/crates/sozo/src/commands/scarb_internal/mod.rs +++ /dev/null @@ -1,55 +0,0 @@ -// I have copied source code from https://github.com/software-mansion/scarb/blob/main/scarb/src/compiler/db.rs -// since build_scarb_root_database is not public -// -// NOTE: This files needs to be updated whenever scarb version is updated -use anyhow::Result; -use cairo_lang_compiler::db::RootDatabase; -use cairo_lang_compiler::project::{ProjectConfig, ProjectConfigContent}; -use cairo_lang_filesystem::ids::Directory; -use scarb::compiler::CompilationUnit; -use scarb::core::Workspace; -use tracing::trace; - -// TODO(mkaput): ScarbDatabase? -pub(crate) fn build_scarb_root_database( - unit: &CompilationUnit, - ws: &Workspace<'_>, -) -> Result { - let mut b = RootDatabase::builder(); - b.with_project_config(build_project_config(unit)?); - b.with_cfg(unit.cfg_set.clone()); - - for plugin_info in &unit.cairo_plugins { - let package_id = plugin_info.package.id; - let plugin = ws.config().cairo_plugins().fetch(package_id)?; - let instance = plugin.instantiate()?; - for macro_plugin in instance.macro_plugins() { - b.with_macro_plugin(macro_plugin); - } - for (name, inline_macro_plugin) in instance.inline_macro_plugins() { - b.with_inline_macro_plugin(&name, inline_macro_plugin); - } - } - - b.build() -} - -fn build_project_config(unit: &CompilationUnit) -> Result { - let crate_roots = unit - .components - .iter() - .filter(|model| !model.package.id.is_core()) - .map(|model| (model.cairo_package_name(), model.target.source_root().into())) - .collect(); - - let corelib = Some(Directory::Real(unit.core_package_component().target.source_root().into())); - - let content = ProjectConfigContent { crate_roots }; - - let project_config = - ProjectConfig { base_path: unit.main_component().package.root().into(), corelib, content }; - - trace!(?project_config); - - Ok(project_config) -} diff --git a/crates/sozo/src/commands/test.rs b/crates/sozo/src/commands/test.rs index ff73c9ab3a..b464a78e76 100644 --- a/crates/sozo/src/commands/test.rs +++ b/crates/sozo/src/commands/test.rs @@ -1,23 +1,17 @@ //! Compiles and runs tests for a Dojo project. - -use std::sync::Arc; - use anyhow::{bail, Result}; use cairo_lang_compiler::db::RootDatabase; use cairo_lang_compiler::diagnostics::DiagnosticsReporter; use cairo_lang_compiler::project::{ProjectConfig, ProjectConfigContent}; use cairo_lang_filesystem::cfg::{Cfg, CfgSet}; use cairo_lang_filesystem::ids::Directory; -use cairo_lang_starknet::inline_macros::selector::SelectorMacro; -use cairo_lang_starknet::plugin::StarkNetPlugin; -use cairo_lang_test_plugin::TestPlugin; +use cairo_lang_starknet::starknet_plugin_suite; +use cairo_lang_test_plugin::test_plugin_suite; use cairo_lang_test_runner::{CompiledTestRunner, TestCompiler, TestRunConfig}; use clap::Args; use dojo_lang::compiler::{collect_core_crate_ids, collect_external_crate_ids, Props}; -use dojo_lang::inline_macros::emit::EmitMacro; -use dojo_lang::inline_macros::get::GetMacro; -use dojo_lang::inline_macros::set::SetMacro; -use dojo_lang::plugin::BuiltinDojoPlugin; +use dojo_lang::plugin::dojo_plugin_suite; +use dojo_lang::scarb_internal::crates_config_for_compilation_unit; use scarb::compiler::helpers::collect_main_crate_ids; use scarb::compiler::CompilationUnit; use scarb::core::Config; @@ -94,14 +88,9 @@ pub(crate) fn build_root_database(unit: &CompilationUnit) -> Result Result { .collect(); let corelib = Some(Directory::Real(unit.core_package_component().target.source_root().into())); + let crates_config = crates_config_for_compilation_unit(unit); - let content = ProjectConfigContent { crate_roots }; + let content = ProjectConfigContent { crate_roots, crates_config }; let project_config = ProjectConfig { base_path: unit.main_component().package.root().into(), corelib, content }; diff --git a/crates/sozo/src/ops/migration/mod.rs b/crates/sozo/src/ops/migration/mod.rs index fe9d700efb..7b1c04adcc 100644 --- a/crates/sozo/src/ops/migration/mod.rs +++ b/crates/sozo/src/ops/migration/mod.rs @@ -52,7 +52,7 @@ where // Load local and remote World manifests. let (local_manifest, remote_manifest) = - load_world_manifests(&target_dir, &account, world_address, ui).await?; + load_world_manifests(&target_dir, &account, world_address, &ui).await?; // Calculate diff between local and remote World manifests. @@ -129,7 +129,7 @@ where S: Signer + Sync + Send + 'static, { let ui = ws.config().ui(); - let strategy = prepare_migration(target_dir, diff, name, world_address, ui)?; + let strategy = prepare_migration(target_dir, diff, name, world_address, &ui)?; println!(" "); @@ -288,7 +288,7 @@ where match &strategy.executor { Some(executor) => { ui.print_header("# Executor"); - deploy_contract(executor, "executor", vec![], migrator, ui, &txn_config).await?; + deploy_contract(executor, "executor", vec![], migrator, &ui, &txn_config).await?; // There is no world migration, so it exists already. if strategy.world.is_none() { @@ -336,7 +336,9 @@ where strategy.executor.as_ref().unwrap().contract_address, strategy.base.as_ref().unwrap().diff.local, ]; - deploy_contract(world, "world", calldata.clone(), migrator, ui, &txn_config).await?; + deploy_contract(world, "world", calldata.clone(), migrator, &ui, &txn_config) + .await + .map_err(|e| anyhow!("Failed to deploy world: {e}"))?; ui.print_sub(format!("Contract address: {:#x}", world.contract_address)); @@ -362,8 +364,8 @@ where None => {} }; - register_models(strategy, migrator, ui, txn_config.clone()).await?; - deploy_contracts(strategy, migrator, ui, txn_config).await?; + register_models(strategy, migrator, &ui, txn_config.clone()).await?; + deploy_contracts(strategy, migrator, &ui, txn_config).await?; // This gets current block numder if helpful // let block_height = migrator.provider().block_number().await.ok(); diff --git a/crates/torii/graphql/src/object/inputs/where_input.rs b/crates/torii/graphql/src/object/inputs/where_input.rs index b7acfe7e6d..92821a0aac 100644 --- a/crates/torii/graphql/src/object/inputs/where_input.rs +++ b/crates/torii/graphql/src/object/inputs/where_input.rs @@ -109,8 +109,17 @@ fn parse_integer( } fn parse_string(input: ValueAccessor<'_>, type_name: &str) -> Result { - input - .string() - .map(|i| FilterValue::String(i.to_string())) - .map_err(|_| GqlError::new(format!("Expected string on field {}", type_name))) + match input.string() { + Ok(i) => match i.starts_with("0x") { + true => Ok(FilterValue::String(format!("0x{:0>64}", i.strip_prefix("0x").unwrap()))), /* safe to unwrap since we know it starts with 0x */ + false => match i.parse::() { + Ok(val) => Ok(FilterValue::String(format!("0x{:0>64x}", val))), + Err(_) => Err(GqlError::new(format!( + "Failed to parse integer value on field {}", + type_name + ))), + }, + }, + Err(_) => Err(GqlError::new(format!("Expected string on field {}", type_name))), + } } diff --git a/crates/torii/graphql/src/tests/mod.rs b/crates/torii/graphql/src/tests/mod.rs index 927faf3a0a..667a47ea17 100644 --- a/crates/torii/graphql/src/tests/mod.rs +++ b/crates/torii/graphql/src/tests/mod.rs @@ -252,7 +252,7 @@ pub async fn spinup_types_test() -> Result { execute_strategy(&ws, &migration, &account, None).await.unwrap(); // Execute `create` and insert 10 records into storage - let records_contract = "0x2e6254aaf7e47502319f35de01376cece263f9b83afe6169a4b3a76ef47c8a3"; + let records_contract = "0x414e9776a1626963ba21c4f45ddd7b4d2ac907d20c230e9c6a2e6119c2e5d"; let InvokeTransactionResult { transaction_hash } = account .execute(vec![Call { calldata: vec![FieldElement::from_str("0xa").unwrap()], diff --git a/crates/torii/graphql/src/tests/models_test.rs b/crates/torii/graphql/src/tests/models_test.rs index 10d4ef6bbe..d28df29a2d 100644 --- a/crates/torii/graphql/src/tests/models_test.rs +++ b/crates/torii/graphql/src/tests/models_test.rs @@ -123,16 +123,16 @@ mod tests { let first_record = connection.edges.first().unwrap(); assert_eq!(first_record.node.type_u64, 3); - // NOTE: output leading zeros on hex strings are trimmed, however, we don't do this yet on - // input hex strings - let felt_str_0x5 = format!("0x{:064x}", 5); + // NOTE: Server side is gonna parse "0x5" and "5" to hexadecimal format + let felt_str_0x5 = "0x5"; + let felt_int_5 = "5"; // where filter EQ on class_hash and contract_address let records = records_model_query( &schema, &format!( "(where: {{ type_class_hash: \"{}\", type_contract_address: \"{}\" }})", - felt_str_0x5, felt_str_0x5 + felt_str_0x5, felt_int_5 ), ) .await; @@ -156,7 +156,7 @@ mod tests { // where filter LT on u256 (string) let records = records_model_query( &schema, - &format!("(where: {{ type_u256LT: \"{}\" }})", felt_str_0x5), + &format!("(where: {{ type_u256LT: \"{}\" }})", felt_int_5), ) .await; let connection: Connection = serde_json::from_value(records).unwrap(); diff --git a/crates/torii/graphql/src/tests/types-test/Scarb.lock b/crates/torii/graphql/src/tests/types-test/Scarb.lock index 39a4178583..6a1758f1d7 100644 --- a/crates/torii/graphql/src/tests/types-test/Scarb.lock +++ b/crates/torii/graphql/src/tests/types-test/Scarb.lock @@ -3,7 +3,7 @@ version = 1 [[package]] name = "dojo" -version = "0.3.14" +version = "0.3.15" dependencies = [ "dojo_plugin", ] diff --git a/crates/torii/graphql/src/tests/types-test/Scarb.toml b/crates/torii/graphql/src/tests/types-test/Scarb.toml index 1ad05db050..2b149d7306 100644 --- a/crates/torii/graphql/src/tests/types-test/Scarb.toml +++ b/crates/torii/graphql/src/tests/types-test/Scarb.toml @@ -1,5 +1,5 @@ [package] -cairo-version = "2.1.1" +cairo-version = "2.4.0" name = "types_test" version = "0.1.0" diff --git a/examples/spawn-and-move/.tool-versions b/examples/spawn-and-move/.tool-versions new file mode 100644 index 0000000000..21cfc80772 --- /dev/null +++ b/examples/spawn-and-move/.tool-versions @@ -0,0 +1 @@ +scarb 2.4.0 diff --git a/examples/spawn-and-move/Scarb.toml b/examples/spawn-and-move/Scarb.toml index 97759bbd25..0e594f379c 100644 --- a/examples/spawn-and-move/Scarb.toml +++ b/examples/spawn-and-move/Scarb.toml @@ -1,5 +1,5 @@ [package] -cairo-version = "2.3.1" +cairo-version = "2.4.0" name = "dojo_examples" version = "0.4.0-rc0"