diff --git a/.vscode/launch.json b/.vscode/launch.json index 89693441c5..f141a5a8c7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -23,6 +23,21 @@ "apply" ] }, + { + "name": "Sozo", + "type": "lldb", + "request": "launch", + "program": "${workspaceFolder}/target/debug/sozo", + "args": [ + "--manifest-path", + "examples/spawn-and-move/Scarb.toml", + "events", + "--world", + "0x04c972a756d796d716f665a8079dbf9aff05bbba41a2b8194553073f31d7d393", + "--chunk-size", + "100" + ] + }, { "type": "lldb", "request": "launch", diff --git a/crates/dojo-core/src/model.cairo b/crates/dojo-core/src/model.cairo index f448185d20..a8a6dd8c3f 100644 --- a/crates/dojo-core/src/model.cairo +++ b/crates/dojo-core/src/model.cairo @@ -38,12 +38,13 @@ trait IModel { /// * `class_hash` - Class Hash of the model. fn deploy_and_get_metadata( salt: felt252, class_hash: starknet::ClassHash -) -> SyscallResult<(starknet::ContractAddress, ByteArray, felt252)> { +) -> SyscallResult<(starknet::ContractAddress, ByteArray, felt252, ByteArray)> { let (contract_address, _) = starknet::deploy_syscall( class_hash, salt, array![].span(), false, )?; let model = IModelDispatcher { contract_address }; let name = model.name(); let selector = model.selector(); - Result::Ok((contract_address, name, selector)) + let namespace = model.namespace(); + Result::Ok((contract_address, name, selector, namespace)) } diff --git a/crates/dojo-core/src/world.cairo b/crates/dojo-core/src/world.cairo index 083c7b6c2b..d20479f309 100644 --- a/crates/dojo-core/src/world.cairo +++ b/crates/dojo-core/src/world.cairo @@ -164,6 +164,7 @@ mod world { #[derive(Drop, starknet::Event)] struct ModelRegistered { name: ByteArray, + namespace: ByteArray, class_hash: ClassHash, prev_class_hash: ClassHash, address: ContractAddress, @@ -382,7 +383,7 @@ mod world { let caller = get_caller_address(); let salt = self.models_count.read(); - let (address, name, selector) = dojo::model::deploy_and_get_metadata( + let (address, name, selector, namespace) = dojo::model::deploy_and_get_metadata( salt.into(), class_hash ) .unwrap_syscall(); @@ -414,7 +415,7 @@ mod world { self.models.write(selector, (class_hash, address)); EventEmitter::emit( ref self, - ModelRegistered { name, prev_address, address, class_hash, prev_class_hash } + ModelRegistered { name, namespace, prev_address, address, class_hash, prev_class_hash } ); } diff --git a/crates/dojo-lang/src/plugin.rs b/crates/dojo-lang/src/plugin.rs index 04cd0760d5..4cb6658c7f 100644 --- a/crates/dojo-lang/src/plugin.rs +++ b/crates/dojo-lang/src/plugin.rs @@ -328,6 +328,7 @@ fn get_additional_derive_attrs_for_model(derive_attr_names: &[String]) -> Vec Option { let crates = db.crates(); @@ -376,7 +377,7 @@ impl MacroPlugin for BuiltinDojoPlugin { code: Option::None, diagnostics: vec![PluginDiagnostic { stable_ptr: item_ast.stable_ptr().0, - message: "Unable to find the package ID. Be sure to have a 'package:name' field in your Scarb.toml file.".into(), + message: "Unable to find the package ID. Be sure to have a 'package.name' field in your Scarb.toml file.".into(), severity: Severity::Error, }], remove_original_item: false, diff --git a/crates/dojo-world/src/contracts/abi/world.rs b/crates/dojo-world/src/contracts/abi/world.rs index e2958635f1..55a4178257 100644 --- a/crates/dojo-world/src/contracts/abi/world.rs +++ b/crates/dojo-world/src/contracts/abi/world.rs @@ -730,6 +730,11 @@ abigen!( "type": "core::byte_array::ByteArray", "kind": "data" }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "data" + }, { "name": "class_hash", "type": "core::starknet::class_hash::ClassHash", diff --git a/crates/dojo-world/src/manifest/manifest_test.rs b/crates/dojo-world/src/manifest/manifest_test.rs index bc92e1a4f8..973476faef 100644 --- a/crates/dojo-world/src/manifest/manifest_test.rs +++ b/crates/dojo-world/src/manifest/manifest_test.rs @@ -66,6 +66,9 @@ fn parse_registered_model_events() { data: { let mut data = ByteArray::cairo_serialize(&ByteArray::from_string("Model1").unwrap()); + data.extend(ByteArray::cairo_serialize( + &ByteArray::from_string("Namespace1").unwrap(), + )); data.extend(vec![felt!("0x5555"), felt!("0xbeef"), felt!("0xa1"), felt!("0")]); data }, @@ -79,6 +82,9 @@ fn parse_registered_model_events() { data: { let mut data = ByteArray::cairo_serialize(&ByteArray::from_string("Model1").unwrap()); + data.extend(ByteArray::cairo_serialize( + &ByteArray::from_string("Namespace1").unwrap(), + )); data.extend(vec![felt!("0xbeef"), felt!("0"), felt!("0xa1"), felt!("0xa1")]); data }, @@ -92,6 +98,9 @@ fn parse_registered_model_events() { data: { let mut data = ByteArray::cairo_serialize(&ByteArray::from_string("Model2").unwrap()); + data.extend(ByteArray::cairo_serialize( + &ByteArray::from_string("Namespace2").unwrap(), + )); data.extend(vec![felt!("0x6666"), felt!("0"), felt!("0xa3"), felt!("0")]); data }, diff --git a/crates/sozo/ops/src/events.rs b/crates/sozo/ops/src/events.rs index c524fc2e96..33f17441e3 100644 --- a/crates/sozo/ops/src/events.rs +++ b/crates/sozo/ops/src/events.rs @@ -2,6 +2,7 @@ use std::collections::{HashMap, VecDeque}; use std::fs; use anyhow::{anyhow, Result}; +use cainome::cairo_serde::{ByteArray, CairoSerde}; use cainome::parser::tokens::{CompositeInner, CompositeInnerKind, CoreBasic, Token}; use cainome::parser::AbiParser; use camino::Utf8PathBuf; @@ -213,6 +214,16 @@ fn process_inners( let formatted_value = match &inner.token { Token::CoreBasic(ref cb) => parse_core_basic(cb, &value, true)?, + Token::Composite(c) => { + if c.type_path.eq("core::byte_array::ByteArray") { + data.push_front(value); + let bytearray = ByteArray::cairo_deserialize(data.as_mut_slices().0, 0)?; + data.drain(0..ByteArray::cairo_serialized_size(&bytearray)); + ByteArray::to_string(&bytearray)? + } else { + return Err(anyhow!("Unhandled Composite token")); + } + } Token::Array(ref array) => { let length = value .to_string() diff --git a/crates/torii/types-test/manifests/dev/base/dojo_world_world.toml b/crates/torii/types-test/manifests/dev/base/dojo_world_world.toml index f80ccef0d2..f195eecea6 100644 --- a/crates/torii/types-test/manifests/dev/base/dojo_world_world.toml +++ b/crates/torii/types-test/manifests/dev/base/dojo_world_world.toml @@ -1,5 +1,5 @@ kind = "Class" -class_hash = "0xf6f44afb3cacbcc01a371aff62c86ca9a45feba065424c99f7cd8637514d8f" -original_class_hash = "0xf6f44afb3cacbcc01a371aff62c86ca9a45feba065424c99f7cd8637514d8f" +class_hash = "0x610b8797d5ca3d551eb33a4086b13893f10d8d60b8ff23da40d4bd8d907dccb" +original_class_hash = "0x610b8797d5ca3d551eb33a4086b13893f10d8d60b8ff23da40d4bd8d907dccb" abi = "manifests/dev/abis/base/dojo_world_world.json" name = "dojo::world::world" diff --git a/examples/spawn-and-move/manifests/dev/abis/base/dojo_world_world.json b/examples/spawn-and-move/manifests/dev/abis/base/dojo_world_world.json index 63207ddec9..f4a84c2e42 100644 --- a/examples/spawn-and-move/manifests/dev/abis/base/dojo_world_world.json +++ b/examples/spawn-and-move/manifests/dev/abis/base/dojo_world_world.json @@ -724,6 +724,11 @@ "type": "core::byte_array::ByteArray", "kind": "data" }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "data" + }, { "name": "class_hash", "type": "core::starknet::class_hash::ClassHash", diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_actions_actions_moved.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_actions_actions_moved.json index 89abdcfec5..a1449a31ab 100644 --- a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_actions_actions_moved.json +++ b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_actions_actions_moved.json @@ -271,6 +271,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_emote_message.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_emote_message.json index 9c63d0fc5d..ee7829ccd1 100644 --- a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_emote_message.json +++ b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_emote_message.json @@ -271,6 +271,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_moves.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_moves.json index ee2cf17b26..8bf0f554d1 100644 --- a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_moves.json +++ b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_moves.json @@ -271,6 +271,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_player_config.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_player_config.json index 8c33ebabc4..6838a60718 100644 --- a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_player_config.json +++ b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_player_config.json @@ -271,6 +271,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_position.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_position.json index bceec42587..6d330887ff 100644 --- a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_position.json +++ b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_models_position.json @@ -271,6 +271,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_others_others_contract_initialized.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_others_others_contract_initialized.json index 1dbbd313d8..aff79d923c 100644 --- a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_others_others_contract_initialized.json +++ b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples_others_others_contract_initialized.json @@ -271,6 +271,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/dojo_world_world.json b/examples/spawn-and-move/manifests/dev/abis/deployments/dojo_world_world.json index 63207ddec9..f4a84c2e42 100644 --- a/examples/spawn-and-move/manifests/dev/abis/deployments/dojo_world_world.json +++ b/examples/spawn-and-move/manifests/dev/abis/deployments/dojo_world_world.json @@ -724,6 +724,11 @@ "type": "core::byte_array::ByteArray", "kind": "data" }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "data" + }, { "name": "class_hash", "type": "core::starknet::class_hash::ClassHash", diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_actions_actions_moved.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_actions_actions_moved.json index 89abdcfec5..a1449a31ab 100644 --- a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_actions_actions_moved.json +++ b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_actions_actions_moved.json @@ -271,6 +271,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_emote_message.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_emote_message.json index 9c63d0fc5d..ee7829ccd1 100644 --- a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_emote_message.json +++ b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_emote_message.json @@ -271,6 +271,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_moves.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_moves.json index ee2cf17b26..8bf0f554d1 100644 --- a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_moves.json +++ b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_moves.json @@ -271,6 +271,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_player_config.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_player_config.json index 8c33ebabc4..6838a60718 100644 --- a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_player_config.json +++ b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_player_config.json @@ -271,6 +271,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_position.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_position.json index bceec42587..6d330887ff 100644 --- a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_position.json +++ b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_models_position.json @@ -271,6 +271,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_others_others_contract_initialized.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_others_others_contract_initialized.json index 1dbbd313d8..aff79d923c 100644 --- a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_others_others_contract_initialized.json +++ b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples_others_others_contract_initialized.json @@ -271,6 +271,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples_actions_actions.toml b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples_actions_actions.toml index 09f30e5dfa..5dcbce8fec 100644 --- a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples_actions_actions.toml +++ b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples_actions_actions.toml @@ -1,6 +1,6 @@ kind = "DojoContract" -class_hash = "0x6d905953360cf18e3393d128c6ced40b38fc83b033412c8541fd4aba59d2767" -original_class_hash = "0x6d905953360cf18e3393d128c6ced40b38fc83b033412c8541fd4aba59d2767" +class_hash = "0x3c9d3188d9bfcd9179bf6ff930c789aa53c4d0932da64ed2af86b8433f5e35a" +original_class_hash = "0x3c9d3188d9bfcd9179bf6ff930c789aa53c4d0932da64ed2af86b8433f5e35a" base_class_hash = "0x0" abi = "manifests/dev/abis/base/contracts/dojo_examples_actions_actions.json" reads = [] diff --git a/examples/spawn-and-move/manifests/dev/base/dojo_world_world.toml b/examples/spawn-and-move/manifests/dev/base/dojo_world_world.toml index f80ccef0d2..f195eecea6 100644 --- a/examples/spawn-and-move/manifests/dev/base/dojo_world_world.toml +++ b/examples/spawn-and-move/manifests/dev/base/dojo_world_world.toml @@ -1,5 +1,5 @@ kind = "Class" -class_hash = "0xf6f44afb3cacbcc01a371aff62c86ca9a45feba065424c99f7cd8637514d8f" -original_class_hash = "0xf6f44afb3cacbcc01a371aff62c86ca9a45feba065424c99f7cd8637514d8f" +class_hash = "0x610b8797d5ca3d551eb33a4086b13893f10d8d60b8ff23da40d4bd8d907dccb" +original_class_hash = "0x610b8797d5ca3d551eb33a4086b13893f10d8d60b8ff23da40d4bd8d907dccb" abi = "manifests/dev/abis/base/dojo_world_world.json" name = "dojo::world::world" diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_actions_actions_moved.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_actions_actions_moved.toml index 8b79f5c317..6638f643fb 100644 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_actions_actions_moved.toml +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_actions_actions_moved.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x4ef89963afe500337aaf757ad52394ea8e311077a825b3de5a5f32d3457997c" -original_class_hash = "0x4ef89963afe500337aaf757ad52394ea8e311077a825b3de5a5f32d3457997c" +class_hash = "0x6b2b029759c01123f15af42be8d8c35dcf5a6864907cf68b45deae5061c62ce" +original_class_hash = "0x6b2b029759c01123f15af42be8d8c35dcf5a6864907cf68b45deae5061c62ce" abi = "manifests/dev/abis/base/models/dojo_examples_actions_actions_moved.json" name = "dojo_examples::actions::actions::moved" diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_emote_message.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_emote_message.toml index 3dfeddaf7b..7a6baa9471 100644 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_emote_message.toml +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_emote_message.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x6ec8bf0a073e509e5b442ee5d4bee75aa85b87671a110dff2b9e6a58cc2aaa5" -original_class_hash = "0x6ec8bf0a073e509e5b442ee5d4bee75aa85b87671a110dff2b9e6a58cc2aaa5" +class_hash = "0x7f14bf1375cb110dc6779affbceaf1f302f95bed3ac2adcb84357a549e804c7" +original_class_hash = "0x7f14bf1375cb110dc6779affbceaf1f302f95bed3ac2adcb84357a549e804c7" abi = "manifests/dev/abis/base/models/dojo_examples_models_emote_message.json" name = "dojo_examples::models::emote_message" diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_moves.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_moves.toml index 6241643aa4..2c8a1d3110 100644 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_moves.toml +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_moves.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x456d85286b34249fffa0a13d1ac490cc1f5b02eb1a1c92d820c59d6b0f2eaa8" -original_class_hash = "0x456d85286b34249fffa0a13d1ac490cc1f5b02eb1a1c92d820c59d6b0f2eaa8" +class_hash = "0x6a9b532ba97c389f90f2fc0ee487a8651321cf5e3f31ff667d139fb0d07aaba" +original_class_hash = "0x6a9b532ba97c389f90f2fc0ee487a8651321cf5e3f31ff667d139fb0d07aaba" abi = "manifests/dev/abis/base/models/dojo_examples_models_moves.json" name = "dojo_examples::models::moves" diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_player_config.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_player_config.toml index 459eb9ebdb..a70c0a45fa 100644 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_player_config.toml +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_player_config.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x584d016a91d077c86ff1c014e0c4d735946d1084dd0d4c0a80cee6d04629e55" -original_class_hash = "0x584d016a91d077c86ff1c014e0c4d735946d1084dd0d4c0a80cee6d04629e55" +class_hash = "0x1c5fd16d2013c917f05b484e0c8e1ef4804b46ca45759ed1cf4d19e55b95ec0" +original_class_hash = "0x1c5fd16d2013c917f05b484e0c8e1ef4804b46ca45759ed1cf4d19e55b95ec0" abi = "manifests/dev/abis/base/models/dojo_examples_models_player_config.json" name = "dojo_examples::models::player_config" diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_position.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_position.toml index d29abaa4e0..bf4beaac14 100644 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_position.toml +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_models_position.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x27942375b09862291ece780c573e8c625df4ba41fd7524e0658ca75fff014ff" -original_class_hash = "0x27942375b09862291ece780c573e8c625df4ba41fd7524e0658ca75fff014ff" +class_hash = "0x388e2d7941568d72369f8ede13d01be9de96827c8c19ede6a47ad42861b209a" +original_class_hash = "0x388e2d7941568d72369f8ede13d01be9de96827c8c19ede6a47ad42861b209a" abi = "manifests/dev/abis/base/models/dojo_examples_models_position.json" name = "dojo_examples::models::position" diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_others_others_contract_initialized.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_others_others_contract_initialized.toml index e4b4f0fdc3..e1eba316c4 100644 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_others_others_contract_initialized.toml +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples_others_others_contract_initialized.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x4b29afc6db744bd87f7276869620348557c11b984e9f3fcb27c4d55efb0ab6c" -original_class_hash = "0x4b29afc6db744bd87f7276869620348557c11b984e9f3fcb27c4d55efb0ab6c" +class_hash = "0x201188e333f79877d683043cfa6e663c4048a1d3df76559f60aabb1bbfa6830" +original_class_hash = "0x201188e333f79877d683043cfa6e663c4048a1d3df76559f60aabb1bbfa6830" abi = "manifests/dev/abis/base/models/dojo_examples_others_others_contract_initialized.json" name = "dojo_examples::others::others::contract_initialized" diff --git a/examples/spawn-and-move/manifests/dev/manifest.json b/examples/spawn-and-move/manifests/dev/manifest.json index 404bf0f8b6..06948aa5ab 100644 --- a/examples/spawn-and-move/manifests/dev/manifest.json +++ b/examples/spawn-and-move/manifests/dev/manifest.json @@ -1,8 +1,8 @@ { "world": { "kind": "WorldContract", - "class_hash": "0xf6f44afb3cacbcc01a371aff62c86ca9a45feba065424c99f7cd8637514d8f", - "original_class_hash": "0xf6f44afb3cacbcc01a371aff62c86ca9a45feba065424c99f7cd8637514d8f", + "class_hash": "0x610b8797d5ca3d551eb33a4086b13893f10d8d60b8ff23da40d4bd8d907dccb", + "original_class_hash": "0x610b8797d5ca3d551eb33a4086b13893f10d8d60b8ff23da40d4bd8d907dccb", "abi": [ { "type": "impl", @@ -729,6 +729,11 @@ "type": "core::byte_array::ByteArray", "kind": "data" }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "data" + }, { "name": "class_hash", "type": "core::starknet::class_hash::ClassHash", @@ -955,8 +960,8 @@ ] } ], - "address": "0x2e31cfde9f9990c7fe44b25043e3c6958a849c0a66ab535686d2b710e97f309", - "transaction_hash": "0x7106054ad5c4ccfcd5e512d286ce7cadc5ddc21b8cf058e4daab09743bace76", + "address": "0x4c972a756d796d716f665a8079dbf9aff05bbba41a2b8194553073f31d7d393", + "transaction_hash": "0x45d255f789df9bb522be78da9c098fa1cdb2b38044e5358329b28bed4d57e92", "block_number": 3, "seed": "dojo_examples", "metadata": { @@ -975,9 +980,9 @@ "contracts": [ { "kind": "DojoContract", - "address": "0x263f89fc2bdf121a3bdcc9af35eb6b3d5c078f9bcc257e9f5627af81a7607fd", - "class_hash": "0x6d905953360cf18e3393d128c6ced40b38fc83b033412c8541fd4aba59d2767", - "original_class_hash": "0x6d905953360cf18e3393d128c6ced40b38fc83b033412c8541fd4aba59d2767", + "address": "0x398173c5ffbbc287ead02b2bdabc4ffa0c52518627b5b458348f5e32062d733", + "class_hash": "0x3c9d3188d9bfcd9179bf6ff930c789aa53c4d0932da64ed2af86b8433f5e35a", + "original_class_hash": "0x3c9d3188d9bfcd9179bf6ff930c789aa53c4d0932da64ed2af86b8433f5e35a", "base_class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", "abi": [ { @@ -1280,7 +1285,7 @@ }, { "kind": "DojoContract", - "address": "0x2dc27292cc94aa40e4d2d327e511ce02e96f40ca3c41d1f9938860a1a4aee9f", + "address": "0x728467aae9f5f12d1691e2a20756a4ff27eb4dc1fdd66fdda84090cd0823634", "class_hash": "0x3ee016157303a7ce35a9fecdb5b8519159df620c5780527d61443636aaa3c3a", "original_class_hash": "0x3ee016157303a7ce35a9fecdb5b8519159df620c5780527d61443636aaa3c3a", "base_class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", @@ -1456,8 +1461,8 @@ "key": false } ], - "class_hash": "0x4ef89963afe500337aaf757ad52394ea8e311077a825b3de5a5f32d3457997c", - "original_class_hash": "0x4ef89963afe500337aaf757ad52394ea8e311077a825b3de5a5f32d3457997c", + "class_hash": "0x6b2b029759c01123f15af42be8d8c35dcf5a6864907cf68b45deae5061c62ce", + "original_class_hash": "0x6b2b029759c01123f15af42be8d8c35dcf5a6864907cf68b45deae5061c62ce", "abi": [ { "type": "impl", @@ -1731,6 +1736,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", @@ -1863,8 +1879,8 @@ "key": false } ], - "class_hash": "0x6ec8bf0a073e509e5b442ee5d4bee75aa85b87671a110dff2b9e6a58cc2aaa5", - "original_class_hash": "0x6ec8bf0a073e509e5b442ee5d4bee75aa85b87671a110dff2b9e6a58cc2aaa5", + "class_hash": "0x7f14bf1375cb110dc6779affbceaf1f302f95bed3ac2adcb84357a549e804c7", + "original_class_hash": "0x7f14bf1375cb110dc6779affbceaf1f302f95bed3ac2adcb84357a549e804c7", "abi": [ { "type": "impl", @@ -2138,6 +2154,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", @@ -2275,8 +2302,8 @@ "key": false } ], - "class_hash": "0x456d85286b34249fffa0a13d1ac490cc1f5b02eb1a1c92d820c59d6b0f2eaa8", - "original_class_hash": "0x456d85286b34249fffa0a13d1ac490cc1f5b02eb1a1c92d820c59d6b0f2eaa8", + "class_hash": "0x6a9b532ba97c389f90f2fc0ee487a8651321cf5e3f31ff667d139fb0d07aaba", + "original_class_hash": "0x6a9b532ba97c389f90f2fc0ee487a8651321cf5e3f31ff667d139fb0d07aaba", "abi": [ { "type": "impl", @@ -2550,6 +2577,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", @@ -2696,8 +2734,8 @@ "key": false } ], - "class_hash": "0x584d016a91d077c86ff1c014e0c4d735946d1084dd0d4c0a80cee6d04629e55", - "original_class_hash": "0x584d016a91d077c86ff1c014e0c4d735946d1084dd0d4c0a80cee6d04629e55", + "class_hash": "0x1c5fd16d2013c917f05b484e0c8e1ef4804b46ca45759ed1cf4d19e55b95ec0", + "original_class_hash": "0x1c5fd16d2013c917f05b484e0c8e1ef4804b46ca45759ed1cf4d19e55b95ec0", "abi": [ { "type": "impl", @@ -2971,6 +3009,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", @@ -3099,8 +3148,8 @@ "key": false } ], - "class_hash": "0x27942375b09862291ece780c573e8c625df4ba41fd7524e0658ca75fff014ff", - "original_class_hash": "0x27942375b09862291ece780c573e8c625df4ba41fd7524e0658ca75fff014ff", + "class_hash": "0x388e2d7941568d72369f8ede13d01be9de96827c8c19ede6a47ad42861b209a", + "original_class_hash": "0x388e2d7941568d72369f8ede13d01be9de96827c8c19ede6a47ad42861b209a", "abi": [ { "type": "impl", @@ -3374,6 +3423,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", @@ -3499,8 +3559,8 @@ "key": false } ], - "class_hash": "0x4b29afc6db744bd87f7276869620348557c11b984e9f3fcb27c4d55efb0ab6c", - "original_class_hash": "0x4b29afc6db744bd87f7276869620348557c11b984e9f3fcb27c4d55efb0ab6c", + "class_hash": "0x201188e333f79877d683043cfa6e663c4048a1d3df76559f60aabb1bbfa6830", + "original_class_hash": "0x201188e333f79877d683043cfa6e663c4048a1d3df76559f60aabb1bbfa6830", "abi": [ { "type": "impl", @@ -3774,6 +3834,17 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/examples/spawn-and-move/manifests/dev/manifest.toml b/examples/spawn-and-move/manifests/dev/manifest.toml index ccc078a545..22d04b05b6 100644 --- a/examples/spawn-and-move/manifests/dev/manifest.toml +++ b/examples/spawn-and-move/manifests/dev/manifest.toml @@ -1,10 +1,10 @@ [world] kind = "WorldContract" -class_hash = "0xf6f44afb3cacbcc01a371aff62c86ca9a45feba065424c99f7cd8637514d8f" -original_class_hash = "0xf6f44afb3cacbcc01a371aff62c86ca9a45feba065424c99f7cd8637514d8f" +class_hash = "0x610b8797d5ca3d551eb33a4086b13893f10d8d60b8ff23da40d4bd8d907dccb" +original_class_hash = "0x610b8797d5ca3d551eb33a4086b13893f10d8d60b8ff23da40d4bd8d907dccb" abi = "manifests/dev/abis/deployments/dojo_world_world.json" -address = "0x2e31cfde9f9990c7fe44b25043e3c6958a849c0a66ab535686d2b710e97f309" -transaction_hash = "0x7106054ad5c4ccfcd5e512d286ce7cadc5ddc21b8cf058e4daab09743bace76" +address = "0x4c972a756d796d716f665a8079dbf9aff05bbba41a2b8194553073f31d7d393" +transaction_hash = "0x45d255f789df9bb522be78da9c098fa1cdb2b38044e5358329b28bed4d57e92" block_number = 3 seed = "dojo_examples" name = "dojo::world::world" @@ -21,9 +21,9 @@ name = "dojo::base::base" [[contracts]] kind = "DojoContract" -address = "0x263f89fc2bdf121a3bdcc9af35eb6b3d5c078f9bcc257e9f5627af81a7607fd" -class_hash = "0x6d905953360cf18e3393d128c6ced40b38fc83b033412c8541fd4aba59d2767" -original_class_hash = "0x6d905953360cf18e3393d128c6ced40b38fc83b033412c8541fd4aba59d2767" +address = "0x398173c5ffbbc287ead02b2bdabc4ffa0c52518627b5b458348f5e32062d733" +class_hash = "0x3c9d3188d9bfcd9179bf6ff930c789aa53c4d0932da64ed2af86b8433f5e35a" +original_class_hash = "0x3c9d3188d9bfcd9179bf6ff930c789aa53c4d0932da64ed2af86b8433f5e35a" base_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" abi = "manifests/dev/abis/deployments/contracts/dojo_examples_actions_actions.json" reads = [] @@ -37,7 +37,7 @@ name = "dojo_examples::actions::actions" [[contracts]] kind = "DojoContract" -address = "0x2dc27292cc94aa40e4d2d327e511ce02e96f40ca3c41d1f9938860a1a4aee9f" +address = "0x728467aae9f5f12d1691e2a20756a4ff27eb4dc1fdd66fdda84090cd0823634" class_hash = "0x3ee016157303a7ce35a9fecdb5b8519159df620c5780527d61443636aaa3c3a" original_class_hash = "0x3ee016157303a7ce35a9fecdb5b8519159df620c5780527d61443636aaa3c3a" base_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" @@ -54,8 +54,8 @@ name = "dojo_examples::others::others" [[models]] kind = "DojoModel" -class_hash = "0x4ef89963afe500337aaf757ad52394ea8e311077a825b3de5a5f32d3457997c" -original_class_hash = "0x4ef89963afe500337aaf757ad52394ea8e311077a825b3de5a5f32d3457997c" +class_hash = "0x6b2b029759c01123f15af42be8d8c35dcf5a6864907cf68b45deae5061c62ce" +original_class_hash = "0x6b2b029759c01123f15af42be8d8c35dcf5a6864907cf68b45deae5061c62ce" abi = "manifests/dev/abis/deployments/models/dojo_examples_actions_actions_moved.json" name = "dojo_examples::actions::actions::moved" @@ -71,8 +71,8 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x6ec8bf0a073e509e5b442ee5d4bee75aa85b87671a110dff2b9e6a58cc2aaa5" -original_class_hash = "0x6ec8bf0a073e509e5b442ee5d4bee75aa85b87671a110dff2b9e6a58cc2aaa5" +class_hash = "0x7f14bf1375cb110dc6779affbceaf1f302f95bed3ac2adcb84357a549e804c7" +original_class_hash = "0x7f14bf1375cb110dc6779affbceaf1f302f95bed3ac2adcb84357a549e804c7" abi = "manifests/dev/abis/deployments/models/dojo_examples_models_emote_message.json" name = "dojo_examples::models::emote_message" @@ -88,8 +88,8 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x456d85286b34249fffa0a13d1ac490cc1f5b02eb1a1c92d820c59d6b0f2eaa8" -original_class_hash = "0x456d85286b34249fffa0a13d1ac490cc1f5b02eb1a1c92d820c59d6b0f2eaa8" +class_hash = "0x6a9b532ba97c389f90f2fc0ee487a8651321cf5e3f31ff667d139fb0d07aaba" +original_class_hash = "0x6a9b532ba97c389f90f2fc0ee487a8651321cf5e3f31ff667d139fb0d07aaba" abi = "manifests/dev/abis/deployments/models/dojo_examples_models_moves.json" name = "dojo_examples::models::moves" @@ -110,8 +110,8 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x584d016a91d077c86ff1c014e0c4d735946d1084dd0d4c0a80cee6d04629e55" -original_class_hash = "0x584d016a91d077c86ff1c014e0c4d735946d1084dd0d4c0a80cee6d04629e55" +class_hash = "0x1c5fd16d2013c917f05b484e0c8e1ef4804b46ca45759ed1cf4d19e55b95ec0" +original_class_hash = "0x1c5fd16d2013c917f05b484e0c8e1ef4804b46ca45759ed1cf4d19e55b95ec0" abi = "manifests/dev/abis/deployments/models/dojo_examples_models_player_config.json" name = "dojo_examples::models::player_config" @@ -137,8 +137,8 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x27942375b09862291ece780c573e8c625df4ba41fd7524e0658ca75fff014ff" -original_class_hash = "0x27942375b09862291ece780c573e8c625df4ba41fd7524e0658ca75fff014ff" +class_hash = "0x388e2d7941568d72369f8ede13d01be9de96827c8c19ede6a47ad42861b209a" +original_class_hash = "0x388e2d7941568d72369f8ede13d01be9de96827c8c19ede6a47ad42861b209a" abi = "manifests/dev/abis/deployments/models/dojo_examples_models_position.json" name = "dojo_examples::models::position" @@ -154,8 +154,8 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x4b29afc6db744bd87f7276869620348557c11b984e9f3fcb27c4d55efb0ab6c" -original_class_hash = "0x4b29afc6db744bd87f7276869620348557c11b984e9f3fcb27c4d55efb0ab6c" +class_hash = "0x201188e333f79877d683043cfa6e663c4048a1d3df76559f60aabb1bbfa6830" +original_class_hash = "0x201188e333f79877d683043cfa6e663c4048a1d3df76559f60aabb1bbfa6830" abi = "manifests/dev/abis/deployments/models/dojo_examples_others_others_contract_initialized.json" name = "dojo_examples::others::others::contract_initialized"