From b1d51bfa2c998fafad866631dcc4b4bba42b15ea Mon Sep 17 00:00:00 2001 From: ponderingdemocritus Date: Sun, 7 Jul 2024 14:57:57 +0200 Subject: [PATCH 01/10] bump to 1 --- Scarb.lock | 10 +- Scarb.toml | 6 +- ...son => dojo_starter-actions-7a1c7102.json} | 70 ++++++++++- manifests/dev/abis/base/dojo-base.json | 98 +++++++++++++++ ...{dojo_world_world.json => dojo-world.json} | 117 +++++++++++++++++- ...starter-DirectionsAvailable-77844f1f.json} | 33 +++++ ....json => dojo_starter-Moved-504403e5.json} | 33 +++++ ....json => dojo_starter-Moves-2a29373f.json} | 33 +++++ ...on => dojo_starter-Position-2ac8b4c1.json} | 33 +++++ .../dojo_starter-actions-7a1c7102.toml | 11 ++ .../dojo_starter_systems_actions_actions.toml | 10 -- .../{dojo_base_base.toml => dojo-base.toml} | 4 +- manifests/dev/base/dojo-world.toml | 6 + manifests/dev/base/dojo_world_world.toml | 5 - ..._starter-DirectionsAvailable-77844f1f.toml | 16 +++ .../models/dojo_starter-Moved-504403e5.toml | 16 +++ .../models/dojo_starter-Moves-2a29373f.toml | 26 ++++ .../dojo_starter-Position-2ac8b4c1.toml | 16 +++ ...ter_models_moves_directions_available.toml | 15 --- .../dojo_starter_models_moves_moves.toml | 25 ---- ...dojo_starter_models_position_position.toml | 15 --- ...starter_systems_actions_actions_moved.toml | 15 --- 22 files changed, 512 insertions(+), 101 deletions(-) rename manifests/dev/abis/base/contracts/{dojo_starter_systems_actions_actions.json => dojo_starter-actions-7a1c7102.json} (72%) create mode 100644 manifests/dev/abis/base/dojo-base.json rename manifests/dev/abis/base/{dojo_world_world.json => dojo-world.json} (89%) rename manifests/dev/abis/base/models/{dojo_starter_models_moves_directions_available.json => dojo_starter-DirectionsAvailable-77844f1f.json} (92%) rename manifests/dev/abis/base/models/{dojo_starter_systems_actions_actions_moved.json => dojo_starter-Moved-504403e5.json} (92%) rename manifests/dev/abis/base/models/{dojo_starter_models_moves_moves.json => dojo_starter-Moves-2a29373f.json} (92%) rename manifests/dev/abis/base/models/{dojo_starter_models_position_position.json => dojo_starter-Position-2ac8b4c1.json} (92%) create mode 100644 manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml delete mode 100644 manifests/dev/base/contracts/dojo_starter_systems_actions_actions.toml rename manifests/dev/base/{dojo_base_base.toml => dojo-base.toml} (66%) create mode 100644 manifests/dev/base/dojo-world.toml delete mode 100644 manifests/dev/base/dojo_world_world.toml create mode 100644 manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml create mode 100644 manifests/dev/base/models/dojo_starter-Moved-504403e5.toml create mode 100644 manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml create mode 100644 manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml delete mode 100644 manifests/dev/base/models/dojo_starter_models_moves_directions_available.toml delete mode 100644 manifests/dev/base/models/dojo_starter_models_moves_moves.toml delete mode 100644 manifests/dev/base/models/dojo_starter_models_position_position.toml delete mode 100644 manifests/dev/base/models/dojo_starter_systems_actions_actions_moved.toml diff --git a/Scarb.lock b/Scarb.lock index 692332f..5560592 100644 --- a/Scarb.lock +++ b/Scarb.lock @@ -3,20 +3,20 @@ version = 1 [[package]] name = "dojo" -version = "0.7.2" -source = "git+https://github.com/dojoengine/dojo?tag=v0.7.2#3da5cad9fdd39b81551e0668015d88262e6c5fc4" +version = "0.7.3" +source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.0#2e04f54ceaa1c595e5d9ca369aaef640e189ac2a" dependencies = [ "dojo_plugin", ] [[package]] name = "dojo_plugin" -version = "0.3.11" -source = "git+https://github.com/dojoengine/dojo?tag=v0.3.11#1e651b5d4d3b79b14a7d8aa29a92062fcb9e6659" +version = "0.4.1" +source = "git+https://github.com/dojoengine/dojo?tag=v0.7.2#3da5cad9fdd39b81551e0668015d88262e6c5fc4" [[package]] name = "dojo_starter" -version = "0.7.0" +version = "0.1.0" dependencies = [ "dojo", ] diff --git a/Scarb.toml b/Scarb.toml index edeaed5..6feec68 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -1,7 +1,7 @@ [package] cairo-version = "2.6.3" name = "dojo_starter" -version = "0.7.0" +version = "0.1.0" [cairo] sierra-replace-ids = true @@ -12,7 +12,7 @@ spawn = "./scripts/spawn.sh" move = "./scripts/move.sh" [dependencies] -dojo = { git = "https://github.com/dojoengine/dojo", tag = "v0.7.3" } +dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.0" } [[target.dojo]] @@ -32,6 +32,8 @@ description = "The official Dojo Starter guide, the quickest and most streamline cover_uri = "file://assets/cover.png" icon_uri = "file://assets/icon.png" website = "https://github.com/dojoengine/dojo-starter" +seed = "dojo_starter" +namespace = "dojo_starter" [tool.dojo.world.socials] x = "https://x.com/ohayo_dojo" diff --git a/manifests/dev/abis/base/contracts/dojo_starter_systems_actions_actions.json b/manifests/dev/abis/base/contracts/dojo_starter-actions-7a1c7102.json similarity index 72% rename from manifests/dev/abis/base/contracts/dojo_starter_systems_actions_actions.json rename to manifests/dev/abis/base/contracts/dojo_starter-actions-7a1c7102.json index 797c105..df2f987 100644 --- a/manifests/dev/abis/base/contracts/dojo_starter_systems_actions_actions.json +++ b/manifests/dev/abis/base/contracts/dojo_starter-actions-7a1c7102.json @@ -1,16 +1,67 @@ [ { "type": "impl", - "name": "DojoResourceProviderImpl", - "interface_name": "dojo::world::IDojoResourceProvider" + "name": "ContractImpl", + "interface_name": "dojo::contract::IContract" + }, + { + "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": "interface", - "name": "dojo::world::IDojoResourceProvider", + "name": "dojo::contract::IContract", "items": [ { "type": "function", - "name": "dojo_resource", + "name": "contract_name", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", "inputs": [], "outputs": [ { @@ -18,6 +69,17 @@ } ], "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" } ] }, diff --git a/manifests/dev/abis/base/dojo-base.json b/manifests/dev/abis/base/dojo-base.json new file mode 100644 index 0000000..ee9ceaa --- /dev/null +++ b/manifests/dev/abis/base/dojo-base.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/manifests/dev/abis/base/dojo_world_world.json b/manifests/dev/abis/base/dojo-world.json similarity index 89% rename from manifests/dev/abis/base/dojo_world_world.json rename to manifests/dev/abis/base/dojo-world.json index c1a2447..0e5e962 100644 --- a/manifests/dev/abis/base/dojo_world_world.json +++ b/manifests/dev/abis/base/dojo-world.json @@ -194,6 +194,18 @@ "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", @@ -401,7 +413,7 @@ "name": "is_writer", "inputs": [ { - "name": "model", + "name": "resource", "type": "core::felt252" }, { @@ -421,7 +433,7 @@ "name": "grant_writer", "inputs": [ { - "name": "model", + "name": "resource", "type": "core::felt252" }, { @@ -437,7 +449,7 @@ "name": "revoke_writer", "inputs": [ { - "name": "model", + "name": "resource", "type": "core::felt252" }, { @@ -447,6 +459,66 @@ ], "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" } ] }, @@ -692,6 +764,16 @@ "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" } ] }, @@ -741,6 +823,23 @@ } ] }, + { + "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", @@ -751,6 +850,11 @@ "type": "core::byte_array::ByteArray", "kind": "data" }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "data" + }, { "name": "class_hash", "type": "core::starknet::class_hash::ClassHash", @@ -818,7 +922,7 @@ "kind": "struct", "members": [ { - "name": "model", + "name": "resource", "type": "core::felt252", "kind": "data" }, @@ -956,6 +1060,11 @@ "type": "dojo::world::world::MetadataUpdate", "kind": "nested" }, + { + "name": "NamespaceRegistered", + "type": "dojo::world::world::NamespaceRegistered", + "kind": "nested" + }, { "name": "ModelRegistered", "type": "dojo::world::world::ModelRegistered", diff --git a/manifests/dev/abis/base/models/dojo_starter_models_moves_directions_available.json b/manifests/dev/abis/base/models/dojo_starter-DirectionsAvailable-77844f1f.json similarity index 92% rename from manifests/dev/abis/base/models/dojo_starter_models_moves_directions_available.json rename to manifests/dev/abis/base/models/dojo_starter-DirectionsAvailable-77844f1f.json index 16cb2ac..6a646cd 100644 --- a/manifests/dev/abis/base/models/dojo_starter_models_moves_directions_available.json +++ b/manifests/dev/abis/base/models/dojo_starter-DirectionsAvailable-77844f1f.json @@ -271,6 +271,39 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/manifests/dev/abis/base/models/dojo_starter_systems_actions_actions_moved.json b/manifests/dev/abis/base/models/dojo_starter-Moved-504403e5.json similarity index 92% rename from manifests/dev/abis/base/models/dojo_starter_systems_actions_actions_moved.json rename to manifests/dev/abis/base/models/dojo_starter-Moved-504403e5.json index baac961..349d439 100644 --- a/manifests/dev/abis/base/models/dojo_starter_systems_actions_actions_moved.json +++ b/manifests/dev/abis/base/models/dojo_starter-Moved-504403e5.json @@ -271,6 +271,39 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/manifests/dev/abis/base/models/dojo_starter_models_moves_moves.json b/manifests/dev/abis/base/models/dojo_starter-Moves-2a29373f.json similarity index 92% rename from manifests/dev/abis/base/models/dojo_starter_models_moves_moves.json rename to manifests/dev/abis/base/models/dojo_starter-Moves-2a29373f.json index 5c0abb3..5d420be 100644 --- a/manifests/dev/abis/base/models/dojo_starter_models_moves_moves.json +++ b/manifests/dev/abis/base/models/dojo_starter-Moves-2a29373f.json @@ -271,6 +271,39 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/manifests/dev/abis/base/models/dojo_starter_models_position_position.json b/manifests/dev/abis/base/models/dojo_starter-Position-2ac8b4c1.json similarity index 92% rename from manifests/dev/abis/base/models/dojo_starter_models_position_position.json rename to manifests/dev/abis/base/models/dojo_starter-Position-2ac8b4c1.json index de89995..b59a8e8 100644 --- a/manifests/dev/abis/base/models/dojo_starter_models_position_position.json +++ b/manifests/dev/abis/base/models/dojo_starter-Position-2ac8b4c1.json @@ -271,6 +271,39 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml b/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml new file mode 100644 index 0000000..4d14b08 --- /dev/null +++ b/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml @@ -0,0 +1,11 @@ +kind = "DojoContract" +class_hash = "0x3789ded2f1522b5893d82c51dd7b51303e9fc9f78cd9d15421096c5e45e5855" +original_class_hash = "0x3789ded2f1522b5893d82c51dd7b51303e9fc9f78cd9d15421096c5e45e5855" +base_class_hash = "0x0" +abi = "manifests/dev/abis/base/contracts/dojo_starter-actions-7a1c7102.json" +reads = [] +writes = [] +computed = [] +init_calldata = [] +tag = "dojo_starter-actions" +manifest_name = "dojo_starter-actions-7a1c7102" diff --git a/manifests/dev/base/contracts/dojo_starter_systems_actions_actions.toml b/manifests/dev/base/contracts/dojo_starter_systems_actions_actions.toml deleted file mode 100644 index 800f088..0000000 --- a/manifests/dev/base/contracts/dojo_starter_systems_actions_actions.toml +++ /dev/null @@ -1,10 +0,0 @@ -kind = "DojoContract" -class_hash = "0x6b9e8abff1a178c80f9c18a29a35436d48759a1bcada1f074b1821df0f87119" -original_class_hash = "0x6b9e8abff1a178c80f9c18a29a35436d48759a1bcada1f074b1821df0f87119" -base_class_hash = "0x0" -abi = "manifests/dev/abis/base/contracts/dojo_starter_systems_actions_actions.json" -reads = [] -writes = [] -computed = [] -init_calldata = [] -name = "dojo_starter::systems::actions::actions" diff --git a/manifests/dev/base/dojo_base_base.toml b/manifests/dev/base/dojo-base.toml similarity index 66% rename from manifests/dev/base/dojo_base_base.toml rename to manifests/dev/base/dojo-base.toml index 6c4b5de..4e2fc2e 100644 --- a/manifests/dev/base/dojo_base_base.toml +++ b/manifests/dev/base/dojo-base.toml @@ -1,4 +1,6 @@ kind = "Class" class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" original_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" -name = "dojo::base::base" +abi = "manifests/dev/abis/base/dojo-base.json" +tag = "dojo-base" +manifest_name = "dojo-base" diff --git a/manifests/dev/base/dojo-world.toml b/manifests/dev/base/dojo-world.toml new file mode 100644 index 0000000..94821ba --- /dev/null +++ b/manifests/dev/base/dojo-world.toml @@ -0,0 +1,6 @@ +kind = "Class" +class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" +original_class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" +abi = "manifests/dev/abis/base/dojo-world.json" +tag = "dojo-world" +manifest_name = "dojo-world" diff --git a/manifests/dev/base/dojo_world_world.toml b/manifests/dev/base/dojo_world_world.toml deleted file mode 100644 index 2555ec3..0000000 --- a/manifests/dev/base/dojo_world_world.toml +++ /dev/null @@ -1,5 +0,0 @@ -kind = "Class" -class_hash = "0x3f63cecdc4964acafb921ba2934c6507d1b3c344edb64c2762cf08053169ab9" -original_class_hash = "0x3f63cecdc4964acafb921ba2934c6507d1b3c344edb64c2762cf08053169ab9" -abi = "manifests/dev/abis/base/dojo_world_world.json" -name = "dojo::world::world" diff --git a/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml b/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml new file mode 100644 index 0000000..0f5db5f --- /dev/null +++ b/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml @@ -0,0 +1,16 @@ +kind = "DojoModel" +class_hash = "0x35c13bdb9159b896863c212b7343fca5f0f0db80c7cb9cea0002ecb1d1f41ad" +original_class_hash = "0x35c13bdb9159b896863c212b7343fca5f0f0db80c7cb9cea0002ecb1d1f41ad" +abi = "manifests/dev/abis/base/models/dojo_starter-DirectionsAvailable-77844f1f.json" +tag = "dojo_starter-DirectionsAvailable" +manifest_name = "dojo_starter-DirectionsAvailable-77844f1f" + +[[members]] +name = "player" +type = "ContractAddress" +key = true + +[[members]] +name = "directions" +type = "Array" +key = false diff --git a/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml b/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml new file mode 100644 index 0000000..b6ca42a --- /dev/null +++ b/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml @@ -0,0 +1,16 @@ +kind = "DojoModel" +class_hash = "0x2ceff56a9aa56e9048925d52aaf6fe51c560ec1435e2ace85f90e1f91970074" +original_class_hash = "0x2ceff56a9aa56e9048925d52aaf6fe51c560ec1435e2ace85f90e1f91970074" +abi = "manifests/dev/abis/base/models/dojo_starter-Moved-504403e5.json" +tag = "dojo_starter-Moved" +manifest_name = "dojo_starter-Moved-504403e5" + +[[members]] +name = "player" +type = "ContractAddress" +key = true + +[[members]] +name = "direction" +type = "Direction" +key = false diff --git a/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml b/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml new file mode 100644 index 0000000..c24abdb --- /dev/null +++ b/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml @@ -0,0 +1,26 @@ +kind = "DojoModel" +class_hash = "0x13e6c0db807528a9210cf01c6938ca7076ef9683961258e0ee11cb8bbd3cddf" +original_class_hash = "0x13e6c0db807528a9210cf01c6938ca7076ef9683961258e0ee11cb8bbd3cddf" +abi = "manifests/dev/abis/base/models/dojo_starter-Moves-2a29373f.json" +tag = "dojo_starter-Moves" +manifest_name = "dojo_starter-Moves-2a29373f" + +[[members]] +name = "player" +type = "ContractAddress" +key = true + +[[members]] +name = "remaining" +type = "u8" +key = false + +[[members]] +name = "last_direction" +type = "Direction" +key = false + +[[members]] +name = "can_move" +type = "bool" +key = false diff --git a/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml b/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml new file mode 100644 index 0000000..ecc10c4 --- /dev/null +++ b/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml @@ -0,0 +1,16 @@ +kind = "DojoModel" +class_hash = "0x5b76d1e991daee4bb9cf7911c5398a629e84fafdbc3f2713fa6a9eef3000e50" +original_class_hash = "0x5b76d1e991daee4bb9cf7911c5398a629e84fafdbc3f2713fa6a9eef3000e50" +abi = "manifests/dev/abis/base/models/dojo_starter-Position-2ac8b4c1.json" +tag = "dojo_starter-Position" +manifest_name = "dojo_starter-Position-2ac8b4c1" + +[[members]] +name = "player" +type = "ContractAddress" +key = true + +[[members]] +name = "vec" +type = "Vec2" +key = false diff --git a/manifests/dev/base/models/dojo_starter_models_moves_directions_available.toml b/manifests/dev/base/models/dojo_starter_models_moves_directions_available.toml deleted file mode 100644 index 52cb5f9..0000000 --- a/manifests/dev/base/models/dojo_starter_models_moves_directions_available.toml +++ /dev/null @@ -1,15 +0,0 @@ -kind = "DojoModel" -class_hash = "0x13fc796dd2d767ca4051ee20d673074f74b6e6b072bef1926ba429e427c8080" -original_class_hash = "0x13fc796dd2d767ca4051ee20d673074f74b6e6b072bef1926ba429e427c8080" -abi = "manifests/dev/abis/base/models/dojo_starter_models_moves_directions_available.json" -name = "dojo_starter::models::moves::directions_available" - -[[members]] -name = "player" -type = "ContractAddress" -key = true - -[[members]] -name = "directions" -type = "Array" -key = false diff --git a/manifests/dev/base/models/dojo_starter_models_moves_moves.toml b/manifests/dev/base/models/dojo_starter_models_moves_moves.toml deleted file mode 100644 index 92a256f..0000000 --- a/manifests/dev/base/models/dojo_starter_models_moves_moves.toml +++ /dev/null @@ -1,25 +0,0 @@ -kind = "DojoModel" -class_hash = "0x2f6c0529a3aa4c81c1679408106b2c00013fc19a7088ed9639046c0e3aeac7a" -original_class_hash = "0x2f6c0529a3aa4c81c1679408106b2c00013fc19a7088ed9639046c0e3aeac7a" -abi = "manifests/dev/abis/base/models/dojo_starter_models_moves_moves.json" -name = "dojo_starter::models::moves::moves" - -[[members]] -name = "player" -type = "ContractAddress" -key = true - -[[members]] -name = "remaining" -type = "u8" -key = false - -[[members]] -name = "last_direction" -type = "Direction" -key = false - -[[members]] -name = "can_move" -type = "bool" -key = false diff --git a/manifests/dev/base/models/dojo_starter_models_position_position.toml b/manifests/dev/base/models/dojo_starter_models_position_position.toml deleted file mode 100644 index f3fb406..0000000 --- a/manifests/dev/base/models/dojo_starter_models_position_position.toml +++ /dev/null @@ -1,15 +0,0 @@ -kind = "DojoModel" -class_hash = "0x4312e0e9fa6d912c293311798591e5022744a5fbebefc5ddfcfcc9b7c0c9be1" -original_class_hash = "0x4312e0e9fa6d912c293311798591e5022744a5fbebefc5ddfcfcc9b7c0c9be1" -abi = "manifests/dev/abis/base/models/dojo_starter_models_position_position.json" -name = "dojo_starter::models::position::position" - -[[members]] -name = "player" -type = "ContractAddress" -key = true - -[[members]] -name = "vec" -type = "Vec2" -key = false diff --git a/manifests/dev/base/models/dojo_starter_systems_actions_actions_moved.toml b/manifests/dev/base/models/dojo_starter_systems_actions_actions_moved.toml deleted file mode 100644 index ed51c91..0000000 --- a/manifests/dev/base/models/dojo_starter_systems_actions_actions_moved.toml +++ /dev/null @@ -1,15 +0,0 @@ -kind = "DojoModel" -class_hash = "0x1e1fa676a44c4b22fe024f3d3a681904fc4fcaececd382b94d794593b811de2" -original_class_hash = "0x1e1fa676a44c4b22fe024f3d3a681904fc4fcaececd382b94d794593b811de2" -abi = "manifests/dev/abis/base/models/dojo_starter_systems_actions_actions_moved.json" -name = "dojo_starter::systems::actions::actions::moved" - -[[members]] -name = "player" -type = "ContractAddress" -key = true - -[[members]] -name = "direction" -type = "Direction" -key = false From 8a5c0cf10f2797214641c69f42e01e3d33ed8743 Mon Sep 17 00:00:00 2001 From: ponderingdemocritus Date: Sun, 7 Jul 2024 15:06:46 +0200 Subject: [PATCH 02/10] bump ci --- .github/workflows/test.yaml | 2 +- README.md | 2 +- ...son => dojo_starter-actions-7a1c7102.json} | 70 ++- ...{dojo_world_world.json => dojo-world.json} | 117 +++- ...starter-DirectionsAvailable-77844f1f.json} | 33 ++ ....json => dojo_starter-Moved-504403e5.json} | 33 ++ ....json => dojo_starter-Moves-2a29373f.json} | 33 ++ ...on => dojo_starter-Position-2ac8b4c1.json} | 33 ++ manifests/dev/manifest.json | 549 ++++++++++++++---- manifests/dev/manifest.toml | 95 +-- .../dojo_starter_systems_actions_actions.toml | 4 - manifests/dev/overlays/dojo_base_base.toml | 1 - manifests/dev/overlays/dojo_world_world.toml | 1 - .../dojo_starter_models_moves_moves.toml | 1 - ...dojo_starter_models_position_position.toml | 1 - 15 files changed, 789 insertions(+), 186 deletions(-) rename manifests/dev/abis/deployments/contracts/{dojo_starter_systems_actions_actions.json => dojo_starter-actions-7a1c7102.json} (72%) rename manifests/dev/abis/deployments/{dojo_world_world.json => dojo-world.json} (89%) rename manifests/dev/abis/deployments/models/{dojo_starter_models_moves_directions_available.json => dojo_starter-DirectionsAvailable-77844f1f.json} (92%) rename manifests/dev/abis/deployments/models/{dojo_starter_systems_actions_actions_moved.json => dojo_starter-Moved-504403e5.json} (92%) rename manifests/dev/abis/deployments/models/{dojo_starter_models_moves_moves.json => dojo_starter-Moves-2a29373f.json} (92%) rename manifests/dev/abis/deployments/models/{dojo_starter_models_position_position.json => dojo_starter-Position-2ac8b4c1.json} (92%) delete mode 100644 manifests/dev/overlays/contracts/dojo_starter_systems_actions_actions.toml delete mode 100644 manifests/dev/overlays/dojo_base_base.toml delete mode 100644 manifests/dev/overlays/dojo_world_world.toml delete mode 100644 manifests/dev/overlays/models/dojo_starter_models_moves_moves.toml delete mode 100644 manifests/dev/overlays/models/dojo_starter_models_position_position.toml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b7a19bd..ceff222 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: curl -L https://install.dojoengine.org | bash - - run: /home/runner/.config/.dojo/bin/dojoup -v v0.7.3 + - run: /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.0 - run: | /home/runner/.config/.dojo/bin/sozo build /home/runner/.config/.dojo/bin/sozo test diff --git a/README.md b/README.md index 9f52a24..1957ff7 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ sozo build sozo migrate apply # Start Torii -torii --world 0xb4079627ebab1cd3cf9fd075dda1ad2454a7a448bf659591f259efa2519b18 --allowed-origins "*" +torii --world 0x2c8633f80cbeb14ed6d8b24f82fb465c9c1e0574ee40897f7188b569908337f --allowed-origins "*" ``` --- diff --git a/manifests/dev/abis/deployments/contracts/dojo_starter_systems_actions_actions.json b/manifests/dev/abis/deployments/contracts/dojo_starter-actions-7a1c7102.json similarity index 72% rename from manifests/dev/abis/deployments/contracts/dojo_starter_systems_actions_actions.json rename to manifests/dev/abis/deployments/contracts/dojo_starter-actions-7a1c7102.json index 797c105..df2f987 100644 --- a/manifests/dev/abis/deployments/contracts/dojo_starter_systems_actions_actions.json +++ b/manifests/dev/abis/deployments/contracts/dojo_starter-actions-7a1c7102.json @@ -1,16 +1,67 @@ [ { "type": "impl", - "name": "DojoResourceProviderImpl", - "interface_name": "dojo::world::IDojoResourceProvider" + "name": "ContractImpl", + "interface_name": "dojo::contract::IContract" + }, + { + "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": "interface", - "name": "dojo::world::IDojoResourceProvider", + "name": "dojo::contract::IContract", "items": [ { "type": "function", - "name": "dojo_resource", + "name": "contract_name", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", "inputs": [], "outputs": [ { @@ -18,6 +69,17 @@ } ], "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" } ] }, diff --git a/manifests/dev/abis/deployments/dojo_world_world.json b/manifests/dev/abis/deployments/dojo-world.json similarity index 89% rename from manifests/dev/abis/deployments/dojo_world_world.json rename to manifests/dev/abis/deployments/dojo-world.json index c1a2447..0e5e962 100644 --- a/manifests/dev/abis/deployments/dojo_world_world.json +++ b/manifests/dev/abis/deployments/dojo-world.json @@ -194,6 +194,18 @@ "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", @@ -401,7 +413,7 @@ "name": "is_writer", "inputs": [ { - "name": "model", + "name": "resource", "type": "core::felt252" }, { @@ -421,7 +433,7 @@ "name": "grant_writer", "inputs": [ { - "name": "model", + "name": "resource", "type": "core::felt252" }, { @@ -437,7 +449,7 @@ "name": "revoke_writer", "inputs": [ { - "name": "model", + "name": "resource", "type": "core::felt252" }, { @@ -447,6 +459,66 @@ ], "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" } ] }, @@ -692,6 +764,16 @@ "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" } ] }, @@ -741,6 +823,23 @@ } ] }, + { + "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", @@ -751,6 +850,11 @@ "type": "core::byte_array::ByteArray", "kind": "data" }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "data" + }, { "name": "class_hash", "type": "core::starknet::class_hash::ClassHash", @@ -818,7 +922,7 @@ "kind": "struct", "members": [ { - "name": "model", + "name": "resource", "type": "core::felt252", "kind": "data" }, @@ -956,6 +1060,11 @@ "type": "dojo::world::world::MetadataUpdate", "kind": "nested" }, + { + "name": "NamespaceRegistered", + "type": "dojo::world::world::NamespaceRegistered", + "kind": "nested" + }, { "name": "ModelRegistered", "type": "dojo::world::world::ModelRegistered", diff --git a/manifests/dev/abis/deployments/models/dojo_starter_models_moves_directions_available.json b/manifests/dev/abis/deployments/models/dojo_starter-DirectionsAvailable-77844f1f.json similarity index 92% rename from manifests/dev/abis/deployments/models/dojo_starter_models_moves_directions_available.json rename to manifests/dev/abis/deployments/models/dojo_starter-DirectionsAvailable-77844f1f.json index 16cb2ac..6a646cd 100644 --- a/manifests/dev/abis/deployments/models/dojo_starter_models_moves_directions_available.json +++ b/manifests/dev/abis/deployments/models/dojo_starter-DirectionsAvailable-77844f1f.json @@ -271,6 +271,39 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/manifests/dev/abis/deployments/models/dojo_starter_systems_actions_actions_moved.json b/manifests/dev/abis/deployments/models/dojo_starter-Moved-504403e5.json similarity index 92% rename from manifests/dev/abis/deployments/models/dojo_starter_systems_actions_actions_moved.json rename to manifests/dev/abis/deployments/models/dojo_starter-Moved-504403e5.json index baac961..349d439 100644 --- a/manifests/dev/abis/deployments/models/dojo_starter_systems_actions_actions_moved.json +++ b/manifests/dev/abis/deployments/models/dojo_starter-Moved-504403e5.json @@ -271,6 +271,39 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/manifests/dev/abis/deployments/models/dojo_starter_models_moves_moves.json b/manifests/dev/abis/deployments/models/dojo_starter-Moves-2a29373f.json similarity index 92% rename from manifests/dev/abis/deployments/models/dojo_starter_models_moves_moves.json rename to manifests/dev/abis/deployments/models/dojo_starter-Moves-2a29373f.json index 5c0abb3..5d420be 100644 --- a/manifests/dev/abis/deployments/models/dojo_starter_models_moves_moves.json +++ b/manifests/dev/abis/deployments/models/dojo_starter-Moves-2a29373f.json @@ -271,6 +271,39 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/manifests/dev/abis/deployments/models/dojo_starter_models_position_position.json b/manifests/dev/abis/deployments/models/dojo_starter-Position-2ac8b4c1.json similarity index 92% rename from manifests/dev/abis/deployments/models/dojo_starter_models_position_position.json rename to manifests/dev/abis/deployments/models/dojo_starter-Position-2ac8b4c1.json index de89995..b59a8e8 100644 --- a/manifests/dev/abis/deployments/models/dojo_starter_models_position_position.json +++ b/manifests/dev/abis/deployments/models/dojo_starter-Position-2ac8b4c1.json @@ -271,6 +271,39 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", diff --git a/manifests/dev/manifest.json b/manifests/dev/manifest.json index 69254f5..8b3239e 100644 --- a/manifests/dev/manifest.json +++ b/manifests/dev/manifest.json @@ -1,8 +1,8 @@ { "world": { "kind": "WorldContract", - "class_hash": "0x3f63cecdc4964acafb921ba2934c6507d1b3c344edb64c2762cf08053169ab9", - "original_class_hash": "0x3f63cecdc4964acafb921ba2934c6507d1b3c344edb64c2762cf08053169ab9", + "class_hash": "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2", + "original_class_hash": "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2", "abi": [ { "type": "impl", @@ -199,6 +199,18 @@ "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", @@ -406,7 +418,7 @@ "name": "is_writer", "inputs": [ { - "name": "model", + "name": "resource", "type": "core::felt252" }, { @@ -426,7 +438,7 @@ "name": "grant_writer", "inputs": [ { - "name": "model", + "name": "resource", "type": "core::felt252" }, { @@ -442,7 +454,7 @@ "name": "revoke_writer", "inputs": [ { - "name": "model", + "name": "resource", "type": "core::felt252" }, { @@ -452,6 +464,66 @@ ], "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" } ] }, @@ -697,6 +769,16 @@ "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" } ] }, @@ -746,6 +828,23 @@ } ] }, + { + "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", @@ -756,6 +855,11 @@ "type": "core::byte_array::ByteArray", "kind": "data" }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "data" + }, { "name": "class_hash", "type": "core::starknet::class_hash::ClassHash", @@ -823,7 +927,7 @@ "kind": "struct", "members": [ { - "name": "model", + "name": "resource", "type": "core::felt252", "kind": "data" }, @@ -961,6 +1065,11 @@ "type": "dojo::world::world::MetadataUpdate", "kind": "nested" }, + { + "name": "NamespaceRegistered", + "type": "dojo::world::world::NamespaceRegistered", + "kind": "nested" + }, { "name": "ModelRegistered", "type": "dojo::world::world::ModelRegistered", @@ -999,43 +1108,73 @@ ] } ], - "address": "0xb4079627ebab1cd3cf9fd075dda1ad2454a7a448bf659591f259efa2519b18", - "transaction_hash": "0x3a729aa09b4ad351fbc724f94c6d599037a53d7d9b5a182097a60fb09d0486c", + "address": "0x2c8633f80cbeb14ed6d8b24f82fb465c9c1e0574ee40897f7188b569908337f", + "transaction_hash": "0x6a552a89cdce98596f295f34050e5e9aec726831372fb2c47e6e30659d0056a", "block_number": 3, "seed": "dojo_starter", "metadata": { "profile_name": "dev", "rpc_url": "http://localhost:5050/" }, - "name": "dojo::world::world" + "manifest_name": "dojo-world" }, "base": { "kind": "Class", "class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", "original_class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", - "abi": null, - "name": "dojo::base::base" + "abi": "manifests/dev/abis/base/dojo-base.json", + "tag": "dojo-base", + "manifest_name": "dojo-base" }, "contracts": [ { "kind": "DojoContract", - "address": "0x3610b797baec740e2fa25ae90b4a57d92b04f48a1fdbae1ae203eaf9723c1a0", - "class_hash": "0x6b9e8abff1a178c80f9c18a29a35436d48759a1bcada1f074b1821df0f87119", - "original_class_hash": "0x6b9e8abff1a178c80f9c18a29a35436d48759a1bcada1f074b1821df0f87119", + "address": "0x64db432a705a2831caaca5fcea6766af66c19b1897aa94b118429dae5da2380", + "class_hash": "0x3789ded2f1522b5893d82c51dd7b51303e9fc9f78cd9d15421096c5e45e5855", + "original_class_hash": "0x3789ded2f1522b5893d82c51dd7b51303e9fc9f78cd9d15421096c5e45e5855", "base_class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", "abi": [ { "type": "impl", - "name": "DojoResourceProviderImpl", - "interface_name": "dojo::world::IDojoResourceProvider" + "name": "ContractImpl", + "interface_name": "dojo::contract::IContract" + }, + { + "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": "interface", - "name": "dojo::world::IDojoResourceProvider", + "name": "dojo::contract::IContract", "items": [ { "type": "function", - "name": "dojo_resource", + "name": "contract_name", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "selector", "inputs": [], "outputs": [ { @@ -1043,6 +1182,39 @@ } ], "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" } ] }, @@ -1213,14 +1385,11 @@ } ], "reads": [], - "writes": [ - "Position", - "Moves", - "DirectionsAvailable" - ], + "writes": [], "computed": [], "init_calldata": [], - "name": "dojo_starter::systems::actions::actions" + "tag": "dojo_starter-actions", + "manifest_name": "dojo_starter-actions-7a1c7102" } ], "models": [ @@ -1238,8 +1407,8 @@ "key": false } ], - "class_hash": "0x13fc796dd2d767ca4051ee20d673074f74b6e6b072bef1926ba429e427c8080", - "original_class_hash": "0x13fc796dd2d767ca4051ee20d673074f74b6e6b072bef1926ba429e427c8080", + "class_hash": "0x35c13bdb9159b896863c212b7343fca5f0f0db80c7cb9cea0002ecb1d1f41ad", + "original_class_hash": "0x35c13bdb9159b896863c212b7343fca5f0f0db80c7cb9cea0002ecb1d1f41ad", "abi": [ { "type": "impl", @@ -1513,6 +1682,39 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", @@ -1629,7 +1831,8 @@ "variants": [] } ], - "name": "dojo_starter::models::moves::directions_available" + "tag": "dojo_starter-DirectionsAvailable", + "manifest_name": "dojo_starter-DirectionsAvailable-77844f1f" }, { "kind": "DojoModel", @@ -1640,23 +1843,13 @@ "key": true }, { - "name": "remaining", - "type": "u8", - "key": false - }, - { - "name": "last_direction", + "name": "direction", "type": "Direction", "key": false - }, - { - "name": "can_move", - "type": "bool", - "key": false } ], - "class_hash": "0x2f6c0529a3aa4c81c1679408106b2c00013fc19a7088ed9639046c0e3aeac7a", - "original_class_hash": "0x2f6c0529a3aa4c81c1679408106b2c00013fc19a7088ed9639046c0e3aeac7a", + "class_hash": "0x2ceff56a9aa56e9048925d52aaf6fe51c560ec1435e2ace85f90e1f91970074", + "original_class_hash": "0x2ceff56a9aa56e9048925d52aaf6fe51c560ec1435e2ace85f90e1f91970074", "abi": [ { "type": "impl", @@ -1930,6 +2123,39 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", @@ -1978,8 +2204,8 @@ }, { "type": "impl", - "name": "movesImpl", - "interface_name": "dojo_starter::models::moves::Imoves" + "name": "movedImpl", + "interface_name": "dojo_starter::systems::actions::actions::Imoved" }, { "type": "enum", @@ -2007,45 +2233,23 @@ } ] }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, { "type": "struct", - "name": "dojo_starter::models::moves::Moves", + "name": "dojo_starter::systems::actions::actions::Moved", "members": [ { "name": "player", "type": "core::starknet::contract_address::ContractAddress" }, { - "name": "remaining", - "type": "core::integer::u8" - }, - { - "name": "last_direction", + "name": "direction", "type": "dojo_starter::models::moves::Direction" - }, - { - "name": "can_move", - "type": "core::bool" } ] }, { "type": "interface", - "name": "dojo_starter::models::moves::Imoves", + "name": "dojo_starter::systems::actions::actions::Imoved", "items": [ { "type": "function", @@ -2053,7 +2257,7 @@ "inputs": [ { "name": "model", - "type": "dojo_starter::models::moves::Moves" + "type": "dojo_starter::systems::actions::actions::Moved" } ], "outputs": [], @@ -2063,12 +2267,13 @@ }, { "type": "event", - "name": "dojo_starter::models::moves::moves::Event", + "name": "dojo_starter::systems::actions::actions::moved::Event", "kind": "enum", "variants": [] } ], - "name": "dojo_starter::models::moves::moves" + "tag": "dojo_starter-Moved", + "manifest_name": "dojo_starter-Moved-504403e5" }, { "kind": "DojoModel", @@ -2079,13 +2284,23 @@ "key": true }, { - "name": "vec", - "type": "Vec2", + "name": "remaining", + "type": "u8", + "key": false + }, + { + "name": "last_direction", + "type": "Direction", + "key": false + }, + { + "name": "can_move", + "type": "bool", "key": false } ], - "class_hash": "0x4312e0e9fa6d912c293311798591e5022744a5fbebefc5ddfcfcc9b7c0c9be1", - "original_class_hash": "0x4312e0e9fa6d912c293311798591e5022744a5fbebefc5ddfcfcc9b7c0c9be1", + "class_hash": "0x13e6c0db807528a9210cf01c6938ca7076ef9683961258e0ee11cb8bbd3cddf", + "original_class_hash": "0x13e6c0db807528a9210cf01c6938ca7076ef9683961258e0ee11cb8bbd3cddf", "abi": [ { "type": "impl", @@ -2359,6 +2574,39 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", @@ -2407,40 +2655,74 @@ }, { "type": "impl", - "name": "positionImpl", - "interface_name": "dojo_starter::models::position::Iposition" + "name": "movesImpl", + "interface_name": "dojo_starter::models::moves::Imoves" }, { - "type": "struct", - "name": "dojo_starter::models::position::Vec2", - "members": [ + "type": "enum", + "name": "dojo_starter::models::moves::Direction", + "variants": [ { - "name": "x", - "type": "core::integer::u32" + "name": "None", + "type": "()" }, { - "name": "y", - "type": "core::integer::u32" + "name": "Left", + "type": "()" + }, + { + "name": "Right", + "type": "()" + }, + { + "name": "Up", + "type": "()" + }, + { + "name": "Down", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "core::bool", + "variants": [ + { + "name": "False", + "type": "()" + }, + { + "name": "True", + "type": "()" } ] }, { "type": "struct", - "name": "dojo_starter::models::position::Position", + "name": "dojo_starter::models::moves::Moves", "members": [ { "name": "player", "type": "core::starknet::contract_address::ContractAddress" }, { - "name": "vec", - "type": "dojo_starter::models::position::Vec2" + "name": "remaining", + "type": "core::integer::u8" + }, + { + "name": "last_direction", + "type": "dojo_starter::models::moves::Direction" + }, + { + "name": "can_move", + "type": "core::bool" } ] }, { "type": "interface", - "name": "dojo_starter::models::position::Iposition", + "name": "dojo_starter::models::moves::Imoves", "items": [ { "type": "function", @@ -2448,7 +2730,7 @@ "inputs": [ { "name": "model", - "type": "dojo_starter::models::position::Position" + "type": "dojo_starter::models::moves::Moves" } ], "outputs": [], @@ -2458,12 +2740,13 @@ }, { "type": "event", - "name": "dojo_starter::models::position::position::Event", + "name": "dojo_starter::models::moves::moves::Event", "kind": "enum", "variants": [] } ], - "name": "dojo_starter::models::position::position" + "tag": "dojo_starter-Moves", + "manifest_name": "dojo_starter-Moves-2a29373f" }, { "kind": "DojoModel", @@ -2474,13 +2757,13 @@ "key": true }, { - "name": "direction", - "type": "Direction", + "name": "vec", + "type": "Vec2", "key": false } ], - "class_hash": "0x1e1fa676a44c4b22fe024f3d3a681904fc4fcaececd382b94d794593b811de2", - "original_class_hash": "0x1e1fa676a44c4b22fe024f3d3a681904fc4fcaececd382b94d794593b811de2", + "class_hash": "0x5b76d1e991daee4bb9cf7911c5398a629e84fafdbc3f2713fa6a9eef3000e50", + "original_class_hash": "0x5b76d1e991daee4bb9cf7911c5398a629e84fafdbc3f2713fa6a9eef3000e50", "abi": [ { "type": "impl", @@ -2754,6 +3037,39 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "namespace_selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, { "type": "function", "name": "unpacked_size", @@ -2802,52 +3118,40 @@ }, { "type": "impl", - "name": "movedImpl", - "interface_name": "dojo_starter::systems::actions::actions::Imoved" + "name": "positionImpl", + "interface_name": "dojo_starter::models::position::Iposition" }, { - "type": "enum", - "name": "dojo_starter::models::moves::Direction", - "variants": [ - { - "name": "None", - "type": "()" - }, - { - "name": "Left", - "type": "()" - }, - { - "name": "Right", - "type": "()" - }, + "type": "struct", + "name": "dojo_starter::models::position::Vec2", + "members": [ { - "name": "Up", - "type": "()" + "name": "x", + "type": "core::integer::u32" }, { - "name": "Down", - "type": "()" + "name": "y", + "type": "core::integer::u32" } ] }, { "type": "struct", - "name": "dojo_starter::systems::actions::actions::Moved", + "name": "dojo_starter::models::position::Position", "members": [ { "name": "player", "type": "core::starknet::contract_address::ContractAddress" }, { - "name": "direction", - "type": "dojo_starter::models::moves::Direction" + "name": "vec", + "type": "dojo_starter::models::position::Vec2" } ] }, { "type": "interface", - "name": "dojo_starter::systems::actions::actions::Imoved", + "name": "dojo_starter::models::position::Iposition", "items": [ { "type": "function", @@ -2855,7 +3159,7 @@ "inputs": [ { "name": "model", - "type": "dojo_starter::systems::actions::actions::Moved" + "type": "dojo_starter::models::position::Position" } ], "outputs": [], @@ -2865,12 +3169,13 @@ }, { "type": "event", - "name": "dojo_starter::systems::actions::actions::moved::Event", + "name": "dojo_starter::models::position::position::Event", "kind": "enum", "variants": [] } ], - "name": "dojo_starter::systems::actions::actions::moved" + "tag": "dojo_starter-Position", + "manifest_name": "dojo_starter-Position-2ac8b4c1" } ] } \ No newline at end of file diff --git a/manifests/dev/manifest.toml b/manifests/dev/manifest.toml index 4f0382b..b29e950 100644 --- a/manifests/dev/manifest.toml +++ b/manifests/dev/manifest.toml @@ -1,13 +1,13 @@ [world] kind = "WorldContract" -class_hash = "0x3f63cecdc4964acafb921ba2934c6507d1b3c344edb64c2762cf08053169ab9" -original_class_hash = "0x3f63cecdc4964acafb921ba2934c6507d1b3c344edb64c2762cf08053169ab9" -abi = "manifests/dev/abis/deployments/dojo_world_world.json" -address = "0xb4079627ebab1cd3cf9fd075dda1ad2454a7a448bf659591f259efa2519b18" -transaction_hash = "0x3a729aa09b4ad351fbc724f94c6d599037a53d7d9b5a182097a60fb09d0486c" +class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" +original_class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" +abi = "abis/deployments/dojo-world.json" +address = "0x2c8633f80cbeb14ed6d8b24f82fb465c9c1e0574ee40897f7188b569908337f" +transaction_hash = "0x6a552a89cdce98596f295f34050e5e9aec726831372fb2c47e6e30659d0056a" block_number = 3 seed = "dojo_starter" -name = "dojo::world::world" +manifest_name = "dojo-world" [world.metadata] profile_name = "dev" @@ -17,31 +17,31 @@ rpc_url = "http://localhost:5050/" kind = "Class" class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" original_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" -name = "dojo::base::base" +abi = "manifests/dev/abis/base/dojo-base.json" +tag = "dojo-base" +manifest_name = "dojo-base" [[contracts]] kind = "DojoContract" -address = "0x3610b797baec740e2fa25ae90b4a57d92b04f48a1fdbae1ae203eaf9723c1a0" -class_hash = "0x6b9e8abff1a178c80f9c18a29a35436d48759a1bcada1f074b1821df0f87119" -original_class_hash = "0x6b9e8abff1a178c80f9c18a29a35436d48759a1bcada1f074b1821df0f87119" +address = "0x64db432a705a2831caaca5fcea6766af66c19b1897aa94b118429dae5da2380" +class_hash = "0x3789ded2f1522b5893d82c51dd7b51303e9fc9f78cd9d15421096c5e45e5855" +original_class_hash = "0x3789ded2f1522b5893d82c51dd7b51303e9fc9f78cd9d15421096c5e45e5855" base_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" -abi = "manifests/dev/abis/deployments/contracts/dojo_starter_systems_actions_actions.json" +abi = "abis/deployments/contracts/dojo_starter-actions-7a1c7102.json" reads = [] -writes = [ - "Position", - "Moves", - "DirectionsAvailable", -] +writes = [] computed = [] init_calldata = [] -name = "dojo_starter::systems::actions::actions" +tag = "dojo_starter-actions" +manifest_name = "dojo_starter-actions-7a1c7102" [[models]] kind = "DojoModel" -class_hash = "0x13fc796dd2d767ca4051ee20d673074f74b6e6b072bef1926ba429e427c8080" -original_class_hash = "0x13fc796dd2d767ca4051ee20d673074f74b6e6b072bef1926ba429e427c8080" -abi = "manifests/dev/abis/deployments/models/dojo_starter_models_moves_directions_available.json" -name = "dojo_starter::models::moves::directions_available" +class_hash = "0x35c13bdb9159b896863c212b7343fca5f0f0db80c7cb9cea0002ecb1d1f41ad" +original_class_hash = "0x35c13bdb9159b896863c212b7343fca5f0f0db80c7cb9cea0002ecb1d1f41ad" +abi = "abis/deployments/models/dojo_starter-DirectionsAvailable-77844f1f.json" +tag = "dojo_starter-DirectionsAvailable" +manifest_name = "dojo_starter-DirectionsAvailable-77844f1f" [[models.members]] name = "player" @@ -55,10 +55,29 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x2f6c0529a3aa4c81c1679408106b2c00013fc19a7088ed9639046c0e3aeac7a" -original_class_hash = "0x2f6c0529a3aa4c81c1679408106b2c00013fc19a7088ed9639046c0e3aeac7a" -abi = "manifests/dev/abis/deployments/models/dojo_starter_models_moves_moves.json" -name = "dojo_starter::models::moves::moves" +class_hash = "0x2ceff56a9aa56e9048925d52aaf6fe51c560ec1435e2ace85f90e1f91970074" +original_class_hash = "0x2ceff56a9aa56e9048925d52aaf6fe51c560ec1435e2ace85f90e1f91970074" +abi = "abis/deployments/models/dojo_starter-Moved-504403e5.json" +tag = "dojo_starter-Moved" +manifest_name = "dojo_starter-Moved-504403e5" + +[[models.members]] +name = "player" +type = "ContractAddress" +key = true + +[[models.members]] +name = "direction" +type = "Direction" +key = false + +[[models]] +kind = "DojoModel" +class_hash = "0x13e6c0db807528a9210cf01c6938ca7076ef9683961258e0ee11cb8bbd3cddf" +original_class_hash = "0x13e6c0db807528a9210cf01c6938ca7076ef9683961258e0ee11cb8bbd3cddf" +abi = "abis/deployments/models/dojo_starter-Moves-2a29373f.json" +tag = "dojo_starter-Moves" +manifest_name = "dojo_starter-Moves-2a29373f" [[models.members]] name = "player" @@ -82,10 +101,11 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x4312e0e9fa6d912c293311798591e5022744a5fbebefc5ddfcfcc9b7c0c9be1" -original_class_hash = "0x4312e0e9fa6d912c293311798591e5022744a5fbebefc5ddfcfcc9b7c0c9be1" -abi = "manifests/dev/abis/deployments/models/dojo_starter_models_position_position.json" -name = "dojo_starter::models::position::position" +class_hash = "0x5b76d1e991daee4bb9cf7911c5398a629e84fafdbc3f2713fa6a9eef3000e50" +original_class_hash = "0x5b76d1e991daee4bb9cf7911c5398a629e84fafdbc3f2713fa6a9eef3000e50" +abi = "abis/deployments/models/dojo_starter-Position-2ac8b4c1.json" +tag = "dojo_starter-Position" +manifest_name = "dojo_starter-Position-2ac8b4c1" [[models.members]] name = "player" @@ -96,20 +116,3 @@ key = true name = "vec" type = "Vec2" key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x1e1fa676a44c4b22fe024f3d3a681904fc4fcaececd382b94d794593b811de2" -original_class_hash = "0x1e1fa676a44c4b22fe024f3d3a681904fc4fcaececd382b94d794593b811de2" -abi = "manifests/dev/abis/deployments/models/dojo_starter_systems_actions_actions_moved.json" -name = "dojo_starter::systems::actions::actions::moved" - -[[models.members]] -name = "player" -type = "ContractAddress" -key = true - -[[models.members]] -name = "direction" -type = "Direction" -key = false diff --git a/manifests/dev/overlays/contracts/dojo_starter_systems_actions_actions.toml b/manifests/dev/overlays/contracts/dojo_starter_systems_actions_actions.toml deleted file mode 100644 index 2b96ea0..0000000 --- a/manifests/dev/overlays/contracts/dojo_starter_systems_actions_actions.toml +++ /dev/null @@ -1,4 +0,0 @@ -name = "dojo_starter::systems::actions::actions" -reads = [] -writes = ["Position", "Moves", "DirectionsAvailable"] -init_calldata = [] diff --git a/manifests/dev/overlays/dojo_base_base.toml b/manifests/dev/overlays/dojo_base_base.toml deleted file mode 100644 index f706470..0000000 --- a/manifests/dev/overlays/dojo_base_base.toml +++ /dev/null @@ -1 +0,0 @@ -name = "dojo::base::base" diff --git a/manifests/dev/overlays/dojo_world_world.toml b/manifests/dev/overlays/dojo_world_world.toml deleted file mode 100644 index a3e686e..0000000 --- a/manifests/dev/overlays/dojo_world_world.toml +++ /dev/null @@ -1 +0,0 @@ -name = "dojo::world::world" diff --git a/manifests/dev/overlays/models/dojo_starter_models_moves_moves.toml b/manifests/dev/overlays/models/dojo_starter_models_moves_moves.toml deleted file mode 100644 index 4873c2c..0000000 --- a/manifests/dev/overlays/models/dojo_starter_models_moves_moves.toml +++ /dev/null @@ -1 +0,0 @@ -name = "dojo_starter::models::moves::moves" diff --git a/manifests/dev/overlays/models/dojo_starter_models_position_position.toml b/manifests/dev/overlays/models/dojo_starter_models_position_position.toml deleted file mode 100644 index 9e70e65..0000000 --- a/manifests/dev/overlays/models/dojo_starter_models_position_position.toml +++ /dev/null @@ -1 +0,0 @@ -name = "dojo_starter::models::position::position" From e9130295a0ee1c5ffba398cb843062606f989098 Mon Sep 17 00:00:00 2001 From: ponderingdemocritus Date: Sun, 7 Jul 2024 15:21:28 +0200 Subject: [PATCH 03/10] test fix --- src/tests/test_world.cairo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/test_world.cairo b/src/tests/test_world.cairo index fda2d29..bad2013 100644 --- a/src/tests/test_world.cairo +++ b/src/tests/test_world.cairo @@ -20,7 +20,7 @@ mod tests { let mut models = array![position::TEST_CLASS_HASH, moves::TEST_CLASS_HASH]; // deploy world with models - let world = spawn_test_world(models); + let world = spawn_test_world("dojo_starter", models); // deploy systems contract let contract_address = world From 360369139682d73d96591c0fe1814aef2c01057b Mon Sep 17 00:00:00 2001 From: ponderingdemocritus Date: Sun, 7 Jul 2024 15:43:32 +0200 Subject: [PATCH 04/10] comment array --- src/systems/actions.cairo | 4 +--- src/tests/test_world.cairo | 34 ++++++++++++++++------------------ 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/systems/actions.cairo b/src/systems/actions.cairo index 568ff4f..30e3cf8 100644 --- a/src/systems/actions.cairo +++ b/src/systems/actions.cairo @@ -33,7 +33,6 @@ mod actions { let player = get_caller_address(); // Retrieve the player's current position from the world. let position = get!(world, player, (Position)); - // Update the world state with the new data. // 1. Set the player's remaining moves to 100. // 2. Move the player's position 10 units in both the x and y direction. @@ -45,7 +44,6 @@ mod actions { Direction::Up, Direction::Right, Direction::Down, Direction::Left ], }; - set!( world, ( @@ -55,7 +53,7 @@ mod actions { Position { player, vec: Vec2 { x: position.vec.x + 10, y: position.vec.y + 10 } }, - directions_available + // DirectionsAvailable { player, directions: array![Direction::Up], } ) ); } diff --git a/src/tests/test_world.cairo b/src/tests/test_world.cairo index bad2013..6f12a71 100644 --- a/src/tests/test_world.cairo +++ b/src/tests/test_world.cairo @@ -26,32 +26,30 @@ mod tests { let contract_address = world .deploy_contract('salt', actions::TEST_CLASS_HASH.try_into().unwrap(), array![].span()); let actions_system = IActionsDispatcher { contract_address }; - // call spawn() actions_system.spawn(); + // // call move with direction right + // actions_system.move(Direction::Right); - // call move with direction right - actions_system.move(Direction::Right); - - // Check world state - let moves = get!(world, caller, Moves); + // // Check world state + // let moves = get!(world, caller, Moves); - // casting right direction - let right_dir_felt: felt252 = Direction::Right.into(); + // // casting right direction + // let right_dir_felt: felt252 = Direction::Right.into(); - // check moves - assert(moves.remaining == 99, 'moves is wrong'); + // // check moves + // assert(moves.remaining == 99, 'moves is wrong'); - // check last direction - assert(moves.last_direction.into() == right_dir_felt, 'last direction is wrong'); + // // check last direction + // assert(moves.last_direction.into() == right_dir_felt, 'last direction is wrong'); - // get new_position - let new_position = get!(world, caller, Position); + // // get new_position + // let new_position = get!(world, caller, Position); - // check new position x - assert(new_position.vec.x == 11, 'position x is wrong'); + // // check new position x + // assert(new_position.vec.x == 11, 'position x is wrong'); - // check new position y - assert(new_position.vec.y == 10, 'position y is wrong'); + // // check new position y + // assert(new_position.vec.y == 10, 'position y is wrong'); } } From 9b3554c399628001856bb6fe7d08afce790439ca Mon Sep 17 00:00:00 2001 From: ponderingdemocritus Date: Fri, 19 Jul 2024 11:29:30 +1000 Subject: [PATCH 05/10] alpha 1 --- .github/workflows/test.yaml | 2 +- README.md | 2 +- Scarb.lock | 6 +- Scarb.toml | 8 +- .../dojo_starter-actions-7a1c7102.json | 23 +- .../{abis/base => base/abis}/dojo-base.json | 0 .../deployments => base/abis}/dojo-world.json | 111 ++++++- ..._starter-DirectionsAvailable-77844f1f.json | 27 +- .../models/dojo_starter-Moved-504403e5.json | 27 +- .../models/dojo_starter-Moves-2a29373f.json | 27 +- .../dojo_starter-Position-2ac8b4c1.json | 27 +- .../dojo_starter-actions-7a1c7102.toml | 6 +- manifests/dev/base/dojo-base.toml | 6 +- manifests/dev/base/dojo-world.toml | 6 +- ..._starter-DirectionsAvailable-77844f1f.toml | 6 +- .../models/dojo_starter-Moved-504403e5.toml | 6 +- .../models/dojo_starter-Moves-2a29373f.toml | 6 +- .../dojo_starter-Position-2ac8b4c1.toml | 6 +- .../dojo_starter-actions-7a1c7102.json | 23 +- manifests/dev/deployment/abis/dojo-base.json | 98 ++++++ .../base => deployment/abis}/dojo-world.json | 111 ++++++- ..._starter-DirectionsAvailable-77844f1f.json | 27 +- .../models/dojo_starter-Moved-504403e5.json | 27 +- .../models/dojo_starter-Moves-2a29373f.json | 27 +- .../dojo_starter-Position-2ac8b4c1.json | 27 +- manifests/dev/{ => deployment}/manifest.json | 286 +++++++++++++----- manifests/dev/deployment/manifest.toml | 122 ++++++++ manifests/dev/manifest.toml | 118 -------- overlays/dev/actions.toml | 6 + 29 files changed, 848 insertions(+), 326 deletions(-) rename manifests/dev/{abis/base => base/abis}/contracts/dojo_starter-actions-7a1c7102.json (95%) rename manifests/dev/{abis/base => base/abis}/dojo-base.json (100%) rename manifests/dev/{abis/deployments => base/abis}/dojo-world.json (91%) rename manifests/dev/{abis/deployments => base/abis}/models/dojo_starter-DirectionsAvailable-77844f1f.json (97%) rename manifests/dev/{abis/deployments => base/abis}/models/dojo_starter-Moved-504403e5.json (97%) rename manifests/dev/{abis/base => base/abis}/models/dojo_starter-Moves-2a29373f.json (97%) rename manifests/dev/{abis/base => base/abis}/models/dojo_starter-Position-2ac8b4c1.json (97%) rename manifests/dev/{abis/deployments => deployment/abis}/contracts/dojo_starter-actions-7a1c7102.json (95%) create mode 100644 manifests/dev/deployment/abis/dojo-base.json rename manifests/dev/{abis/base => deployment/abis}/dojo-world.json (91%) rename manifests/dev/{abis/base => deployment/abis}/models/dojo_starter-DirectionsAvailable-77844f1f.json (97%) rename manifests/dev/{abis/base => deployment/abis}/models/dojo_starter-Moved-504403e5.json (97%) rename manifests/dev/{abis/deployments => deployment/abis}/models/dojo_starter-Moves-2a29373f.json (97%) rename manifests/dev/{abis/deployments => deployment/abis}/models/dojo_starter-Position-2ac8b4c1.json (97%) rename manifests/dev/{ => deployment}/manifest.json (93%) create mode 100644 manifests/dev/deployment/manifest.toml delete mode 100644 manifests/dev/manifest.toml create mode 100644 overlays/dev/actions.toml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ceff222..0d7b912 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: curl -L https://install.dojoengine.org | bash - - run: /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.0 + - run: /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.1 - run: | /home/runner/.config/.dojo/bin/sozo build /home/runner/.config/.dojo/bin/sozo test diff --git a/README.md b/README.md index 1957ff7..ea6af94 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ sozo build sozo migrate apply # Start Torii -torii --world 0x2c8633f80cbeb14ed6d8b24f82fb465c9c1e0574ee40897f7188b569908337f --allowed-origins "*" +torii --world 0x16a15cc2a571bf95eef741c701a5657e4dbf1a5b9ce3785b4060b60f58913f4 --allowed-origins "*" ``` --- diff --git a/Scarb.lock b/Scarb.lock index 5560592..fea8843 100644 --- a/Scarb.lock +++ b/Scarb.lock @@ -4,15 +4,15 @@ version = 1 [[package]] name = "dojo" version = "0.7.3" -source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.0#2e04f54ceaa1c595e5d9ca369aaef640e189ac2a" +source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.1#e87da4a3a0c21d76c658abeead14d82b9cc3f85d" dependencies = [ "dojo_plugin", ] [[package]] name = "dojo_plugin" -version = "0.4.1" -source = "git+https://github.com/dojoengine/dojo?tag=v0.7.2#3da5cad9fdd39b81551e0668015d88262e6c5fc4" +version = "0.7.2" +source = "git+https://github.com/dojoengine/dojo?tag=v0.7.3#e8539d5b199efbd51c89c75da32f6592de5d9262" [[package]] name = "dojo_starter" diff --git a/Scarb.toml b/Scarb.toml index 6feec68..f47c243 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -12,7 +12,7 @@ spawn = "./scripts/spawn.sh" move = "./scripts/move.sh" [dependencies] -dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.0" } +dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.1" } [[target.dojo]] @@ -24,7 +24,7 @@ rpc_url = "http://localhost:5050/" # Default account for katana with seed = 0 account_address = "0xb3ff441a68610b30fd5e2abbf3a1548eb6ba6f3559f2862bf2dc757e5828ca" private_key = "0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a" -#world_address = "0xb4079627ebab1cd3cf9fd075dda1ad2454a7a448bf659591f259efa2519b18" # Uncomment and update this line with your world address. +world_address = "0x16a15cc2a571bf95eef741c701a5657e4dbf1a5b9ce3785b4060b60f58913f4" # Uncomment and update this line with your world address. [tool.dojo.world] name = "Dojo starter" @@ -33,7 +33,9 @@ cover_uri = "file://assets/cover.png" icon_uri = "file://assets/icon.png" website = "https://github.com/dojoengine/dojo-starter" seed = "dojo_starter" -namespace = "dojo_starter" + +[tool.dojo.world.namespace] +default = "dojo_starter" [tool.dojo.world.socials] x = "https://x.com/ohayo_dojo" diff --git a/manifests/dev/abis/base/contracts/dojo_starter-actions-7a1c7102.json b/manifests/dev/base/abis/contracts/dojo_starter-actions-7a1c7102.json similarity index 95% rename from manifests/dev/abis/base/contracts/dojo_starter-actions-7a1c7102.json rename to manifests/dev/base/abis/contracts/dojo_starter-actions-7a1c7102.json index df2f987..40555d7 100644 --- a/manifests/dev/abis/base/contracts/dojo_starter-actions-7a1c7102.json +++ b/manifests/dev/base/abis/contracts/dojo_starter-actions-7a1c7102.json @@ -39,18 +39,18 @@ }, { "type": "function", - "name": "selector", + "name": "namespace", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace", + "name": "tag", "inputs": [], "outputs": [ { @@ -61,7 +61,7 @@ }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -72,11 +72,22 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" } ], "state_mutability": "view" diff --git a/manifests/dev/abis/base/dojo-base.json b/manifests/dev/base/abis/dojo-base.json similarity index 100% rename from manifests/dev/abis/base/dojo-base.json rename to manifests/dev/base/abis/dojo-base.json diff --git a/manifests/dev/abis/deployments/dojo-world.json b/manifests/dev/base/abis/dojo-world.json similarity index 91% rename from manifests/dev/abis/deployments/dojo-world.json rename to manifests/dev/base/abis/dojo-world.json index 0e5e962..fe02b53 100644 --- a/manifests/dev/abis/deployments/dojo-world.json +++ b/manifests/dev/base/abis/dojo-world.json @@ -46,6 +46,24 @@ } ] }, + { + "type": "enum", + "name": "dojo::world::ModelIndex", + "variants": [ + { + "name": "Keys", + "type": "core::array::Span::" + }, + { + "name": "Id", + "type": "core::felt252" + }, + { + "name": "MemberId", + "type": "(core::felt252, core::felt252)" + } + ] + }, { "type": "struct", "name": "core::array::Span::", @@ -182,6 +200,22 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "contract", + "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", @@ -235,8 +269,8 @@ "name": "upgrade_contract", "inputs": [ { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" + "name": "selector", + "type": "core::felt252" }, { "name": "class_hash", @@ -282,12 +316,12 @@ "name": "entity", "inputs": [ { - "name": "model", + "name": "model_selector", "type": "core::felt252" }, { - "name": "keys", - "type": "core::array::Span::" + "name": "index", + "type": "dojo::world::ModelIndex" }, { "name": "layout", @@ -306,12 +340,12 @@ "name": "set_entity", "inputs": [ { - "name": "model", + "name": "model_selector", "type": "core::felt252" }, { - "name": "keys", - "type": "core::array::Span::" + "name": "index", + "type": "dojo::world::ModelIndex" }, { "name": "values", @@ -330,12 +364,12 @@ "name": "delete_entity", "inputs": [ { - "name": "model", + "name": "model_selector", "type": "core::felt252" }, { - "name": "keys", - "type": "core::array::Span::" + "name": "index", + "type": "dojo::world::ModelIndex" }, { "name": "layout", @@ -485,7 +519,27 @@ "name": "can_write_model", "inputs": [ { - "name": "model_id", + "name": "selector", + "type": "core::felt252" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "can_write_contract", + "inputs": [ + { + "name": "selector", "type": "core::felt252" }, { @@ -505,7 +559,7 @@ "name": "can_write_namespace", "inputs": [ { - "name": "namespace_id", + "name": "selector", "type": "core::felt252" }, { @@ -901,7 +955,7 @@ }, { "type": "event", - "name": "dojo::world::world::StoreDelRecord", + "name": "dojo::world::world::StoreUpdateRecord", "kind": "struct", "members": [ { @@ -910,12 +964,34 @@ "kind": "data" }, { - "name": "keys", + "name": "entity_id", + "type": "core::felt252", + "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": "entity_id", + "type": "core::felt252", + "kind": "data" + } + ] + }, { "type": "event", "name": "dojo::world::world::WriterUpdated", @@ -1075,6 +1151,11 @@ "type": "dojo::world::world::StoreSetRecord", "kind": "nested" }, + { + "name": "StoreUpdateRecord", + "type": "dojo::world::world::StoreUpdateRecord", + "kind": "nested" + }, { "name": "StoreDelRecord", "type": "dojo::world::world::StoreDelRecord", diff --git a/manifests/dev/abis/deployments/models/dojo_starter-DirectionsAvailable-77844f1f.json b/manifests/dev/base/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json similarity index 97% rename from manifests/dev/abis/deployments/models/dojo_starter-DirectionsAvailable-77844f1f.json rename to manifests/dev/base/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json index 6a646cd..78b2f4a 100644 --- a/manifests/dev/abis/deployments/models/dojo_starter-DirectionsAvailable-77844f1f.json +++ b/manifests/dev/base/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json @@ -240,18 +240,29 @@ "items": [ { "type": "function", - "name": "selector", + "name": "name", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "name", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", "inputs": [], "outputs": [ { @@ -273,18 +284,18 @@ }, { "type": "function", - "name": "namespace", + "name": "selector", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -295,11 +306,11 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" diff --git a/manifests/dev/abis/deployments/models/dojo_starter-Moved-504403e5.json b/manifests/dev/base/abis/models/dojo_starter-Moved-504403e5.json similarity index 97% rename from manifests/dev/abis/deployments/models/dojo_starter-Moved-504403e5.json rename to manifests/dev/base/abis/models/dojo_starter-Moved-504403e5.json index 349d439..b42078c 100644 --- a/manifests/dev/abis/deployments/models/dojo_starter-Moved-504403e5.json +++ b/manifests/dev/base/abis/models/dojo_starter-Moved-504403e5.json @@ -240,18 +240,29 @@ "items": [ { "type": "function", - "name": "selector", + "name": "name", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "name", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", "inputs": [], "outputs": [ { @@ -273,18 +284,18 @@ }, { "type": "function", - "name": "namespace", + "name": "selector", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -295,11 +306,11 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" diff --git a/manifests/dev/abis/base/models/dojo_starter-Moves-2a29373f.json b/manifests/dev/base/abis/models/dojo_starter-Moves-2a29373f.json similarity index 97% rename from manifests/dev/abis/base/models/dojo_starter-Moves-2a29373f.json rename to manifests/dev/base/abis/models/dojo_starter-Moves-2a29373f.json index 5d420be..50fe316 100644 --- a/manifests/dev/abis/base/models/dojo_starter-Moves-2a29373f.json +++ b/manifests/dev/base/abis/models/dojo_starter-Moves-2a29373f.json @@ -240,18 +240,29 @@ "items": [ { "type": "function", - "name": "selector", + "name": "name", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "name", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", "inputs": [], "outputs": [ { @@ -273,18 +284,18 @@ }, { "type": "function", - "name": "namespace", + "name": "selector", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -295,11 +306,11 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" diff --git a/manifests/dev/abis/base/models/dojo_starter-Position-2ac8b4c1.json b/manifests/dev/base/abis/models/dojo_starter-Position-2ac8b4c1.json similarity index 97% rename from manifests/dev/abis/base/models/dojo_starter-Position-2ac8b4c1.json rename to manifests/dev/base/abis/models/dojo_starter-Position-2ac8b4c1.json index b59a8e8..8259cab 100644 --- a/manifests/dev/abis/base/models/dojo_starter-Position-2ac8b4c1.json +++ b/manifests/dev/base/abis/models/dojo_starter-Position-2ac8b4c1.json @@ -240,18 +240,29 @@ "items": [ { "type": "function", - "name": "selector", + "name": "name", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "name", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", "inputs": [], "outputs": [ { @@ -273,18 +284,18 @@ }, { "type": "function", - "name": "namespace", + "name": "selector", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -295,11 +306,11 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" diff --git a/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml b/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml index 4d14b08..edd6076 100644 --- a/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml +++ b/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml @@ -1,8 +1,8 @@ kind = "DojoContract" -class_hash = "0x3789ded2f1522b5893d82c51dd7b51303e9fc9f78cd9d15421096c5e45e5855" -original_class_hash = "0x3789ded2f1522b5893d82c51dd7b51303e9fc9f78cd9d15421096c5e45e5855" +class_hash = "0x75070bf823315b1b592dd4e431fc30e380098cced30f09bb3d8ea081926419c" +original_class_hash = "0x75070bf823315b1b592dd4e431fc30e380098cced30f09bb3d8ea081926419c" base_class_hash = "0x0" -abi = "manifests/dev/abis/base/contracts/dojo_starter-actions-7a1c7102.json" +abi = "manifests/dev/base/abis/contracts/dojo_starter-actions-7a1c7102.json" reads = [] writes = [] computed = [] diff --git a/manifests/dev/base/dojo-base.toml b/manifests/dev/base/dojo-base.toml index 4e2fc2e..aa92e94 100644 --- a/manifests/dev/base/dojo-base.toml +++ b/manifests/dev/base/dojo-base.toml @@ -1,6 +1,6 @@ kind = "Class" -class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" -original_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" -abi = "manifests/dev/abis/base/dojo-base.json" +class_hash = "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4" +original_class_hash = "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4" +abi = "manifests/dev/base/abis/dojo-base.json" tag = "dojo-base" manifest_name = "dojo-base" diff --git a/manifests/dev/base/dojo-world.toml b/manifests/dev/base/dojo-world.toml index 94821ba..e79e888 100644 --- a/manifests/dev/base/dojo-world.toml +++ b/manifests/dev/base/dojo-world.toml @@ -1,6 +1,6 @@ kind = "Class" -class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" -original_class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" -abi = "manifests/dev/abis/base/dojo-world.json" +class_hash = "0x26a8f65e0b0ba2a6d2f9e93d4f72f75eabebb853ea7413e134b3902ea352557" +original_class_hash = "0x26a8f65e0b0ba2a6d2f9e93d4f72f75eabebb853ea7413e134b3902ea352557" +abi = "manifests/dev/base/abis/dojo-world.json" tag = "dojo-world" manifest_name = "dojo-world" diff --git a/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml b/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml index 0f5db5f..7904248 100644 --- a/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml +++ b/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml @@ -1,7 +1,7 @@ kind = "DojoModel" -class_hash = "0x35c13bdb9159b896863c212b7343fca5f0f0db80c7cb9cea0002ecb1d1f41ad" -original_class_hash = "0x35c13bdb9159b896863c212b7343fca5f0f0db80c7cb9cea0002ecb1d1f41ad" -abi = "manifests/dev/abis/base/models/dojo_starter-DirectionsAvailable-77844f1f.json" +class_hash = "0x2220d0dfcf00ed38537c8025ed22807b29d0023e119550ec1017314624426e" +original_class_hash = "0x2220d0dfcf00ed38537c8025ed22807b29d0023e119550ec1017314624426e" +abi = "manifests/dev/base/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json" tag = "dojo_starter-DirectionsAvailable" manifest_name = "dojo_starter-DirectionsAvailable-77844f1f" diff --git a/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml b/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml index b6ca42a..ce3c6c2 100644 --- a/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml +++ b/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml @@ -1,7 +1,7 @@ kind = "DojoModel" -class_hash = "0x2ceff56a9aa56e9048925d52aaf6fe51c560ec1435e2ace85f90e1f91970074" -original_class_hash = "0x2ceff56a9aa56e9048925d52aaf6fe51c560ec1435e2ace85f90e1f91970074" -abi = "manifests/dev/abis/base/models/dojo_starter-Moved-504403e5.json" +class_hash = "0x488613c8e3854add0667f4096f45a7d15202d1bd68e0c5b552e9030e282dea7" +original_class_hash = "0x488613c8e3854add0667f4096f45a7d15202d1bd68e0c5b552e9030e282dea7" +abi = "manifests/dev/base/abis/models/dojo_starter-Moved-504403e5.json" tag = "dojo_starter-Moved" manifest_name = "dojo_starter-Moved-504403e5" diff --git a/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml b/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml index c24abdb..8cac30c 100644 --- a/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml +++ b/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml @@ -1,7 +1,7 @@ kind = "DojoModel" -class_hash = "0x13e6c0db807528a9210cf01c6938ca7076ef9683961258e0ee11cb8bbd3cddf" -original_class_hash = "0x13e6c0db807528a9210cf01c6938ca7076ef9683961258e0ee11cb8bbd3cddf" -abi = "manifests/dev/abis/base/models/dojo_starter-Moves-2a29373f.json" +class_hash = "0x34dfd2dc5076a3fc4999079588c17db90d506f9925d6ede6c353e1ea4d0cf6f" +original_class_hash = "0x34dfd2dc5076a3fc4999079588c17db90d506f9925d6ede6c353e1ea4d0cf6f" +abi = "manifests/dev/base/abis/models/dojo_starter-Moves-2a29373f.json" tag = "dojo_starter-Moves" manifest_name = "dojo_starter-Moves-2a29373f" diff --git a/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml b/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml index ecc10c4..46ef0d2 100644 --- a/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml +++ b/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml @@ -1,7 +1,7 @@ kind = "DojoModel" -class_hash = "0x5b76d1e991daee4bb9cf7911c5398a629e84fafdbc3f2713fa6a9eef3000e50" -original_class_hash = "0x5b76d1e991daee4bb9cf7911c5398a629e84fafdbc3f2713fa6a9eef3000e50" -abi = "manifests/dev/abis/base/models/dojo_starter-Position-2ac8b4c1.json" +class_hash = "0x6aa14d416af2f19bd37237259f92fa1cd5a708182851b43bd9e047b1dd2e67" +original_class_hash = "0x6aa14d416af2f19bd37237259f92fa1cd5a708182851b43bd9e047b1dd2e67" +abi = "manifests/dev/base/abis/models/dojo_starter-Position-2ac8b4c1.json" tag = "dojo_starter-Position" manifest_name = "dojo_starter-Position-2ac8b4c1" diff --git a/manifests/dev/abis/deployments/contracts/dojo_starter-actions-7a1c7102.json b/manifests/dev/deployment/abis/contracts/dojo_starter-actions-7a1c7102.json similarity index 95% rename from manifests/dev/abis/deployments/contracts/dojo_starter-actions-7a1c7102.json rename to manifests/dev/deployment/abis/contracts/dojo_starter-actions-7a1c7102.json index df2f987..40555d7 100644 --- a/manifests/dev/abis/deployments/contracts/dojo_starter-actions-7a1c7102.json +++ b/manifests/dev/deployment/abis/contracts/dojo_starter-actions-7a1c7102.json @@ -39,18 +39,18 @@ }, { "type": "function", - "name": "selector", + "name": "namespace", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace", + "name": "tag", "inputs": [], "outputs": [ { @@ -61,7 +61,7 @@ }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -72,11 +72,22 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" } ], "state_mutability": "view" diff --git a/manifests/dev/deployment/abis/dojo-base.json b/manifests/dev/deployment/abis/dojo-base.json new file mode 100644 index 0000000..ee9ceaa --- /dev/null +++ b/manifests/dev/deployment/abis/dojo-base.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/manifests/dev/abis/base/dojo-world.json b/manifests/dev/deployment/abis/dojo-world.json similarity index 91% rename from manifests/dev/abis/base/dojo-world.json rename to manifests/dev/deployment/abis/dojo-world.json index 0e5e962..fe02b53 100644 --- a/manifests/dev/abis/base/dojo-world.json +++ b/manifests/dev/deployment/abis/dojo-world.json @@ -46,6 +46,24 @@ } ] }, + { + "type": "enum", + "name": "dojo::world::ModelIndex", + "variants": [ + { + "name": "Keys", + "type": "core::array::Span::" + }, + { + "name": "Id", + "type": "core::felt252" + }, + { + "name": "MemberId", + "type": "(core::felt252, core::felt252)" + } + ] + }, { "type": "struct", "name": "core::array::Span::", @@ -182,6 +200,22 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "contract", + "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", @@ -235,8 +269,8 @@ "name": "upgrade_contract", "inputs": [ { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" + "name": "selector", + "type": "core::felt252" }, { "name": "class_hash", @@ -282,12 +316,12 @@ "name": "entity", "inputs": [ { - "name": "model", + "name": "model_selector", "type": "core::felt252" }, { - "name": "keys", - "type": "core::array::Span::" + "name": "index", + "type": "dojo::world::ModelIndex" }, { "name": "layout", @@ -306,12 +340,12 @@ "name": "set_entity", "inputs": [ { - "name": "model", + "name": "model_selector", "type": "core::felt252" }, { - "name": "keys", - "type": "core::array::Span::" + "name": "index", + "type": "dojo::world::ModelIndex" }, { "name": "values", @@ -330,12 +364,12 @@ "name": "delete_entity", "inputs": [ { - "name": "model", + "name": "model_selector", "type": "core::felt252" }, { - "name": "keys", - "type": "core::array::Span::" + "name": "index", + "type": "dojo::world::ModelIndex" }, { "name": "layout", @@ -485,7 +519,27 @@ "name": "can_write_model", "inputs": [ { - "name": "model_id", + "name": "selector", + "type": "core::felt252" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "can_write_contract", + "inputs": [ + { + "name": "selector", "type": "core::felt252" }, { @@ -505,7 +559,7 @@ "name": "can_write_namespace", "inputs": [ { - "name": "namespace_id", + "name": "selector", "type": "core::felt252" }, { @@ -901,7 +955,7 @@ }, { "type": "event", - "name": "dojo::world::world::StoreDelRecord", + "name": "dojo::world::world::StoreUpdateRecord", "kind": "struct", "members": [ { @@ -910,12 +964,34 @@ "kind": "data" }, { - "name": "keys", + "name": "entity_id", + "type": "core::felt252", + "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": "entity_id", + "type": "core::felt252", + "kind": "data" + } + ] + }, { "type": "event", "name": "dojo::world::world::WriterUpdated", @@ -1075,6 +1151,11 @@ "type": "dojo::world::world::StoreSetRecord", "kind": "nested" }, + { + "name": "StoreUpdateRecord", + "type": "dojo::world::world::StoreUpdateRecord", + "kind": "nested" + }, { "name": "StoreDelRecord", "type": "dojo::world::world::StoreDelRecord", diff --git a/manifests/dev/abis/base/models/dojo_starter-DirectionsAvailable-77844f1f.json b/manifests/dev/deployment/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json similarity index 97% rename from manifests/dev/abis/base/models/dojo_starter-DirectionsAvailable-77844f1f.json rename to manifests/dev/deployment/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json index 6a646cd..78b2f4a 100644 --- a/manifests/dev/abis/base/models/dojo_starter-DirectionsAvailable-77844f1f.json +++ b/manifests/dev/deployment/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json @@ -240,18 +240,29 @@ "items": [ { "type": "function", - "name": "selector", + "name": "name", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "name", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", "inputs": [], "outputs": [ { @@ -273,18 +284,18 @@ }, { "type": "function", - "name": "namespace", + "name": "selector", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -295,11 +306,11 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" diff --git a/manifests/dev/abis/base/models/dojo_starter-Moved-504403e5.json b/manifests/dev/deployment/abis/models/dojo_starter-Moved-504403e5.json similarity index 97% rename from manifests/dev/abis/base/models/dojo_starter-Moved-504403e5.json rename to manifests/dev/deployment/abis/models/dojo_starter-Moved-504403e5.json index 349d439..b42078c 100644 --- a/manifests/dev/abis/base/models/dojo_starter-Moved-504403e5.json +++ b/manifests/dev/deployment/abis/models/dojo_starter-Moved-504403e5.json @@ -240,18 +240,29 @@ "items": [ { "type": "function", - "name": "selector", + "name": "name", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "name", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", "inputs": [], "outputs": [ { @@ -273,18 +284,18 @@ }, { "type": "function", - "name": "namespace", + "name": "selector", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -295,11 +306,11 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" diff --git a/manifests/dev/abis/deployments/models/dojo_starter-Moves-2a29373f.json b/manifests/dev/deployment/abis/models/dojo_starter-Moves-2a29373f.json similarity index 97% rename from manifests/dev/abis/deployments/models/dojo_starter-Moves-2a29373f.json rename to manifests/dev/deployment/abis/models/dojo_starter-Moves-2a29373f.json index 5d420be..50fe316 100644 --- a/manifests/dev/abis/deployments/models/dojo_starter-Moves-2a29373f.json +++ b/manifests/dev/deployment/abis/models/dojo_starter-Moves-2a29373f.json @@ -240,18 +240,29 @@ "items": [ { "type": "function", - "name": "selector", + "name": "name", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "name", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", "inputs": [], "outputs": [ { @@ -273,18 +284,18 @@ }, { "type": "function", - "name": "namespace", + "name": "selector", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -295,11 +306,11 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" diff --git a/manifests/dev/abis/deployments/models/dojo_starter-Position-2ac8b4c1.json b/manifests/dev/deployment/abis/models/dojo_starter-Position-2ac8b4c1.json similarity index 97% rename from manifests/dev/abis/deployments/models/dojo_starter-Position-2ac8b4c1.json rename to manifests/dev/deployment/abis/models/dojo_starter-Position-2ac8b4c1.json index b59a8e8..8259cab 100644 --- a/manifests/dev/abis/deployments/models/dojo_starter-Position-2ac8b4c1.json +++ b/manifests/dev/deployment/abis/models/dojo_starter-Position-2ac8b4c1.json @@ -240,18 +240,29 @@ "items": [ { "type": "function", - "name": "selector", + "name": "name", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "name", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", "inputs": [], "outputs": [ { @@ -273,18 +284,18 @@ }, { "type": "function", - "name": "namespace", + "name": "selector", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -295,11 +306,11 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" diff --git a/manifests/dev/manifest.json b/manifests/dev/deployment/manifest.json similarity index 93% rename from manifests/dev/manifest.json rename to manifests/dev/deployment/manifest.json index 8b3239e..bc39bf8 100644 --- a/manifests/dev/manifest.json +++ b/manifests/dev/deployment/manifest.json @@ -1,8 +1,8 @@ { "world": { "kind": "WorldContract", - "class_hash": "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2", - "original_class_hash": "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2", + "class_hash": "0x26a8f65e0b0ba2a6d2f9e93d4f72f75eabebb853ea7413e134b3902ea352557", + "original_class_hash": "0x26a8f65e0b0ba2a6d2f9e93d4f72f75eabebb853ea7413e134b3902ea352557", "abi": [ { "type": "impl", @@ -51,6 +51,24 @@ } ] }, + { + "type": "enum", + "name": "dojo::world::ModelIndex", + "variants": [ + { + "name": "Keys", + "type": "core::array::Span::" + }, + { + "name": "Id", + "type": "core::felt252" + }, + { + "name": "MemberId", + "type": "(core::felt252, core::felt252)" + } + ] + }, { "type": "struct", "name": "core::array::Span::", @@ -187,6 +205,22 @@ ], "state_mutability": "view" }, + { + "type": "function", + "name": "contract", + "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", @@ -240,8 +274,8 @@ "name": "upgrade_contract", "inputs": [ { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" + "name": "selector", + "type": "core::felt252" }, { "name": "class_hash", @@ -287,12 +321,12 @@ "name": "entity", "inputs": [ { - "name": "model", + "name": "model_selector", "type": "core::felt252" }, { - "name": "keys", - "type": "core::array::Span::" + "name": "index", + "type": "dojo::world::ModelIndex" }, { "name": "layout", @@ -311,12 +345,12 @@ "name": "set_entity", "inputs": [ { - "name": "model", + "name": "model_selector", "type": "core::felt252" }, { - "name": "keys", - "type": "core::array::Span::" + "name": "index", + "type": "dojo::world::ModelIndex" }, { "name": "values", @@ -335,12 +369,12 @@ "name": "delete_entity", "inputs": [ { - "name": "model", + "name": "model_selector", "type": "core::felt252" }, { - "name": "keys", - "type": "core::array::Span::" + "name": "index", + "type": "dojo::world::ModelIndex" }, { "name": "layout", @@ -490,7 +524,27 @@ "name": "can_write_model", "inputs": [ { - "name": "model_id", + "name": "selector", + "type": "core::felt252" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "can_write_contract", + "inputs": [ + { + "name": "selector", "type": "core::felt252" }, { @@ -510,7 +564,7 @@ "name": "can_write_namespace", "inputs": [ { - "name": "namespace_id", + "name": "selector", "type": "core::felt252" }, { @@ -906,7 +960,7 @@ }, { "type": "event", - "name": "dojo::world::world::StoreDelRecord", + "name": "dojo::world::world::StoreUpdateRecord", "kind": "struct", "members": [ { @@ -915,12 +969,34 @@ "kind": "data" }, { - "name": "keys", + "name": "entity_id", + "type": "core::felt252", + "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": "entity_id", + "type": "core::felt252", + "kind": "data" + } + ] + }, { "type": "event", "name": "dojo::world::world::WriterUpdated", @@ -1080,6 +1156,11 @@ "type": "dojo::world::world::StoreSetRecord", "kind": "nested" }, + { + "name": "StoreUpdateRecord", + "type": "dojo::world::world::StoreUpdateRecord", + "kind": "nested" + }, { "name": "StoreDelRecord", "type": "dojo::world::world::StoreDelRecord", @@ -1108,8 +1189,8 @@ ] } ], - "address": "0x2c8633f80cbeb14ed6d8b24f82fb465c9c1e0574ee40897f7188b569908337f", - "transaction_hash": "0x6a552a89cdce98596f295f34050e5e9aec726831372fb2c47e6e30659d0056a", + "address": "0x16a15cc2a571bf95eef741c701a5657e4dbf1a5b9ce3785b4060b60f58913f4", + "transaction_hash": "0x3eccec45e17ea685f63abeb94b544c000c5520d18177b75e712a8ae38f840cc", "block_number": 3, "seed": "dojo_starter", "metadata": { @@ -1120,19 +1201,19 @@ }, "base": { "kind": "Class", - "class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", - "original_class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", - "abi": "manifests/dev/abis/base/dojo-base.json", + "class_hash": "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4", + "original_class_hash": "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4", + "abi": "manifests/dev/deployment/abis/dojo-base.json", "tag": "dojo-base", "manifest_name": "dojo-base" }, "contracts": [ { "kind": "DojoContract", - "address": "0x64db432a705a2831caaca5fcea6766af66c19b1897aa94b118429dae5da2380", - "class_hash": "0x3789ded2f1522b5893d82c51dd7b51303e9fc9f78cd9d15421096c5e45e5855", - "original_class_hash": "0x3789ded2f1522b5893d82c51dd7b51303e9fc9f78cd9d15421096c5e45e5855", - "base_class_hash": "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46", + "address": "0x60b74f2493ef869ce406ca2ee3981caea120f7c66f7cd8e45e70f4805472010", + "class_hash": "0x75070bf823315b1b592dd4e431fc30e380098cced30f09bb3d8ea081926419c", + "original_class_hash": "0x75070bf823315b1b592dd4e431fc30e380098cced30f09bb3d8ea081926419c", + "base_class_hash": "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4", "abi": [ { "type": "impl", @@ -1174,18 +1255,18 @@ }, { "type": "function", - "name": "selector", + "name": "namespace", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace", + "name": "tag", "inputs": [], "outputs": [ { @@ -1196,7 +1277,7 @@ }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -1207,11 +1288,22 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "selector", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" } ], "state_mutability": "view" @@ -1385,7 +1477,11 @@ } ], "reads": [], - "writes": [], + "writes": [ + "dojo_starter-Moves", + "dojo_starter-Position", + "dojo_starter-DirectionsAvailable" + ], "computed": [], "init_calldata": [], "tag": "dojo_starter-actions", @@ -1407,8 +1503,8 @@ "key": false } ], - "class_hash": "0x35c13bdb9159b896863c212b7343fca5f0f0db80c7cb9cea0002ecb1d1f41ad", - "original_class_hash": "0x35c13bdb9159b896863c212b7343fca5f0f0db80c7cb9cea0002ecb1d1f41ad", + "class_hash": "0x2220d0dfcf00ed38537c8025ed22807b29d0023e119550ec1017314624426e", + "original_class_hash": "0x2220d0dfcf00ed38537c8025ed22807b29d0023e119550ec1017314624426e", "abi": [ { "type": "impl", @@ -1651,18 +1747,29 @@ "items": [ { "type": "function", - "name": "selector", + "name": "name", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "name", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", "inputs": [], "outputs": [ { @@ -1684,18 +1791,18 @@ }, { "type": "function", - "name": "namespace", + "name": "selector", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -1706,11 +1813,11 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" @@ -1848,8 +1955,8 @@ "key": false } ], - "class_hash": "0x2ceff56a9aa56e9048925d52aaf6fe51c560ec1435e2ace85f90e1f91970074", - "original_class_hash": "0x2ceff56a9aa56e9048925d52aaf6fe51c560ec1435e2ace85f90e1f91970074", + "class_hash": "0x488613c8e3854add0667f4096f45a7d15202d1bd68e0c5b552e9030e282dea7", + "original_class_hash": "0x488613c8e3854add0667f4096f45a7d15202d1bd68e0c5b552e9030e282dea7", "abi": [ { "type": "impl", @@ -2092,18 +2199,29 @@ "items": [ { "type": "function", - "name": "selector", + "name": "name", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "name", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", "inputs": [], "outputs": [ { @@ -2125,18 +2243,18 @@ }, { "type": "function", - "name": "namespace", + "name": "selector", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -2147,11 +2265,11 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" @@ -2299,8 +2417,8 @@ "key": false } ], - "class_hash": "0x13e6c0db807528a9210cf01c6938ca7076ef9683961258e0ee11cb8bbd3cddf", - "original_class_hash": "0x13e6c0db807528a9210cf01c6938ca7076ef9683961258e0ee11cb8bbd3cddf", + "class_hash": "0x34dfd2dc5076a3fc4999079588c17db90d506f9925d6ede6c353e1ea4d0cf6f", + "original_class_hash": "0x34dfd2dc5076a3fc4999079588c17db90d506f9925d6ede6c353e1ea4d0cf6f", "abi": [ { "type": "impl", @@ -2543,18 +2661,29 @@ "items": [ { "type": "function", - "name": "selector", + "name": "name", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "name", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", "inputs": [], "outputs": [ { @@ -2576,18 +2705,18 @@ }, { "type": "function", - "name": "namespace", + "name": "selector", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -2598,11 +2727,11 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" @@ -2762,8 +2891,8 @@ "key": false } ], - "class_hash": "0x5b76d1e991daee4bb9cf7911c5398a629e84fafdbc3f2713fa6a9eef3000e50", - "original_class_hash": "0x5b76d1e991daee4bb9cf7911c5398a629e84fafdbc3f2713fa6a9eef3000e50", + "class_hash": "0x6aa14d416af2f19bd37237259f92fa1cd5a708182851b43bd9e047b1dd2e67", + "original_class_hash": "0x6aa14d416af2f19bd37237259f92fa1cd5a708182851b43bd9e047b1dd2e67", "abi": [ { "type": "impl", @@ -3006,18 +3135,29 @@ "items": [ { "type": "function", - "name": "selector", + "name": "name", "inputs": [], "outputs": [ { - "type": "core::felt252" + "type": "core::byte_array::ByteArray" } ], "state_mutability": "view" }, { "type": "function", - "name": "name", + "name": "namespace", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tag", "inputs": [], "outputs": [ { @@ -3039,18 +3179,18 @@ }, { "type": "function", - "name": "namespace", + "name": "selector", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" }, { "type": "function", - "name": "namespace_selector", + "name": "name_hash", "inputs": [], "outputs": [ { @@ -3061,11 +3201,11 @@ }, { "type": "function", - "name": "tag", + "name": "namespace_hash", "inputs": [], "outputs": [ { - "type": "core::byte_array::ByteArray" + "type": "core::felt252" } ], "state_mutability": "view" diff --git a/manifests/dev/deployment/manifest.toml b/manifests/dev/deployment/manifest.toml new file mode 100644 index 0000000..d37370b --- /dev/null +++ b/manifests/dev/deployment/manifest.toml @@ -0,0 +1,122 @@ +[world] +kind = "WorldContract" +class_hash = "0x26a8f65e0b0ba2a6d2f9e93d4f72f75eabebb853ea7413e134b3902ea352557" +original_class_hash = "0x26a8f65e0b0ba2a6d2f9e93d4f72f75eabebb853ea7413e134b3902ea352557" +abi = "manifests/dev/deployment/abis/dojo-world.json" +address = "0x16a15cc2a571bf95eef741c701a5657e4dbf1a5b9ce3785b4060b60f58913f4" +transaction_hash = "0x3eccec45e17ea685f63abeb94b544c000c5520d18177b75e712a8ae38f840cc" +block_number = 3 +seed = "dojo_starter" +manifest_name = "dojo-world" + +[world.metadata] +profile_name = "dev" +rpc_url = "http://localhost:5050/" + +[base] +kind = "Class" +class_hash = "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4" +original_class_hash = "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4" +abi = "manifests/dev/deployment/abis/dojo-base.json" +tag = "dojo-base" +manifest_name = "dojo-base" + +[[contracts]] +kind = "DojoContract" +address = "0x60b74f2493ef869ce406ca2ee3981caea120f7c66f7cd8e45e70f4805472010" +class_hash = "0x75070bf823315b1b592dd4e431fc30e380098cced30f09bb3d8ea081926419c" +original_class_hash = "0x75070bf823315b1b592dd4e431fc30e380098cced30f09bb3d8ea081926419c" +base_class_hash = "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4" +abi = "manifests/dev/deployment/abis/contracts/dojo_starter-actions-7a1c7102.json" +reads = [] +writes = [ + "dojo_starter-Moves", + "dojo_starter-Position", + "dojo_starter-DirectionsAvailable", +] +computed = [] +init_calldata = [] +tag = "dojo_starter-actions" +manifest_name = "dojo_starter-actions-7a1c7102" + +[[models]] +kind = "DojoModel" +class_hash = "0x2220d0dfcf00ed38537c8025ed22807b29d0023e119550ec1017314624426e" +original_class_hash = "0x2220d0dfcf00ed38537c8025ed22807b29d0023e119550ec1017314624426e" +abi = "manifests/dev/deployment/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json" +tag = "dojo_starter-DirectionsAvailable" +manifest_name = "dojo_starter-DirectionsAvailable-77844f1f" + +[[models.members]] +name = "player" +type = "ContractAddress" +key = true + +[[models.members]] +name = "directions" +type = "Array" +key = false + +[[models]] +kind = "DojoModel" +class_hash = "0x488613c8e3854add0667f4096f45a7d15202d1bd68e0c5b552e9030e282dea7" +original_class_hash = "0x488613c8e3854add0667f4096f45a7d15202d1bd68e0c5b552e9030e282dea7" +abi = "manifests/dev/deployment/abis/models/dojo_starter-Moved-504403e5.json" +tag = "dojo_starter-Moved" +manifest_name = "dojo_starter-Moved-504403e5" + +[[models.members]] +name = "player" +type = "ContractAddress" +key = true + +[[models.members]] +name = "direction" +type = "Direction" +key = false + +[[models]] +kind = "DojoModel" +class_hash = "0x34dfd2dc5076a3fc4999079588c17db90d506f9925d6ede6c353e1ea4d0cf6f" +original_class_hash = "0x34dfd2dc5076a3fc4999079588c17db90d506f9925d6ede6c353e1ea4d0cf6f" +abi = "manifests/dev/deployment/abis/models/dojo_starter-Moves-2a29373f.json" +tag = "dojo_starter-Moves" +manifest_name = "dojo_starter-Moves-2a29373f" + +[[models.members]] +name = "player" +type = "ContractAddress" +key = true + +[[models.members]] +name = "remaining" +type = "u8" +key = false + +[[models.members]] +name = "last_direction" +type = "Direction" +key = false + +[[models.members]] +name = "can_move" +type = "bool" +key = false + +[[models]] +kind = "DojoModel" +class_hash = "0x6aa14d416af2f19bd37237259f92fa1cd5a708182851b43bd9e047b1dd2e67" +original_class_hash = "0x6aa14d416af2f19bd37237259f92fa1cd5a708182851b43bd9e047b1dd2e67" +abi = "manifests/dev/deployment/abis/models/dojo_starter-Position-2ac8b4c1.json" +tag = "dojo_starter-Position" +manifest_name = "dojo_starter-Position-2ac8b4c1" + +[[models.members]] +name = "player" +type = "ContractAddress" +key = true + +[[models.members]] +name = "vec" +type = "Vec2" +key = false diff --git a/manifests/dev/manifest.toml b/manifests/dev/manifest.toml deleted file mode 100644 index b29e950..0000000 --- a/manifests/dev/manifest.toml +++ /dev/null @@ -1,118 +0,0 @@ -[world] -kind = "WorldContract" -class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" -original_class_hash = "0x1498dd1197805ec05d37da956d0fc568023a4c25578b0523b4f4f0d0e4f16c2" -abi = "abis/deployments/dojo-world.json" -address = "0x2c8633f80cbeb14ed6d8b24f82fb465c9c1e0574ee40897f7188b569908337f" -transaction_hash = "0x6a552a89cdce98596f295f34050e5e9aec726831372fb2c47e6e30659d0056a" -block_number = 3 -seed = "dojo_starter" -manifest_name = "dojo-world" - -[world.metadata] -profile_name = "dev" -rpc_url = "http://localhost:5050/" - -[base] -kind = "Class" -class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" -original_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" -abi = "manifests/dev/abis/base/dojo-base.json" -tag = "dojo-base" -manifest_name = "dojo-base" - -[[contracts]] -kind = "DojoContract" -address = "0x64db432a705a2831caaca5fcea6766af66c19b1897aa94b118429dae5da2380" -class_hash = "0x3789ded2f1522b5893d82c51dd7b51303e9fc9f78cd9d15421096c5e45e5855" -original_class_hash = "0x3789ded2f1522b5893d82c51dd7b51303e9fc9f78cd9d15421096c5e45e5855" -base_class_hash = "0x22f3e55b61d86c2ac5239fa3b3b8761f26b9a5c0b5f61ddbd5d756ced498b46" -abi = "abis/deployments/contracts/dojo_starter-actions-7a1c7102.json" -reads = [] -writes = [] -computed = [] -init_calldata = [] -tag = "dojo_starter-actions" -manifest_name = "dojo_starter-actions-7a1c7102" - -[[models]] -kind = "DojoModel" -class_hash = "0x35c13bdb9159b896863c212b7343fca5f0f0db80c7cb9cea0002ecb1d1f41ad" -original_class_hash = "0x35c13bdb9159b896863c212b7343fca5f0f0db80c7cb9cea0002ecb1d1f41ad" -abi = "abis/deployments/models/dojo_starter-DirectionsAvailable-77844f1f.json" -tag = "dojo_starter-DirectionsAvailable" -manifest_name = "dojo_starter-DirectionsAvailable-77844f1f" - -[[models.members]] -name = "player" -type = "ContractAddress" -key = true - -[[models.members]] -name = "directions" -type = "Array" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x2ceff56a9aa56e9048925d52aaf6fe51c560ec1435e2ace85f90e1f91970074" -original_class_hash = "0x2ceff56a9aa56e9048925d52aaf6fe51c560ec1435e2ace85f90e1f91970074" -abi = "abis/deployments/models/dojo_starter-Moved-504403e5.json" -tag = "dojo_starter-Moved" -manifest_name = "dojo_starter-Moved-504403e5" - -[[models.members]] -name = "player" -type = "ContractAddress" -key = true - -[[models.members]] -name = "direction" -type = "Direction" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x13e6c0db807528a9210cf01c6938ca7076ef9683961258e0ee11cb8bbd3cddf" -original_class_hash = "0x13e6c0db807528a9210cf01c6938ca7076ef9683961258e0ee11cb8bbd3cddf" -abi = "abis/deployments/models/dojo_starter-Moves-2a29373f.json" -tag = "dojo_starter-Moves" -manifest_name = "dojo_starter-Moves-2a29373f" - -[[models.members]] -name = "player" -type = "ContractAddress" -key = true - -[[models.members]] -name = "remaining" -type = "u8" -key = false - -[[models.members]] -name = "last_direction" -type = "Direction" -key = false - -[[models.members]] -name = "can_move" -type = "bool" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x5b76d1e991daee4bb9cf7911c5398a629e84fafdbc3f2713fa6a9eef3000e50" -original_class_hash = "0x5b76d1e991daee4bb9cf7911c5398a629e84fafdbc3f2713fa6a9eef3000e50" -abi = "abis/deployments/models/dojo_starter-Position-2ac8b4c1.json" -tag = "dojo_starter-Position" -manifest_name = "dojo_starter-Position-2ac8b4c1" - -[[models.members]] -name = "player" -type = "ContractAddress" -key = true - -[[models.members]] -name = "vec" -type = "Vec2" -key = false diff --git a/overlays/dev/actions.toml b/overlays/dev/actions.toml new file mode 100644 index 0000000..f44555f --- /dev/null +++ b/overlays/dev/actions.toml @@ -0,0 +1,6 @@ +tag = "dojo_starter-actions" +writes = [ + "dojo_starter-Moves", + "dojo_starter-Position", + "dojo_starter-DirectionsAvailable", +] From 045ee281415cb3ffc274b791d7b964952cc50b40 Mon Sep 17 00:00:00 2001 From: ponderingdemocritus Date: Mon, 22 Jul 2024 04:26:51 +1000 Subject: [PATCH 06/10] bump to alpha 2 --- Scarb.lock | 6 ++-- Scarb.toml | 6 ++-- .../dojo_starter-actions-7a1c7102.toml | 4 +-- manifests/dev/base/dojo-base.toml | 4 +-- manifests/dev/base/dojo-world.toml | 4 +-- ..._starter-DirectionsAvailable-77844f1f.toml | 4 +-- .../models/dojo_starter-Moved-504403e5.toml | 4 +-- .../models/dojo_starter-Moves-2a29373f.toml | 4 +-- .../dojo_starter-Position-2ac8b4c1.toml | 4 +-- manifests/dev/deployment/manifest.json | 36 +++++++++---------- manifests/dev/deployment/manifest.toml | 36 +++++++++---------- 11 files changed, 56 insertions(+), 56 deletions(-) diff --git a/Scarb.lock b/Scarb.lock index fea8843..a863598 100644 --- a/Scarb.lock +++ b/Scarb.lock @@ -4,15 +4,15 @@ version = 1 [[package]] name = "dojo" version = "0.7.3" -source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.1#e87da4a3a0c21d76c658abeead14d82b9cc3f85d" +source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.2#8a1a652d9ea06f141645316f22e3916a148403ec" dependencies = [ "dojo_plugin", ] [[package]] name = "dojo_plugin" -version = "0.7.2" -source = "git+https://github.com/dojoengine/dojo?tag=v0.7.3#e8539d5b199efbd51c89c75da32f6592de5d9262" +version = "0.7.3" +source = "git+https://github.com/dojoengine/dojo?rev=d90b52b#d90b52b89749ac8af82f352dc08aa0b1378cfae6" [[package]] name = "dojo_starter" diff --git a/Scarb.toml b/Scarb.toml index f47c243..00d54fb 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -1,5 +1,5 @@ [package] -cairo-version = "2.6.3" +cairo-version = "=2.7.0-rc.3" name = "dojo_starter" version = "0.1.0" @@ -12,7 +12,7 @@ spawn = "./scripts/spawn.sh" move = "./scripts/move.sh" [dependencies] -dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.1" } +dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.2" } [[target.dojo]] @@ -24,7 +24,7 @@ rpc_url = "http://localhost:5050/" # Default account for katana with seed = 0 account_address = "0xb3ff441a68610b30fd5e2abbf3a1548eb6ba6f3559f2862bf2dc757e5828ca" private_key = "0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a" -world_address = "0x16a15cc2a571bf95eef741c701a5657e4dbf1a5b9ce3785b4060b60f58913f4" # Uncomment and update this line with your world address. +world_address = "0x3fc79ccfd72c1450d2ccb73c5c521a7ec68b6c6af0caf96a0f1c39ce58876c8" # Uncomment and update this line with your world address. [tool.dojo.world] name = "Dojo starter" diff --git a/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml b/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml index edd6076..b80f818 100644 --- a/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml +++ b/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml @@ -1,6 +1,6 @@ kind = "DojoContract" -class_hash = "0x75070bf823315b1b592dd4e431fc30e380098cced30f09bb3d8ea081926419c" -original_class_hash = "0x75070bf823315b1b592dd4e431fc30e380098cced30f09bb3d8ea081926419c" +class_hash = "0x51ef3cab40318955db3a84671487f2e434ed7788b8192305326454a45159dc" +original_class_hash = "0x51ef3cab40318955db3a84671487f2e434ed7788b8192305326454a45159dc" base_class_hash = "0x0" abi = "manifests/dev/base/abis/contracts/dojo_starter-actions-7a1c7102.json" reads = [] diff --git a/manifests/dev/base/dojo-base.toml b/manifests/dev/base/dojo-base.toml index aa92e94..063a71b 100644 --- a/manifests/dev/base/dojo-base.toml +++ b/manifests/dev/base/dojo-base.toml @@ -1,6 +1,6 @@ kind = "Class" -class_hash = "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4" -original_class_hash = "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4" +class_hash = "0x6178b645cecd0c483994e4e592dea2c71ed26b2083de2a3e0af55fcf62cb31b" +original_class_hash = "0x6178b645cecd0c483994e4e592dea2c71ed26b2083de2a3e0af55fcf62cb31b" abi = "manifests/dev/base/abis/dojo-base.json" tag = "dojo-base" manifest_name = "dojo-base" diff --git a/manifests/dev/base/dojo-world.toml b/manifests/dev/base/dojo-world.toml index e79e888..5df663d 100644 --- a/manifests/dev/base/dojo-world.toml +++ b/manifests/dev/base/dojo-world.toml @@ -1,6 +1,6 @@ kind = "Class" -class_hash = "0x26a8f65e0b0ba2a6d2f9e93d4f72f75eabebb853ea7413e134b3902ea352557" -original_class_hash = "0x26a8f65e0b0ba2a6d2f9e93d4f72f75eabebb853ea7413e134b3902ea352557" +class_hash = "0x564a2ff36752ddda913033318645e313928c7c96dc02efc82f597a66a9c6e58" +original_class_hash = "0x564a2ff36752ddda913033318645e313928c7c96dc02efc82f597a66a9c6e58" abi = "manifests/dev/base/abis/dojo-world.json" tag = "dojo-world" manifest_name = "dojo-world" diff --git a/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml b/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml index 7904248..6d8c853 100644 --- a/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml +++ b/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x2220d0dfcf00ed38537c8025ed22807b29d0023e119550ec1017314624426e" -original_class_hash = "0x2220d0dfcf00ed38537c8025ed22807b29d0023e119550ec1017314624426e" +class_hash = "0x5dde0646c4d6116efd296bb1d5ec9c2b3b12b039403ce9e12048387eb00f6d7" +original_class_hash = "0x5dde0646c4d6116efd296bb1d5ec9c2b3b12b039403ce9e12048387eb00f6d7" abi = "manifests/dev/base/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json" tag = "dojo_starter-DirectionsAvailable" manifest_name = "dojo_starter-DirectionsAvailable-77844f1f" diff --git a/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml b/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml index ce3c6c2..48b734c 100644 --- a/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml +++ b/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x488613c8e3854add0667f4096f45a7d15202d1bd68e0c5b552e9030e282dea7" -original_class_hash = "0x488613c8e3854add0667f4096f45a7d15202d1bd68e0c5b552e9030e282dea7" +class_hash = "0x3e0db1b3021b613fedd728d5bbd60f9c1b534bb200ca7e498498f723b8e582e" +original_class_hash = "0x3e0db1b3021b613fedd728d5bbd60f9c1b534bb200ca7e498498f723b8e582e" abi = "manifests/dev/base/abis/models/dojo_starter-Moved-504403e5.json" tag = "dojo_starter-Moved" manifest_name = "dojo_starter-Moved-504403e5" diff --git a/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml b/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml index 8cac30c..a58afb3 100644 --- a/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml +++ b/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x34dfd2dc5076a3fc4999079588c17db90d506f9925d6ede6c353e1ea4d0cf6f" -original_class_hash = "0x34dfd2dc5076a3fc4999079588c17db90d506f9925d6ede6c353e1ea4d0cf6f" +class_hash = "0x4a6b4db5132c80cbf278d0dcaf1e885cc3fabb547bfdf73c188d61257646098" +original_class_hash = "0x4a6b4db5132c80cbf278d0dcaf1e885cc3fabb547bfdf73c188d61257646098" abi = "manifests/dev/base/abis/models/dojo_starter-Moves-2a29373f.json" tag = "dojo_starter-Moves" manifest_name = "dojo_starter-Moves-2a29373f" diff --git a/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml b/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml index 46ef0d2..7357cb3 100644 --- a/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml +++ b/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x6aa14d416af2f19bd37237259f92fa1cd5a708182851b43bd9e047b1dd2e67" -original_class_hash = "0x6aa14d416af2f19bd37237259f92fa1cd5a708182851b43bd9e047b1dd2e67" +class_hash = "0x5663a554712bf9dafac003bf7031e90aea7b8876d5e7970cc3e5e77829de063" +original_class_hash = "0x5663a554712bf9dafac003bf7031e90aea7b8876d5e7970cc3e5e77829de063" abi = "manifests/dev/base/abis/models/dojo_starter-Position-2ac8b4c1.json" tag = "dojo_starter-Position" manifest_name = "dojo_starter-Position-2ac8b4c1" diff --git a/manifests/dev/deployment/manifest.json b/manifests/dev/deployment/manifest.json index bc39bf8..2b483ce 100644 --- a/manifests/dev/deployment/manifest.json +++ b/manifests/dev/deployment/manifest.json @@ -1,8 +1,8 @@ { "world": { "kind": "WorldContract", - "class_hash": "0x26a8f65e0b0ba2a6d2f9e93d4f72f75eabebb853ea7413e134b3902ea352557", - "original_class_hash": "0x26a8f65e0b0ba2a6d2f9e93d4f72f75eabebb853ea7413e134b3902ea352557", + "class_hash": "0x564a2ff36752ddda913033318645e313928c7c96dc02efc82f597a66a9c6e58", + "original_class_hash": "0x564a2ff36752ddda913033318645e313928c7c96dc02efc82f597a66a9c6e58", "abi": [ { "type": "impl", @@ -1189,8 +1189,8 @@ ] } ], - "address": "0x16a15cc2a571bf95eef741c701a5657e4dbf1a5b9ce3785b4060b60f58913f4", - "transaction_hash": "0x3eccec45e17ea685f63abeb94b544c000c5520d18177b75e712a8ae38f840cc", + "address": "0x3fc79ccfd72c1450d2ccb73c5c521a7ec68b6c6af0caf96a0f1c39ce58876c8", + "transaction_hash": "0x29f978f27ca06063870433dd2375be211ff546c9eaf6ab8e9550945fe87abb3", "block_number": 3, "seed": "dojo_starter", "metadata": { @@ -1201,8 +1201,8 @@ }, "base": { "kind": "Class", - "class_hash": "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4", - "original_class_hash": "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4", + "class_hash": "0x6178b645cecd0c483994e4e592dea2c71ed26b2083de2a3e0af55fcf62cb31b", + "original_class_hash": "0x6178b645cecd0c483994e4e592dea2c71ed26b2083de2a3e0af55fcf62cb31b", "abi": "manifests/dev/deployment/abis/dojo-base.json", "tag": "dojo-base", "manifest_name": "dojo-base" @@ -1210,10 +1210,10 @@ "contracts": [ { "kind": "DojoContract", - "address": "0x60b74f2493ef869ce406ca2ee3981caea120f7c66f7cd8e45e70f4805472010", - "class_hash": "0x75070bf823315b1b592dd4e431fc30e380098cced30f09bb3d8ea081926419c", - "original_class_hash": "0x75070bf823315b1b592dd4e431fc30e380098cced30f09bb3d8ea081926419c", - "base_class_hash": "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4", + "address": "0x5851e38911fd5f0ada41cb01d4a47f408ef2bf8563fc153935a41918df2fe7d", + "class_hash": "0x51ef3cab40318955db3a84671487f2e434ed7788b8192305326454a45159dc", + "original_class_hash": "0x51ef3cab40318955db3a84671487f2e434ed7788b8192305326454a45159dc", + "base_class_hash": "0x6178b645cecd0c483994e4e592dea2c71ed26b2083de2a3e0af55fcf62cb31b", "abi": [ { "type": "impl", @@ -1503,8 +1503,8 @@ "key": false } ], - "class_hash": "0x2220d0dfcf00ed38537c8025ed22807b29d0023e119550ec1017314624426e", - "original_class_hash": "0x2220d0dfcf00ed38537c8025ed22807b29d0023e119550ec1017314624426e", + "class_hash": "0x5dde0646c4d6116efd296bb1d5ec9c2b3b12b039403ce9e12048387eb00f6d7", + "original_class_hash": "0x5dde0646c4d6116efd296bb1d5ec9c2b3b12b039403ce9e12048387eb00f6d7", "abi": [ { "type": "impl", @@ -1955,8 +1955,8 @@ "key": false } ], - "class_hash": "0x488613c8e3854add0667f4096f45a7d15202d1bd68e0c5b552e9030e282dea7", - "original_class_hash": "0x488613c8e3854add0667f4096f45a7d15202d1bd68e0c5b552e9030e282dea7", + "class_hash": "0x3e0db1b3021b613fedd728d5bbd60f9c1b534bb200ca7e498498f723b8e582e", + "original_class_hash": "0x3e0db1b3021b613fedd728d5bbd60f9c1b534bb200ca7e498498f723b8e582e", "abi": [ { "type": "impl", @@ -2417,8 +2417,8 @@ "key": false } ], - "class_hash": "0x34dfd2dc5076a3fc4999079588c17db90d506f9925d6ede6c353e1ea4d0cf6f", - "original_class_hash": "0x34dfd2dc5076a3fc4999079588c17db90d506f9925d6ede6c353e1ea4d0cf6f", + "class_hash": "0x4a6b4db5132c80cbf278d0dcaf1e885cc3fabb547bfdf73c188d61257646098", + "original_class_hash": "0x4a6b4db5132c80cbf278d0dcaf1e885cc3fabb547bfdf73c188d61257646098", "abi": [ { "type": "impl", @@ -2891,8 +2891,8 @@ "key": false } ], - "class_hash": "0x6aa14d416af2f19bd37237259f92fa1cd5a708182851b43bd9e047b1dd2e67", - "original_class_hash": "0x6aa14d416af2f19bd37237259f92fa1cd5a708182851b43bd9e047b1dd2e67", + "class_hash": "0x5663a554712bf9dafac003bf7031e90aea7b8876d5e7970cc3e5e77829de063", + "original_class_hash": "0x5663a554712bf9dafac003bf7031e90aea7b8876d5e7970cc3e5e77829de063", "abi": [ { "type": "impl", diff --git a/manifests/dev/deployment/manifest.toml b/manifests/dev/deployment/manifest.toml index d37370b..d1a5f02 100644 --- a/manifests/dev/deployment/manifest.toml +++ b/manifests/dev/deployment/manifest.toml @@ -1,10 +1,10 @@ [world] kind = "WorldContract" -class_hash = "0x26a8f65e0b0ba2a6d2f9e93d4f72f75eabebb853ea7413e134b3902ea352557" -original_class_hash = "0x26a8f65e0b0ba2a6d2f9e93d4f72f75eabebb853ea7413e134b3902ea352557" +class_hash = "0x564a2ff36752ddda913033318645e313928c7c96dc02efc82f597a66a9c6e58" +original_class_hash = "0x564a2ff36752ddda913033318645e313928c7c96dc02efc82f597a66a9c6e58" abi = "manifests/dev/deployment/abis/dojo-world.json" -address = "0x16a15cc2a571bf95eef741c701a5657e4dbf1a5b9ce3785b4060b60f58913f4" -transaction_hash = "0x3eccec45e17ea685f63abeb94b544c000c5520d18177b75e712a8ae38f840cc" +address = "0x3fc79ccfd72c1450d2ccb73c5c521a7ec68b6c6af0caf96a0f1c39ce58876c8" +transaction_hash = "0x29f978f27ca06063870433dd2375be211ff546c9eaf6ab8e9550945fe87abb3" block_number = 3 seed = "dojo_starter" manifest_name = "dojo-world" @@ -15,18 +15,18 @@ rpc_url = "http://localhost:5050/" [base] kind = "Class" -class_hash = "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4" -original_class_hash = "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4" +class_hash = "0x6178b645cecd0c483994e4e592dea2c71ed26b2083de2a3e0af55fcf62cb31b" +original_class_hash = "0x6178b645cecd0c483994e4e592dea2c71ed26b2083de2a3e0af55fcf62cb31b" abi = "manifests/dev/deployment/abis/dojo-base.json" tag = "dojo-base" manifest_name = "dojo-base" [[contracts]] kind = "DojoContract" -address = "0x60b74f2493ef869ce406ca2ee3981caea120f7c66f7cd8e45e70f4805472010" -class_hash = "0x75070bf823315b1b592dd4e431fc30e380098cced30f09bb3d8ea081926419c" -original_class_hash = "0x75070bf823315b1b592dd4e431fc30e380098cced30f09bb3d8ea081926419c" -base_class_hash = "0x26a4f5d2d9638877a2648297339275df5eaab0adb3cdf0010887c2dbf2be4" +address = "0x5851e38911fd5f0ada41cb01d4a47f408ef2bf8563fc153935a41918df2fe7d" +class_hash = "0x51ef3cab40318955db3a84671487f2e434ed7788b8192305326454a45159dc" +original_class_hash = "0x51ef3cab40318955db3a84671487f2e434ed7788b8192305326454a45159dc" +base_class_hash = "0x6178b645cecd0c483994e4e592dea2c71ed26b2083de2a3e0af55fcf62cb31b" abi = "manifests/dev/deployment/abis/contracts/dojo_starter-actions-7a1c7102.json" reads = [] writes = [ @@ -41,8 +41,8 @@ manifest_name = "dojo_starter-actions-7a1c7102" [[models]] kind = "DojoModel" -class_hash = "0x2220d0dfcf00ed38537c8025ed22807b29d0023e119550ec1017314624426e" -original_class_hash = "0x2220d0dfcf00ed38537c8025ed22807b29d0023e119550ec1017314624426e" +class_hash = "0x5dde0646c4d6116efd296bb1d5ec9c2b3b12b039403ce9e12048387eb00f6d7" +original_class_hash = "0x5dde0646c4d6116efd296bb1d5ec9c2b3b12b039403ce9e12048387eb00f6d7" abi = "manifests/dev/deployment/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json" tag = "dojo_starter-DirectionsAvailable" manifest_name = "dojo_starter-DirectionsAvailable-77844f1f" @@ -59,8 +59,8 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x488613c8e3854add0667f4096f45a7d15202d1bd68e0c5b552e9030e282dea7" -original_class_hash = "0x488613c8e3854add0667f4096f45a7d15202d1bd68e0c5b552e9030e282dea7" +class_hash = "0x3e0db1b3021b613fedd728d5bbd60f9c1b534bb200ca7e498498f723b8e582e" +original_class_hash = "0x3e0db1b3021b613fedd728d5bbd60f9c1b534bb200ca7e498498f723b8e582e" abi = "manifests/dev/deployment/abis/models/dojo_starter-Moved-504403e5.json" tag = "dojo_starter-Moved" manifest_name = "dojo_starter-Moved-504403e5" @@ -77,8 +77,8 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x34dfd2dc5076a3fc4999079588c17db90d506f9925d6ede6c353e1ea4d0cf6f" -original_class_hash = "0x34dfd2dc5076a3fc4999079588c17db90d506f9925d6ede6c353e1ea4d0cf6f" +class_hash = "0x4a6b4db5132c80cbf278d0dcaf1e885cc3fabb547bfdf73c188d61257646098" +original_class_hash = "0x4a6b4db5132c80cbf278d0dcaf1e885cc3fabb547bfdf73c188d61257646098" abi = "manifests/dev/deployment/abis/models/dojo_starter-Moves-2a29373f.json" tag = "dojo_starter-Moves" manifest_name = "dojo_starter-Moves-2a29373f" @@ -105,8 +105,8 @@ key = false [[models]] kind = "DojoModel" -class_hash = "0x6aa14d416af2f19bd37237259f92fa1cd5a708182851b43bd9e047b1dd2e67" -original_class_hash = "0x6aa14d416af2f19bd37237259f92fa1cd5a708182851b43bd9e047b1dd2e67" +class_hash = "0x5663a554712bf9dafac003bf7031e90aea7b8876d5e7970cc3e5e77829de063" +original_class_hash = "0x5663a554712bf9dafac003bf7031e90aea7b8876d5e7970cc3e5e77829de063" abi = "manifests/dev/deployment/abis/models/dojo_starter-Position-2ac8b4c1.json" tag = "dojo_starter-Position" manifest_name = "dojo_starter-Position-2ac8b4c1" From dc9851cf4207d699b4d43b2f4616ee05c02556e9 Mon Sep 17 00:00:00 2001 From: ponderingdemocritus Date: Mon, 22 Jul 2024 04:27:08 +1000 Subject: [PATCH 07/10] bump CI --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0d7b912..5680f50 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: curl -L https://install.dojoengine.org | bash - - run: /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.1 + - run: /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.2 - run: | /home/runner/.config/.dojo/bin/sozo build /home/runner/.config/.dojo/bin/sozo test From fd1670dbc7cc836783fa1097cd0e0fd4cb3392ce Mon Sep 17 00:00:00 2001 From: ponderingdemocritus Date: Thu, 25 Jul 2024 18:54:09 +1000 Subject: [PATCH 08/10] bump v --- Scarb.lock | 4 +- Scarb.toml | 2 +- .../dojo_starter-actions-7a1c7102.json | 28 ++-- manifests/dev/base/abis/dojo-base.json | 22 +-- manifests/dev/base/abis/dojo-world.json | 140 +++++++++--------- ..._starter-DirectionsAvailable-77844f1f.json | 78 +++++----- .../models/dojo_starter-Moved-504403e5.json | 68 ++++----- .../models/dojo_starter-Moves-2a29373f.json | 78 +++++----- .../dojo_starter-Position-2ac8b4c1.json | 78 +++++----- .../dojo_starter-actions-7a1c7102.toml | 4 +- manifests/dev/base/dojo-base.toml | 4 +- manifests/dev/base/dojo-world.toml | 4 +- ..._starter-DirectionsAvailable-77844f1f.toml | 4 +- .../models/dojo_starter-Moved-504403e5.toml | 4 +- .../models/dojo_starter-Moves-2a29373f.toml | 4 +- .../dojo_starter-Position-2ac8b4c1.toml | 4 +- src/lib.cairo | 5 +- src/models.cairo | 88 +++++++++++ src/models/moves.cairo | 41 ----- src/models/position.cairo | 49 ------ src/systems/actions.cairo | 16 +- src/tests/test_world.cairo | 2 +- 22 files changed, 356 insertions(+), 371 deletions(-) create mode 100644 src/models.cairo delete mode 100644 src/models/moves.cairo delete mode 100644 src/models/position.cairo diff --git a/Scarb.lock b/Scarb.lock index a863598..9fee1c7 100644 --- a/Scarb.lock +++ b/Scarb.lock @@ -4,7 +4,7 @@ version = 1 [[package]] name = "dojo" version = "0.7.3" -source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.2#8a1a652d9ea06f141645316f22e3916a148403ec" +source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.3#a6a7724380169372336e886fb36f31f56e7d0d8a" dependencies = [ "dojo_plugin", ] @@ -12,7 +12,7 @@ dependencies = [ [[package]] name = "dojo_plugin" version = "0.7.3" -source = "git+https://github.com/dojoengine/dojo?rev=d90b52b#d90b52b89749ac8af82f352dc08aa0b1378cfae6" +source = "git+https://github.com/dojoengine/dojo?rev=71b1f1a4#71b1f1a467534cbeeb901356f41e612ed4187bd1" [[package]] name = "dojo_starter" diff --git a/Scarb.toml b/Scarb.toml index 00d54fb..f619b94 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -12,7 +12,7 @@ spawn = "./scripts/spawn.sh" move = "./scripts/move.sh" [dependencies] -dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.2" } +dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.3" } [[target.dojo]] diff --git a/manifests/dev/base/abis/contracts/dojo_starter-actions-7a1c7102.json b/manifests/dev/base/abis/contracts/dojo_starter-actions-7a1c7102.json index 40555d7..fd95c28 100644 --- a/manifests/dev/base/abis/contracts/dojo_starter-actions-7a1c7102.json +++ b/manifests/dev/base/abis/contracts/dojo_starter-actions-7a1c7102.json @@ -2,7 +2,7 @@ { "type": "impl", "name": "ContractImpl", - "interface_name": "dojo::contract::IContract" + "interface_name": "dojo::contract::contract::IContract" }, { "type": "struct", @@ -24,7 +24,7 @@ }, { "type": "interface", - "name": "dojo::contract::IContract", + "name": "dojo::contract::contract::IContract", "items": [ { "type": "function", @@ -97,11 +97,11 @@ { "type": "impl", "name": "WorldProviderImpl", - "interface_name": "dojo::world::IWorldProvider" + "interface_name": "dojo::world::world_contract::IWorldProvider" }, { "type": "struct", - "name": "dojo::world::IWorldDispatcher", + "name": "dojo::world::world_contract::IWorldDispatcher", "members": [ { "name": "contract_address", @@ -111,7 +111,7 @@ }, { "type": "interface", - "name": "dojo::world::IWorldProvider", + "name": "dojo::world::world_contract::IWorldProvider", "items": [ { "type": "function", @@ -119,7 +119,7 @@ "inputs": [], "outputs": [ { - "type": "dojo::world::IWorldDispatcher" + "type": "dojo::world::world_contract::IWorldDispatcher" } ], "state_mutability": "view" @@ -133,7 +133,7 @@ }, { "type": "enum", - "name": "dojo_starter::models::moves::Direction", + "name": "dojo_starter::models::Direction", "variants": [ { "name": "None", @@ -174,7 +174,7 @@ "inputs": [ { "name": "direction", - "type": "dojo_starter::models::moves::Direction" + "type": "dojo_starter::models::Direction" } ], "outputs": [], @@ -203,11 +203,11 @@ { "type": "impl", "name": "UpgradableImpl", - "interface_name": "dojo::components::upgradeable::IUpgradeable" + "interface_name": "dojo::contract::upgradeable::IUpgradeable" }, { "type": "interface", - "name": "dojo::components::upgradeable::IUpgradeable", + "name": "dojo::contract::upgradeable::IUpgradeable", "items": [ { "type": "function", @@ -225,7 +225,7 @@ }, { "type": "event", - "name": "dojo::components::upgradeable::upgradeable::Upgraded", + "name": "dojo::contract::upgradeable::upgradeable::Upgraded", "kind": "struct", "members": [ { @@ -237,12 +237,12 @@ }, { "type": "event", - "name": "dojo::components::upgradeable::upgradeable::Event", + "name": "dojo::contract::upgradeable::upgradeable::Event", "kind": "enum", "variants": [ { "name": "Upgraded", - "type": "dojo::components::upgradeable::upgradeable::Upgraded", + "type": "dojo::contract::upgradeable::upgradeable::Upgraded", "kind": "nested" } ] @@ -254,7 +254,7 @@ "variants": [ { "name": "UpgradeableEvent", - "type": "dojo::components::upgradeable::upgradeable::Event", + "type": "dojo::contract::upgradeable::upgradeable::Event", "kind": "nested" } ] diff --git a/manifests/dev/base/abis/dojo-base.json b/manifests/dev/base/abis/dojo-base.json index ee9ceaa..4800464 100644 --- a/manifests/dev/base/abis/dojo-base.json +++ b/manifests/dev/base/abis/dojo-base.json @@ -2,11 +2,11 @@ { "type": "impl", "name": "WorldProviderImpl", - "interface_name": "dojo::world::IWorldProvider" + "interface_name": "dojo::world::world_contract::IWorldProvider" }, { "type": "struct", - "name": "dojo::world::IWorldDispatcher", + "name": "dojo::world::world_contract::IWorldDispatcher", "members": [ { "name": "contract_address", @@ -16,7 +16,7 @@ }, { "type": "interface", - "name": "dojo::world::IWorldProvider", + "name": "dojo::world::world_contract::IWorldProvider", "items": [ { "type": "function", @@ -24,7 +24,7 @@ "inputs": [], "outputs": [ { - "type": "dojo::world::IWorldDispatcher" + "type": "dojo::world::world_contract::IWorldDispatcher" } ], "state_mutability": "view" @@ -34,11 +34,11 @@ { "type": "impl", "name": "UpgradableImpl", - "interface_name": "dojo::components::upgradeable::IUpgradeable" + "interface_name": "dojo::contract::upgradeable::IUpgradeable" }, { "type": "interface", - "name": "dojo::components::upgradeable::IUpgradeable", + "name": "dojo::contract::upgradeable::IUpgradeable", "items": [ { "type": "function", @@ -61,7 +61,7 @@ }, { "type": "event", - "name": "dojo::components::upgradeable::upgradeable::Upgraded", + "name": "dojo::contract::upgradeable::upgradeable::Upgraded", "kind": "struct", "members": [ { @@ -73,24 +73,24 @@ }, { "type": "event", - "name": "dojo::components::upgradeable::upgradeable::Event", + "name": "dojo::contract::upgradeable::upgradeable::Event", "kind": "enum", "variants": [ { "name": "Upgraded", - "type": "dojo::components::upgradeable::upgradeable::Upgraded", + "type": "dojo::contract::upgradeable::upgradeable::Upgraded", "kind": "nested" } ] }, { "type": "event", - "name": "dojo::base::base::Event", + "name": "dojo::contract::base_contract::base::Event", "kind": "enum", "variants": [ { "name": "UpgradeableEvent", - "type": "dojo::components::upgradeable::upgradeable::Event", + "type": "dojo::contract::upgradeable::upgradeable::Event", "kind": "flat" } ] diff --git a/manifests/dev/base/abis/dojo-world.json b/manifests/dev/base/abis/dojo-world.json index fe02b53..5620aa6 100644 --- a/manifests/dev/base/abis/dojo-world.json +++ b/manifests/dev/base/abis/dojo-world.json @@ -2,7 +2,7 @@ { "type": "impl", "name": "World", - "interface_name": "dojo::world::IWorld" + "interface_name": "dojo::world::world_contract::IWorld" }, { "type": "struct", @@ -24,7 +24,7 @@ }, { "type": "struct", - "name": "dojo::resource_metadata::ResourceMetadata", + "name": "dojo::model::metadata::ResourceMetadata", "members": [ { "name": "resource_id", @@ -48,7 +48,7 @@ }, { "type": "enum", - "name": "dojo::world::ModelIndex", + "name": "dojo::model::model::ModelIndex", "variants": [ { "name": "Keys", @@ -76,7 +76,7 @@ }, { "type": "struct", - "name": "dojo::database::introspect::FieldLayout", + "name": "dojo::model::layout::FieldLayout", "members": [ { "name": "selector", @@ -84,33 +84,33 @@ }, { "name": "layout", - "type": "dojo::database::introspect::Layout" + "type": "dojo::model::layout::Layout" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "enum", - "name": "dojo::database::introspect::Layout", + "name": "dojo::model::layout::Layout", "variants": [ { "name": "Fixed", @@ -118,15 +118,15 @@ }, { "name": "Struct", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Tuple", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Array", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "ByteArray", @@ -134,7 +134,7 @@ }, { "name": "Enum", - "type": "core::array::Span::" + "type": "core::array::Span::" } ] }, @@ -154,7 +154,7 @@ }, { "type": "interface", - "name": "dojo::world::IWorld", + "name": "dojo::world::world_contract::IWorld", "items": [ { "type": "function", @@ -167,7 +167,7 @@ ], "outputs": [ { - "type": "dojo::resource_metadata::ResourceMetadata" + "type": "dojo::model::metadata::ResourceMetadata" } ], "state_mutability": "view" @@ -178,7 +178,7 @@ "inputs": [ { "name": "metadata", - "type": "dojo::resource_metadata::ResourceMetadata" + "type": "dojo::model::metadata::ResourceMetadata" } ], "outputs": [], @@ -321,11 +321,11 @@ }, { "name": "index", - "type": "dojo::world::ModelIndex" + "type": "dojo::model::model::ModelIndex" }, { "name": "layout", - "type": "dojo::database::introspect::Layout" + "type": "dojo::model::layout::Layout" } ], "outputs": [ @@ -345,7 +345,7 @@ }, { "name": "index", - "type": "dojo::world::ModelIndex" + "type": "dojo::model::model::ModelIndex" }, { "name": "values", @@ -353,7 +353,7 @@ }, { "name": "layout", - "type": "dojo::database::introspect::Layout" + "type": "dojo::model::layout::Layout" } ], "outputs": [], @@ -369,11 +369,11 @@ }, { "name": "index", - "type": "dojo::world::ModelIndex" + "type": "dojo::model::model::ModelIndex" }, { "name": "layout", - "type": "dojo::database::introspect::Layout" + "type": "dojo::model::layout::Layout" } ], "outputs": [], @@ -579,11 +579,11 @@ { "type": "impl", "name": "UpgradeableWorld", - "interface_name": "dojo::world::IUpgradeableWorld" + "interface_name": "dojo::world::world_contract::IUpgradeableWorld" }, { "type": "interface", - "name": "dojo::world::IUpgradeableWorld", + "name": "dojo::world::world_contract::IUpgradeableWorld", "items": [ { "type": "function", @@ -602,11 +602,11 @@ { "type": "impl", "name": "UpgradeableState", - "interface_name": "dojo::interfaces::IUpgradeableState" + "interface_name": "dojo::world::update::IUpgradeableState" }, { "type": "struct", - "name": "dojo::interfaces::StorageUpdate", + "name": "dojo::world::update::StorageUpdate", "members": [ { "name": "key", @@ -620,17 +620,17 @@ }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "struct", - "name": "dojo::interfaces::ProgramOutput", + "name": "dojo::world::update::ProgramOutput", "members": [ { "name": "prev_state_root", @@ -668,7 +668,7 @@ }, { "type": "interface", - "name": "dojo::interfaces::IUpgradeableState", + "name": "dojo::world::update::IUpgradeableState", "items": [ { "type": "function", @@ -676,11 +676,11 @@ "inputs": [ { "name": "new_state", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "program_output", - "type": "dojo::interfaces::ProgramOutput" + "type": "dojo::world::update::ProgramOutput" }, { "name": "program_hash", @@ -695,11 +695,11 @@ { "type": "impl", "name": "ConfigImpl", - "interface_name": "dojo::config::interface::IConfig" + "interface_name": "dojo::world::config::IConfig" }, { "type": "interface", - "name": "dojo::config::interface::IConfig", + "name": "dojo::world::config::IConfig", "items": [ { "type": "function", @@ -784,7 +784,7 @@ }, { "type": "event", - "name": "dojo::world::world::WorldSpawned", + "name": "dojo::world::world_contract::world::WorldSpawned", "kind": "struct", "members": [ { @@ -801,7 +801,7 @@ }, { "type": "event", - "name": "dojo::world::world::ContractDeployed", + "name": "dojo::world::world_contract::world::ContractDeployed", "kind": "struct", "members": [ { @@ -833,7 +833,7 @@ }, { "type": "event", - "name": "dojo::world::world::ContractUpgraded", + "name": "dojo::world::world_contract::world::ContractUpgraded", "kind": "struct", "members": [ { @@ -850,7 +850,7 @@ }, { "type": "event", - "name": "dojo::world::world::WorldUpgraded", + "name": "dojo::world::world_contract::world::WorldUpgraded", "kind": "struct", "members": [ { @@ -862,7 +862,7 @@ }, { "type": "event", - "name": "dojo::world::world::MetadataUpdate", + "name": "dojo::world::world_contract::world::MetadataUpdate", "kind": "struct", "members": [ { @@ -879,7 +879,7 @@ }, { "type": "event", - "name": "dojo::world::world::NamespaceRegistered", + "name": "dojo::world::world_contract::world::NamespaceRegistered", "kind": "struct", "members": [ { @@ -896,7 +896,7 @@ }, { "type": "event", - "name": "dojo::world::world::ModelRegistered", + "name": "dojo::world::world_contract::world::ModelRegistered", "kind": "struct", "members": [ { @@ -933,7 +933,7 @@ }, { "type": "event", - "name": "dojo::world::world::StoreSetRecord", + "name": "dojo::world::world_contract::world::StoreSetRecord", "kind": "struct", "members": [ { @@ -955,7 +955,7 @@ }, { "type": "event", - "name": "dojo::world::world::StoreUpdateRecord", + "name": "dojo::world::world_contract::world::StoreUpdateRecord", "kind": "struct", "members": [ { @@ -977,7 +977,7 @@ }, { "type": "event", - "name": "dojo::world::world::StoreDelRecord", + "name": "dojo::world::world_contract::world::StoreDelRecord", "kind": "struct", "members": [ { @@ -994,7 +994,7 @@ }, { "type": "event", - "name": "dojo::world::world::WriterUpdated", + "name": "dojo::world::world_contract::world::WriterUpdated", "kind": "struct", "members": [ { @@ -1016,7 +1016,7 @@ }, { "type": "event", - "name": "dojo::world::world::OwnerUpdated", + "name": "dojo::world::world_contract::world::OwnerUpdated", "kind": "struct", "members": [ { @@ -1038,7 +1038,7 @@ }, { "type": "event", - "name": "dojo::config::component::Config::DifferProgramHashUpdate", + "name": "dojo::world::config::Config::DifferProgramHashUpdate", "kind": "struct", "members": [ { @@ -1050,7 +1050,7 @@ }, { "type": "event", - "name": "dojo::config::component::Config::MergerProgramHashUpdate", + "name": "dojo::world::config::Config::MergerProgramHashUpdate", "kind": "struct", "members": [ { @@ -1062,7 +1062,7 @@ }, { "type": "event", - "name": "dojo::config::component::Config::FactsRegistryUpdate", + "name": "dojo::world::config::Config::FactsRegistryUpdate", "kind": "struct", "members": [ { @@ -1074,29 +1074,29 @@ }, { "type": "event", - "name": "dojo::config::component::Config::Event", + "name": "dojo::world::config::Config::Event", "kind": "enum", "variants": [ { "name": "DifferProgramHashUpdate", - "type": "dojo::config::component::Config::DifferProgramHashUpdate", + "type": "dojo::world::config::Config::DifferProgramHashUpdate", "kind": "nested" }, { "name": "MergerProgramHashUpdate", - "type": "dojo::config::component::Config::MergerProgramHashUpdate", + "type": "dojo::world::config::Config::MergerProgramHashUpdate", "kind": "nested" }, { "name": "FactsRegistryUpdate", - "type": "dojo::config::component::Config::FactsRegistryUpdate", + "type": "dojo::world::config::Config::FactsRegistryUpdate", "kind": "nested" } ] }, { "type": "event", - "name": "dojo::world::world::StateUpdated", + "name": "dojo::world::world_contract::world::StateUpdated", "kind": "struct", "members": [ { @@ -1108,77 +1108,77 @@ }, { "type": "event", - "name": "dojo::world::world::Event", + "name": "dojo::world::world_contract::world::Event", "kind": "enum", "variants": [ { "name": "WorldSpawned", - "type": "dojo::world::world::WorldSpawned", + "type": "dojo::world::world_contract::world::WorldSpawned", "kind": "nested" }, { "name": "ContractDeployed", - "type": "dojo::world::world::ContractDeployed", + "type": "dojo::world::world_contract::world::ContractDeployed", "kind": "nested" }, { "name": "ContractUpgraded", - "type": "dojo::world::world::ContractUpgraded", + "type": "dojo::world::world_contract::world::ContractUpgraded", "kind": "nested" }, { "name": "WorldUpgraded", - "type": "dojo::world::world::WorldUpgraded", + "type": "dojo::world::world_contract::world::WorldUpgraded", "kind": "nested" }, { "name": "MetadataUpdate", - "type": "dojo::world::world::MetadataUpdate", + "type": "dojo::world::world_contract::world::MetadataUpdate", "kind": "nested" }, { "name": "NamespaceRegistered", - "type": "dojo::world::world::NamespaceRegistered", + "type": "dojo::world::world_contract::world::NamespaceRegistered", "kind": "nested" }, { "name": "ModelRegistered", - "type": "dojo::world::world::ModelRegistered", + "type": "dojo::world::world_contract::world::ModelRegistered", "kind": "nested" }, { "name": "StoreSetRecord", - "type": "dojo::world::world::StoreSetRecord", + "type": "dojo::world::world_contract::world::StoreSetRecord", "kind": "nested" }, { "name": "StoreUpdateRecord", - "type": "dojo::world::world::StoreUpdateRecord", + "type": "dojo::world::world_contract::world::StoreUpdateRecord", "kind": "nested" }, { "name": "StoreDelRecord", - "type": "dojo::world::world::StoreDelRecord", + "type": "dojo::world::world_contract::world::StoreDelRecord", "kind": "nested" }, { "name": "WriterUpdated", - "type": "dojo::world::world::WriterUpdated", + "type": "dojo::world::world_contract::world::WriterUpdated", "kind": "nested" }, { "name": "OwnerUpdated", - "type": "dojo::world::world::OwnerUpdated", + "type": "dojo::world::world_contract::world::OwnerUpdated", "kind": "nested" }, { "name": "ConfigEvent", - "type": "dojo::config::component::Config::Event", + "type": "dojo::world::config::Config::Event", "kind": "nested" }, { "name": "StateUpdated", - "type": "dojo::world::world::StateUpdated", + "type": "dojo::world::world_contract::world::StateUpdated", "kind": "nested" } ] diff --git a/manifests/dev/base/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json b/manifests/dev/base/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json index 78b2f4a..ce14cce 100644 --- a/manifests/dev/base/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json +++ b/manifests/dev/base/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json @@ -2,7 +2,7 @@ { "type": "impl", "name": "DojoModelImpl", - "interface_name": "dojo::model::IModel" + "interface_name": "dojo::model::model::IModel" }, { "type": "struct", @@ -48,7 +48,7 @@ }, { "type": "struct", - "name": "dojo::database::introspect::FieldLayout", + "name": "dojo::model::layout::FieldLayout", "members": [ { "name": "selector", @@ -56,33 +56,33 @@ }, { "name": "layout", - "type": "dojo::database::introspect::Layout" + "type": "dojo::model::layout::Layout" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "enum", - "name": "dojo::database::introspect::Layout", + "name": "dojo::model::layout::Layout", "variants": [ { "name": "Fixed", @@ -90,15 +90,15 @@ }, { "name": "Struct", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Tuple", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Array", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "ByteArray", @@ -106,7 +106,7 @@ }, { "name": "Enum", - "type": "core::array::Span::" + "type": "core::array::Span::" } ] }, @@ -122,7 +122,7 @@ }, { "type": "struct", - "name": "dojo::database::introspect::Member", + "name": "dojo::model::introspect::Member", "members": [ { "name": "name", @@ -134,23 +134,23 @@ }, { "name": "ty", - "type": "dojo::database::introspect::Ty" + "type": "dojo::model::introspect::Ty" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "struct", - "name": "dojo::database::introspect::Struct", + "name": "dojo::model::introspect::Struct", "members": [ { "name": "name", @@ -162,23 +162,23 @@ }, { "name": "children", - "type": "core::array::Span::" + "type": "core::array::Span::" } ] }, { "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>", + "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", "members": [ { "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::database::introspect::Ty)>" + "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" } ] }, { "type": "struct", - "name": "dojo::database::introspect::Enum", + "name": "dojo::model::introspect::Enum", "members": [ { "name": "name", @@ -190,23 +190,23 @@ }, { "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>" + "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "enum", - "name": "dojo::database::introspect::Ty", + "name": "dojo::model::introspect::Ty", "variants": [ { "name": "Primitive", @@ -214,19 +214,19 @@ }, { "name": "Struct", - "type": "dojo::database::introspect::Struct" + "type": "dojo::model::introspect::Struct" }, { "name": "Enum", - "type": "dojo::database::introspect::Enum" + "type": "dojo::model::introspect::Enum" }, { "name": "Tuple", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Array", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "ByteArray", @@ -236,7 +236,7 @@ }, { "type": "interface", - "name": "dojo::model::IModel", + "name": "dojo::model::model::IModel", "items": [ { "type": "function", @@ -343,7 +343,7 @@ "inputs": [], "outputs": [ { - "type": "dojo::database::introspect::Layout" + "type": "dojo::model::layout::Layout" } ], "state_mutability": "view" @@ -354,7 +354,7 @@ "inputs": [], "outputs": [ { - "type": "dojo::database::introspect::Ty" + "type": "dojo::model::introspect::Ty" } ], "state_mutability": "view" @@ -364,11 +364,11 @@ { "type": "impl", "name": "directions_availableImpl", - "interface_name": "dojo_starter::models::moves::Idirections_available" + "interface_name": "dojo_starter::models::Idirections_available" }, { "type": "enum", - "name": "dojo_starter::models::moves::Direction", + "name": "dojo_starter::models::Direction", "variants": [ { "name": "None", @@ -394,7 +394,7 @@ }, { "type": "struct", - "name": "dojo_starter::models::moves::DirectionsAvailable", + "name": "dojo_starter::models::DirectionsAvailable", "members": [ { "name": "player", @@ -402,13 +402,13 @@ }, { "name": "directions", - "type": "core::array::Array::" + "type": "core::array::Array::" } ] }, { "type": "interface", - "name": "dojo_starter::models::moves::Idirections_available", + "name": "dojo_starter::models::Idirections_available", "items": [ { "type": "function", @@ -416,7 +416,7 @@ "inputs": [ { "name": "model", - "type": "dojo_starter::models::moves::DirectionsAvailable" + "type": "dojo_starter::models::DirectionsAvailable" } ], "outputs": [], @@ -426,7 +426,7 @@ }, { "type": "event", - "name": "dojo_starter::models::moves::directions_available::Event", + "name": "dojo_starter::models::directions_available::Event", "kind": "enum", "variants": [] } diff --git a/manifests/dev/base/abis/models/dojo_starter-Moved-504403e5.json b/manifests/dev/base/abis/models/dojo_starter-Moved-504403e5.json index b42078c..8da4559 100644 --- a/manifests/dev/base/abis/models/dojo_starter-Moved-504403e5.json +++ b/manifests/dev/base/abis/models/dojo_starter-Moved-504403e5.json @@ -2,7 +2,7 @@ { "type": "impl", "name": "DojoModelImpl", - "interface_name": "dojo::model::IModel" + "interface_name": "dojo::model::model::IModel" }, { "type": "struct", @@ -48,7 +48,7 @@ }, { "type": "struct", - "name": "dojo::database::introspect::FieldLayout", + "name": "dojo::model::layout::FieldLayout", "members": [ { "name": "selector", @@ -56,33 +56,33 @@ }, { "name": "layout", - "type": "dojo::database::introspect::Layout" + "type": "dojo::model::layout::Layout" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "enum", - "name": "dojo::database::introspect::Layout", + "name": "dojo::model::layout::Layout", "variants": [ { "name": "Fixed", @@ -90,15 +90,15 @@ }, { "name": "Struct", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Tuple", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Array", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "ByteArray", @@ -106,7 +106,7 @@ }, { "name": "Enum", - "type": "core::array::Span::" + "type": "core::array::Span::" } ] }, @@ -122,7 +122,7 @@ }, { "type": "struct", - "name": "dojo::database::introspect::Member", + "name": "dojo::model::introspect::Member", "members": [ { "name": "name", @@ -134,23 +134,23 @@ }, { "name": "ty", - "type": "dojo::database::introspect::Ty" + "type": "dojo::model::introspect::Ty" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "struct", - "name": "dojo::database::introspect::Struct", + "name": "dojo::model::introspect::Struct", "members": [ { "name": "name", @@ -162,23 +162,23 @@ }, { "name": "children", - "type": "core::array::Span::" + "type": "core::array::Span::" } ] }, { "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>", + "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", "members": [ { "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::database::introspect::Ty)>" + "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" } ] }, { "type": "struct", - "name": "dojo::database::introspect::Enum", + "name": "dojo::model::introspect::Enum", "members": [ { "name": "name", @@ -190,23 +190,23 @@ }, { "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>" + "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "enum", - "name": "dojo::database::introspect::Ty", + "name": "dojo::model::introspect::Ty", "variants": [ { "name": "Primitive", @@ -214,19 +214,19 @@ }, { "name": "Struct", - "type": "dojo::database::introspect::Struct" + "type": "dojo::model::introspect::Struct" }, { "name": "Enum", - "type": "dojo::database::introspect::Enum" + "type": "dojo::model::introspect::Enum" }, { "name": "Tuple", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Array", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "ByteArray", @@ -236,7 +236,7 @@ }, { "type": "interface", - "name": "dojo::model::IModel", + "name": "dojo::model::model::IModel", "items": [ { "type": "function", @@ -343,7 +343,7 @@ "inputs": [], "outputs": [ { - "type": "dojo::database::introspect::Layout" + "type": "dojo::model::layout::Layout" } ], "state_mutability": "view" @@ -354,7 +354,7 @@ "inputs": [], "outputs": [ { - "type": "dojo::database::introspect::Ty" + "type": "dojo::model::introspect::Ty" } ], "state_mutability": "view" @@ -368,7 +368,7 @@ }, { "type": "enum", - "name": "dojo_starter::models::moves::Direction", + "name": "dojo_starter::models::Direction", "variants": [ { "name": "None", @@ -402,7 +402,7 @@ }, { "name": "direction", - "type": "dojo_starter::models::moves::Direction" + "type": "dojo_starter::models::Direction" } ] }, diff --git a/manifests/dev/base/abis/models/dojo_starter-Moves-2a29373f.json b/manifests/dev/base/abis/models/dojo_starter-Moves-2a29373f.json index 50fe316..de2fad3 100644 --- a/manifests/dev/base/abis/models/dojo_starter-Moves-2a29373f.json +++ b/manifests/dev/base/abis/models/dojo_starter-Moves-2a29373f.json @@ -2,7 +2,7 @@ { "type": "impl", "name": "DojoModelImpl", - "interface_name": "dojo::model::IModel" + "interface_name": "dojo::model::model::IModel" }, { "type": "struct", @@ -48,7 +48,7 @@ }, { "type": "struct", - "name": "dojo::database::introspect::FieldLayout", + "name": "dojo::model::layout::FieldLayout", "members": [ { "name": "selector", @@ -56,33 +56,33 @@ }, { "name": "layout", - "type": "dojo::database::introspect::Layout" + "type": "dojo::model::layout::Layout" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "enum", - "name": "dojo::database::introspect::Layout", + "name": "dojo::model::layout::Layout", "variants": [ { "name": "Fixed", @@ -90,15 +90,15 @@ }, { "name": "Struct", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Tuple", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Array", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "ByteArray", @@ -106,7 +106,7 @@ }, { "name": "Enum", - "type": "core::array::Span::" + "type": "core::array::Span::" } ] }, @@ -122,7 +122,7 @@ }, { "type": "struct", - "name": "dojo::database::introspect::Member", + "name": "dojo::model::introspect::Member", "members": [ { "name": "name", @@ -134,23 +134,23 @@ }, { "name": "ty", - "type": "dojo::database::introspect::Ty" + "type": "dojo::model::introspect::Ty" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "struct", - "name": "dojo::database::introspect::Struct", + "name": "dojo::model::introspect::Struct", "members": [ { "name": "name", @@ -162,23 +162,23 @@ }, { "name": "children", - "type": "core::array::Span::" + "type": "core::array::Span::" } ] }, { "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>", + "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", "members": [ { "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::database::introspect::Ty)>" + "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" } ] }, { "type": "struct", - "name": "dojo::database::introspect::Enum", + "name": "dojo::model::introspect::Enum", "members": [ { "name": "name", @@ -190,23 +190,23 @@ }, { "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>" + "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "enum", - "name": "dojo::database::introspect::Ty", + "name": "dojo::model::introspect::Ty", "variants": [ { "name": "Primitive", @@ -214,19 +214,19 @@ }, { "name": "Struct", - "type": "dojo::database::introspect::Struct" + "type": "dojo::model::introspect::Struct" }, { "name": "Enum", - "type": "dojo::database::introspect::Enum" + "type": "dojo::model::introspect::Enum" }, { "name": "Tuple", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Array", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "ByteArray", @@ -236,7 +236,7 @@ }, { "type": "interface", - "name": "dojo::model::IModel", + "name": "dojo::model::model::IModel", "items": [ { "type": "function", @@ -343,7 +343,7 @@ "inputs": [], "outputs": [ { - "type": "dojo::database::introspect::Layout" + "type": "dojo::model::layout::Layout" } ], "state_mutability": "view" @@ -354,7 +354,7 @@ "inputs": [], "outputs": [ { - "type": "dojo::database::introspect::Ty" + "type": "dojo::model::introspect::Ty" } ], "state_mutability": "view" @@ -364,11 +364,11 @@ { "type": "impl", "name": "movesImpl", - "interface_name": "dojo_starter::models::moves::Imoves" + "interface_name": "dojo_starter::models::Imoves" }, { "type": "enum", - "name": "dojo_starter::models::moves::Direction", + "name": "dojo_starter::models::Direction", "variants": [ { "name": "None", @@ -408,7 +408,7 @@ }, { "type": "struct", - "name": "dojo_starter::models::moves::Moves", + "name": "dojo_starter::models::Moves", "members": [ { "name": "player", @@ -420,7 +420,7 @@ }, { "name": "last_direction", - "type": "dojo_starter::models::moves::Direction" + "type": "dojo_starter::models::Direction" }, { "name": "can_move", @@ -430,7 +430,7 @@ }, { "type": "interface", - "name": "dojo_starter::models::moves::Imoves", + "name": "dojo_starter::models::Imoves", "items": [ { "type": "function", @@ -438,7 +438,7 @@ "inputs": [ { "name": "model", - "type": "dojo_starter::models::moves::Moves" + "type": "dojo_starter::models::Moves" } ], "outputs": [], @@ -448,7 +448,7 @@ }, { "type": "event", - "name": "dojo_starter::models::moves::moves::Event", + "name": "dojo_starter::models::moves::Event", "kind": "enum", "variants": [] } diff --git a/manifests/dev/base/abis/models/dojo_starter-Position-2ac8b4c1.json b/manifests/dev/base/abis/models/dojo_starter-Position-2ac8b4c1.json index 8259cab..5cfa776 100644 --- a/manifests/dev/base/abis/models/dojo_starter-Position-2ac8b4c1.json +++ b/manifests/dev/base/abis/models/dojo_starter-Position-2ac8b4c1.json @@ -2,7 +2,7 @@ { "type": "impl", "name": "DojoModelImpl", - "interface_name": "dojo::model::IModel" + "interface_name": "dojo::model::model::IModel" }, { "type": "struct", @@ -48,7 +48,7 @@ }, { "type": "struct", - "name": "dojo::database::introspect::FieldLayout", + "name": "dojo::model::layout::FieldLayout", "members": [ { "name": "selector", @@ -56,33 +56,33 @@ }, { "name": "layout", - "type": "dojo::database::introspect::Layout" + "type": "dojo::model::layout::Layout" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "enum", - "name": "dojo::database::introspect::Layout", + "name": "dojo::model::layout::Layout", "variants": [ { "name": "Fixed", @@ -90,15 +90,15 @@ }, { "name": "Struct", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Tuple", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Array", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "ByteArray", @@ -106,7 +106,7 @@ }, { "name": "Enum", - "type": "core::array::Span::" + "type": "core::array::Span::" } ] }, @@ -122,7 +122,7 @@ }, { "type": "struct", - "name": "dojo::database::introspect::Member", + "name": "dojo::model::introspect::Member", "members": [ { "name": "name", @@ -134,23 +134,23 @@ }, { "name": "ty", - "type": "dojo::database::introspect::Ty" + "type": "dojo::model::introspect::Ty" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "struct", - "name": "dojo::database::introspect::Struct", + "name": "dojo::model::introspect::Struct", "members": [ { "name": "name", @@ -162,23 +162,23 @@ }, { "name": "children", - "type": "core::array::Span::" + "type": "core::array::Span::" } ] }, { "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>", + "name": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>", "members": [ { "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::database::introspect::Ty)>" + "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" } ] }, { "type": "struct", - "name": "dojo::database::introspect::Enum", + "name": "dojo::model::introspect::Enum", "members": [ { "name": "name", @@ -190,23 +190,23 @@ }, { "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>" + "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" } ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "core::array::Span::", "members": [ { "name": "snapshot", - "type": "@core::array::Array::" + "type": "@core::array::Array::" } ] }, { "type": "enum", - "name": "dojo::database::introspect::Ty", + "name": "dojo::model::introspect::Ty", "variants": [ { "name": "Primitive", @@ -214,19 +214,19 @@ }, { "name": "Struct", - "type": "dojo::database::introspect::Struct" + "type": "dojo::model::introspect::Struct" }, { "name": "Enum", - "type": "dojo::database::introspect::Enum" + "type": "dojo::model::introspect::Enum" }, { "name": "Tuple", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "Array", - "type": "core::array::Span::" + "type": "core::array::Span::" }, { "name": "ByteArray", @@ -236,7 +236,7 @@ }, { "type": "interface", - "name": "dojo::model::IModel", + "name": "dojo::model::model::IModel", "items": [ { "type": "function", @@ -343,7 +343,7 @@ "inputs": [], "outputs": [ { - "type": "dojo::database::introspect::Layout" + "type": "dojo::model::layout::Layout" } ], "state_mutability": "view" @@ -354,7 +354,7 @@ "inputs": [], "outputs": [ { - "type": "dojo::database::introspect::Ty" + "type": "dojo::model::introspect::Ty" } ], "state_mutability": "view" @@ -364,11 +364,11 @@ { "type": "impl", "name": "positionImpl", - "interface_name": "dojo_starter::models::position::Iposition" + "interface_name": "dojo_starter::models::Iposition" }, { "type": "struct", - "name": "dojo_starter::models::position::Vec2", + "name": "dojo_starter::models::Vec2", "members": [ { "name": "x", @@ -382,7 +382,7 @@ }, { "type": "struct", - "name": "dojo_starter::models::position::Position", + "name": "dojo_starter::models::Position", "members": [ { "name": "player", @@ -390,13 +390,13 @@ }, { "name": "vec", - "type": "dojo_starter::models::position::Vec2" + "type": "dojo_starter::models::Vec2" } ] }, { "type": "interface", - "name": "dojo_starter::models::position::Iposition", + "name": "dojo_starter::models::Iposition", "items": [ { "type": "function", @@ -404,7 +404,7 @@ "inputs": [ { "name": "model", - "type": "dojo_starter::models::position::Position" + "type": "dojo_starter::models::Position" } ], "outputs": [], @@ -414,7 +414,7 @@ }, { "type": "event", - "name": "dojo_starter::models::position::position::Event", + "name": "dojo_starter::models::position::Event", "kind": "enum", "variants": [] } diff --git a/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml b/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml index b80f818..4f83bdb 100644 --- a/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml +++ b/manifests/dev/base/contracts/dojo_starter-actions-7a1c7102.toml @@ -1,6 +1,6 @@ kind = "DojoContract" -class_hash = "0x51ef3cab40318955db3a84671487f2e434ed7788b8192305326454a45159dc" -original_class_hash = "0x51ef3cab40318955db3a84671487f2e434ed7788b8192305326454a45159dc" +class_hash = "0x58bba620da6e6411af49f295669985f8832c56caae31903e1078e149356115f" +original_class_hash = "0x58bba620da6e6411af49f295669985f8832c56caae31903e1078e149356115f" base_class_hash = "0x0" abi = "manifests/dev/base/abis/contracts/dojo_starter-actions-7a1c7102.json" reads = [] diff --git a/manifests/dev/base/dojo-base.toml b/manifests/dev/base/dojo-base.toml index 063a71b..44b3746 100644 --- a/manifests/dev/base/dojo-base.toml +++ b/manifests/dev/base/dojo-base.toml @@ -1,6 +1,6 @@ kind = "Class" -class_hash = "0x6178b645cecd0c483994e4e592dea2c71ed26b2083de2a3e0af55fcf62cb31b" -original_class_hash = "0x6178b645cecd0c483994e4e592dea2c71ed26b2083de2a3e0af55fcf62cb31b" +class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" +original_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" abi = "manifests/dev/base/abis/dojo-base.json" tag = "dojo-base" manifest_name = "dojo-base" diff --git a/manifests/dev/base/dojo-world.toml b/manifests/dev/base/dojo-world.toml index 5df663d..612934e 100644 --- a/manifests/dev/base/dojo-world.toml +++ b/manifests/dev/base/dojo-world.toml @@ -1,6 +1,6 @@ kind = "Class" -class_hash = "0x564a2ff36752ddda913033318645e313928c7c96dc02efc82f597a66a9c6e58" -original_class_hash = "0x564a2ff36752ddda913033318645e313928c7c96dc02efc82f597a66a9c6e58" +class_hash = "0x32fb65ebfe6d91bb4b7ba0640650722c43ca0c917f5fc0f649ee2ecf720cde" +original_class_hash = "0x32fb65ebfe6d91bb4b7ba0640650722c43ca0c917f5fc0f649ee2ecf720cde" abi = "manifests/dev/base/abis/dojo-world.json" tag = "dojo-world" manifest_name = "dojo-world" diff --git a/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml b/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml index 6d8c853..30f2738 100644 --- a/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml +++ b/manifests/dev/base/models/dojo_starter-DirectionsAvailable-77844f1f.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x5dde0646c4d6116efd296bb1d5ec9c2b3b12b039403ce9e12048387eb00f6d7" -original_class_hash = "0x5dde0646c4d6116efd296bb1d5ec9c2b3b12b039403ce9e12048387eb00f6d7" +class_hash = "0x559b178cd83f2c888c17628cafcb6de68a1757551c54440a63dac2f9621c7b5" +original_class_hash = "0x559b178cd83f2c888c17628cafcb6de68a1757551c54440a63dac2f9621c7b5" abi = "manifests/dev/base/abis/models/dojo_starter-DirectionsAvailable-77844f1f.json" tag = "dojo_starter-DirectionsAvailable" manifest_name = "dojo_starter-DirectionsAvailable-77844f1f" diff --git a/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml b/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml index 48b734c..51e65ba 100644 --- a/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml +++ b/manifests/dev/base/models/dojo_starter-Moved-504403e5.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x3e0db1b3021b613fedd728d5bbd60f9c1b534bb200ca7e498498f723b8e582e" -original_class_hash = "0x3e0db1b3021b613fedd728d5bbd60f9c1b534bb200ca7e498498f723b8e582e" +class_hash = "0x2e06be7cf406eb3161fedf460a47faca68855eb9dad7d505c1b1f1875192ccd" +original_class_hash = "0x2e06be7cf406eb3161fedf460a47faca68855eb9dad7d505c1b1f1875192ccd" abi = "manifests/dev/base/abis/models/dojo_starter-Moved-504403e5.json" tag = "dojo_starter-Moved" manifest_name = "dojo_starter-Moved-504403e5" diff --git a/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml b/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml index a58afb3..be89206 100644 --- a/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml +++ b/manifests/dev/base/models/dojo_starter-Moves-2a29373f.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x4a6b4db5132c80cbf278d0dcaf1e885cc3fabb547bfdf73c188d61257646098" -original_class_hash = "0x4a6b4db5132c80cbf278d0dcaf1e885cc3fabb547bfdf73c188d61257646098" +class_hash = "0x44a126682e03558cadba7e42eddc836f2c72db906953a7f10706b8eaf5501e7" +original_class_hash = "0x44a126682e03558cadba7e42eddc836f2c72db906953a7f10706b8eaf5501e7" abi = "manifests/dev/base/abis/models/dojo_starter-Moves-2a29373f.json" tag = "dojo_starter-Moves" manifest_name = "dojo_starter-Moves-2a29373f" diff --git a/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml b/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml index 7357cb3..d6e7f37 100644 --- a/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml +++ b/manifests/dev/base/models/dojo_starter-Position-2ac8b4c1.toml @@ -1,6 +1,6 @@ kind = "DojoModel" -class_hash = "0x5663a554712bf9dafac003bf7031e90aea7b8876d5e7970cc3e5e77829de063" -original_class_hash = "0x5663a554712bf9dafac003bf7031e90aea7b8876d5e7970cc3e5e77829de063" +class_hash = "0x75900b2b430e5d9841664b48008f98851e72e8a9828c6f5f08a88abcefb77e" +original_class_hash = "0x75900b2b430e5d9841664b48008f98851e72e8a9828c6f5f08a88abcefb77e" abi = "manifests/dev/base/abis/models/dojo_starter-Position-2ac8b4c1.json" tag = "dojo_starter-Position" manifest_name = "dojo_starter-Position-2ac8b4c1" diff --git a/src/lib.cairo b/src/lib.cairo index deb6ae1..786bb77 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -2,10 +2,7 @@ mod systems { mod actions; } -mod models { - mod moves; - mod position; -} +mod models; mod tests { mod test_world; diff --git a/src/models.cairo b/src/models.cairo new file mode 100644 index 0000000..58b5617 --- /dev/null +++ b/src/models.cairo @@ -0,0 +1,88 @@ +use starknet::ContractAddress; + +#[derive(Copy, Drop, Serde)] +#[dojo::model] +pub struct Moves { + #[key] + pub player: ContractAddress, + pub remaining: u8, + pub last_direction: Direction, + pub can_move: bool, +} + +#[derive(Drop, Serde)] +#[dojo::model] +pub struct DirectionsAvailable { + #[key] + pub player: ContractAddress, + pub directions: Array, +} + +#[derive(Copy, Drop, Serde)] +#[dojo::model] +pub struct Position { + #[key] + pub player: ContractAddress, + pub vec: Vec2, +} + + +#[derive(Serde, Copy, Drop, Introspect)] +pub enum Direction { + None, + Left, + Right, + Up, + Down, +} + + +#[derive(Copy, Drop, Serde, Introspect)] +pub struct Vec2 { + pub x: u32, + pub y: u32 +} + + +impl DirectionIntoFelt252 of Into { + fn into(self: Direction) -> felt252 { + match self { + Direction::None => 0, + Direction::Left => 1, + Direction::Right => 2, + Direction::Up => 3, + Direction::Down => 4, + } + } +} + + +#[generate_trait] +impl Vec2Impl of Vec2Trait { + fn is_zero(self: Vec2) -> bool { + if self.x - self.y == 0 { + return true; + } + false + } + + fn is_equal(self: Vec2, b: Vec2) -> bool { + self.x == b.x && self.y == b.y + } +} + +#[cfg(test)] +mod tests { + use super::{Position, Vec2, Vec2Trait}; + + #[test] + fn test_vec_is_zero() { + assert(Vec2Trait::is_zero(Vec2 { x: 0, y: 0 }), 'not zero'); + } + + #[test] + fn test_vec_is_equal() { + let position = Vec2 { x: 420, y: 0 }; + assert(position.is_equal(Vec2 { x: 420, y: 0 }), 'not equal'); + } +} diff --git a/src/models/moves.cairo b/src/models/moves.cairo deleted file mode 100644 index 57f5993..0000000 --- a/src/models/moves.cairo +++ /dev/null @@ -1,41 +0,0 @@ -use starknet::ContractAddress; - -#[derive(Copy, Drop, Serde)] -#[dojo::model] -struct Moves { - #[key] - player: ContractAddress, - remaining: u8, - last_direction: Direction, - can_move: bool, -} - -#[derive(Drop, Serde)] -#[dojo::model] -struct DirectionsAvailable { - #[key] - player: ContractAddress, - directions: Array, -} - -#[derive(Serde, Copy, Drop, Introspect)] -enum Direction { - None, - Left, - Right, - Up, - Down, -} - -impl DirectionIntoFelt252 of Into { - fn into(self: Direction) -> felt252 { - match self { - Direction::None => 0, - Direction::Left => 1, - Direction::Right => 2, - Direction::Up => 3, - Direction::Down => 4, - } - } -} - diff --git a/src/models/position.cairo b/src/models/position.cairo deleted file mode 100644 index ff3d4bd..0000000 --- a/src/models/position.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use starknet::ContractAddress; - -#[derive(Copy, Drop, Serde)] -#[dojo::model] -struct Position { - #[key] - player: ContractAddress, - vec: Vec2, -} - -#[derive(Copy, Drop, Serde, Introspect)] -struct Vec2 { - x: u32, - y: u32 -} - -trait Vec2Trait { - fn is_zero(self: Vec2) -> bool; - fn is_equal(self: Vec2, b: Vec2) -> bool; -} - -impl Vec2Impl of Vec2Trait { - fn is_zero(self: Vec2) -> bool { - if self.x - self.y == 0 { - return true; - } - false - } - - fn is_equal(self: Vec2, b: Vec2) -> bool { - self.x == b.x && self.y == b.y - } -} - -#[cfg(test)] -mod tests { - use super::{Position, Vec2, Vec2Trait}; - - #[test] - fn test_vec_is_zero() { - assert(Vec2Trait::is_zero(Vec2 { x: 0, y: 0 }), 'not zero'); - } - - #[test] - fn test_vec_is_equal() { - let position = Vec2 { x: 420, y: 0 }; - assert(position.is_equal(Vec2 { x: 420, y: 0 }), 'not equal'); - } -} diff --git a/src/systems/actions.cairo b/src/systems/actions.cairo index 30e3cf8..1f0aab9 100644 --- a/src/systems/actions.cairo +++ b/src/systems/actions.cairo @@ -1,5 +1,5 @@ -use dojo_starter::models::moves::Direction; -use dojo_starter::models::position::Position; +use dojo_starter::models::Direction; +use dojo_starter::models::Position; // define the interface #[dojo::interface] @@ -13,9 +13,7 @@ trait IActions { mod actions { use super::{IActions, next_position}; use starknet::{ContractAddress, get_caller_address}; - use dojo_starter::models::{ - position::{Position, Vec2}, moves::{Moves, Direction, DirectionsAvailable} - }; + use dojo_starter::models::{Position, Vec2, Moves, Direction, DirectionsAvailable}; #[derive(Copy, Drop, Serde)] #[dojo::model] @@ -36,14 +34,7 @@ mod actions { // Update the world state with the new data. // 1. Set the player's remaining moves to 100. // 2. Move the player's position 10 units in both the x and y direction. - // 3. Set available directions to all four directions. (This is an example of how you can use an array in Dojo). - let directions_available = DirectionsAvailable { - player, - directions: array![ - Direction::Up, Direction::Right, Direction::Down, Direction::Left - ], - }; set!( world, ( @@ -53,7 +44,6 @@ mod actions { Position { player, vec: Vec2 { x: position.vec.x + 10, y: position.vec.y + 10 } }, - // DirectionsAvailable { player, directions: array![Direction::Up], } ) ); } diff --git a/src/tests/test_world.cairo b/src/tests/test_world.cairo index 6f12a71..c1c7fae 100644 --- a/src/tests/test_world.cairo +++ b/src/tests/test_world.cairo @@ -8,7 +8,7 @@ mod tests { // import test utils use dojo_starter::{ systems::{actions::{actions, IActionsDispatcher, IActionsDispatcherTrait}}, - models::{position::{Position, Vec2, position}, moves::{Moves, Direction, moves}} + models::{{Position, Vec2, position, Moves, Direction, moves}} }; #[test] From 90f91d0a8cac855c062fd00b06a5f2e88fc62d85 Mon Sep 17 00:00:00 2001 From: ponderingdemocritus Date: Thu, 25 Jul 2024 18:54:27 +1000 Subject: [PATCH 09/10] bump ci --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5680f50..ce23f4c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v3 - run: curl -L https://install.dojoengine.org | bash - - run: /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.2 + - run: /home/runner/.config/.dojo/bin/dojoup -v v1.0.0-alpha.3 - run: | /home/runner/.config/.dojo/bin/sozo build /home/runner/.config/.dojo/bin/sozo test From 366c9412dca009e1277e7fa855b4c12c99fa38b7 Mon Sep 17 00:00:00 2001 From: ponderingdemocritus Date: Thu, 25 Jul 2024 19:08:52 +1000 Subject: [PATCH 10/10] fix tests --- src/tests/test_world.cairo | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tests/test_world.cairo b/src/tests/test_world.cairo index c1c7fae..4d58b2b 100644 --- a/src/tests/test_world.cairo +++ b/src/tests/test_world.cairo @@ -1,10 +1,9 @@ #[cfg(test)] mod tests { - use starknet::class_hash::Felt252TryIntoClassHash; // import world dispatcher use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; // import test utils - use dojo::test_utils::{spawn_test_world, deploy_contract}; + use dojo::utils::test::{spawn_test_world, deploy_contract}; // import test utils use dojo_starter::{ systems::{actions::{actions, IActionsDispatcher, IActionsDispatcherTrait}},