diff --git a/bin/sozo/tests/register_test.rs b/bin/sozo/tests/register_test.rs index 579fcc9d9e..acc248729b 100644 --- a/bin/sozo/tests/register_test.rs +++ b/bin/sozo/tests/register_test.rs @@ -50,7 +50,7 @@ async fn reregister_models() { let rpc_url = &sequencer.url().to_string(); let moves_model = - migration.models.iter().find(|m| m.diff.tag == "dojo_examples:Moves").unwrap(); + migration.models.iter().find(|m| m.diff.tag == "dojo_examples-Moves").unwrap(); let moves_model_class_hash = &format!("0x{:x}", moves_model.diff.local_class_hash); let args_vec = [ "register", diff --git a/bin/sozo/tests/test_build.rs b/bin/sozo/tests/test_build.rs index 552f62f1fc..722d231036 100644 --- a/bin/sozo/tests/test_build.rs +++ b/bin/sozo/tests/test_build.rs @@ -3,11 +3,12 @@ mod utils; use std::fs; use utils::snapbox::get_snapbox; -use utils::stdout::expected_stdout; #[test] fn test_invalid_cairo_version() { let path = fs::canonicalize("./tests/test_data/invalid_cairo_version"); let assert = get_snapbox().arg("build").current_dir(path.unwrap()).assert().failure(); - assert.stdout_eq(expected_stdout("wrong-cairo-version")); + assert.stdout_matches( + "[..]Specified cairo version not supported by dojo. Please verify and update dojo[..]", + ); } diff --git a/crates/dojo-bindgen/src/lib.rs b/crates/dojo-bindgen/src/lib.rs index 44422d71ff..42640948d8 100644 --- a/crates/dojo-bindgen/src/lib.rs +++ b/crates/dojo-bindgen/src/lib.rs @@ -241,16 +241,16 @@ mod tests { assert_eq!(data.world.name, "dojo_example"); - let pos = data.models.get("Position").unwrap(); - assert_eq!(pos.tag, "dojo_examples:Position"); + let pos = data.models.get("dojo_examples-Position").unwrap(); + assert_eq!(pos.tag, "dojo_examples-Position"); - let moves = data.models.get("Moves").unwrap(); - assert_eq!(moves.tag, "dojo_examples:Moves"); + let moves = data.models.get("dojo_examples-Moves").unwrap(); + assert_eq!(moves.tag, "dojo_examples-Moves"); - let moved = data.models.get("dojo_examples:Message").unwrap(); - assert_eq!(moved.tag, "Message"); + let moved = data.models.get("dojo_examples-Message").unwrap(); + assert_eq!(moved.tag, "dojo_examples-Message"); - let player_config = data.models.get("dojo_examples:PlayerConfig").unwrap(); - assert_eq!(player_config.tag, "dojo_examples:PlayerConfig"); + let player_config = data.models.get("dojo_examples-PlayerConfig").unwrap(); + assert_eq!(player_config.tag, "dojo_examples-PlayerConfig"); } } diff --git a/crates/dojo-bindgen/src/plugins/typescript/mod.rs b/crates/dojo-bindgen/src/plugins/typescript/mod.rs index cea10ee0ea..c68a64cbb6 100644 --- a/crates/dojo-bindgen/src/plugins/typescript/mod.rs +++ b/crates/dojo-bindgen/src/plugins/typescript/mod.rs @@ -380,7 +380,7 @@ export function defineContractComponents(world: World) { } // Formats a contract tag into a pretty contract name - // eg. dojo_examples:actions -> Actions + // eg. dojo_examples-actions -> Actions fn formatted_contract_name(tag: &str) -> String { capitalize(&get_name_from_tag(tag)) } diff --git a/crates/dojo-bindgen/src/plugins/typescript_v2/mod.rs b/crates/dojo-bindgen/src/plugins/typescript_v2/mod.rs index 0617a9a56e..f3e62d468f 100644 --- a/crates/dojo-bindgen/src/plugins/typescript_v2/mod.rs +++ b/crates/dojo-bindgen/src/plugins/typescript_v2/mod.rs @@ -577,7 +577,7 @@ type {} = ", } // Formats a contract tag into a pretty contract name - // eg. dojo_examples:actions -> Actions + // eg. dojo_examples-actions -> Actions fn formatted_contract_name(tag: &str) -> String { capitalize(&get_name_from_tag(tag)) } diff --git a/crates/dojo-bindgen/src/plugins/unity/mod.rs b/crates/dojo-bindgen/src/plugins/unity/mod.rs index ec70421b24..6466825430 100644 --- a/crates/dojo-bindgen/src/plugins/unity/mod.rs +++ b/crates/dojo-bindgen/src/plugins/unity/mod.rs @@ -476,7 +476,7 @@ public class {} : ModelInstance {{ } // Formats a contract tag into a pretty contract name - // eg. dojo_examples:actions.json -> Actions + // eg. dojo_examples-actions.json -> Actions fn formatted_contract_name(tag: &str) -> String { capitalize(&get_name_from_tag(tag)) } diff --git a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/abis/base/contracts/compiler_cairo-cairo_v240-3005180b.json b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/abis/base/contracts/compiler_cairo-cairo_v240-3005180b.json new file mode 100644 index 0000000000..fdb8ff1c75 --- /dev/null +++ b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/abis/base/contracts/compiler_cairo-cairo_v240-3005180b.json @@ -0,0 +1,8 @@ +[ + { + "type": "event", + "name": "compiler_cairo::cairo_24::cairo_v240::Event", + "kind": "enum", + "variants": [] + } +] \ No newline at end of file diff --git a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/abis/base/contracts/compiler_cairo-cairo_v260-7358d0b8.json b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/abis/base/contracts/compiler_cairo-cairo_v260-7358d0b8.json new file mode 100644 index 0000000000..86eebdcf3f --- /dev/null +++ b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/abis/base/contracts/compiler_cairo-cairo_v260-7358d0b8.json @@ -0,0 +1,8 @@ +[ + { + "type": "event", + "name": "compiler_cairo::cairo_26::cairo_v260::Event", + "kind": "enum", + "variants": [] + } +] \ No newline at end of file diff --git a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/abis/base/dojo-base-4b7f9cd4.json b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/abis/base/dojo-base-4b7f9cd4.json new file mode 100644 index 0000000000..ee9ceaac66 --- /dev/null +++ b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/abis/base/dojo-base-4b7f9cd4.json @@ -0,0 +1,98 @@ +[ + { + "type": "impl", + "name": "WorldProviderImpl", + "interface_name": "dojo::world::IWorldProvider" + }, + { + "type": "struct", + "name": "dojo::world::IWorldDispatcher", + "members": [ + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress" + } + ] + }, + { + "type": "interface", + "name": "dojo::world::IWorldProvider", + "items": [ + { + "type": "function", + "name": "world", + "inputs": [], + "outputs": [ + { + "type": "dojo::world::IWorldDispatcher" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "UpgradableImpl", + "interface_name": "dojo::components::upgradeable::IUpgradeable" + }, + { + "type": "interface", + "name": "dojo::components::upgradeable::IUpgradeable", + "items": [ + { + "type": "function", + "name": "upgrade", + "inputs": [ + { + "name": "new_class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "constructor", + "name": "constructor", + "inputs": [] + }, + { + "type": "event", + "name": "dojo::components::upgradeable::upgradeable::Upgraded", + "kind": "struct", + "members": [ + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::components::upgradeable::upgradeable::Event", + "kind": "enum", + "variants": [ + { + "name": "Upgraded", + "type": "dojo::components::upgradeable::upgradeable::Upgraded", + "kind": "nested" + } + ] + }, + { + "type": "event", + "name": "dojo::base::base::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::components::upgradeable::upgradeable::Event", + "kind": "flat" + } + ] + } +] \ No newline at end of file diff --git a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/abis/base/dojo-world-580768b7.json b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/abis/base/dojo-world-580768b7.json new file mode 100644 index 0000000000..0e5e96210e --- /dev/null +++ b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/abis/base/dojo-world-580768b7.json @@ -0,0 +1,1105 @@ +[ + { + "type": "impl", + "name": "World", + "interface_name": "dojo::world::IWorld" + }, + { + "type": "struct", + "name": "core::byte_array::ByteArray", + "members": [ + { + "name": "data", + "type": "core::array::Array::" + }, + { + "name": "pending_word", + "type": "core::felt252" + }, + { + "name": "pending_word_len", + "type": "core::integer::u32" + } + ] + }, + { + "type": "struct", + "name": "dojo::resource_metadata::ResourceMetadata", + "members": [ + { + "name": "resource_id", + "type": "core::felt252" + }, + { + "name": "metadata_uri", + "type": "core::byte_array::ByteArray" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::database::introspect::FieldLayout", + "members": [ + { + "name": "selector", + "type": "core::felt252" + }, + { + "name": "layout", + "type": "dojo::database::introspect::Layout" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "enum", + "name": "dojo::database::introspect::Layout", + "variants": [ + { + "name": "Fixed", + "type": "core::array::Span::" + }, + { + "name": "Struct", + "type": "core::array::Span::" + }, + { + "name": "Tuple", + "type": "core::array::Span::" + }, + { + "name": "Array", + "type": "core::array::Span::" + }, + { + "name": "ByteArray", + "type": "()" + }, + { + "name": "Enum", + "type": "core::array::Span::" + } + ] + }, + { + "type": "enum", + "name": "core::bool", + "variants": [ + { + "name": "False", + "type": "()" + }, + { + "name": "True", + "type": "()" + } + ] + }, + { + "type": "interface", + "name": "dojo::world::IWorld", + "items": [ + { + "type": "function", + "name": "metadata", + "inputs": [ + { + "name": "resource_id", + "type": "core::felt252" + } + ], + "outputs": [ + { + "type": "dojo::resource_metadata::ResourceMetadata" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "set_metadata", + "inputs": [ + { + "name": "metadata", + "type": "dojo::resource_metadata::ResourceMetadata" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "model", + "inputs": [ + { + "name": "selector", + "type": "core::felt252" + } + ], + "outputs": [ + { + "type": "(core::starknet::class_hash::ClassHash, core::starknet::contract_address::ContractAddress)" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "register_model", + "inputs": [ + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "register_namespace", + "inputs": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "deploy_contract", + "inputs": [ + { + "name": "salt", + "type": "core::felt252" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash" + }, + { + "name": "init_calldata", + "type": "core::array::Span::" + } + ], + "outputs": [ + { + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "upgrade_contract", + "inputs": [ + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [ + { + "type": "core::starknet::class_hash::ClassHash" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "uuid", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "emit", + "inputs": [ + { + "name": "keys", + "type": "core::array::Array::" + }, + { + "name": "values", + "type": "core::array::Span::" + } + ], + "outputs": [], + "state_mutability": "view" + }, + { + "type": "function", + "name": "entity", + "inputs": [ + { + "name": "model", + "type": "core::felt252" + }, + { + "name": "keys", + "type": "core::array::Span::" + }, + { + "name": "layout", + "type": "dojo::database::introspect::Layout" + } + ], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "set_entity", + "inputs": [ + { + "name": "model", + "type": "core::felt252" + }, + { + "name": "keys", + "type": "core::array::Span::" + }, + { + "name": "values", + "type": "core::array::Span::" + }, + { + "name": "layout", + "type": "dojo::database::introspect::Layout" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "delete_entity", + "inputs": [ + { + "name": "model", + "type": "core::felt252" + }, + { + "name": "keys", + "type": "core::array::Span::" + }, + { + "name": "layout", + "type": "dojo::database::introspect::Layout" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "base", + "inputs": [], + "outputs": [ + { + "type": "core::starknet::class_hash::ClassHash" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "is_owner", + "inputs": [ + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "resource", + "type": "core::felt252" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "grant_owner", + "inputs": [ + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "resource", + "type": "core::felt252" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "revoke_owner", + "inputs": [ + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "resource", + "type": "core::felt252" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "is_writer", + "inputs": [ + { + "name": "resource", + "type": "core::felt252" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "grant_writer", + "inputs": [ + { + "name": "resource", + "type": "core::felt252" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "revoke_writer", + "inputs": [ + { + "name": "resource", + "type": "core::felt252" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "can_write_resource", + "inputs": [ + { + "name": "resource_id", + "type": "core::felt252" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "can_write_model", + "inputs": [ + { + "name": "model_id", + "type": "core::felt252" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "can_write_namespace", + "inputs": [ + { + "name": "namespace_id", + "type": "core::felt252" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "UpgradeableWorld", + "interface_name": "dojo::world::IUpgradeableWorld" + }, + { + "type": "interface", + "name": "dojo::world::IUpgradeableWorld", + "items": [ + { + "type": "function", + "name": "upgrade", + "inputs": [ + { + "name": "new_class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "impl", + "name": "UpgradeableState", + "interface_name": "dojo::interfaces::IUpgradeableState" + }, + { + "type": "struct", + "name": "dojo::interfaces::StorageUpdate", + "members": [ + { + "name": "key", + "type": "core::felt252" + }, + { + "name": "value", + "type": "core::felt252" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "dojo::interfaces::ProgramOutput", + "members": [ + { + "name": "prev_state_root", + "type": "core::felt252" + }, + { + "name": "new_state_root", + "type": "core::felt252" + }, + { + "name": "block_number", + "type": "core::felt252" + }, + { + "name": "block_hash", + "type": "core::felt252" + }, + { + "name": "config_hash", + "type": "core::felt252" + }, + { + "name": "world_da_hash", + "type": "core::felt252" + }, + { + "name": "message_to_starknet_segment", + "type": "core::array::Span::" + }, + { + "name": "message_to_appchain_segment", + "type": "core::array::Span::" + } + ] + }, + { + "type": "interface", + "name": "dojo::interfaces::IUpgradeableState", + "items": [ + { + "type": "function", + "name": "upgrade_state", + "inputs": [ + { + "name": "new_state", + "type": "core::array::Span::" + }, + { + "name": "program_output", + "type": "dojo::interfaces::ProgramOutput" + }, + { + "name": "program_hash", + "type": "core::felt252" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "impl", + "name": "ConfigImpl", + "interface_name": "dojo::config::interface::IConfig" + }, + { + "type": "interface", + "name": "dojo::config::interface::IConfig", + "items": [ + { + "type": "function", + "name": "set_differ_program_hash", + "inputs": [ + { + "name": "program_hash", + "type": "core::felt252" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "set_merger_program_hash", + "inputs": [ + { + "name": "program_hash", + "type": "core::felt252" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "get_differ_program_hash", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "get_merger_program_hash", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "set_facts_registry", + "inputs": [ + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "get_facts_registry", + "inputs": [], + "outputs": [ + { + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "constructor", + "name": "constructor", + "inputs": [ + { + "name": "contract_base", + "type": "core::starknet::class_hash::ClassHash" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::WorldSpawned", + "kind": "struct", + "members": [ + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "creator", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::ContractDeployed", + "kind": "struct", + "members": [ + { + "name": "salt", + "type": "core::felt252", + "kind": "data" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + }, + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "data" + }, + { + "name": "name", + "type": "core::byte_array::ByteArray", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::ContractUpgraded", + "kind": "struct", + "members": [ + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + }, + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::WorldUpgraded", + "kind": "struct", + "members": [ + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::MetadataUpdate", + "kind": "struct", + "members": [ + { + "name": "resource", + "type": "core::felt252", + "kind": "data" + }, + { + "name": "uri", + "type": "core::byte_array::ByteArray", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::NamespaceRegistered", + "kind": "struct", + "members": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "data" + }, + { + "name": "hash", + "type": "core::felt252", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::ModelRegistered", + "kind": "struct", + "members": [ + { + "name": "name", + "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", + "kind": "data" + }, + { + "name": "prev_class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + }, + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "prev_address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::StoreSetRecord", + "kind": "struct", + "members": [ + { + "name": "table", + "type": "core::felt252", + "kind": "data" + }, + { + "name": "keys", + "type": "core::array::Span::", + "kind": "data" + }, + { + "name": "values", + "type": "core::array::Span::", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::StoreDelRecord", + "kind": "struct", + "members": [ + { + "name": "table", + "type": "core::felt252", + "kind": "data" + }, + { + "name": "keys", + "type": "core::array::Span::", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::WriterUpdated", + "kind": "struct", + "members": [ + { + "name": "resource", + "type": "core::felt252", + "kind": "data" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "value", + "type": "core::bool", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::OwnerUpdated", + "kind": "struct", + "members": [ + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "resource", + "type": "core::felt252", + "kind": "data" + }, + { + "name": "value", + "type": "core::bool", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::config::component::Config::DifferProgramHashUpdate", + "kind": "struct", + "members": [ + { + "name": "program_hash", + "type": "core::felt252", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::config::component::Config::MergerProgramHashUpdate", + "kind": "struct", + "members": [ + { + "name": "program_hash", + "type": "core::felt252", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::config::component::Config::FactsRegistryUpdate", + "kind": "struct", + "members": [ + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::config::component::Config::Event", + "kind": "enum", + "variants": [ + { + "name": "DifferProgramHashUpdate", + "type": "dojo::config::component::Config::DifferProgramHashUpdate", + "kind": "nested" + }, + { + "name": "MergerProgramHashUpdate", + "type": "dojo::config::component::Config::MergerProgramHashUpdate", + "kind": "nested" + }, + { + "name": "FactsRegistryUpdate", + "type": "dojo::config::component::Config::FactsRegistryUpdate", + "kind": "nested" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::StateUpdated", + "kind": "struct", + "members": [ + { + "name": "da_hash", + "type": "core::felt252", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world::Event", + "kind": "enum", + "variants": [ + { + "name": "WorldSpawned", + "type": "dojo::world::world::WorldSpawned", + "kind": "nested" + }, + { + "name": "ContractDeployed", + "type": "dojo::world::world::ContractDeployed", + "kind": "nested" + }, + { + "name": "ContractUpgraded", + "type": "dojo::world::world::ContractUpgraded", + "kind": "nested" + }, + { + "name": "WorldUpgraded", + "type": "dojo::world::world::WorldUpgraded", + "kind": "nested" + }, + { + "name": "MetadataUpdate", + "type": "dojo::world::world::MetadataUpdate", + "kind": "nested" + }, + { + "name": "NamespaceRegistered", + "type": "dojo::world::world::NamespaceRegistered", + "kind": "nested" + }, + { + "name": "ModelRegistered", + "type": "dojo::world::world::ModelRegistered", + "kind": "nested" + }, + { + "name": "StoreSetRecord", + "type": "dojo::world::world::StoreSetRecord", + "kind": "nested" + }, + { + "name": "StoreDelRecord", + "type": "dojo::world::world::StoreDelRecord", + "kind": "nested" + }, + { + "name": "WriterUpdated", + "type": "dojo::world::world::WriterUpdated", + "kind": "nested" + }, + { + "name": "OwnerUpdated", + "type": "dojo::world::world::OwnerUpdated", + "kind": "nested" + }, + { + "name": "ConfigEvent", + "type": "dojo::config::component::Config::Event", + "kind": "nested" + }, + { + "name": "StateUpdated", + "type": "dojo::world::world::StateUpdated", + "kind": "nested" + } + ] + } +] \ No newline at end of file diff --git a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/contracts/compiler_cairo-cairo_v240-3005180b.toml b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/contracts/compiler_cairo-cairo_v240-3005180b.toml new file mode 100644 index 0000000000..a6f3f8765d --- /dev/null +++ b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/contracts/compiler_cairo-cairo_v240-3005180b.toml @@ -0,0 +1,11 @@ +kind = "DojoContract" +class_hash = "0x7468fbf6e47eb66fd898a4a68bbe801560fdd42b0d6909ec4f75fb38c613702" +original_class_hash = "0x7468fbf6e47eb66fd898a4a68bbe801560fdd42b0d6909ec4f75fb38c613702" +base_class_hash = "0x0" +abi = "manifests/dev/abis/base/contracts/compiler_cairo-cairo_v240-3005180b.json" +reads = [] +writes = [] +computed = [] +init_calldata = [] +tag = "compiler_cairo-cairo_v240" +manifest_name = "compiler_cairo-cairo_v240-3005180b" diff --git a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/contracts/compiler_cairo-cairo_v260-7358d0b8.toml b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/contracts/compiler_cairo-cairo_v260-7358d0b8.toml new file mode 100644 index 0000000000..4ee10e65a0 --- /dev/null +++ b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/contracts/compiler_cairo-cairo_v260-7358d0b8.toml @@ -0,0 +1,11 @@ +kind = "DojoContract" +class_hash = "0x4bbfcdc8d95ecfa332201e21f615e98b4d12e08f77d176761e32bb34e3bc333" +original_class_hash = "0x4bbfcdc8d95ecfa332201e21f615e98b4d12e08f77d176761e32bb34e3bc333" +base_class_hash = "0x0" +abi = "manifests/dev/abis/base/contracts/compiler_cairo-cairo_v260-7358d0b8.json" +reads = [] +writes = [] +computed = [] +init_calldata = [] +tag = "compiler_cairo-cairo_v260" +manifest_name = "compiler_cairo-cairo_v260-7358d0b8" diff --git a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-base-4b7f9cd4.toml b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-base-4b7f9cd4.toml new file mode 100644 index 0000000000..b76e475987 --- /dev/null +++ b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-base-4b7f9cd4.toml @@ -0,0 +1,6 @@ +kind = "Class" +class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" +original_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" +abi = "manifests/dev/abis/base/dojo-base-4b7f9cd4.json" +tag = "dojo-base" +manifest_name = "dojo-base-4b7f9cd4" diff --git a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-base.toml b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-base.toml index c1bf141c1a..4e2fc2e0bb 100644 --- a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-base.toml +++ b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-base.toml @@ -2,5 +2,5 @@ kind = "Class" class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" original_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" abi = "manifests/dev/abis/base/dojo-base.json" -tag = "dojo:base" +tag = "dojo-base" manifest_name = "dojo-base" diff --git a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world-580768b7.toml b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world-580768b7.toml new file mode 100644 index 0000000000..129c5b9765 --- /dev/null +++ b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world-580768b7.toml @@ -0,0 +1,6 @@ +kind = "Class" +class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" +original_class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" +abi = "manifests/dev/abis/base/dojo-world-580768b7.json" +tag = "dojo-world" +manifest_name = "dojo-world-580768b7" diff --git a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world.toml b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world.toml index 8296c6d29e..94821ba3f7 100644 --- a/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world.toml +++ b/crates/dojo-lang/src/manifest_test_data/compiler_cairo/manifests/dev/base/dojo-world.toml @@ -2,5 +2,5 @@ kind = "Class" class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" original_class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" abi = "manifests/dev/abis/base/dojo-world.json" -tag = "dojo:world" +tag = "dojo-world" manifest_name = "dojo-world" diff --git a/crates/dojo-lang/src/plugin_test_data/model b/crates/dojo-lang/src/plugin_test_data/model index 2b074c0cbc..620747c774 100644 --- a/crates/dojo-lang/src/plugin_test_data/model +++ b/crates/dojo-lang/src/plugin_test_data/model @@ -454,7 +454,7 @@ impl BadModelMultipleVersionsModel of dojo::model::Model ByteArray { - "dojo_plugin:BadModelMultipleVersions" + "dojo_plugin-BadModelMultipleVersions" } #[inline(always)] @@ -662,7 +662,7 @@ impl BadModelBadVersionTypeModel of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:BadModelBadVersionType" + "dojo_plugin-BadModelBadVersionType" } #[inline(always)] @@ -870,7 +870,7 @@ impl BadModelNoVersionValueModel of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:BadModelNoVersionValue" + "dojo_plugin-BadModelNoVersionValue" } #[inline(always)] @@ -1078,7 +1078,7 @@ impl BadModelUnexpectedArgWithValueModel of dojo::model::Model ByteArray { - "dojo_plugin:BadModelUnexpectedArgWithValue" + "dojo_plugin-BadModelUnexpectedArgWithValue" } #[inline(always)] @@ -1286,7 +1286,7 @@ impl BadModelUnexpectedArgModel of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:BadModelUnexpectedArg" + "dojo_plugin-BadModelUnexpectedArg" } #[inline(always)] @@ -1494,7 +1494,7 @@ impl BadModelNotSupportedVersionModel of dojo::model::Model ByteArray { - "dojo_plugin:BadModelNotSupportedVersion" + "dojo_plugin-BadModelNotSupportedVersion" } #[inline(always)] @@ -1702,7 +1702,7 @@ impl Modelv0Model of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:Modelv0" + "dojo_plugin-Modelv0" } #[inline(always)] @@ -1910,7 +1910,7 @@ impl ModelWithBadNamespaceFormatModel of dojo::model::Model ByteArray { - "MyNamespace:ModelWithBadNamespaceFormat" + "MyNamespace-ModelWithBadNamespaceFormat" } #[inline(always)] @@ -2118,7 +2118,7 @@ impl ModelWithShortStringNamespaceModel of dojo::model::Model ByteArray { - "my_namespace:ModelWithShortStringNamespace" + "my_namespace-ModelWithShortStringNamespace" } #[inline(always)] @@ -2326,7 +2326,7 @@ impl ModelWithStringNamespaceModel of dojo::model::Model ByteArray { - "my_namespace:ModelWithStringNamespace" + "my_namespace-ModelWithStringNamespace" } #[inline(always)] @@ -2534,7 +2534,7 @@ impl PositionModel of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:Position" + "dojo_plugin-Position" } #[inline(always)] @@ -2742,7 +2742,7 @@ impl RolesModel of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:Roles" + "dojo_plugin-Roles" } #[inline(always)] @@ -2942,7 +2942,7 @@ impl OnlyKeyModelModel of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:OnlyKeyModel" + "dojo_plugin-OnlyKeyModel" } #[inline(always)] @@ -3142,7 +3142,7 @@ impl U256KeyModelModel of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:U256KeyModel" + "dojo_plugin-U256KeyModel" } #[inline(always)] @@ -3355,7 +3355,7 @@ impl PlayerModel of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:Player" + "dojo_plugin-Player" } #[inline(always)] @@ -3577,7 +3577,7 @@ impl ModelWithSimpleArrayModel of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:ModelWithSimpleArray" + "dojo_plugin-ModelWithSimpleArray" } #[inline(always)] @@ -3795,7 +3795,7 @@ impl ModelWithByteArrayModel of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:ModelWithByteArray" + "dojo_plugin-ModelWithByteArray" } #[inline(always)] @@ -4017,7 +4017,7 @@ impl ModelWithComplexArrayModel of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:ModelWithComplexArray" + "dojo_plugin-ModelWithComplexArray" } #[inline(always)] @@ -4246,7 +4246,7 @@ impl ModelWithTupleModel of dojo::model::Model { #[inline(always)] fn tag() -> ByteArray { - "dojo_plugin:ModelWithTuple" + "dojo_plugin-ModelWithTuple" } #[inline(always)] @@ -4484,7 +4484,7 @@ impl ModelWithTupleNoPrimitivesModel of dojo::model::Model ByteArray { - "dojo_plugin:ModelWithTupleNoPrimitives" + "dojo_plugin-ModelWithTupleNoPrimitives" } #[inline(always)] diff --git a/crates/dojo-lang/src/plugin_test_data/system b/crates/dojo-lang/src/plugin_test_data/system index 2c519d1fca..54928c18d3 100644 --- a/crates/dojo-lang/src/plugin_test_data/system +++ b/crates/dojo-lang/src/plugin_test_data/system @@ -944,7 +944,7 @@ mod testcomponent2 { } fn tag(self: @ContractState) -> ByteArray { - "my_namespace:spawn" + "my_namespace-spawn" } } @@ -1019,7 +1019,7 @@ impl EventDrop of core::traits::Drop::; } fn tag(self: @ContractState) -> ByteArray { - "my_namespace:proxy" + "my_namespace-proxy" } } @@ -1091,7 +1091,7 @@ impl EventDrop of core::traits::Drop::; } fn tag(self: @ContractState) -> ByteArray { - "dojo_plugin:ctxnamed" + "dojo_plugin-ctxnamed" } } @@ -1166,7 +1166,7 @@ impl EventDrop of core::traits::Drop::; } fn tag(self: @ContractState) -> ByteArray { - "dojo_plugin:withevent" + "dojo_plugin-withevent" } } @@ -1242,7 +1242,7 @@ impl TestEventDrop of core::traits::Drop::; } fn tag(self: @ContractState) -> ByteArray { - "dojo_plugin:withcomponent" + "dojo_plugin-withcomponent" } } @@ -1358,7 +1358,7 @@ self: @TContractState, vec: Vec2, ref another_world: IWorldDispatcher } fn tag(self: @ContractState) -> ByteArray { - "dojo_plugin:MyFaultyContract" + "dojo_plugin-MyFaultyContract" } } @@ -1476,7 +1476,7 @@ impl EventDrop of core::traits::Drop::; } fn tag(self: @ContractState) -> ByteArray { - "dojo_plugin:MyNominalContract" + "dojo_plugin-MyNominalContract" } } @@ -1600,7 +1600,7 @@ impl EventDrop of core::traits::Drop::; } fn tag(self: @ContractState) -> ByteArray { - "dojo_plugin:init_test" + "dojo_plugin-init_test" } } @@ -1681,7 +1681,7 @@ impl EventDrop of core::traits::Drop::; } fn tag(self: @ContractState) -> ByteArray { - "dojo_plugin:no_init_test" + "dojo_plugin-no_init_test" } } diff --git a/crates/dojo-world/src/contracts/model_test.rs b/crates/dojo-world/src/contracts/model_test.rs index d8999221b2..61c307fc28 100644 --- a/crates/dojo-world/src/contracts/model_test.rs +++ b/crates/dojo-world/src/contracts/model_test.rs @@ -41,7 +41,7 @@ async fn test_model() { .await; let world = WorldContractReader::new(world_address, provider); - let position = world.model_reader("Dojo", "Position").await.unwrap(); + let position = world.model_reader("dojo_examples", "Position").await.unwrap(); let schema = position.schema().await.unwrap(); assert_eq!( @@ -79,7 +79,7 @@ async fn test_model() { assert_eq!( position.class_hash(), - felt!("0x027942375b09862291ece780c573e8c625df4ba41fd7524e0658ca75fff014ff") + felt!("0x059e57c16c3bc8c59a768a342496837275e399509366640620a0682826275a34") ); let moves = world.model_reader("Dojo", "Moves").await.unwrap(); diff --git a/crates/dojo-world/src/contracts/world_test.rs b/crates/dojo-world/src/contracts/world_test.rs index a5a84a0c61..a69c5a7ad1 100644 --- a/crates/dojo-world/src/contracts/world_test.rs +++ b/crates/dojo-world/src/contracts/world_test.rs @@ -12,6 +12,7 @@ use crate::metadata::dojo_metadata_from_workspace; use crate::migration::strategy::prepare_for_migration; use crate::migration::world::WorldDiff; use crate::migration::{Declarable, Deployable, TxnConfig}; +use crate::utils::TransactionExt; #[tokio::test(flavor = "multi_thread")] async fn test_world_contract_reader() { @@ -88,10 +89,7 @@ pub async fn deploy_world( strategy.resolve_variable(strategy.world_address().unwrap()).unwrap(); let base_class_hash = - strategy.base.unwrap().declare(&account, &TxnConfig::default()).await.unwrap().class_hash; - - // wait for the tx to be mined - tokio::time::sleep(Duration::from_millis(250)).await; + strategy.base.unwrap().declare(&account, &TxnConfig::init_wait()).await.unwrap().class_hash; let world_address = strategy .world @@ -100,7 +98,7 @@ pub async fn deploy_world( manifest.clone().world.inner.class_hash, vec![base_class_hash], &account, - &TxnConfig::default(), + &TxnConfig::init_wait(), ) .await .unwrap() @@ -108,24 +106,28 @@ pub async fn deploy_world( let mut declare_output = vec![]; for model in strategy.models { - let res = model.declare(&account, &TxnConfig::default()).await.unwrap(); + let res = model.declare(&account, &TxnConfig::init_wait()).await.unwrap(); declare_output.push(res); } - // wait for the tx to be mined - tokio::time::sleep(Duration::from_millis(250)).await; - let world = WorldContract::new(world_address, &account); + world + .register_namespace(&cainome::cairo_serde::ByteArray::from_string("dojo_examples").unwrap()) + .send_with_cfg(&TxnConfig::init_wait()) + .await + .unwrap(); + + // Wondering why the `init_wait` is not enough and causes a nonce error. + // May be to a delay to create the block as we are in instant mining. + tokio::time::sleep(Duration::from_millis(2000)).await; + let calls = declare_output .iter() .map(|o| world.register_model_getcall(&o.class_hash.into())) .collect::>(); - let _ = account.execute(calls).send().await.unwrap(); - - // wait for the tx to be mined - tokio::time::sleep(Duration::from_millis(250)).await; + let _ = account.execute(calls).send_with_cfg(&TxnConfig::init_wait()).await.unwrap(); for contract in strategy.contracts { let declare_res = contract.declare(&account, &TxnConfig::default()).await.unwrap(); @@ -135,15 +137,12 @@ pub async fn deploy_world( declare_res.class_hash, base_class_hash, &account, - &TxnConfig::default(), + &TxnConfig::init_wait(), &contract.diff.init_calldata, ) .await .unwrap(); } - // wait for the tx to be mined - tokio::time::sleep(Duration::from_millis(250)).await; - world_address } diff --git a/crates/dojo-world/src/manifest/utils.rs b/crates/dojo-world/src/manifest/utils.rs index f0c2414aaa..30e8bf3d49 100644 --- a/crates/dojo-world/src/manifest/utils.rs +++ b/crates/dojo-world/src/manifest/utils.rs @@ -5,8 +5,7 @@ use starknet::core::types::FieldElement; use starknet_crypto::poseidon_hash_many; pub const CONTRACT_NAME_SEPARATOR: &str = "::"; -pub const TAG_SEPARATOR: char = ':'; -pub const FILENAME_SEPARATOR: &str = "-"; +pub const TAG_SEPARATOR: char = '-'; pub const SELECTOR_CHUNK_SIZE: usize = 8; pub fn get_default_namespace_from_ws(ws: &Workspace<'_>) -> String { @@ -51,16 +50,16 @@ pub fn ensure_namespace(tag: &str, default_namespace: &str) -> String { } pub fn get_filename_from_tag(tag: &str) -> Result { - let (namespace, name) = split_tag(tag)?; - - if ["world", "base"].contains(&name.as_str()) { - return Ok(format!("{namespace}{FILENAME_SEPARATOR}{name}")); + if [format!("dojo{TAG_SEPARATOR}world").as_str(), format!("dojo{TAG_SEPARATOR}base").as_str()] + .contains(&tag) + { + return Ok(tag.to_string()); } - let mut selector = format!("{:x}", compute_bytearray_hash(&name)); + let mut selector = format!("{:x}", compute_model_selector_from_tag(tag)); selector.truncate(SELECTOR_CHUNK_SIZE); - Ok(format!("{namespace}{FILENAME_SEPARATOR}{name}{FILENAME_SEPARATOR}{selector}")) + Ok(format!("{tag}{TAG_SEPARATOR}{selector}")) } // TODO: should not be useful with a standard WORLD/BASE name diff --git a/crates/dojo-world/src/metadata_test.rs b/crates/dojo-world/src/metadata_test.rs index e7767bdc40..51a9c16ecc 100644 --- a/crates/dojo-world/src/metadata_test.rs +++ b/crates/dojo-world/src/metadata_test.rs @@ -6,9 +6,7 @@ use dojo_test_utils::compiler; use scarb::ops; use url::Url; -use crate::manifest::utils::{ - get_filename_from_special_contract_name, FILENAME_SEPARATOR, TAG_SEPARATOR, -}; +use crate::manifest::utils::{get_filename_from_special_contract_name, TAG_SEPARATOR}; use crate::manifest::{CONTRACTS_DIR, MODELS_DIR, WORLD_CONTRACT_NAME}; use crate::metadata::{ dojo_metadata_from_workspace, ArtifactMetadata, ProjectMetadata, Uri, WorldMetadata, ABIS_DIR, @@ -240,7 +238,7 @@ fn get_artifacts_from_manifest(manifest_dir: &Utf8PathBuf) -> Vec<(&str, String) } fn get_tag_from_filename(filename: &str) -> String { - let parts = filename.split(FILENAME_SEPARATOR).collect::>(); + let parts = filename.split(TAG_SEPARATOR).collect::>(); assert!(parts.len() >= 2); format!("{}{TAG_SEPARATOR}{}", parts[0], parts[1]) } diff --git a/crates/dojo-world/src/migration/mod.rs b/crates/dojo-world/src/migration/mod.rs index 77bd78c67b..cd18b62386 100644 --- a/crates/dojo-world/src/migration/mod.rs +++ b/crates/dojo-world/src/migration/mod.rs @@ -207,6 +207,7 @@ pub trait Deployable: Declarable + Sync { } Err(ProviderError::StarknetError(StarknetError::ContractNotFound)) => { + println!("calldada {:?}", calldata); let init_calldata: Vec = calldata .iter() .map(|s| FieldElement::from_str(s)) diff --git a/crates/dojo-world/src/migration/world_test.rs b/crates/dojo-world/src/migration/world_test.rs index 432305b97c..ac9b4b2e1b 100644 --- a/crates/dojo-world/src/migration/world_test.rs +++ b/crates/dojo-world/src/migration/world_test.rs @@ -137,12 +137,12 @@ fn diff_when_local_and_remote_are_different() { #[test] fn updating_order_as_expected() { let init_calldata = vec![ - ("ns", "c4", vec!["$contract_address:ns:c1", "0x0"]), + ("ns", "c4", vec!["$contract_address:ns-c1", "0x0"]), ("ns", "c3", vec!["0x0"]), - ("ns", "c5", vec!["$contract_address:ns:c4", "0x0"]), - ("ns", "c7", vec!["$contract_address:ns:c4", "0x0"]), + ("ns", "c5", vec!["$contract_address:ns-c4", "0x0"]), + ("ns", "c7", vec!["$contract_address:ns-c4", "0x0"]), ("ns", "c2", vec!["0x0"]), - ("ns", "c6", vec!["$contract_address:ns:c4", "$contract_address:ns:c3", "0x0"]), + ("ns", "c6", vec!["$contract_address:ns-c4", "$contract_address:ns-c3", "0x0"]), ("ns", "c1", vec!["0x0"]), ]; @@ -164,7 +164,7 @@ fn updating_order_as_expected() { diff.update_order("ns").unwrap(); - let expected_order = ["ns:c1", "ns:c2", "ns:c3", "ns:c4", "ns:c5", "ns:c6", "ns:c7"]; + let expected_order = ["ns-c1", "ns-c2", "ns-c3", "ns-c4", "ns-c5", "ns-c6", "ns-c7"]; for (i, contract) in diff.contracts.iter().enumerate() { assert_eq!(contract.tag, expected_order[i]); } @@ -173,12 +173,12 @@ fn updating_order_as_expected() { #[test] fn updating_order_when_cyclic_dependency_fail() { let init_calldata = vec![ - ("ns", "c4", vec!["$contract_address:ns:c1", "$contract_address:ns:c6", "0x0"]), + ("ns", "c4", vec!["$contract_address:ns-c1", "$contract_address:ns-c6", "0x0"]), ("ns", "c3", vec!["0x0"]), - ("ns", "c5", vec!["$contract_address:ns:c4", "0x0"]), - ("ns", "c7", vec!["$contract_address:ns:c4", "0x0"]), + ("ns", "c5", vec!["$contract_address:ns-c4", "0x0"]), + ("ns", "c7", vec!["$contract_address:ns-c4", "0x0"]), ("ns", "c2", vec!["0x0"]), - ("ns", "c6", vec!["$contract_address:ns:c4", "$contract_address:ns:c3", "0x0"]), + ("ns", "c6", vec!["$contract_address:ns-c4", "$contract_address:ns-c3", "0x0"]), ("ns", "c1", vec!["0x0"]), ]; diff --git a/crates/sozo/ops/src/events.rs b/crates/sozo/ops/src/events.rs index 69f7122d44..bc5b9e28c6 100644 --- a/crates/sozo/ops/src/events.rs +++ b/crates/sozo/ops/src/events.rs @@ -78,13 +78,14 @@ fn is_event(token: &Token) -> bool { fn extract_events( manifest: &DeploymentManifest, - manifest_dir: &Utf8PathBuf, + project_dir: &Utf8PathBuf, target_dir: &Utf8PathBuf, ) -> Result>> { fn process_abi( events: &mut HashMap>, full_abi_path: &Utf8PathBuf, ) -> Result<()> { + println!("full_abi_path {:?}", full_abi_path); let abi_str = fs::read_to_string(full_abi_path)?; match AbiParser::tokens_from_abi_string(&abi_str, &HashMap::new()) { @@ -107,14 +108,14 @@ fn extract_events( for contract in &manifest.contracts { if let Some(AbiFormat::Path(abi_path)) = contract.inner.abi() { - let full_abi_path = manifest_dir.join(abi_path); + let full_abi_path = project_dir.join(abi_path); process_abi(&mut events_map, &full_abi_path)?; } } for model in &manifest.models { if let Some(AbiFormat::Path(abi_path)) = model.inner.abi() { - let full_abi_path = manifest_dir.join(abi_path); + let full_abi_path = project_dir.join(abi_path); process_abi(&mut events_map, &full_abi_path)?; } } @@ -275,13 +276,15 @@ mod tests { let profile_name = "dev"; let project_dir = Utf8Path::new("../../../examples/spawn-and-move").to_path_buf(); let manifest_dir = project_dir.join(MANIFESTS_DIR).join(profile_name); + println!("manifest_dir {:?}", manifest_dir); let target_dir = project_dir.join(TARGET_DIR).join(profile_name); + println!("target dir {:?}", target_dir); let manifest = BaseManifest::load_from_path(&manifest_dir.join(BASE_DIR)).unwrap().into(); - let result = extract_events(&manifest, &manifest_dir, &target_dir).unwrap(); + let result = extract_events(&manifest, &project_dir, &target_dir).unwrap(); // we are just collecting all events from manifest file so just verifying count should work - assert_eq!(result.len(), 15); + assert_eq!(result.len(), 16); } #[test] diff --git a/crates/sozo/ops/src/tests/auth.rs b/crates/sozo/ops/src/tests/auth.rs index 80df7be990..1566dd5868 100644 --- a/crates/sozo/ops/src/tests/auth.rs +++ b/crates/sozo/ops/src/tests/auth.rs @@ -10,7 +10,7 @@ use super::setup; use crate::auth::{self, ModelContract, OwnerResource, ResourceType}; use crate::execute; -const ACTION_CONTRACT_NAME: &str = "dojo_examples::actions::actions"; +const ACTION_CONTRACT_NAME: &str = "dojo_examples-actions"; #[tokio::test(flavor = "multi_thread")] async fn auth_grant_writer_ok() { diff --git a/crates/sozo/ops/src/tests/call.rs b/crates/sozo/ops/src/tests/call.rs index 84d6c4f5bc..d380511999 100644 --- a/crates/sozo/ops/src/tests/call.rs +++ b/crates/sozo/ops/src/tests/call.rs @@ -9,8 +9,11 @@ use starknet_crypto::FieldElement; use super::setup; use crate::{call, utils}; -const CONTRACT_NAME: &str = "dojo_examples::actions::actions"; -const ENTRYPOINT: &str = "tile_terrain"; +const CONTRACT_TAG: &str = "dojo_examples-actions"; +const ENTRYPOINT: &str = "get_player_position"; + +// TODO: we should work on a lazy static init for the runner for all the call tests, +// as the state will not change, we only read and check the result. #[tokio::test] async fn call_with_bad_address() { @@ -65,7 +68,7 @@ async fn call_with_bad_entrypoint() { assert!( call::call( world_reader, - CONTRACT_NAME.to_string(), + CONTRACT_TAG.to_string(), "BadEntryPoint".to_string(), vec![FieldElement::ZERO, FieldElement::ZERO], None @@ -84,9 +87,15 @@ async fn call_with_bad_calldata() { let world_reader = WorldContractReader::new(world.address, provider); assert!( - call::call(world_reader, CONTRACT_NAME.to_string(), ENTRYPOINT.to_string(), vec![], None) - .await - .is_err() + call::call( + world_reader, + CONTRACT_TAG.to_string(), + ENTRYPOINT.to_string(), + vec![FieldElement::ZERO], + None + ) + .await + .is_err() ); } @@ -98,17 +107,13 @@ async fn call_with_contract_name() { let provider = sequencer.provider(); let world_reader = WorldContractReader::new(world.address, provider); - assert!( - call::call( - world_reader, - CONTRACT_NAME.to_string(), - ENTRYPOINT.to_string(), - vec![FieldElement::ZERO, FieldElement::ZERO], - None, - ) - .await - .is_ok() - ); + let r = + call::call(world_reader, CONTRACT_TAG.to_string(), ENTRYPOINT.to_string(), vec![], None) + .await; + + println!("r {:?}", r); + + assert!(r.is_ok()); } #[tokio::test] @@ -121,7 +126,7 @@ async fn call_with_contract_address() { let contract_address = utils::get_contract_address::< SingleOwnerAccount, LocalWallet>, - >(&world, CONTRACT_NAME.to_string()) + >(&world, CONTRACT_TAG.to_string()) .await .unwrap(); @@ -130,7 +135,7 @@ async fn call_with_contract_address() { world_reader, format!("{:#x}", contract_address), ENTRYPOINT.to_string(), - vec![FieldElement::ZERO, FieldElement::ZERO], + vec![], None, ) .await diff --git a/crates/sozo/ops/src/tests/setup.rs b/crates/sozo/ops/src/tests/setup.rs index 4829aef757..01c783dc64 100644 --- a/crates/sozo/ops/src/tests/setup.rs +++ b/crates/sozo/ops/src/tests/setup.rs @@ -87,7 +87,9 @@ pub async fn setup( let config = load_config(); let ws = setup_ws(&config); - let migration = setup_migration(&config)?; + let mut migration = setup_migration(&config)?; + let _ = + migration.resolve_variable(migration.world_address().expect("world address must exist")); let mut account = sequencer.account(0); account.set_block_id(BlockId::Tag(BlockTag::Pending)); diff --git a/crates/sozo/ops/src/tests/utils.rs b/crates/sozo/ops/src/tests/utils.rs index 765075757d..bef86c78f0 100644 --- a/crates/sozo/ops/src/tests/utils.rs +++ b/crates/sozo/ops/src/tests/utils.rs @@ -7,7 +7,7 @@ use starknet::core::types::{BlockId, BlockTag, FieldElement}; use super::setup; use crate::utils; -const ACTION_CONTRACT_TAG: &str = "dojo_examples:actions"; +const ACTION_CONTRACT_TAG: &str = "dojo_examples-actions"; #[tokio::test(flavor = "multi_thread")] async fn get_contract_address_from_world() { diff --git a/examples/spawn-and-move/Scarb.toml b/examples/spawn-and-move/Scarb.toml index 1fd306bc47..2761cb8919 100644 --- a/examples/spawn-and-move/Scarb.toml +++ b/examples/spawn-and-move/Scarb.toml @@ -27,7 +27,7 @@ rpc_url = "http://localhost:5050/" # Default account for katana with seed = 0 account_address = "0x6162896d1d7ab204c7ccac6dd5f8e9e7c25ecd5ae4fcb4ad32e57786bb46e03" private_key = "0x1800000000300000180000000000030000000000003006001800006600" -#world_address = "0x5ceb94c01aab2606c2ba56d37578b8451aca5e210c5776075ef8a52ee9c1acb" +#world_address = "0x104dd156d76aeab45146a10869637f161ca6cf9f804704f8bbb12ae5b1b5cfb" # `release` profile # diff --git a/examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples-actions-49cbe40e.json b/examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples-actions-40b6994c.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples-actions-49cbe40e.json rename to examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples-actions-40b6994c.json diff --git a/examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples-mock_token-1e060b45.json b/examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples-mock_token-31599eb2.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples-mock_token-1e060b45.json rename to examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples-mock_token-31599eb2.json diff --git a/examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples-others-1297eb86.json b/examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples-others-61de2c18.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples-others-1297eb86.json rename to examples/spawn-and-move/manifests/dev/abis/base/contracts/dojo_examples-others-61de2c18.json diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-ContractInitialized-56eeab26.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-ContractInitialized-376b7bd6.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-ContractInitialized-56eeab26.json rename to examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-ContractInitialized-376b7bd6.json diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Message-2b1e4414.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Message-1bb1d226.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Message-2b1e4414.json rename to examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Message-1bb1d226.json diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-MockToken-14cc132d.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-MockToken-38903c7c.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-MockToken-14cc132d.json rename to examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-MockToken-38903c7c.json diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Moved-6a1e458e.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Moved-318ae40d.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Moved-6a1e458e.json rename to examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Moved-318ae40d.json diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Moves-5e0bed36.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Moves-2e2accba.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Moves-5e0bed36.json rename to examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Moves-2e2accba.json diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-PlayerConfig-2d357dac.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-PlayerConfig-3adad785.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-PlayerConfig-2d357dac.json rename to examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-PlayerConfig-3adad785.json diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Position-6694bf61.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Position-1e145e26.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Position-6694bf61.json rename to examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-Position-1e145e26.json diff --git a/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-ServerProfile-71e0f153.json b/examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-ServerProfile-4caad1e6.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-ServerProfile-71e0f153.json rename to examples/spawn-and-move/manifests/dev/abis/base/models/dojo_examples-ServerProfile-4caad1e6.json diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/contracts/dojo_examples-actions-49cbe40e.json b/examples/spawn-and-move/manifests/dev/abis/deployments/contracts/dojo_examples-actions-40b6994c.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/deployments/contracts/dojo_examples-actions-49cbe40e.json rename to examples/spawn-and-move/manifests/dev/abis/deployments/contracts/dojo_examples-actions-40b6994c.json diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/contracts/dojo_examples-mock_token-1e060b45.json b/examples/spawn-and-move/manifests/dev/abis/deployments/contracts/dojo_examples-mock_token-31599eb2.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/deployments/contracts/dojo_examples-mock_token-1e060b45.json rename to examples/spawn-and-move/manifests/dev/abis/deployments/contracts/dojo_examples-mock_token-31599eb2.json diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/contracts/dojo_examples-others-1297eb86.json b/examples/spawn-and-move/manifests/dev/abis/deployments/contracts/dojo_examples-others-61de2c18.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/deployments/contracts/dojo_examples-others-1297eb86.json rename to examples/spawn-and-move/manifests/dev/abis/deployments/contracts/dojo_examples-others-61de2c18.json diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-ContractInitialized-56eeab26.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-ContractInitialized-376b7bd6.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-ContractInitialized-56eeab26.json rename to examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-ContractInitialized-376b7bd6.json diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Message-2b1e4414.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Message-1bb1d226.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Message-2b1e4414.json rename to examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Message-1bb1d226.json diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-MockToken-14cc132d.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-MockToken-38903c7c.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-MockToken-14cc132d.json rename to examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-MockToken-38903c7c.json diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Moved-6a1e458e.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Moved-318ae40d.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Moved-6a1e458e.json rename to examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Moved-318ae40d.json diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Moves-5e0bed36.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Moves-2e2accba.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Moves-5e0bed36.json rename to examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Moves-2e2accba.json diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-PlayerConfig-2d357dac.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-PlayerConfig-3adad785.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-PlayerConfig-2d357dac.json rename to examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-PlayerConfig-3adad785.json diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Position-6694bf61.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Position-1e145e26.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Position-6694bf61.json rename to examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-Position-1e145e26.json diff --git a/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-ServerProfile-71e0f153.json b/examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-ServerProfile-4caad1e6.json similarity index 100% rename from examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-ServerProfile-71e0f153.json rename to examples/spawn-and-move/manifests/dev/abis/deployments/models/dojo_examples-ServerProfile-4caad1e6.json diff --git a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-actions-40b6994c.toml b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-actions-40b6994c.toml new file mode 100644 index 0000000000..34d9543e28 --- /dev/null +++ b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-actions-40b6994c.toml @@ -0,0 +1,11 @@ +kind = "DojoContract" +class_hash = "0x7b394d087b5cf4f3b740253c591138bf98d177ef0d9b5c00b0477a145f3fb75" +original_class_hash = "0x7b394d087b5cf4f3b740253c591138bf98d177ef0d9b5c00b0477a145f3fb75" +base_class_hash = "0x0" +abi = "manifests/dev/abis/base/contracts/dojo_examples-actions-40b6994c.json" +reads = [] +writes = [] +computed = [] +init_calldata = [] +tag = "dojo_examples-actions" +manifest_name = "dojo_examples-actions-40b6994c" diff --git a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-actions-49cbe40e.toml b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-actions-49cbe40e.toml deleted file mode 100644 index 5bf6de2eed..0000000000 --- a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-actions-49cbe40e.toml +++ /dev/null @@ -1,11 +0,0 @@ -kind = "DojoContract" -class_hash = "0x1e25819012944715e33045da9b9f1bced52553412935816b3886cffe5ce0d90" -original_class_hash = "0x1e25819012944715e33045da9b9f1bced52553412935816b3886cffe5ce0d90" -base_class_hash = "0x0" -abi = "manifests/dev/abis/base/contracts/dojo_examples-actions-49cbe40e.json" -reads = [] -writes = [] -computed = [] -init_calldata = [] -tag = "dojo_examples:actions" -manifest_name = "dojo_examples-actions-49cbe40e" diff --git a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-mock_token-1e060b45.toml b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-mock_token-1e060b45.toml deleted file mode 100644 index dde42036eb..0000000000 --- a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-mock_token-1e060b45.toml +++ /dev/null @@ -1,11 +0,0 @@ -kind = "DojoContract" -class_hash = "0x35cec8c62ba7a93be10ec69e8e8a0e3963b83873dc0679102f20e011a3dae94" -original_class_hash = "0x35cec8c62ba7a93be10ec69e8e8a0e3963b83873dc0679102f20e011a3dae94" -base_class_hash = "0x0" -abi = "manifests/dev/abis/base/contracts/dojo_examples-mock_token-1e060b45.json" -reads = [] -writes = [] -computed = [] -init_calldata = [] -tag = "dojo_examples:mock_token" -manifest_name = "dojo_examples-mock_token-1e060b45" diff --git a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-mock_token-31599eb2.toml b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-mock_token-31599eb2.toml new file mode 100644 index 0000000000..1a2a64dea4 --- /dev/null +++ b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-mock_token-31599eb2.toml @@ -0,0 +1,11 @@ +kind = "DojoContract" +class_hash = "0x6a55b3f612b0bc5e55603d805c188c0220aa53017fd2f690abe8bad50867ef2" +original_class_hash = "0x6a55b3f612b0bc5e55603d805c188c0220aa53017fd2f690abe8bad50867ef2" +base_class_hash = "0x0" +abi = "manifests/dev/abis/base/contracts/dojo_examples-mock_token-31599eb2.json" +reads = [] +writes = [] +computed = [] +init_calldata = [] +tag = "dojo_examples-mock_token" +manifest_name = "dojo_examples-mock_token-31599eb2" diff --git a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-others-1297eb86.toml b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-others-1297eb86.toml deleted file mode 100644 index a6efe48e1c..0000000000 --- a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-others-1297eb86.toml +++ /dev/null @@ -1,11 +0,0 @@ -kind = "DojoContract" -class_hash = "0x6e4c6cc2e7bc17b82246ee99a3b2a3dcb5d7dd8f7666858e0baa86a1e2ac4f6" -original_class_hash = "0x6e4c6cc2e7bc17b82246ee99a3b2a3dcb5d7dd8f7666858e0baa86a1e2ac4f6" -base_class_hash = "0x0" -abi = "manifests/dev/abis/base/contracts/dojo_examples-others-1297eb86.json" -reads = [] -writes = [] -computed = [] -init_calldata = [] -tag = "dojo_examples:others" -manifest_name = "dojo_examples-others-1297eb86" diff --git a/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-others-61de2c18.toml b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-others-61de2c18.toml new file mode 100644 index 0000000000..31438c1f0f --- /dev/null +++ b/examples/spawn-and-move/manifests/dev/base/contracts/dojo_examples-others-61de2c18.toml @@ -0,0 +1,11 @@ +kind = "DojoContract" +class_hash = "0x3a61e2fafaee0ca4ed5166fbb417270563b4d8518cd1e086733cc346e8ea6b9" +original_class_hash = "0x3a61e2fafaee0ca4ed5166fbb417270563b4d8518cd1e086733cc346e8ea6b9" +base_class_hash = "0x0" +abi = "manifests/dev/abis/base/contracts/dojo_examples-others-61de2c18.json" +reads = [] +writes = [] +computed = [] +init_calldata = [] +tag = "dojo_examples-others" +manifest_name = "dojo_examples-others-61de2c18" diff --git a/examples/spawn-and-move/manifests/dev/base/dojo-base.toml b/examples/spawn-and-move/manifests/dev/base/dojo-base.toml index c1bf141c1a..4e2fc2e0bb 100644 --- a/examples/spawn-and-move/manifests/dev/base/dojo-base.toml +++ b/examples/spawn-and-move/manifests/dev/base/dojo-base.toml @@ -2,5 +2,5 @@ kind = "Class" class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" original_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" abi = "manifests/dev/abis/base/dojo-base.json" -tag = "dojo:base" +tag = "dojo-base" manifest_name = "dojo-base" diff --git a/examples/spawn-and-move/manifests/dev/base/dojo-world.toml b/examples/spawn-and-move/manifests/dev/base/dojo-world.toml index 8296c6d29e..94821ba3f7 100644 --- a/examples/spawn-and-move/manifests/dev/base/dojo-world.toml +++ b/examples/spawn-and-move/manifests/dev/base/dojo-world.toml @@ -2,5 +2,5 @@ kind = "Class" class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" original_class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" abi = "manifests/dev/abis/base/dojo-world.json" -tag = "dojo:world" +tag = "dojo-world" manifest_name = "dojo-world" diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ContractInitialized-376b7bd6.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ContractInitialized-376b7bd6.toml new file mode 100644 index 0000000000..0aacc170a4 --- /dev/null +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ContractInitialized-376b7bd6.toml @@ -0,0 +1,21 @@ +kind = "DojoModel" +class_hash = "0x1ba185f6f09a7a73f32e6e1d6767c182abe5635d3107c79b64dfdb9f25b3c3a" +original_class_hash = "0x1ba185f6f09a7a73f32e6e1d6767c182abe5635d3107c79b64dfdb9f25b3c3a" +abi = "manifests/dev/abis/base/models/dojo_examples-ContractInitialized-376b7bd6.json" +tag = "dojo_examples-ContractInitialized" +manifest_name = "dojo_examples-ContractInitialized-376b7bd6" + +[[members]] +name = "contract_address" +type = "ContractAddress" +key = true + +[[members]] +name = "contract_class" +type = "ClassHash" +key = false + +[[members]] +name = "value" +type = "u8" +key = false diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ContractInitialized-56eeab26.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ContractInitialized-56eeab26.toml deleted file mode 100644 index 30a97d02f5..0000000000 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ContractInitialized-56eeab26.toml +++ /dev/null @@ -1,21 +0,0 @@ -kind = "DojoModel" -class_hash = "0x37b7d94c2c6a4284b109149f76349ba513cf5459e46f3688a875c4921eab510" -original_class_hash = "0x37b7d94c2c6a4284b109149f76349ba513cf5459e46f3688a875c4921eab510" -abi = "manifests/dev/abis/base/models/dojo_examples-ContractInitialized-56eeab26.json" -tag = "dojo_examples:ContractInitialized" -manifest_name = "dojo_examples-ContractInitialized-56eeab26" - -[[members]] -name = "contract_address" -type = "ContractAddress" -key = true - -[[members]] -name = "contract_class" -type = "ClassHash" -key = false - -[[members]] -name = "value" -type = "u8" -key = false diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Message-1bb1d226.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Message-1bb1d226.toml new file mode 100644 index 0000000000..698d0a8f0e --- /dev/null +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Message-1bb1d226.toml @@ -0,0 +1,26 @@ +kind = "DojoModel" +class_hash = "0x6d9703c6df6af6f097cfdd2e7f838f4fd2b2f2ae27bf27e76065ffb903f9c9b" +original_class_hash = "0x6d9703c6df6af6f097cfdd2e7f838f4fd2b2f2ae27bf27e76065ffb903f9c9b" +abi = "manifests/dev/abis/base/models/dojo_examples-Message-1bb1d226.json" +tag = "dojo_examples-Message" +manifest_name = "dojo_examples-Message-1bb1d226" + +[[members]] +name = "identity" +type = "ContractAddress" +key = true + +[[members]] +name = "channel" +type = "felt252" +key = true + +[[members]] +name = "message" +type = "ByteArray" +key = false + +[[members]] +name = "salt" +type = "felt252" +key = true diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Message-2b1e4414.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Message-2b1e4414.toml deleted file mode 100644 index 58340db1b2..0000000000 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Message-2b1e4414.toml +++ /dev/null @@ -1,26 +0,0 @@ -kind = "DojoModel" -class_hash = "0x60a1c33b918cb63ec0842285b67ae18dd6ba22a95baaaceffb370db630eeaa4" -original_class_hash = "0x60a1c33b918cb63ec0842285b67ae18dd6ba22a95baaaceffb370db630eeaa4" -abi = "manifests/dev/abis/base/models/dojo_examples-Message-2b1e4414.json" -tag = "dojo_examples:Message" -manifest_name = "dojo_examples-Message-2b1e4414" - -[[members]] -name = "identity" -type = "ContractAddress" -key = true - -[[members]] -name = "channel" -type = "felt252" -key = true - -[[members]] -name = "message" -type = "ByteArray" -key = false - -[[members]] -name = "salt" -type = "felt252" -key = true diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-MockToken-14cc132d.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-MockToken-14cc132d.toml deleted file mode 100644 index 70dd4b857b..0000000000 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-MockToken-14cc132d.toml +++ /dev/null @@ -1,16 +0,0 @@ -kind = "DojoModel" -class_hash = "0x5c18f631d0a009b44cd7b3ef25e4ab240d22a995843511d1d924056f2e3d895" -original_class_hash = "0x5c18f631d0a009b44cd7b3ef25e4ab240d22a995843511d1d924056f2e3d895" -abi = "manifests/dev/abis/base/models/dojo_examples-MockToken-14cc132d.json" -tag = "dojo_examples:MockToken" -manifest_name = "dojo_examples-MockToken-14cc132d" - -[[members]] -name = "account" -type = "ContractAddress" -key = true - -[[members]] -name = "amount" -type = "u128" -key = false diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-MockToken-38903c7c.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-MockToken-38903c7c.toml new file mode 100644 index 0000000000..b607d23d57 --- /dev/null +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-MockToken-38903c7c.toml @@ -0,0 +1,16 @@ +kind = "DojoModel" +class_hash = "0x637d1d7966a14967047e31f3512c694e32b4d6a6dda4afe4b225a8b6f8f3519" +original_class_hash = "0x637d1d7966a14967047e31f3512c694e32b4d6a6dda4afe4b225a8b6f8f3519" +abi = "manifests/dev/abis/base/models/dojo_examples-MockToken-38903c7c.json" +tag = "dojo_examples-MockToken" +manifest_name = "dojo_examples-MockToken-38903c7c" + +[[members]] +name = "account" +type = "ContractAddress" +key = true + +[[members]] +name = "amount" +type = "u128" +key = false diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moved-318ae40d.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moved-318ae40d.toml new file mode 100644 index 0000000000..c8e044bd5a --- /dev/null +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moved-318ae40d.toml @@ -0,0 +1,16 @@ +kind = "DojoModel" +class_hash = "0x838672e7f67cd6e67336283805b0ef168c814e65b6ba1d3a7a5f31c10559c4" +original_class_hash = "0x838672e7f67cd6e67336283805b0ef168c814e65b6ba1d3a7a5f31c10559c4" +abi = "manifests/dev/abis/base/models/dojo_examples-Moved-318ae40d.json" +tag = "dojo_examples-Moved" +manifest_name = "dojo_examples-Moved-318ae40d" + +[[members]] +name = "player" +type = "ContractAddress" +key = true + +[[members]] +name = "direction" +type = "Direction" +key = false diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moved-6a1e458e.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moved-6a1e458e.toml deleted file mode 100644 index 62aad07290..0000000000 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moved-6a1e458e.toml +++ /dev/null @@ -1,16 +0,0 @@ -kind = "DojoModel" -class_hash = "0x8099d73f0af5737215041df37d770768fba4265b9a68de9c4e02d49bfaa1c5" -original_class_hash = "0x8099d73f0af5737215041df37d770768fba4265b9a68de9c4e02d49bfaa1c5" -abi = "manifests/dev/abis/base/models/dojo_examples-Moved-6a1e458e.json" -tag = "dojo_examples:Moved" -manifest_name = "dojo_examples-Moved-6a1e458e" - -[[members]] -name = "player" -type = "ContractAddress" -key = true - -[[members]] -name = "direction" -type = "Direction" -key = false diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moves-2e2accba.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moves-2e2accba.toml new file mode 100644 index 0000000000..0a661e61c7 --- /dev/null +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moves-2e2accba.toml @@ -0,0 +1,21 @@ +kind = "DojoModel" +class_hash = "0x4e9b10687f487bc0fe159affa3963cf0f7548136a2b614914e11af4497d609" +original_class_hash = "0x4e9b10687f487bc0fe159affa3963cf0f7548136a2b614914e11af4497d609" +abi = "manifests/dev/abis/base/models/dojo_examples-Moves-2e2accba.json" +tag = "dojo_examples-Moves" +manifest_name = "dojo_examples-Moves-2e2accba" + +[[members]] +name = "player" +type = "ContractAddress" +key = true + +[[members]] +name = "remaining" +type = "u8" +key = false + +[[members]] +name = "last_direction" +type = "Direction" +key = false diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moves-5e0bed36.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moves-5e0bed36.toml deleted file mode 100644 index 041e474058..0000000000 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Moves-5e0bed36.toml +++ /dev/null @@ -1,21 +0,0 @@ -kind = "DojoModel" -class_hash = "0x3cbcfee00a2e31140eb046e290926355f64f763c99ac18a81636c73bc35d4ec" -original_class_hash = "0x3cbcfee00a2e31140eb046e290926355f64f763c99ac18a81636c73bc35d4ec" -abi = "manifests/dev/abis/base/models/dojo_examples-Moves-5e0bed36.json" -tag = "dojo_examples:Moves" -manifest_name = "dojo_examples-Moves-5e0bed36" - -[[members]] -name = "player" -type = "ContractAddress" -key = true - -[[members]] -name = "remaining" -type = "u8" -key = false - -[[members]] -name = "last_direction" -type = "Direction" -key = false diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-PlayerConfig-2d357dac.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-PlayerConfig-3adad785.toml similarity index 55% rename from examples/spawn-and-move/manifests/dev/base/models/dojo_examples-PlayerConfig-2d357dac.toml rename to examples/spawn-and-move/manifests/dev/base/models/dojo_examples-PlayerConfig-3adad785.toml index d805dbdc3e..a83db11151 100644 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-PlayerConfig-2d357dac.toml +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-PlayerConfig-3adad785.toml @@ -1,9 +1,9 @@ kind = "DojoModel" -class_hash = "0x54c9f0eb172362bb3b69499d0a3ff634d52cfc8909b38713bd6872467fec76a" -original_class_hash = "0x54c9f0eb172362bb3b69499d0a3ff634d52cfc8909b38713bd6872467fec76a" -abi = "manifests/dev/abis/base/models/dojo_examples-PlayerConfig-2d357dac.json" -tag = "dojo_examples:PlayerConfig" -manifest_name = "dojo_examples-PlayerConfig-2d357dac" +class_hash = "0x3b94d89f5b3589438b8ffcf2cbc8061670deee1d0f81247ab2346d8991b4eca" +original_class_hash = "0x3b94d89f5b3589438b8ffcf2cbc8061670deee1d0f81247ab2346d8991b4eca" +abi = "manifests/dev/abis/base/models/dojo_examples-PlayerConfig-3adad785.json" +tag = "dojo_examples-PlayerConfig" +manifest_name = "dojo_examples-PlayerConfig-3adad785" [[members]] name = "player" diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Position-1e145e26.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Position-1e145e26.toml new file mode 100644 index 0000000000..6eea086fef --- /dev/null +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Position-1e145e26.toml @@ -0,0 +1,16 @@ +kind = "DojoModel" +class_hash = "0x59e57c16c3bc8c59a768a342496837275e399509366640620a0682826275a34" +original_class_hash = "0x59e57c16c3bc8c59a768a342496837275e399509366640620a0682826275a34" +abi = "manifests/dev/abis/base/models/dojo_examples-Position-1e145e26.json" +tag = "dojo_examples-Position" +manifest_name = "dojo_examples-Position-1e145e26" + +[[members]] +name = "player" +type = "ContractAddress" +key = true + +[[members]] +name = "vec" +type = "Vec2" +key = false diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Position-6694bf61.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Position-6694bf61.toml deleted file mode 100644 index 3c8d253747..0000000000 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-Position-6694bf61.toml +++ /dev/null @@ -1,16 +0,0 @@ -kind = "DojoModel" -class_hash = "0x4cc7ad8362c56d99136d6f814aa9ab924ed50b5cdc5269fa8a536ee0f8b4bd2" -original_class_hash = "0x4cc7ad8362c56d99136d6f814aa9ab924ed50b5cdc5269fa8a536ee0f8b4bd2" -abi = "manifests/dev/abis/base/models/dojo_examples-Position-6694bf61.json" -tag = "dojo_examples:Position" -manifest_name = "dojo_examples-Position-6694bf61" - -[[members]] -name = "player" -type = "ContractAddress" -key = true - -[[members]] -name = "vec" -type = "Vec2" -key = false diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ServerProfile-4caad1e6.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ServerProfile-4caad1e6.toml new file mode 100644 index 0000000000..4b77f78c88 --- /dev/null +++ b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ServerProfile-4caad1e6.toml @@ -0,0 +1,21 @@ +kind = "DojoModel" +class_hash = "0x38986e1b875d48b2931932879412cf0b6c52d0e04aaac6e2780995b3f47b91b" +original_class_hash = "0x38986e1b875d48b2931932879412cf0b6c52d0e04aaac6e2780995b3f47b91b" +abi = "manifests/dev/abis/base/models/dojo_examples-ServerProfile-4caad1e6.json" +tag = "dojo_examples-ServerProfile" +manifest_name = "dojo_examples-ServerProfile-4caad1e6" + +[[members]] +name = "player" +type = "ContractAddress" +key = true + +[[members]] +name = "server_id" +type = "u32" +key = true + +[[members]] +name = "name" +type = "ByteArray" +key = false diff --git a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ServerProfile-71e0f153.toml b/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ServerProfile-71e0f153.toml deleted file mode 100644 index 4d78d450e7..0000000000 --- a/examples/spawn-and-move/manifests/dev/base/models/dojo_examples-ServerProfile-71e0f153.toml +++ /dev/null @@ -1,21 +0,0 @@ -kind = "DojoModel" -class_hash = "0x66a806d59e69873946a5b06e0e3df94c2f9cb139d8cc32f73e4f9ebc0ff885" -original_class_hash = "0x66a806d59e69873946a5b06e0e3df94c2f9cb139d8cc32f73e4f9ebc0ff885" -abi = "manifests/dev/abis/base/models/dojo_examples-ServerProfile-71e0f153.json" -tag = "dojo_examples:ServerProfile" -manifest_name = "dojo_examples-ServerProfile-71e0f153" - -[[members]] -name = "player" -type = "ContractAddress" -key = true - -[[members]] -name = "server_id" -type = "u32" -key = true - -[[members]] -name = "name" -type = "ByteArray" -key = false diff --git a/examples/spawn-and-move/manifests/dev/manifest.json b/examples/spawn-and-move/manifests/dev/manifest.json index 82fe6fdac2..847540f56f 100644 --- a/examples/spawn-and-move/manifests/dev/manifest.json +++ b/examples/spawn-and-move/manifests/dev/manifest.json @@ -1123,15 +1123,15 @@ "class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", "original_class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", "abi": "manifests/dev/abis/base/dojo-base.json", - "tag": "dojo:base", + "tag": "dojo-base", "manifest_name": "dojo-base" }, "contracts": [ { "kind": "DojoContract", "address": "0x2a570e12405096e725508ba1f4ade127edd42e0fcb5890b8f12f76ef043623", - "class_hash": "0x1e25819012944715e33045da9b9f1bced52553412935816b3886cffe5ce0d90", - "original_class_hash": "0x1e25819012944715e33045da9b9f1bced52553412935816b3886cffe5ce0d90", + "class_hash": "0x7b394d087b5cf4f3b740253c591138bf98d177ef0d9b5c00b0477a145f3fb75", + "original_class_hash": "0x7b394d087b5cf4f3b740253c591138bf98d177ef0d9b5c00b0477a145f3fb75", "base_class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", "abi": [ { @@ -1505,14 +1505,14 @@ "writes": [], "computed": [], "init_calldata": [], - "tag": "dojo_examples:actions", - "manifest_name": "dojo_examples-actions-49cbe40e" + "tag": "dojo_examples-actions", + "manifest_name": "dojo_examples-actions-40b6994c" }, { "kind": "DojoContract", "address": "0x26f33e8d81dad06c79c2d944ea519a850e007eb8432ae20d38db82caea590b2", - "class_hash": "0x35cec8c62ba7a93be10ec69e8e8a0e3963b83873dc0679102f20e011a3dae94", - "original_class_hash": "0x35cec8c62ba7a93be10ec69e8e8a0e3963b83873dc0679102f20e011a3dae94", + "class_hash": "0x6a55b3f612b0bc5e55603d805c188c0220aa53017fd2f690abe8bad50867ef2", + "original_class_hash": "0x6a55b3f612b0bc5e55603d805c188c0220aa53017fd2f690abe8bad50867ef2", "base_class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", "abi": [ { @@ -1713,14 +1713,14 @@ "writes": [], "computed": [], "init_calldata": [], - "tag": "dojo_examples:mock_token", - "manifest_name": "dojo_examples-mock_token-1e060b45" + "tag": "dojo_examples-mock_token", + "manifest_name": "dojo_examples-mock_token-31599eb2" }, { "kind": "DojoContract", "address": "0x3304896afaa421f362b3b8e8586773f9a7fcaca050b3fd6885400908803f344", - "class_hash": "0x6e4c6cc2e7bc17b82246ee99a3b2a3dcb5d7dd8f7666858e0baa86a1e2ac4f6", - "original_class_hash": "0x6e4c6cc2e7bc17b82246ee99a3b2a3dcb5d7dd8f7666858e0baa86a1e2ac4f6", + "class_hash": "0x3a61e2fafaee0ca4ed5166fbb417270563b4d8518cd1e086733cc346e8ea6b9", + "original_class_hash": "0x3a61e2fafaee0ca4ed5166fbb417270563b4d8518cd1e086733cc346e8ea6b9", "base_class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", "abi": [ { @@ -1934,12 +1934,12 @@ "writes": [], "computed": [], "init_calldata": [ - "$contract_address:dojo_examples:actions", - "$class_hash:dojo_examples:actions", + "$contract_address:dojo_examples-actions", + "$class_hash:dojo_examples-actions", "10" ], - "tag": "dojo_examples:others", - "manifest_name": "dojo_examples-others-1297eb86" + "tag": "dojo_examples-others", + "manifest_name": "dojo_examples-others-61de2c18" } ], "models": [ @@ -1962,8 +1962,8 @@ "key": false } ], - "class_hash": "0x37b7d94c2c6a4284b109149f76349ba513cf5459e46f3688a875c4921eab510", - "original_class_hash": "0x37b7d94c2c6a4284b109149f76349ba513cf5459e46f3688a875c4921eab510", + "class_hash": "0x1ba185f6f09a7a73f32e6e1d6767c182abe5635d3107c79b64dfdb9f25b3c3a", + "original_class_hash": "0x1ba185f6f09a7a73f32e6e1d6767c182abe5635d3107c79b64dfdb9f25b3c3a", "abi": [ { "type": "impl", @@ -2364,8 +2364,8 @@ "variants": [] } ], - "tag": "dojo_examples:ContractInitialized", - "manifest_name": "dojo_examples-ContractInitialized-56eeab26" + "tag": "dojo_examples-ContractInitialized", + "manifest_name": "dojo_examples-ContractInitialized-376b7bd6" }, { "kind": "DojoModel", @@ -2391,8 +2391,8 @@ "key": true } ], - "class_hash": "0x60a1c33b918cb63ec0842285b67ae18dd6ba22a95baaaceffb370db630eeaa4", - "original_class_hash": "0x60a1c33b918cb63ec0842285b67ae18dd6ba22a95baaaceffb370db630eeaa4", + "class_hash": "0x6d9703c6df6af6f097cfdd2e7f838f4fd2b2f2ae27bf27e76065ffb903f9c9b", + "original_class_hash": "0x6d9703c6df6af6f097cfdd2e7f838f4fd2b2f2ae27bf27e76065ffb903f9c9b", "abi": [ { "type": "impl", @@ -2797,8 +2797,8 @@ "variants": [] } ], - "tag": "dojo_examples:Message", - "manifest_name": "dojo_examples-Message-2b1e4414" + "tag": "dojo_examples-Message", + "manifest_name": "dojo_examples-Message-1bb1d226" }, { "kind": "DojoModel", @@ -2814,8 +2814,8 @@ "key": false } ], - "class_hash": "0x5c18f631d0a009b44cd7b3ef25e4ab240d22a995843511d1d924056f2e3d895", - "original_class_hash": "0x5c18f631d0a009b44cd7b3ef25e4ab240d22a995843511d1d924056f2e3d895", + "class_hash": "0x637d1d7966a14967047e31f3512c694e32b4d6a6dda4afe4b225a8b6f8f3519", + "original_class_hash": "0x637d1d7966a14967047e31f3512c694e32b4d6a6dda4afe4b225a8b6f8f3519", "abi": [ { "type": "impl", @@ -3212,8 +3212,8 @@ "variants": [] } ], - "tag": "dojo_examples:MockToken", - "manifest_name": "dojo_examples-MockToken-14cc132d" + "tag": "dojo_examples-MockToken", + "manifest_name": "dojo_examples-MockToken-38903c7c" }, { "kind": "DojoModel", @@ -3229,8 +3229,8 @@ "key": false } ], - "class_hash": "0x8099d73f0af5737215041df37d770768fba4265b9a68de9c4e02d49bfaa1c5", - "original_class_hash": "0x8099d73f0af5737215041df37d770768fba4265b9a68de9c4e02d49bfaa1c5", + "class_hash": "0x838672e7f67cd6e67336283805b0ef168c814e65b6ba1d3a7a5f31c10559c4", + "original_class_hash": "0x838672e7f67cd6e67336283805b0ef168c814e65b6ba1d3a7a5f31c10559c4", "abi": [ { "type": "impl", @@ -3653,8 +3653,8 @@ "variants": [] } ], - "tag": "dojo_examples:Moved", - "manifest_name": "dojo_examples-Moved-6a1e458e" + "tag": "dojo_examples-Moved", + "manifest_name": "dojo_examples-Moved-318ae40d" }, { "kind": "DojoModel", @@ -3675,8 +3675,8 @@ "key": false } ], - "class_hash": "0x3cbcfee00a2e31140eb046e290926355f64f763c99ac18a81636c73bc35d4ec", - "original_class_hash": "0x3cbcfee00a2e31140eb046e290926355f64f763c99ac18a81636c73bc35d4ec", + "class_hash": "0x4e9b10687f487bc0fe159affa3963cf0f7548136a2b614914e11af4497d609", + "original_class_hash": "0x4e9b10687f487bc0fe159affa3963cf0f7548136a2b614914e11af4497d609", "abi": [ { "type": "impl", @@ -4103,8 +4103,8 @@ "variants": [] } ], - "tag": "dojo_examples:Moves", - "manifest_name": "dojo_examples-Moves-5e0bed36" + "tag": "dojo_examples-Moves", + "manifest_name": "dojo_examples-Moves-2e2accba" }, { "kind": "DojoModel", @@ -4130,8 +4130,8 @@ "key": false } ], - "class_hash": "0x54c9f0eb172362bb3b69499d0a3ff634d52cfc8909b38713bd6872467fec76a", - "original_class_hash": "0x54c9f0eb172362bb3b69499d0a3ff634d52cfc8909b38713bd6872467fec76a", + "class_hash": "0x3b94d89f5b3589438b8ffcf2cbc8061670deee1d0f81247ab2346d8991b4eca", + "original_class_hash": "0x3b94d89f5b3589438b8ffcf2cbc8061670deee1d0f81247ab2346d8991b4eca", "abi": [ { "type": "impl", @@ -4550,8 +4550,8 @@ "variants": [] } ], - "tag": "dojo_examples:PlayerConfig", - "manifest_name": "dojo_examples-PlayerConfig-2d357dac" + "tag": "dojo_examples-PlayerConfig", + "manifest_name": "dojo_examples-PlayerConfig-3adad785" }, { "kind": "DojoModel", @@ -4567,8 +4567,8 @@ "key": false } ], - "class_hash": "0x4cc7ad8362c56d99136d6f814aa9ab924ed50b5cdc5269fa8a536ee0f8b4bd2", - "original_class_hash": "0x4cc7ad8362c56d99136d6f814aa9ab924ed50b5cdc5269fa8a536ee0f8b4bd2", + "class_hash": "0x59e57c16c3bc8c59a768a342496837275e399509366640620a0682826275a34", + "original_class_hash": "0x59e57c16c3bc8c59a768a342496837275e399509366640620a0682826275a34", "abi": [ { "type": "impl", @@ -4979,8 +4979,8 @@ "variants": [] } ], - "tag": "dojo_examples:Position", - "manifest_name": "dojo_examples-Position-6694bf61" + "tag": "dojo_examples-Position", + "manifest_name": "dojo_examples-Position-1e145e26" }, { "kind": "DojoModel", @@ -5001,8 +5001,8 @@ "key": false } ], - "class_hash": "0x66a806d59e69873946a5b06e0e3df94c2f9cb139d8cc32f73e4f9ebc0ff885", - "original_class_hash": "0x66a806d59e69873946a5b06e0e3df94c2f9cb139d8cc32f73e4f9ebc0ff885", + "class_hash": "0x38986e1b875d48b2931932879412cf0b6c52d0e04aaac6e2780995b3f47b91b", + "original_class_hash": "0x38986e1b875d48b2931932879412cf0b6c52d0e04aaac6e2780995b3f47b91b", "abi": [ { "type": "impl", @@ -5403,8 +5403,8 @@ "variants": [] } ], - "tag": "dojo_examples:ServerProfile", - "manifest_name": "dojo_examples-ServerProfile-71e0f153" + "tag": "dojo_examples-ServerProfile", + "manifest_name": "dojo_examples-ServerProfile-4caad1e6" } ] } \ No newline at end of file diff --git a/examples/spawn-and-move/manifests/dev/manifest.toml b/examples/spawn-and-move/manifests/dev/manifest.toml index f00194f10a..5d18c7f523 100644 --- a/examples/spawn-and-move/manifests/dev/manifest.toml +++ b/examples/spawn-and-move/manifests/dev/manifest.toml @@ -18,62 +18,62 @@ kind = "Class" class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" original_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" abi = "manifests/dev/abis/base/dojo-base.json" -tag = "dojo:base" +tag = "dojo-base" manifest_name = "dojo-base" [[contracts]] kind = "DojoContract" address = "0x2a570e12405096e725508ba1f4ade127edd42e0fcb5890b8f12f76ef043623" -class_hash = "0x1e25819012944715e33045da9b9f1bced52553412935816b3886cffe5ce0d90" -original_class_hash = "0x1e25819012944715e33045da9b9f1bced52553412935816b3886cffe5ce0d90" +class_hash = "0x7b394d087b5cf4f3b740253c591138bf98d177ef0d9b5c00b0477a145f3fb75" +original_class_hash = "0x7b394d087b5cf4f3b740253c591138bf98d177ef0d9b5c00b0477a145f3fb75" base_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" -abi = "abis/deployments/contracts/dojo_examples-actions-49cbe40e.json" +abi = "abis/deployments/contracts/dojo_examples-actions-40b6994c.json" reads = [] writes = [] computed = [] init_calldata = [] -tag = "dojo_examples:actions" -manifest_name = "dojo_examples-actions-49cbe40e" +tag = "dojo_examples-actions" +manifest_name = "dojo_examples-actions-40b6994c" [[contracts]] kind = "DojoContract" address = "0x26f33e8d81dad06c79c2d944ea519a850e007eb8432ae20d38db82caea590b2" -class_hash = "0x35cec8c62ba7a93be10ec69e8e8a0e3963b83873dc0679102f20e011a3dae94" -original_class_hash = "0x35cec8c62ba7a93be10ec69e8e8a0e3963b83873dc0679102f20e011a3dae94" +class_hash = "0x6a55b3f612b0bc5e55603d805c188c0220aa53017fd2f690abe8bad50867ef2" +original_class_hash = "0x6a55b3f612b0bc5e55603d805c188c0220aa53017fd2f690abe8bad50867ef2" base_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" -abi = "abis/deployments/contracts/dojo_examples-mock_token-1e060b45.json" +abi = "abis/deployments/contracts/dojo_examples-mock_token-31599eb2.json" reads = [] writes = [] computed = [] init_calldata = [] -tag = "dojo_examples:mock_token" -manifest_name = "dojo_examples-mock_token-1e060b45" +tag = "dojo_examples-mock_token" +manifest_name = "dojo_examples-mock_token-31599eb2" [[contracts]] kind = "DojoContract" address = "0x3304896afaa421f362b3b8e8586773f9a7fcaca050b3fd6885400908803f344" -class_hash = "0x6e4c6cc2e7bc17b82246ee99a3b2a3dcb5d7dd8f7666858e0baa86a1e2ac4f6" -original_class_hash = "0x6e4c6cc2e7bc17b82246ee99a3b2a3dcb5d7dd8f7666858e0baa86a1e2ac4f6" +class_hash = "0x3a61e2fafaee0ca4ed5166fbb417270563b4d8518cd1e086733cc346e8ea6b9" +original_class_hash = "0x3a61e2fafaee0ca4ed5166fbb417270563b4d8518cd1e086733cc346e8ea6b9" base_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" -abi = "abis/deployments/contracts/dojo_examples-others-1297eb86.json" +abi = "abis/deployments/contracts/dojo_examples-others-61de2c18.json" reads = [] writes = [] computed = [] init_calldata = [ - "$contract_address:dojo_examples:actions", - "$class_hash:dojo_examples:actions", + "$contract_address:dojo_examples-actions", + "$class_hash:dojo_examples-actions", "10", ] -tag = "dojo_examples:others" -manifest_name = "dojo_examples-others-1297eb86" +tag = "dojo_examples-others" +manifest_name = "dojo_examples-others-61de2c18" [[models]] kind = "DojoModel" -class_hash = "0x37b7d94c2c6a4284b109149f76349ba513cf5459e46f3688a875c4921eab510" -original_class_hash = "0x37b7d94c2c6a4284b109149f76349ba513cf5459e46f3688a875c4921eab510" -abi = "abis/deployments/models/dojo_examples-ContractInitialized-56eeab26.json" -tag = "dojo_examples:ContractInitialized" -manifest_name = "dojo_examples-ContractInitialized-56eeab26" +class_hash = "0x1ba185f6f09a7a73f32e6e1d6767c182abe5635d3107c79b64dfdb9f25b3c3a" +original_class_hash = "0x1ba185f6f09a7a73f32e6e1d6767c182abe5635d3107c79b64dfdb9f25b3c3a" +abi = "abis/deployments/models/dojo_examples-ContractInitialized-376b7bd6.json" +tag = "dojo_examples-ContractInitialized" +manifest_name = "dojo_examples-ContractInitialized-376b7bd6" [[models.members]] name = "contract_address" @@ -92,11 +92,11 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x60a1c33b918cb63ec0842285b67ae18dd6ba22a95baaaceffb370db630eeaa4" -original_class_hash = "0x60a1c33b918cb63ec0842285b67ae18dd6ba22a95baaaceffb370db630eeaa4" -abi = "abis/deployments/models/dojo_examples-Message-2b1e4414.json" -tag = "dojo_examples:Message" -manifest_name = "dojo_examples-Message-2b1e4414" +class_hash = "0x6d9703c6df6af6f097cfdd2e7f838f4fd2b2f2ae27bf27e76065ffb903f9c9b" +original_class_hash = "0x6d9703c6df6af6f097cfdd2e7f838f4fd2b2f2ae27bf27e76065ffb903f9c9b" +abi = "abis/deployments/models/dojo_examples-Message-1bb1d226.json" +tag = "dojo_examples-Message" +manifest_name = "dojo_examples-Message-1bb1d226" [[models.members]] name = "identity" @@ -120,11 +120,11 @@ key = true [[models]] kind = "DojoModel" -class_hash = "0x5c18f631d0a009b44cd7b3ef25e4ab240d22a995843511d1d924056f2e3d895" -original_class_hash = "0x5c18f631d0a009b44cd7b3ef25e4ab240d22a995843511d1d924056f2e3d895" -abi = "abis/deployments/models/dojo_examples-MockToken-14cc132d.json" -tag = "dojo_examples:MockToken" -manifest_name = "dojo_examples-MockToken-14cc132d" +class_hash = "0x637d1d7966a14967047e31f3512c694e32b4d6a6dda4afe4b225a8b6f8f3519" +original_class_hash = "0x637d1d7966a14967047e31f3512c694e32b4d6a6dda4afe4b225a8b6f8f3519" +abi = "abis/deployments/models/dojo_examples-MockToken-38903c7c.json" +tag = "dojo_examples-MockToken" +manifest_name = "dojo_examples-MockToken-38903c7c" [[models.members]] name = "account" @@ -138,11 +138,11 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x8099d73f0af5737215041df37d770768fba4265b9a68de9c4e02d49bfaa1c5" -original_class_hash = "0x8099d73f0af5737215041df37d770768fba4265b9a68de9c4e02d49bfaa1c5" -abi = "abis/deployments/models/dojo_examples-Moved-6a1e458e.json" -tag = "dojo_examples:Moved" -manifest_name = "dojo_examples-Moved-6a1e458e" +class_hash = "0x838672e7f67cd6e67336283805b0ef168c814e65b6ba1d3a7a5f31c10559c4" +original_class_hash = "0x838672e7f67cd6e67336283805b0ef168c814e65b6ba1d3a7a5f31c10559c4" +abi = "abis/deployments/models/dojo_examples-Moved-318ae40d.json" +tag = "dojo_examples-Moved" +manifest_name = "dojo_examples-Moved-318ae40d" [[models.members]] name = "player" @@ -156,11 +156,11 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x3cbcfee00a2e31140eb046e290926355f64f763c99ac18a81636c73bc35d4ec" -original_class_hash = "0x3cbcfee00a2e31140eb046e290926355f64f763c99ac18a81636c73bc35d4ec" -abi = "abis/deployments/models/dojo_examples-Moves-5e0bed36.json" -tag = "dojo_examples:Moves" -manifest_name = "dojo_examples-Moves-5e0bed36" +class_hash = "0x4e9b10687f487bc0fe159affa3963cf0f7548136a2b614914e11af4497d609" +original_class_hash = "0x4e9b10687f487bc0fe159affa3963cf0f7548136a2b614914e11af4497d609" +abi = "abis/deployments/models/dojo_examples-Moves-2e2accba.json" +tag = "dojo_examples-Moves" +manifest_name = "dojo_examples-Moves-2e2accba" [[models.members]] name = "player" @@ -179,11 +179,11 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x54c9f0eb172362bb3b69499d0a3ff634d52cfc8909b38713bd6872467fec76a" -original_class_hash = "0x54c9f0eb172362bb3b69499d0a3ff634d52cfc8909b38713bd6872467fec76a" -abi = "abis/deployments/models/dojo_examples-PlayerConfig-2d357dac.json" -tag = "dojo_examples:PlayerConfig" -manifest_name = "dojo_examples-PlayerConfig-2d357dac" +class_hash = "0x3b94d89f5b3589438b8ffcf2cbc8061670deee1d0f81247ab2346d8991b4eca" +original_class_hash = "0x3b94d89f5b3589438b8ffcf2cbc8061670deee1d0f81247ab2346d8991b4eca" +abi = "abis/deployments/models/dojo_examples-PlayerConfig-3adad785.json" +tag = "dojo_examples-PlayerConfig" +manifest_name = "dojo_examples-PlayerConfig-3adad785" [[models.members]] name = "player" @@ -207,11 +207,11 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x4cc7ad8362c56d99136d6f814aa9ab924ed50b5cdc5269fa8a536ee0f8b4bd2" -original_class_hash = "0x4cc7ad8362c56d99136d6f814aa9ab924ed50b5cdc5269fa8a536ee0f8b4bd2" -abi = "abis/deployments/models/dojo_examples-Position-6694bf61.json" -tag = "dojo_examples:Position" -manifest_name = "dojo_examples-Position-6694bf61" +class_hash = "0x59e57c16c3bc8c59a768a342496837275e399509366640620a0682826275a34" +original_class_hash = "0x59e57c16c3bc8c59a768a342496837275e399509366640620a0682826275a34" +abi = "abis/deployments/models/dojo_examples-Position-1e145e26.json" +tag = "dojo_examples-Position" +manifest_name = "dojo_examples-Position-1e145e26" [[models.members]] name = "player" @@ -225,11 +225,11 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x66a806d59e69873946a5b06e0e3df94c2f9cb139d8cc32f73e4f9ebc0ff885" -original_class_hash = "0x66a806d59e69873946a5b06e0e3df94c2f9cb139d8cc32f73e4f9ebc0ff885" -abi = "abis/deployments/models/dojo_examples-ServerProfile-71e0f153.json" -tag = "dojo_examples:ServerProfile" -manifest_name = "dojo_examples-ServerProfile-71e0f153" +class_hash = "0x38986e1b875d48b2931932879412cf0b6c52d0e04aaac6e2780995b3f47b91b" +original_class_hash = "0x38986e1b875d48b2931932879412cf0b6c52d0e04aaac6e2780995b3f47b91b" +abi = "abis/deployments/models/dojo_examples-ServerProfile-4caad1e6.json" +tag = "dojo_examples-ServerProfile" +manifest_name = "dojo_examples-ServerProfile-4caad1e6" [[models.members]] name = "player" diff --git a/examples/spawn-and-move/overlays/dev/others.toml b/examples/spawn-and-move/overlays/dev/others.toml index 908c10f0f0..effbcca1da 100644 --- a/examples/spawn-and-move/overlays/dev/others.toml +++ b/examples/spawn-and-move/overlays/dev/others.toml @@ -1,2 +1,2 @@ -tag = "dojo_examples:others" -init_calldata = ["$contract_address:dojo_examples:actions", "$class_hash:dojo_examples:actions", "10"] +tag = "dojo_examples-others" +init_calldata = ["$contract_address:dojo_examples-actions", "$class_hash:dojo_examples-actions", "10"]