From 2cb1ab4925b60edab6f052f8cb159684f239ab4d Mon Sep 17 00:00:00 2001 From: RolandoDrRobot Date: Wed, 14 Aug 2024 15:46:36 -0400 Subject: [PATCH] created basic models and all of them sozo build properly --- .../models/bytebeasts_models_mt_mt.json} | 36 +- .../bytebeasts_models_potion_potion.json} | 24 +- .../dojo_starter_systems_actions_actions.json | 265 ----- .../abis/deployments/dojo_world_world.json | 996 ------------------ .../dojo_starter_models_beast_beast.json | 411 -------- ...ter_models_moves_directions_available.json | 389 ------- .../dojo_starter_models_moves_moves.json | 411 -------- ...starter_systems_actions_actions_moved.json | 389 ------- .../base/models/bytebeasts_models_mt_mt.toml | 30 + .../bytebeasts_models_potion_potion.toml | 20 + .../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 - scripts/default_auth.sh | 10 +- src/lib.cairo | 6 +- src/models/mt.cairo | 12 + src/models/potion.cairo | 10 + src/tests/test_world.cairo | 2 +- 20 files changed, 113 insertions(+), 2906 deletions(-) rename manifests/dev/abis/{deployments/models/dojo_starter_models_position_position.json => base/models/bytebeasts_models_mt_mt.json} (91%) rename manifests/dev/abis/{deployments/models/dojo_starter_models_user_user.json => base/models/bytebeasts_models_potion_potion.json} (93%) delete mode 100644 manifests/dev/abis/deployments/contracts/dojo_starter_systems_actions_actions.json delete mode 100644 manifests/dev/abis/deployments/dojo_world_world.json delete mode 100644 manifests/dev/abis/deployments/models/dojo_starter_models_beast_beast.json delete mode 100644 manifests/dev/abis/deployments/models/dojo_starter_models_moves_directions_available.json delete mode 100644 manifests/dev/abis/deployments/models/dojo_starter_models_moves_moves.json delete mode 100644 manifests/dev/abis/deployments/models/dojo_starter_systems_actions_actions_moved.json create mode 100644 manifests/dev/base/models/bytebeasts_models_mt_mt.toml create mode 100644 manifests/dev/base/models/bytebeasts_models_potion_potion.toml 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 create mode 100644 src/models/mt.cairo create mode 100644 src/models/potion.cairo diff --git a/manifests/dev/abis/deployments/models/dojo_starter_models_position_position.json b/manifests/dev/abis/base/models/bytebeasts_models_mt_mt.json similarity index 91% rename from manifests/dev/abis/deployments/models/dojo_starter_models_position_position.json rename to manifests/dev/abis/base/models/bytebeasts_models_mt_mt.json index de89995..e2fa463 100644 --- a/manifests/dev/abis/deployments/models/dojo_starter_models_position_position.json +++ b/manifests/dev/abis/base/models/bytebeasts_models_mt_mt.json @@ -319,40 +319,38 @@ }, { "type": "impl", - "name": "positionImpl", - "interface_name": "dojo_starter::models::position::Iposition" + "name": "mtImpl", + "interface_name": "bytebeasts::models::mt::Imt" }, { "type": "struct", - "name": "dojo_starter::models::position::Vec2", + "name": "bytebeasts::models::mt::Mt", "members": [ { - "name": "x", + "name": "mt_id", "type": "core::integer::u32" }, { - "name": "y", + "name": "mt_name", + "type": "core::felt252" + }, + { + "name": "mt_type", "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "dojo_starter::models::position::Position", - "members": [ + }, { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" + "name": "mt_power", + "type": "core::integer::u32" }, { - "name": "vec", - "type": "dojo_starter::models::position::Vec2" + "name": "mt_accuracy", + "type": "core::integer::u32" } ] }, { "type": "interface", - "name": "dojo_starter::models::position::Iposition", + "name": "bytebeasts::models::mt::Imt", "items": [ { "type": "function", @@ -360,7 +358,7 @@ "inputs": [ { "name": "model", - "type": "dojo_starter::models::position::Position" + "type": "bytebeasts::models::mt::Mt" } ], "outputs": [], @@ -370,7 +368,7 @@ }, { "type": "event", - "name": "dojo_starter::models::position::position::Event", + "name": "bytebeasts::models::mt::mt::Event", "kind": "enum", "variants": [] } diff --git a/manifests/dev/abis/deployments/models/dojo_starter_models_user_user.json b/manifests/dev/abis/base/models/bytebeasts_models_potion_potion.json similarity index 93% rename from manifests/dev/abis/deployments/models/dojo_starter_models_user_user.json rename to manifests/dev/abis/base/models/bytebeasts_models_potion_potion.json index 334729f..53ab353 100644 --- a/manifests/dev/abis/deployments/models/dojo_starter_models_user_user.json +++ b/manifests/dev/abis/base/models/bytebeasts_models_potion_potion.json @@ -319,26 +319,30 @@ }, { "type": "impl", - "name": "userImpl", - "interface_name": "dojo_starter::models::user::Iuser" + "name": "potionImpl", + "interface_name": "bytebeasts::models::potion::Ipotion" }, { "type": "struct", - "name": "dojo_starter::models::user::User", + "name": "bytebeasts::models::potion::Potion", "members": [ { - "name": "user_id", - "type": "core::starknet::contract_address::ContractAddress" + "name": "potion_id", + "type": "core::integer::u32" }, { - "name": "name", - "type": "core::starknet::contract_address::ContractAddress" + "name": "potion_name", + "type": "core::felt252" + }, + { + "name": "potion_effect", + "type": "core::integer::u32" } ] }, { "type": "interface", - "name": "dojo_starter::models::user::Iuser", + "name": "bytebeasts::models::potion::Ipotion", "items": [ { "type": "function", @@ -346,7 +350,7 @@ "inputs": [ { "name": "model", - "type": "dojo_starter::models::user::User" + "type": "bytebeasts::models::potion::Potion" } ], "outputs": [], @@ -356,7 +360,7 @@ }, { "type": "event", - "name": "dojo_starter::models::user::user::Event", + "name": "bytebeasts::models::potion::potion::Event", "kind": "enum", "variants": [] } diff --git a/manifests/dev/abis/deployments/contracts/dojo_starter_systems_actions_actions.json b/manifests/dev/abis/deployments/contracts/dojo_starter_systems_actions_actions.json deleted file mode 100644 index bd4d9ed..0000000 --- a/manifests/dev/abis/deployments/contracts/dojo_starter_systems_actions_actions.json +++ /dev/null @@ -1,265 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoResourceProviderImpl", - "interface_name": "dojo::world::IDojoResourceProvider" - }, - { - "type": "interface", - "name": "dojo::world::IDojoResourceProvider", - "items": [ - { - "type": "function", - "name": "dojo_resource", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "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": "ActionsImpl", - "interface_name": "dojo_starter::systems::actions::IActions" - }, - { - "type": "enum", - "name": "dojo_starter::models::moves::Direction", - "variants": [ - { - "name": "None", - "type": "()" - }, - { - "name": "Left", - "type": "()" - }, - { - "name": "Right", - "type": "()" - }, - { - "name": "Up", - "type": "()" - }, - { - "name": "Down", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo_starter::systems::actions::IActions", - "items": [ - { - "type": "function", - "name": "spawn", - "inputs": [], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "move", - "inputs": [ - { - "name": "direction", - "type": "dojo_starter::models::moves::Direction" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "attack", - "inputs": [ - { - "name": "beast_id", - "type": "core::felt252" - }, - { - "name": "damage", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "createBeast", - "inputs": [ - { - "name": "beast_id", - "type": "core::felt252" - }, - { - "name": "beast_type", - "type": "core::felt252" - }, - { - "name": "hp", - "type": "core::integer::u32" - }, - { - "name": "currentHp", - "type": "core::integer::u32" - }, - { - "name": "mp", - "type": "core::integer::u64" - }, - { - "name": "currentMp", - "type": "core::integer::u64" - }, - { - "name": "strength", - "type": "core::integer::u64" - }, - { - "name": "defense", - "type": "core::integer::u64" - }, - { - "name": "equipped_weapon", - "type": "core::felt252" - }, - { - "name": "wpn_power", - "type": "core::integer::u8" - }, - { - "name": "equipped_armor", - "type": "core::felt252" - }, - { - "name": "armor_power", - "type": "core::integer::u64" - }, - { - "name": "experience_to_nex_level", - "type": "core::integer::u64" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "dojo_starter::systems::actions::actions::IDojoInit" - }, - { - "type": "interface", - "name": "dojo_starter::systems::actions::actions::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "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": "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_starter::systems::actions::actions::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::components::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/abis/deployments/dojo_world_world.json b/manifests/dev/abis/deployments/dojo_world_world.json deleted file mode 100644 index c1a2447..0000000 --- a/manifests/dev/abis/deployments/dojo_world_world.json +++ /dev/null @@ -1,996 +0,0 @@ -[ - { - "type": "impl", - "name": "World", - "interface_name": "dojo::world::IWorld" - }, - { - "type": "struct", - "name": "core::byte_array::ByteArray", - "members": [ - { - "name": "data", - "type": "core::array::Array::" - }, - { - "name": "pending_word", - "type": "core::felt252" - }, - { - "name": "pending_word_len", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "dojo::resource_metadata::ResourceMetadata", - "members": [ - { - "name": "resource_id", - "type": "core::felt252" - }, - { - "name": "metadata_uri", - "type": "core::byte_array::ByteArray" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::IWorld", - "items": [ - { - "type": "function", - "name": "metadata", - "inputs": [ - { - "name": "resource_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "dojo::resource_metadata::ResourceMetadata" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_metadata", - "inputs": [ - { - "name": "metadata", - "type": "dojo::resource_metadata::ResourceMetadata" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "model", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "(core::starknet::class_hash::ClassHash, core::starknet::contract_address::ContractAddress)" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "register_model", - "inputs": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "deploy_contract", - "inputs": [ - { - "name": "salt", - "type": "core::felt252" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - }, - { - "name": "init_calldata", - "type": "core::array::Span::" - } - ], - "outputs": [ - { - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_contract", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "uuid", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "emit", - "inputs": [ - { - "name": "keys", - "type": "core::array::Array::" - }, - { - "name": "values", - "type": "core::array::Span::" - } - ], - "outputs": [], - "state_mutability": "view" - }, - { - "type": "function", - "name": "entity", - "inputs": [ - { - "name": "model", - "type": "core::felt252" - }, - { - "name": "keys", - "type": "core::array::Span::" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_entity", - "inputs": [ - { - "name": "model", - "type": "core::felt252" - }, - { - "name": "keys", - "type": "core::array::Span::" - }, - { - "name": "values", - "type": "core::array::Span::" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "delete_entity", - "inputs": [ - { - "name": "model", - "type": "core::felt252" - }, - { - "name": "keys", - "type": "core::array::Span::" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "base", - "inputs": [], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "is_owner", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "resource", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "grant_owner", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "resource", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "revoke_owner", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "resource", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "is_writer", - "inputs": [ - { - "name": "model", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "grant_writer", - "inputs": [ - { - "name": "model", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "revoke_writer", - "inputs": [ - { - "name": "model", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableWorld", - "interface_name": "dojo::world::IUpgradeableWorld" - }, - { - "type": "interface", - "name": "dojo::world::IUpgradeableWorld", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableState", - "interface_name": "dojo::interfaces::IUpgradeableState" - }, - { - "type": "struct", - "name": "dojo::interfaces::StorageUpdate", - "members": [ - { - "name": "key", - "type": "core::felt252" - }, - { - "name": "value", - "type": "core::felt252" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::interfaces::ProgramOutput", - "members": [ - { - "name": "prev_state_root", - "type": "core::felt252" - }, - { - "name": "new_state_root", - "type": "core::felt252" - }, - { - "name": "block_number", - "type": "core::felt252" - }, - { - "name": "block_hash", - "type": "core::felt252" - }, - { - "name": "config_hash", - "type": "core::felt252" - }, - { - "name": "world_da_hash", - "type": "core::felt252" - }, - { - "name": "message_to_starknet_segment", - "type": "core::array::Span::" - }, - { - "name": "message_to_appchain_segment", - "type": "core::array::Span::" - } - ] - }, - { - "type": "interface", - "name": "dojo::interfaces::IUpgradeableState", - "items": [ - { - "type": "function", - "name": "upgrade_state", - "inputs": [ - { - "name": "new_state", - "type": "core::array::Span::" - }, - { - "name": "program_output", - "type": "dojo::interfaces::ProgramOutput" - }, - { - "name": "program_hash", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "ConfigImpl", - "interface_name": "dojo::config::interface::IConfig" - }, - { - "type": "interface", - "name": "dojo::config::interface::IConfig", - "items": [ - { - "type": "function", - "name": "set_differ_program_hash", - "inputs": [ - { - "name": "program_hash", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "set_merger_program_hash", - "inputs": [ - { - "name": "program_hash", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "get_differ_program_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_merger_program_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_facts_registry", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "get_facts_registry", - "inputs": [], - "outputs": [ - { - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "constructor", - "name": "constructor", - "inputs": [ - { - "name": "contract_base", - "type": "core::starknet::class_hash::ClassHash" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::WorldSpawned", - "kind": "struct", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "creator", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::ContractDeployed", - "kind": "struct", - "members": [ - { - "name": "salt", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::ContractUpgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::WorldUpgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::MetadataUpdate", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "uri", - "type": "core::byte_array::ByteArray", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::ModelRegistered", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "prev_class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "prev_address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::StoreSetRecord", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "keys", - "type": "core::array::Span::", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::StoreDelRecord", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "keys", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::WriterUpdated", - "kind": "struct", - "members": [ - { - "name": "model", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "value", - "type": "core::bool", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::OwnerUpdated", - "kind": "struct", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "resource", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "value", - "type": "core::bool", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::config::component::Config::DifferProgramHashUpdate", - "kind": "struct", - "members": [ - { - "name": "program_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::config::component::Config::MergerProgramHashUpdate", - "kind": "struct", - "members": [ - { - "name": "program_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::config::component::Config::FactsRegistryUpdate", - "kind": "struct", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::config::component::Config::Event", - "kind": "enum", - "variants": [ - { - "name": "DifferProgramHashUpdate", - "type": "dojo::config::component::Config::DifferProgramHashUpdate", - "kind": "nested" - }, - { - "name": "MergerProgramHashUpdate", - "type": "dojo::config::component::Config::MergerProgramHashUpdate", - "kind": "nested" - }, - { - "name": "FactsRegistryUpdate", - "type": "dojo::config::component::Config::FactsRegistryUpdate", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::StateUpdated", - "kind": "struct", - "members": [ - { - "name": "da_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world::Event", - "kind": "enum", - "variants": [ - { - "name": "WorldSpawned", - "type": "dojo::world::world::WorldSpawned", - "kind": "nested" - }, - { - "name": "ContractDeployed", - "type": "dojo::world::world::ContractDeployed", - "kind": "nested" - }, - { - "name": "ContractUpgraded", - "type": "dojo::world::world::ContractUpgraded", - "kind": "nested" - }, - { - "name": "WorldUpgraded", - "type": "dojo::world::world::WorldUpgraded", - "kind": "nested" - }, - { - "name": "MetadataUpdate", - "type": "dojo::world::world::MetadataUpdate", - "kind": "nested" - }, - { - "name": "ModelRegistered", - "type": "dojo::world::world::ModelRegistered", - "kind": "nested" - }, - { - "name": "StoreSetRecord", - "type": "dojo::world::world::StoreSetRecord", - "kind": "nested" - }, - { - "name": "StoreDelRecord", - "type": "dojo::world::world::StoreDelRecord", - "kind": "nested" - }, - { - "name": "WriterUpdated", - "type": "dojo::world::world::WriterUpdated", - "kind": "nested" - }, - { - "name": "OwnerUpdated", - "type": "dojo::world::world::OwnerUpdated", - "kind": "nested" - }, - { - "name": "ConfigEvent", - "type": "dojo::config::component::Config::Event", - "kind": "nested" - }, - { - "name": "StateUpdated", - "type": "dojo::world::world::StateUpdated", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/abis/deployments/models/dojo_starter_models_beast_beast.json b/manifests/dev/abis/deployments/models/dojo_starter_models_beast_beast.json deleted file mode 100644 index 421b2bf..0000000 --- a/manifests/dev/abis/deployments/models/dojo_starter_models_beast_beast.json +++ /dev/null @@ -1,411 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::IModel" - }, - { - "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": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::database::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::database::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::database::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::database::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::IModel", - "items": [ - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::database::introspect::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::database::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "beastImpl", - "interface_name": "dojo_starter::models::beast::Ibeast" - }, - { - "type": "struct", - "name": "dojo_starter::models::beast::Beast", - "members": [ - { - "name": "beast_id", - "type": "core::felt252" - }, - { - "name": "player_id", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "beast_type", - "type": "core::felt252" - }, - { - "name": "hp", - "type": "core::integer::u32" - }, - { - "name": "currentHp", - "type": "core::integer::u32" - }, - { - "name": "mp", - "type": "core::integer::u64" - }, - { - "name": "currentMp", - "type": "core::integer::u64" - }, - { - "name": "strength", - "type": "core::integer::u64" - }, - { - "name": "defense", - "type": "core::integer::u64" - }, - { - "name": "equipped_weapon", - "type": "core::felt252" - }, - { - "name": "wpn_power", - "type": "core::integer::u8" - }, - { - "name": "equipped_armor", - "type": "core::felt252" - }, - { - "name": "armor_power", - "type": "core::integer::u64" - }, - { - "name": "experience_to_nex_level", - "type": "core::integer::u64" - } - ] - }, - { - "type": "interface", - "name": "dojo_starter::models::beast::Ibeast", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "dojo_starter::models::beast::Beast" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "dojo_starter::models::beast::beast::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/abis/deployments/models/dojo_starter_models_moves_directions_available.json b/manifests/dev/abis/deployments/models/dojo_starter_models_moves_directions_available.json deleted file mode 100644 index 16cb2ac..0000000 --- a/manifests/dev/abis/deployments/models/dojo_starter_models_moves_directions_available.json +++ /dev/null @@ -1,389 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::IModel" - }, - { - "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": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::database::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::database::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::database::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::database::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::IModel", - "items": [ - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::database::introspect::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::database::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "directions_availableImpl", - "interface_name": "dojo_starter::models::moves::Idirections_available" - }, - { - "type": "enum", - "name": "dojo_starter::models::moves::Direction", - "variants": [ - { - "name": "None", - "type": "()" - }, - { - "name": "Left", - "type": "()" - }, - { - "name": "Right", - "type": "()" - }, - { - "name": "Up", - "type": "()" - }, - { - "name": "Down", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "dojo_starter::models::moves::DirectionsAvailable", - "members": [ - { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "directions", - "type": "core::array::Array::" - } - ] - }, - { - "type": "interface", - "name": "dojo_starter::models::moves::Idirections_available", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "dojo_starter::models::moves::DirectionsAvailable" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "dojo_starter::models::moves::directions_available::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/abis/deployments/models/dojo_starter_models_moves_moves.json b/manifests/dev/abis/deployments/models/dojo_starter_models_moves_moves.json deleted file mode 100644 index 5c0abb3..0000000 --- a/manifests/dev/abis/deployments/models/dojo_starter_models_moves_moves.json +++ /dev/null @@ -1,411 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::IModel" - }, - { - "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": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::database::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::database::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::database::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::database::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::IModel", - "items": [ - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::database::introspect::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::database::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "movesImpl", - "interface_name": "dojo_starter::models::moves::Imoves" - }, - { - "type": "enum", - "name": "dojo_starter::models::moves::Direction", - "variants": [ - { - "name": "None", - "type": "()" - }, - { - "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::moves::Moves", - "members": [ - { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "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::moves::Imoves", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "dojo_starter::models::moves::Moves" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "dojo_starter::models::moves::moves::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/abis/deployments/models/dojo_starter_systems_actions_actions_moved.json b/manifests/dev/abis/deployments/models/dojo_starter_systems_actions_actions_moved.json deleted file mode 100644 index baac961..0000000 --- a/manifests/dev/abis/deployments/models/dojo_starter_systems_actions_actions_moved.json +++ /dev/null @@ -1,389 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::IModel" - }, - { - "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": "enum", - "name": "core::option::Option::", - "variants": [ - { - "name": "Some", - "type": "core::integer::u32" - }, - { - "name": "None", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::database::introspect::Layout" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Layout", - "variants": [ - { - "name": "Fixed", - "type": "core::array::Span::" - }, - { - "name": "Struct", - "type": "core::array::Span::" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - }, - { - "name": "Enum", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::database::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Struct", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::database::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::database::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::database::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::database::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::IModel", - "items": [ - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "version", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::option::Option::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "dojo::database::introspect::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::database::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "movedImpl", - "interface_name": "dojo_starter::systems::actions::actions::Imoved" - }, - { - "type": "enum", - "name": "dojo_starter::models::moves::Direction", - "variants": [ - { - "name": "None", - "type": "()" - }, - { - "name": "Left", - "type": "()" - }, - { - "name": "Right", - "type": "()" - }, - { - "name": "Up", - "type": "()" - }, - { - "name": "Down", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "dojo_starter::systems::actions::actions::Moved", - "members": [ - { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "direction", - "type": "dojo_starter::models::moves::Direction" - } - ] - }, - { - "type": "interface", - "name": "dojo_starter::systems::actions::actions::Imoved", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "dojo_starter::systems::actions::actions::Moved" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "dojo_starter::systems::actions::actions::moved::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/models/bytebeasts_models_mt_mt.toml b/manifests/dev/base/models/bytebeasts_models_mt_mt.toml new file mode 100644 index 0000000..6889958 --- /dev/null +++ b/manifests/dev/base/models/bytebeasts_models_mt_mt.toml @@ -0,0 +1,30 @@ +kind = "DojoModel" +class_hash = "0x10a1be04921f0dd2682d313192e9bae68792ea7104998fc661727e25d79353e" +original_class_hash = "0x10a1be04921f0dd2682d313192e9bae68792ea7104998fc661727e25d79353e" +abi = "manifests/dev/abis/base/models/bytebeasts_models_mt_mt.json" +name = "bytebeasts::models::mt::mt" + +[[members]] +name = "mt_id" +type = "u32" +key = true + +[[members]] +name = "mt_name" +type = "felt252" +key = false + +[[members]] +name = "mt_type" +type = "u32" +key = false + +[[members]] +name = "mt_power" +type = "u32" +key = false + +[[members]] +name = "mt_accuracy" +type = "u32" +key = false diff --git a/manifests/dev/base/models/bytebeasts_models_potion_potion.toml b/manifests/dev/base/models/bytebeasts_models_potion_potion.toml new file mode 100644 index 0000000..96acb32 --- /dev/null +++ b/manifests/dev/base/models/bytebeasts_models_potion_potion.toml @@ -0,0 +1,20 @@ +kind = "DojoModel" +class_hash = "0x540b4d3281748f229675e3a22e6a06cb0c24038b8ef1f2de2904bf7676be447" +original_class_hash = "0x540b4d3281748f229675e3a22e6a06cb0c24038b8ef1f2de2904bf7676be447" +abi = "manifests/dev/abis/base/models/bytebeasts_models_potion_potion.json" +name = "bytebeasts::models::potion::potion" + +[[members]] +name = "potion_id" +type = "u32" +key = true + +[[members]] +name = "potion_name" +type = "felt252" +key = false + +[[members]] +name = "potion_effect" +type = "u32" +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" diff --git a/scripts/default_auth.sh b/scripts/default_auth.sh index 404bb83..468113c 100755 --- a/scripts/default_auth.sh +++ b/scripts/default_auth.sh @@ -25,11 +25,11 @@ echo "-------------------------------------------------------------------------- # enable system -> models authorizations sozo auth grant --world $WORLD_ADDRESS --wait writer \ - Health,dojo_starter::systems::actions::actions\ - Player,dojo_starter::systems::actions::actions\ - Skill,dojo_starter::systems::actions::actions\ - Game,dojo_starter::systems::actions::actions\ - Counter,dojo_starter::systems::actions::actions\ + Health,bytebeasts::systems::actions::actions\ + Player,bytebeasts::systems::actions::actions\ + Skill,bytebeasts::systems::actions::actions\ + Game,bytebeasts::systems::actions::actions\ + Counter,bytebeasts::systems::actions::actions\ >/dev/null echo "Default authorizations have been successfully set." diff --git a/src/lib.cairo b/src/lib.cairo index 1426784..910da92 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,4 +1,6 @@ mod models { - mod beast; - mod player; + mod beast; + mod player; + mod mt; + mod potion; } diff --git a/src/models/mt.cairo b/src/models/mt.cairo new file mode 100644 index 0000000..5c6844a --- /dev/null +++ b/src/models/mt.cairo @@ -0,0 +1,12 @@ +use starknet::ContractAddress; + +#[derive(Copy, Drop, Serde)] +#[dojo::model] +struct Mt { + #[key] + mt_id: u32, + mt_name: felt252, + mt_type: u32, + mt_power: u32, + mt_accuracy: u32, +} diff --git a/src/models/potion.cairo b/src/models/potion.cairo new file mode 100644 index 0000000..aa45690 --- /dev/null +++ b/src/models/potion.cairo @@ -0,0 +1,10 @@ +use starknet::ContractAddress; + +#[derive(Copy, Drop, Serde)] +#[dojo::model] +struct Potion { + #[key] + potion_id: u32, + potion_name: felt252, + potion_effect: u32, +} diff --git a/src/tests/test_world.cairo b/src/tests/test_world.cairo index fda2d29..dfcc575 100644 --- a/src/tests/test_world.cairo +++ b/src/tests/test_world.cairo @@ -6,7 +6,7 @@ mod tests { // import test utils use dojo::test_utils::{spawn_test_world, deploy_contract}; // import test utils - use dojo_starter::{ + use bytebeasts::{ systems::{actions::{actions, IActionsDispatcher, IActionsDispatcherTrait}}, models::{position::{Position, Vec2, position}, moves::{Moves, Direction, moves}} };