diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d29b859..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Dojo - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Makefile b/Makefile deleted file mode 100644 index d9ef076..0000000 --- a/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -katana: - katana --disable-fee --allowed-origins "*" --invoke-max-steps 4294967295 - -setup: - @./scripts/setup.sh - -init: - @mkdir -p .git/hooks - @touch .git/hooks/pre-push - @echo '#!/bin/bash' > .git/hooks//pre-push - @echo 'echo "Running pre-push hook..."' >> .git/hooks/pre-push - @echo 'echo "Executing sozo test..."' >> .git/hooks/pre-push - @echo '' >> .git/hooks/pre-push - @echo '# Run sozo test' >> .git/hooks/pre-push - @echo 'if ! sozo test; then' >> .git/hooks/pre-push - @echo ' echo "โŒ sozo test failed. Push aborted."' >> .git/hooks/pre-push - @echo ' exit 1' >> .git/hooks/pre-push - @echo 'fi' >> .git/hooks/pre-push - @echo '' >> .git/hooks/pre-push - @echo 'echo "โœ… sozo test passed. Proceeding with push..."' >> .git/hooks/pre-push - @echo 'exit 0' >> .git/hooks/pre-push - @chmod +x .git/hooks/pre-push - @echo "Git hooks initialized successfully!" - -# Define tasks that are not real files -.PHONY: katana setup torii init - -# Catch-all rule for undefined commands -%: - @echo "Error: Command '$(MAKECMDGOALS)' is not defined." - @exit 1 diff --git a/README.md b/README.md deleted file mode 100755 index 1083b5c..0000000 --- a/README.md +++ /dev/null @@ -1,150 +0,0 @@ - - - ByteBeats official logo - - - - - - - - - -[![Telegram Chat][tg-badge]][tg-url] - -[tg-badge]: https://img.shields.io/endpoint?color=neon&logo=telegram&label=chat&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fdojoengine -[tg-url]: https://t.me/+-84e2pqLtqNkZDAx - -## Maintainers ๐Ÿฅท - - - - - - -
- Maintainer: danielcdz -
- danielcdz -
-
- Maintainer: Marco -
- Marco -
-
- -# Byte Beasts: Official Guide ๐Ÿ‰๐ŸŽฎ - -The official Byte Beasts guide, the quickest and most streamlined way to get your Dojo provable game up and running. This guide will assist you with the initial setup, from cloning the repository to deploying your world. - -Read the full tutorial [here](https://book.dojoengine.org/tutorial/dojo-starter). - -## Prerequisites ๐Ÿ“‹ - -To be able to run the ByteBeasts backend you need to have Git, Rust and Scarb installed on your PC to satisfy Dojo dependencies. You can install them with the following steps: - -### Install Rust ๐Ÿฆ€ - -Go to the [Rust installation page](https://doc.rust-lang.org/book/ch01-01-installation.html#installing-rustup-on-linux-or-macos) - -After installing Rust, ensure your `PATH` environment variable includes the Cargo bin directory (usually `$HOME/.cargo/bin`). - -### Install Git ๐Ÿง‘โ€๐Ÿ’ป - -Go to the [Git installation page](https://git-scm.com/downloads) and follow the instructions for your operating system to install Git. - -### Install Scarb โš™๏ธ - -The Dojo toolchain integrates [Scarb](https://docs.swmansion.com/scarb/) to build and run Dojo projects, installation instructions are [here](https://docs.swmansion.com/scarb/download.html). - -### Install Dojo using `dojoup` ๐Ÿฅ‹ - -You can install with the `dojoup` version manager which enables you to easily install, update and manage your Dojo installation. - -### Install dojoup ๐Ÿ› ๏ธ - -```bash -curl -L https://install.dojoengine.org | bash -``` - -### Install the Dojo v1.0.0-alpha.5 release ๐Ÿš€ - -dojoup --version 1.0.0-alpha.5 - -### Install Dojo using `asdf` ๐Ÿ“ฆ - -You can alternatively use the `asdf` package manager to install and manage your Dojo installation. - -### Install asdf - -Follow the [asdf installation instructions](https://asdf-vm.com/guide/getting-started.html) - -### Add the asdf-dojo plugin ๐Ÿ”Œ - -```bash -asdf plugin add dojo https://github.com/dojoengine/asdf-dojo -``` - -### Install the latest or a specific version ๐Ÿ†• - -```bash -asdf install dojo latest # For the latest version -asdf install dojo 0.7.0 # For a specific version - -``` - -### Set the global or local version ๐Ÿ“ - -```bash -asdf global dojo latest # Set globally -asdf local dojo 0.7.0 # Set locally in your project directory - -``` - -### Setup the hooks - -This project uses `Git hooks` to ensure code quality and prevent issues before they reach the remote repository. - -#### Pre-push Hook - -We have implemented a `pre-push` hook that automatically runs tests before any code is pushed to the remote repository. This helps maintain code quality and prevents broken code from being pushed. - -##### What it does - -- Runs `sozo test` automatically before each push -- Blocks the push if tests fail -- Allows the push to proceed only if all tests pass - -##### Setup Instructions - -```bash -# Run Katana -make init -``` - -## Running Locally ๐Ÿ–ฅ๏ธ - -### Terminal one (Make sure this is running) ๐Ÿƒ - -```bash -# Run Katana -make katana -``` - -### Terminal two ๐Ÿ”„ - -```bash -# Build migrate and start torii -make setup -``` - -## Contribution ๐Ÿค -We welcome contributions from developers of all levels! If you're interested in contributing to this project, please follow our [CONTRIBUTION GUIDELINES](./docs/contribution/CONTRIBUTION.md) to get started. - -Whether it's fixing bugs, improving documentation, or adding new features, your help is greatly appreciated. Don't hesitate to ask questions or reach out for supportโ€”we're here to help! - -## Communication channel ๐Ÿ“ข - -If you're a contributor or would like to connect with the project maintainers, feel free to join our [Telegram](https://t.me/+-84e2pqLtqNkZDAx) group! diff --git a/Scarb.lock b/Scarb.lock deleted file mode 100644 index 0295b6c..0000000 --- a/Scarb.lock +++ /dev/null @@ -1,22 +0,0 @@ -# Code generated by scarb DO NOT EDIT. -version = 1 - -[[package]] -name = "bytebeasts" -version = "0.1.0" -dependencies = [ - "dojo", -] - -[[package]] -name = "dojo" -version = "1.0.0-alpha.4" -source = "git+https://github.com/dojoengine/dojo?tag=v1.0.0-alpha.5#6878242e120d3135d3bc1bb94135d7135693069b" -dependencies = [ - "dojo_plugin", -] - -[[package]] -name = "dojo_plugin" -version = "1.0.0-alpha.4" -source = "git+https://github.com/dojoengine/dojo?rev=f15def33#f15def330c0d099e79351d11c197f63e8cc1ff36" diff --git a/Scarb.toml b/Scarb.toml deleted file mode 100644 index 7a14c65..0000000 --- a/Scarb.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -cairo-version = "=2.7.0" -name = "bytebeasts" -version = "0.1.0" - -[cairo] -sierra-replace-ids = true - -[scripts] -migrate = "sozo build && sozo migrate apply" -spawn = "./scripts/spawn.sh" -move = "./scripts/move.sh" - -[dependencies] -dojo = { git = "https://github.com/dojoengine/dojo", tag = "v1.0.0-alpha.5" } - -[[target.dojo]] diff --git a/assets/bytebeastslogo.svg b/assets/bytebeastslogo.svg deleted file mode 100644 index bc205d8..0000000 --- a/assets/bytebeastslogo.svg +++ /dev/null @@ -1,1916 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/cover.png b/assets/cover.png deleted file mode 100644 index 8ac043f..0000000 Binary files a/assets/cover.png and /dev/null differ diff --git a/assets/danielcdz.everai.png b/assets/danielcdz.everai.png deleted file mode 100644 index b46c12b..0000000 Binary files a/assets/danielcdz.everai.png and /dev/null differ diff --git a/assets/icon.png b/assets/icon.png deleted file mode 100644 index 2169b56..0000000 Binary files a/assets/icon.png and /dev/null differ diff --git a/assets/marco.everai.jpg b/assets/marco.everai.jpg deleted file mode 100644 index bef9653..0000000 Binary files a/assets/marco.everai.jpg and /dev/null differ diff --git a/docs/contribution/CONTRIBUTION.md b/docs/contribution/CONTRIBUTION.md deleted file mode 100644 index ea3fd44..0000000 --- a/docs/contribution/CONTRIBUTION.md +++ /dev/null @@ -1,92 +0,0 @@ - - - ByteBeats official logo - - - - - - - - - - -[![Telegram Chat][tg-badge]][tg-url] - -[tg-badge]: https://img.shields.io/endpoint?color=neon&logo=telegram&label=chat&style=flat-square&url=https%3A%2F%2Ftg.sumanjay.workers.dev%2Fdojoengine -[tg-url]: https://t.me/+-84e2pqLtqNkZDAx - - - - -# Contribution Guidelines -Thank you for considering contributing to this project! We appreciate your time and effort in improving our work. Below are the guidelines to help you contribute effectively, -but first, join our [Telegram](https://t.me/+-84e2pqLtqNkZDAx)! - -# How to Contribute -### 1. Fork the Repository: -Start by forking this repository to your GitHub account. - -### 2. Clone the Repository: -After forking, clone the repository to your local machine: -``` bash -git clone https://github.com/your-user/ByteBeastsBackend.git -cd ByteBeastBackend -``` - -### 3. Create a New Branch: -Create a new branch for your feature or bug fix following the branch naming convention: -- For bugs: `bug-fix-name` -- For new features: `feat-name` -``` bash -git checkout -b feature-name -``` - -### 4. Make Changes: -Make your changes to the codebase. Ensure your code adheres to the project's coding style and standards. Make sure to add/update tests if needed. - -### 5. Run Tests: -Before submitting your changes, run the existing test suite to ensure your code does not break anything: - -Start the Katana environment -``` bash -# Run Katana -katana --disable-fee --allowed-origins "*" -``` - -``` bash -# Build the example -sozo build -``` - -``` bash -# Run tests -sozo test -``` - -``` bash -# Apply migrations -sozo migrate apply -``` - -### 6. Commit Your Changes: -Use a descriptive commit message that explains your changes clearly. - -### 7. Push to Your Fork: -Push your changes to your forked repository. - - -### 8. Submit a Pull Request: -Once your changes are ready, submit a Pull Request (PR) for review. Ensure that: - -- Your PR has a clear and descriptive title. -- You provide a detailed explanation of the changes made. -- You reference any related issues (if applicable). - -All contributions must go through the PR review process to maintain code quality and consistency. -Once your PR is reviewed, the maintainers will provide feedback or merge it into the main branch. - -Thank you for your contribution, and we look forward to collaborating with you! diff --git a/dojo_dev.toml b/dojo_dev.toml deleted file mode 100644 index 1c5a7a7..0000000 --- a/dojo_dev.toml +++ /dev/null @@ -1,14 +0,0 @@ -[world] -name = "Bytebeasts" -description = "The official Byte Beasts guide, the quickest and most streamlined way to get your Dojo Autonomous World up and running. This guide will assist you with the initial setup, from cloning the repository to deploying your world." -seed = "bytebeasts" - -[namespace] -default = "bytebeasts" - -[env] -rpc_url = "http://0.0.0.0:5050" -# Default account for katana with seed = 0 -account_address = "0xb3ff441a68610b30fd5e2abbf3a1548eb6ba6f3559f2862bf2dc757e5828ca" -private_key = "0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a" -# world_address = "0x3fc79ccfd72c1450d2ccb73c5c521a7ec68b6c6af0caf96a0f1c39ce58876c8" # Uncomment and update this line with your world address. diff --git a/manifests/dev/base/abis/contracts/bytebeasts-actions-648ac931.json b/manifests/dev/base/abis/contracts/bytebeasts-actions-648ac931.json deleted file mode 100644 index d13a4e7..0000000 --- a/manifests/dev/base/abis/contracts/bytebeasts-actions-648ac931.json +++ /dev/null @@ -1,317 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "ActionsImpl", - "interface_name": "bytebeasts::systems::realms::IActions" - }, - { - "type": "enum", - "name": "bytebeasts::models::game::GameStatus", - "variants": [ - { - "name": "Pending", - "type": "()" - }, - { - "name": "InProgress", - "type": "()" - }, - { - "name": "Finished", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::game::Game", - "members": [ - { - "name": "game_id", - "type": "core::integer::u128" - }, - { - "name": "player_1", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_2", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_3", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_4", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "status", - "type": "bytebeasts::models::game::GameStatus" - }, - { - "name": "is_private", - "type": "core::bool" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::realms::IActions", - "items": [ - { - "type": "function", - "name": "create_initial_game_id", - "inputs": [], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "create_game", - "inputs": [], - "outputs": [ - { - "type": "bytebeasts::models::game::Game" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "join_game", - "inputs": [ - { - "name": "game_id", - "type": "core::integer::u128" - }, - { - "name": "player_2_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::realms::actions::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::realms::actions::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::realms::actions::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/contracts/bytebeasts-bag_system-7ad8a155.json b/manifests/dev/base/abis/contracts/bytebeasts-bag_system-7ad8a155.json deleted file mode 100644 index c0b8530..0000000 --- a/manifests/dev/base/abis/contracts/bytebeasts-bag_system-7ad8a155.json +++ /dev/null @@ -1,291 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "BagActionImpl", - "interface_name": "bytebeasts::systems::bag::IBagAction" - }, - { - "type": "struct", - "name": "bytebeasts::models::potion::Potion", - "members": [ - { - "name": "potion_id", - "type": "core::integer::u32" - }, - { - "name": "potion_name", - "type": "core::felt252" - }, - { - "name": "potion_effect", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::bag::IBagAction", - "items": [ - { - "type": "function", - "name": "init_bag", - "inputs": [ - { - "name": "bag_id", - "type": "core::integer::u32" - }, - { - "name": "player_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "add_item", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "bag_id", - "type": "core::integer::u32" - }, - { - "name": "potion", - "type": "bytebeasts::models::potion::Potion" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "take_out_item", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "bag_id", - "type": "core::integer::u32" - } - ], - "outputs": [ - { - "type": "bytebeasts::models::potion::Potion" - } - ], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::bag::bag_system::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::bag::bag_system::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::bag::bag_system::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/contracts/bytebeasts-battle_system-461868ac.json b/manifests/dev/base/abis/contracts/bytebeasts-battle_system-461868ac.json deleted file mode 100644 index 0c52cee..0000000 --- a/manifests/dev/base/abis/contracts/bytebeasts-battle_system-461868ac.json +++ /dev/null @@ -1,469 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "BattleActionsImpl", - "interface_name": "bytebeasts::systems::battle::IBattleActions" - }, - { - "type": "enum", - "name": "bytebeasts::models::world_elements::WorldElements", - "variants": [ - { - "name": "Crystal", - "type": "()" - }, - { - "name": "Draconic", - "type": "()" - }, - { - "name": "Shadow", - "type": "()" - }, - { - "name": "Light", - "type": "()" - }, - { - "name": "Titanium", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::beast::Beast", - "members": [ - { - "name": "beast_id", - "type": "core::integer::u32" - }, - { - "name": "beast_name", - "type": "core::felt252" - }, - { - "name": "beast_type", - "type": "bytebeasts::models::world_elements::WorldElements" - }, - { - "name": "beast_description", - "type": "core::felt252" - }, - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "hp", - "type": "core::integer::u32" - }, - { - "name": "current_hp", - "type": "core::integer::u32" - }, - { - "name": "attack", - "type": "core::integer::u32" - }, - { - "name": "defense", - "type": "core::integer::u32" - }, - { - "name": "mt1", - "type": "core::integer::u32" - }, - { - "name": "mt2", - "type": "core::integer::u32" - }, - { - "name": "mt3", - "type": "core::integer::u32" - }, - { - "name": "mt4", - "type": "core::integer::u32" - }, - { - "name": "level", - "type": "core::integer::u32" - }, - { - "name": "experience_to_next_level", - "type": "core::integer::u64" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::mt::Mt", - "members": [ - { - "name": "mt_id", - "type": "core::integer::u32" - }, - { - "name": "mt_name", - "type": "core::felt252" - }, - { - "name": "mt_type", - "type": "bytebeasts::models::world_elements::WorldElements" - }, - { - "name": "mt_power", - "type": "core::integer::u32" - }, - { - "name": "mt_accuracy", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::battle::IBattleActions", - "items": [ - { - "type": "function", - "name": "init_battle", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "opponent_id", - "type": "core::integer::u32" - } - ], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "check_flee_success", - "inputs": [ - { - "name": "player_beast", - "type": "bytebeasts::models::beast::Beast" - }, - { - "name": "opponent_beast", - "type": "bytebeasts::models::beast::Beast" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "calculate_damage", - "inputs": [ - { - "name": "mt", - "type": "bytebeasts::models::mt::Mt" - }, - { - "name": "attacker", - "type": "bytebeasts::models::beast::Beast" - }, - { - "name": "defender", - "type": "bytebeasts::models::beast::Beast" - } - ], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "opponent_turn", - "inputs": [ - { - "name": "battle_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "attack", - "inputs": [ - { - "name": "battle_id", - "type": "core::integer::u32" - }, - { - "name": "mt_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "use_potion", - "inputs": [ - { - "name": "battle_id", - "type": "core::integer::u32" - }, - { - "name": "potion_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "flee", - "inputs": [ - { - "name": "battle_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::battle::battle_system::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::battle::battle_system::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::battle::battle_system::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/contracts/bytebeasts-move_action-62decdb8.json b/manifests/dev/base/abis/contracts/bytebeasts-move_action-62decdb8.json deleted file mode 100644 index ed34d1f..0000000 --- a/manifests/dev/base/abis/contracts/bytebeasts-move_action-62decdb8.json +++ /dev/null @@ -1,237 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "MoveActionImpl", - "interface_name": "bytebeasts::systems::move::IMoveAction" - }, - { - "type": "interface", - "name": "bytebeasts::systems::move::IMoveAction", - "items": [ - { - "type": "function", - "name": "move", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "new_x", - "type": "core::integer::u32" - }, - { - "name": "new_y", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::move::move_action::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::move::move_action::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::move::move_action::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/contracts/bytebeasts-spawn_action-5176c1e8.json b/manifests/dev/base/abis/contracts/bytebeasts-spawn_action-5176c1e8.json deleted file mode 100644 index da498df..0000000 --- a/manifests/dev/base/abis/contracts/bytebeasts-spawn_action-5176c1e8.json +++ /dev/null @@ -1,229 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "SpawnActionImpl", - "interface_name": "bytebeasts::systems::spawn::ISpawnAction" - }, - { - "type": "interface", - "name": "bytebeasts::systems::spawn::ISpawnAction", - "items": [ - { - "type": "function", - "name": "spawn", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::spawn::spawn_action::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::spawn::spawn_action::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::spawn::spawn_action::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/contracts/bytebeasts-tournament_system-1f2bbf20.json b/manifests/dev/base/abis/contracts/bytebeasts-tournament_system-1f2bbf20.json deleted file mode 100644 index 682a26f..0000000 --- a/manifests/dev/base/abis/contracts/bytebeasts-tournament_system-1f2bbf20.json +++ /dev/null @@ -1,365 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "TournamentActionImpl", - "interface_name": "bytebeasts::systems::tournament::ITournamentAction" - }, - { - "type": "enum", - "name": "bytebeasts::models::tournament::TournamentStatus", - "variants": [ - { - "name": "Pending", - "type": "()" - }, - { - "name": "Ongoing", - "type": "()" - }, - { - "name": "Completed", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::tournament::Tournament", - "members": [ - { - "name": "tournament_id", - "type": "core::integer::u32" - }, - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "status", - "type": "bytebeasts::models::tournament::TournamentStatus" - }, - { - "name": "entry_fee", - "type": "core::integer::u32" - }, - { - "name": "max_participants", - "type": "core::integer::u32" - }, - { - "name": "current_participants", - "type": "core::array::Array::" - }, - { - "name": "prize_pool", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::tournament::ITournamentAction", - "items": [ - { - "type": "function", - "name": "create_tournament", - "inputs": [ - { - "name": "tournament_id", - "type": "core::integer::u32" - }, - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "status", - "type": "bytebeasts::models::tournament::TournamentStatus" - }, - { - "name": "entry_fee", - "type": "core::integer::u32" - }, - { - "name": "max_participants", - "type": "core::integer::u32" - }, - { - "name": "current_participants", - "type": "core::array::Array::" - }, - { - "name": "prize_pool", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_player", - "inputs": [ - { - "name": "tournament_id", - "type": "core::integer::u32" - }, - { - "name": "new_player_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "start_tournament", - "inputs": [ - { - "name": "tournament_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "complete_tournament", - "inputs": [ - { - "name": "tournament_id", - "type": "core::integer::u32" - }, - { - "name": "player_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "get_tournament", - "inputs": [ - { - "name": "tournament_id", - "type": "core::integer::u32" - } - ], - "outputs": [ - { - "type": "bytebeasts::models::tournament::Tournament" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::tournament::tournament_system::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::tournament::tournament_system::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::tournament::tournament_system::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/contracts/bytebeasts-world_setup-674b640b.json b/manifests/dev/base/abis/contracts/bytebeasts-world_setup-674b640b.json deleted file mode 100644 index edd696c..0000000 --- a/manifests/dev/base/abis/contracts/bytebeasts-world_setup-674b640b.json +++ /dev/null @@ -1,224 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldSetupImpl", - "interface_name": "bytebeasts::systems::world_setup::IWorldSetup" - }, - { - "type": "interface", - "name": "bytebeasts::systems::world_setup::IWorldSetup", - "items": [ - { - "type": "function", - "name": "setWorld", - "inputs": [], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::world_setup::world_setup::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::world_setup::world_setup::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::world_setup::world_setup::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/dojo-base.json b/manifests/dev/base/abis/dojo-base.json deleted file mode 100644 index 4800464..0000000 --- a/manifests/dev/base/abis/dojo-base.json +++ /dev/null @@ -1,98 +0,0 @@ -[ - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::base_contract::base::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "flat" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/dojo-world.json b/manifests/dev/base/abis/dojo-world.json deleted file mode 100644 index 897b4d9..0000000 --- a/manifests/dev/base/abis/dojo-world.json +++ /dev/null @@ -1,1226 +0,0 @@ -[ - { - "type": "impl", - "name": "World", - "interface_name": "dojo::world::world_contract::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::model::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": "enum", - "name": "dojo::model::model::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::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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": "dojo::world::world_contract::Resource", - "variants": [ - { - "name": "Model", - "type": "(core::starknet::class_hash::ClassHash, core::starknet::contract_address::ContractAddress)" - }, - { - "name": "Contract", - "type": "(core::starknet::class_hash::ClassHash, core::starknet::contract_address::ContractAddress)" - }, - { - "name": "Namespace", - "type": "()" - }, - { - "name": "World", - "type": "()" - }, - { - "name": "Unregistered", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorld", - "items": [ - { - "type": "function", - "name": "metadata", - "inputs": [ - { - "name": "resource_selector", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "dojo::model::metadata::ResourceMetadata" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_metadata", - "inputs": [ - { - "name": "metadata", - "type": "dojo::model::metadata::ResourceMetadata" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_namespace", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_model", - "inputs": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_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" - } - ], - "outputs": [ - { - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_contract", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "init_contract", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "init_calldata", - "type": "core::array::Span::" - } - ], - "outputs": [], - "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_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::model::ModelIndex" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::model::ModelIndex" - }, - { - "name": "values", - "type": "core::array::Span::" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "delete_entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::model::ModelIndex" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "base", - "inputs": [], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "resource", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "dojo::world::world_contract::Resource" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "is_owner", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "grant_owner", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "revoke_owner", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "is_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "grant_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "revoke_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableWorld", - "interface_name": "dojo::world::world_contract::IUpgradeableWorld" - }, - { - "type": "interface", - "name": "dojo::world::world_contract::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::world::update::IUpgradeableState" - }, - { - "type": "struct", - "name": "dojo::world::update::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::world::update::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::world::update::IUpgradeableState", - "items": [ - { - "type": "function", - "name": "upgrade_state", - "inputs": [ - { - "name": "new_state", - "type": "core::array::Span::" - }, - { - "name": "program_output", - "type": "dojo::world::update::ProgramOutput" - }, - { - "name": "program_hash", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "ConfigImpl", - "interface_name": "dojo::world::config::IConfig" - }, - { - "type": "interface", - "name": "dojo::world::config::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_contract::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_contract::world::ContractDeployed", - "kind": "struct", - "members": [ - { - "name": "salt", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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_contract::world::ContractInitialized", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "init_calldata", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::WorldUpgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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_contract::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_contract::world::ModelRegistered", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::ModelUpgraded", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "prev_class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "prev_address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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_contract::world::StoreUpdateRecord", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreUpdateMember", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "member_selector", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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_contract::world::WriterUpdated", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "value", - "type": "core::bool", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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::world::config::Config::DifferProgramHashUpdate", - "kind": "struct", - "members": [ - { - "name": "program_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::MergerProgramHashUpdate", - "kind": "struct", - "members": [ - { - "name": "program_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::FactsRegistryUpdate", - "kind": "struct", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::Event", - "kind": "enum", - "variants": [ - { - "name": "DifferProgramHashUpdate", - "type": "dojo::world::config::Config::DifferProgramHashUpdate", - "kind": "nested" - }, - { - "name": "MergerProgramHashUpdate", - "type": "dojo::world::config::Config::MergerProgramHashUpdate", - "kind": "nested" - }, - { - "name": "FactsRegistryUpdate", - "type": "dojo::world::config::Config::FactsRegistryUpdate", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StateUpdated", - "kind": "struct", - "members": [ - { - "name": "da_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::Event", - "kind": "enum", - "variants": [ - { - "name": "WorldSpawned", - "type": "dojo::world::world_contract::world::WorldSpawned", - "kind": "nested" - }, - { - "name": "ContractDeployed", - "type": "dojo::world::world_contract::world::ContractDeployed", - "kind": "nested" - }, - { - "name": "ContractUpgraded", - "type": "dojo::world::world_contract::world::ContractUpgraded", - "kind": "nested" - }, - { - "name": "ContractInitialized", - "type": "dojo::world::world_contract::world::ContractInitialized", - "kind": "nested" - }, - { - "name": "WorldUpgraded", - "type": "dojo::world::world_contract::world::WorldUpgraded", - "kind": "nested" - }, - { - "name": "MetadataUpdate", - "type": "dojo::world::world_contract::world::MetadataUpdate", - "kind": "nested" - }, - { - "name": "NamespaceRegistered", - "type": "dojo::world::world_contract::world::NamespaceRegistered", - "kind": "nested" - }, - { - "name": "ModelRegistered", - "type": "dojo::world::world_contract::world::ModelRegistered", - "kind": "nested" - }, - { - "name": "ModelUpgraded", - "type": "dojo::world::world_contract::world::ModelUpgraded", - "kind": "nested" - }, - { - "name": "StoreSetRecord", - "type": "dojo::world::world_contract::world::StoreSetRecord", - "kind": "nested" - }, - { - "name": "StoreUpdateRecord", - "type": "dojo::world::world_contract::world::StoreUpdateRecord", - "kind": "nested" - }, - { - "name": "StoreUpdateMember", - "type": "dojo::world::world_contract::world::StoreUpdateMember", - "kind": "nested" - }, - { - "name": "StoreDelRecord", - "type": "dojo::world::world_contract::world::StoreDelRecord", - "kind": "nested" - }, - { - "name": "WriterUpdated", - "type": "dojo::world::world_contract::world::WriterUpdated", - "kind": "nested" - }, - { - "name": "OwnerUpdated", - "type": "dojo::world::world_contract::world::OwnerUpdated", - "kind": "nested" - }, - { - "name": "ConfigEvent", - "type": "dojo::world::config::Config::Event", - "kind": "nested" - }, - { - "name": "StateUpdated", - "type": "dojo::world::world_contract::world::StateUpdated", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-Achievement-58a03b97.json b/manifests/dev/base/abis/models/bytebeasts-Achievement-58a03b97.json deleted file mode 100644 index 914ec1a..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-Achievement-58a03b97.json +++ /dev/null @@ -1,517 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "achievementImpl", - "interface_name": "bytebeasts::models::achievements::Iachievement" - }, - { - "type": "enum", - "name": "bytebeasts::models::achievement_type::AchievementType", - "variants": [ - { - "name": "FirstWin", - "type": "()" - }, - { - "name": "TenWins", - "type": "()" - }, - { - "name": "HundredWins", - "type": "()" - }, - { - "name": "FirstBeast", - "type": "()" - }, - { - "name": "TenBeasts", - "type": "()" - }, - { - "name": "RareBeast", - "type": "()" - }, - { - "name": "FirstNPCInteraction", - "type": "()" - }, - { - "name": "RandomBattleChampion", - "type": "()" - }, - { - "name": "BeastMaster", - "type": "()" - }, - { - "name": "LegendaryPlayer", - "type": "()" - }, - { - "name": "TopScorer", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "bytebeasts::models::achievement_rarity::AchievementRarity", - "variants": [ - { - "name": "Common", - "type": "()" - }, - { - "name": "Uncommon", - "type": "()" - }, - { - "name": "Rare", - "type": "()" - }, - { - "name": "Epic", - "type": "()" - }, - { - "name": "Legendary", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::achievements::Achievement", - "members": [ - { - "name": "achievement_id", - "type": "core::integer::u64" - }, - { - "name": "achievement_type", - "type": "bytebeasts::models::achievement_type::AchievementType" - }, - { - "name": "rarity", - "type": "bytebeasts::models::achievement_rarity::AchievementRarity" - }, - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "description", - "type": "core::byte_array::ByteArray" - }, - { - "name": "is_hidden", - "type": "core::bool" - }, - { - "name": "is_unlocked", - "type": "core::bool" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::achievements::Iachievement", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::achievements::Achievement" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::achievements::achievement::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-AchievementProgress-221f2719.json b/manifests/dev/base/abis/models/bytebeasts-AchievementProgress-221f2719.json deleted file mode 100644 index 9d690e4..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-AchievementProgress-221f2719.json +++ /dev/null @@ -1,429 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "achievement_progressImpl", - "interface_name": "bytebeasts::models::achievements::Iachievement_progress" - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::achievements::AchievementProgress", - "members": [ - { - "name": "player_id", - "type": "core::integer::u64" - }, - { - "name": "achievement_id", - "type": "core::integer::u64" - }, - { - "name": "progress", - "type": "core::integer::u32" - }, - { - "name": "is_unlocked", - "type": "core::bool" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::achievements::Iachievement_progress", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::achievements::AchievementProgress" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::achievements::achievement_progress::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-Bag-2571b77d.json b/manifests/dev/base/abis/models/bytebeasts-Bag-2571b77d.json deleted file mode 100644 index 8723385..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-Bag-2571b77d.json +++ /dev/null @@ -1,433 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "bagImpl", - "interface_name": "bytebeasts::models::bag::Ibag" - }, - { - "type": "struct", - "name": "bytebeasts::models::potion::Potion", - "members": [ - { - "name": "potion_id", - "type": "core::integer::u32" - }, - { - "name": "potion_name", - "type": "core::felt252" - }, - { - "name": "potion_effect", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::bag::Bag", - "members": [ - { - "name": "bag_id", - "type": "core::integer::u32" - }, - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "max_capacity", - "type": "core::integer::u32" - }, - { - "name": "potions", - "type": "core::array::Array::" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::bag::Ibag", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::bag::Bag" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::bag::bag::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-Battle-55b5860b.json b/manifests/dev/base/abis/models/bytebeasts-Battle-55b5860b.json deleted file mode 100644 index d2d4033..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-Battle-55b5860b.json +++ /dev/null @@ -1,427 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "battleImpl", - "interface_name": "bytebeasts::models::battle::Ibattle" - }, - { - "type": "struct", - "name": "bytebeasts::models::battle::Battle", - "members": [ - { - "name": "battle_id", - "type": "core::integer::u32" - }, - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "opponent_id", - "type": "core::integer::u32" - }, - { - "name": "active_beast_player", - "type": "core::integer::u32" - }, - { - "name": "active_beast_opponent", - "type": "core::integer::u32" - }, - { - "name": "battle_active", - "type": "core::integer::u32" - }, - { - "name": "turn", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::battle::Ibattle", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::battle::Battle" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::battle::battle::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-Beast-27809d20.json b/manifests/dev/base/abis/models/bytebeasts-Beast-27809d20.json deleted file mode 100644 index 7cf025f..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-Beast-27809d20.json +++ /dev/null @@ -1,485 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "beastImpl", - "interface_name": "bytebeasts::models::beast::Ibeast" - }, - { - "type": "enum", - "name": "bytebeasts::models::world_elements::WorldElements", - "variants": [ - { - "name": "Crystal", - "type": "()" - }, - { - "name": "Draconic", - "type": "()" - }, - { - "name": "Shadow", - "type": "()" - }, - { - "name": "Light", - "type": "()" - }, - { - "name": "Titanium", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::beast::Beast", - "members": [ - { - "name": "beast_id", - "type": "core::integer::u32" - }, - { - "name": "beast_name", - "type": "core::felt252" - }, - { - "name": "beast_type", - "type": "bytebeasts::models::world_elements::WorldElements" - }, - { - "name": "beast_description", - "type": "core::felt252" - }, - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "hp", - "type": "core::integer::u32" - }, - { - "name": "current_hp", - "type": "core::integer::u32" - }, - { - "name": "attack", - "type": "core::integer::u32" - }, - { - "name": "defense", - "type": "core::integer::u32" - }, - { - "name": "mt1", - "type": "core::integer::u32" - }, - { - "name": "mt2", - "type": "core::integer::u32" - }, - { - "name": "mt3", - "type": "core::integer::u32" - }, - { - "name": "mt4", - "type": "core::integer::u32" - }, - { - "name": "level", - "type": "core::integer::u32" - }, - { - "name": "experience_to_next_level", - "type": "core::integer::u64" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::beast::Ibeast", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::beast::Beast" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::beast::beast::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-Game-e91217d7.json b/manifests/dev/base/abis/models/bytebeasts-Game-e91217d7.json deleted file mode 100644 index 63358f6..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-Game-e91217d7.json +++ /dev/null @@ -1,459 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "gameImpl", - "interface_name": "bytebeasts::models::game::Igame" - }, - { - "type": "enum", - "name": "bytebeasts::models::game::GameStatus", - "variants": [ - { - "name": "Pending", - "type": "()" - }, - { - "name": "InProgress", - "type": "()" - }, - { - "name": "Finished", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::game::Game", - "members": [ - { - "name": "game_id", - "type": "core::integer::u128" - }, - { - "name": "player_1", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_2", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_3", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_4", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "status", - "type": "bytebeasts::models::game::GameStatus" - }, - { - "name": "is_private", - "type": "core::bool" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::game::Igame", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::game::Game" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::game::game::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-GameId-344511d3.json b/manifests/dev/base/abis/models/bytebeasts-GameId-344511d3.json deleted file mode 100644 index 6f9a0a0..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-GameId-344511d3.json +++ /dev/null @@ -1,407 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "game_idImpl", - "interface_name": "bytebeasts::models::game_id::Igame_id" - }, - { - "type": "struct", - "name": "bytebeasts::models::game_id::GameId", - "members": [ - { - "name": "id", - "type": "core::integer::u32" - }, - { - "name": "game_id", - "type": "core::integer::u128" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::game_id::Igame_id", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::game_id::GameId" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::game_id::game_id::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-GamePlayer-596ef4a1.json b/manifests/dev/base/abis/models/bytebeasts-GamePlayer-596ef4a1.json deleted file mode 100644 index 7045dc4..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-GamePlayer-596ef4a1.json +++ /dev/null @@ -1,439 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "game_playerImpl", - "interface_name": "bytebeasts::models::game_player::Igame_player" - }, - { - "type": "struct", - "name": "bytebeasts::models::game_player::GamePlayer", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "game_id", - "type": "core::integer::u128" - }, - { - "name": "beast_1", - "type": "core::integer::u8" - }, - { - "name": "beast_2", - "type": "core::integer::u8" - }, - { - "name": "beast_3", - "type": "core::integer::u8" - }, - { - "name": "beast_4", - "type": "core::integer::u8" - }, - { - "name": "bag_id", - "type": "core::integer::u8" - }, - { - "name": "active_mount", - "type": "core::integer::u8" - }, - { - "name": "mounts", - "type": "core::array::Array::" - }, - { - "name": "position", - "type": "core::array::Array::" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::game_player::Igame_player", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::game_player::GamePlayer" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::game_player::game_player::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-Mt-37360d30.json b/manifests/dev/base/abis/models/bytebeasts-Mt-37360d30.json deleted file mode 100644 index 6d38f65..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-Mt-37360d30.json +++ /dev/null @@ -1,445 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "mtImpl", - "interface_name": "bytebeasts::models::mt::Imt" - }, - { - "type": "enum", - "name": "bytebeasts::models::world_elements::WorldElements", - "variants": [ - { - "name": "Crystal", - "type": "()" - }, - { - "name": "Draconic", - "type": "()" - }, - { - "name": "Shadow", - "type": "()" - }, - { - "name": "Light", - "type": "()" - }, - { - "name": "Titanium", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::mt::Mt", - "members": [ - { - "name": "mt_id", - "type": "core::integer::u32" - }, - { - "name": "mt_name", - "type": "core::felt252" - }, - { - "name": "mt_type", - "type": "bytebeasts::models::world_elements::WorldElements" - }, - { - "name": "mt_power", - "type": "core::integer::u32" - }, - { - "name": "mt_accuracy", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::mt::Imt", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::mt::Mt" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::mt::mt::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-NPC-4c5239ac.json b/manifests/dev/base/abis/models/bytebeasts-NPC-4c5239ac.json deleted file mode 100644 index 1af2b1a..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-NPC-4c5239ac.json +++ /dev/null @@ -1,537 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "npcImpl", - "interface_name": "bytebeasts::models::npc::Inpc" - }, - { - "type": "enum", - "name": "bytebeasts::models::role::Role", - "variants": [ - { - "name": "Vendor", - "type": "()" - }, - { - "name": "Trainer", - "type": "()" - }, - { - "name": "Guide", - "type": "()" - }, - { - "name": "QuestGiver", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::coordinates::Coordinates", - "members": [ - { - "name": "x", - "type": "core::integer::u32" - }, - { - "name": "y", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "bytebeasts::models::mission_status::MissionStatus", - "variants": [ - { - "name": "NotStarted", - "type": "()" - }, - { - "name": "InProgress", - "type": "()" - }, - { - "name": "Completed", - "type": "()" - }, - { - "name": "Failed", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::potion::Potion", - "members": [ - { - "name": "potion_id", - "type": "core::integer::u32" - }, - { - "name": "potion_name", - "type": "core::felt252" - }, - { - "name": "potion_effect", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::npc::NPC", - "members": [ - { - "name": "npc_id", - "type": "core::integer::u32" - }, - { - "name": "npc_name", - "type": "core::felt252" - }, - { - "name": "npc_description", - "type": "core::felt252" - }, - { - "name": "npc_role", - "type": "bytebeasts::models::role::Role" - }, - { - "name": "dialogue", - "type": "core::byte_array::ByteArray" - }, - { - "name": "is_active", - "type": "core::bool" - }, - { - "name": "location", - "type": "bytebeasts::models::coordinates::Coordinates" - }, - { - "name": "importance_level", - "type": "core::integer::u8" - }, - { - "name": "mission_status", - "type": "bytebeasts::models::mission_status::MissionStatus" - }, - { - "name": "reward", - "type": "core::integer::u16" - }, - { - "name": "experience_points", - "type": "core::integer::u16" - }, - { - "name": "potions", - "type": "core::array::Array::" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::npc::Inpc", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::npc::NPC" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::npc::npc::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-Player-14f5e45e.json b/manifests/dev/base/abis/models/bytebeasts-Player-14f5e45e.json deleted file mode 100644 index cc9bf5c..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-Player-14f5e45e.json +++ /dev/null @@ -1,427 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "playerImpl", - "interface_name": "bytebeasts::models::player::Iplayer" - }, - { - "type": "struct", - "name": "bytebeasts::models::player::Player", - "members": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "player_name", - "type": "core::felt252" - }, - { - "name": "beast_1", - "type": "core::integer::u32" - }, - { - "name": "beast_2", - "type": "core::integer::u32" - }, - { - "name": "beast_3", - "type": "core::integer::u32" - }, - { - "name": "beast_4", - "type": "core::integer::u32" - }, - { - "name": "potions", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::player::Iplayer", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::player::Player" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::player::player::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-Position-78f28df6.json b/manifests/dev/base/abis/models/bytebeasts-Position-78f28df6.json deleted file mode 100644 index ed36018..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-Position-78f28df6.json +++ /dev/null @@ -1,455 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "positionImpl", - "interface_name": "bytebeasts::models::position::Iposition" - }, - { - "type": "struct", - "name": "bytebeasts::models::player::Player", - "members": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "player_name", - "type": "core::felt252" - }, - { - "name": "beast_1", - "type": "core::integer::u32" - }, - { - "name": "beast_2", - "type": "core::integer::u32" - }, - { - "name": "beast_3", - "type": "core::integer::u32" - }, - { - "name": "beast_4", - "type": "core::integer::u32" - }, - { - "name": "potions", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::coordinates::Coordinates", - "members": [ - { - "name": "x", - "type": "core::integer::u32" - }, - { - "name": "y", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::position::Position", - "members": [ - { - "name": "player", - "type": "bytebeasts::models::player::Player" - }, - { - "name": "coordinates", - "type": "bytebeasts::models::coordinates::Coordinates" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::position::Iposition", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::position::Position" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::position::position::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-Potion-6a2114b0.json b/manifests/dev/base/abis/models/bytebeasts-Potion-6a2114b0.json deleted file mode 100644 index 390f77b..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-Potion-6a2114b0.json +++ /dev/null @@ -1,411 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "potionImpl", - "interface_name": "bytebeasts::models::potion::Ipotion" - }, - { - "type": "struct", - "name": "bytebeasts::models::potion::Potion", - "members": [ - { - "name": "potion_id", - "type": "core::integer::u32" - }, - { - "name": "potion_name", - "type": "core::felt252" - }, - { - "name": "potion_effect", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::potion::Ipotion", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::potion::Potion" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::potion::potion::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-Status-6595af0f.json b/manifests/dev/base/abis/models/bytebeasts-Status-6595af0f.json deleted file mode 100644 index 439cd90..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-Status-6595af0f.json +++ /dev/null @@ -1,407 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "statusImpl", - "interface_name": "bytebeasts::systems::battle::battle_system::Istatus" - }, - { - "type": "struct", - "name": "bytebeasts::systems::battle::battle_system::Status", - "members": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "message", - "type": "core::felt252" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::battle::battle_system::Istatus", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::systems::battle::battle_system::Status" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::battle::battle_system::status::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-StatusBattle-161fdb64.json b/manifests/dev/base/abis/models/bytebeasts-StatusBattle-161fdb64.json deleted file mode 100644 index e387582..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-StatusBattle-161fdb64.json +++ /dev/null @@ -1,407 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "status_battleImpl", - "interface_name": "bytebeasts::systems::battle::battle_system::Istatus_battle" - }, - { - "type": "struct", - "name": "bytebeasts::systems::battle::battle_system::StatusBattle", - "members": [ - { - "name": "battle_id", - "type": "core::integer::u32" - }, - { - "name": "message", - "type": "core::felt252" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::battle::battle_system::Istatus_battle", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::systems::battle::battle_system::StatusBattle" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::battle::battle_system::status_battle::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/abis/models/bytebeasts-Tournament-12bdecb1.json b/manifests/dev/base/abis/models/bytebeasts-Tournament-12bdecb1.json deleted file mode 100644 index 9f93476..0000000 --- a/manifests/dev/base/abis/models/bytebeasts-Tournament-12bdecb1.json +++ /dev/null @@ -1,445 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "tournamentImpl", - "interface_name": "bytebeasts::models::tournament::Itournament" - }, - { - "type": "enum", - "name": "bytebeasts::models::tournament::TournamentStatus", - "variants": [ - { - "name": "Pending", - "type": "()" - }, - { - "name": "Ongoing", - "type": "()" - }, - { - "name": "Completed", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::tournament::Tournament", - "members": [ - { - "name": "tournament_id", - "type": "core::integer::u32" - }, - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "status", - "type": "bytebeasts::models::tournament::TournamentStatus" - }, - { - "name": "entry_fee", - "type": "core::integer::u32" - }, - { - "name": "max_participants", - "type": "core::integer::u32" - }, - { - "name": "current_participants", - "type": "core::array::Array::" - }, - { - "name": "prize_pool", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::tournament::Itournament", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::tournament::Tournament" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::tournament::tournament::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/base/contracts/bytebeasts-actions-648ac931.toml b/manifests/dev/base/contracts/bytebeasts-actions-648ac931.toml deleted file mode 100644 index 7609b74..0000000 --- a/manifests/dev/base/contracts/bytebeasts-actions-648ac931.toml +++ /dev/null @@ -1,10 +0,0 @@ -kind = "DojoContract" -class_hash = "0x7a662a2c7e8067fd633c3840f51c671a18c2e71901995fe791281c07c855aa0" -original_class_hash = "0x7a662a2c7e8067fd633c3840f51c671a18c2e71901995fe791281c07c855aa0" -base_class_hash = "0x0" -abi = "manifests/dev/base/abis/contracts/bytebeasts-actions-648ac931.json" -reads = [] -writes = [] -init_calldata = [] -tag = "bytebeasts-actions" -manifest_name = "bytebeasts-actions-648ac931" diff --git a/manifests/dev/base/contracts/bytebeasts-bag_system-7ad8a155.toml b/manifests/dev/base/contracts/bytebeasts-bag_system-7ad8a155.toml deleted file mode 100644 index ca427af..0000000 --- a/manifests/dev/base/contracts/bytebeasts-bag_system-7ad8a155.toml +++ /dev/null @@ -1,10 +0,0 @@ -kind = "DojoContract" -class_hash = "0x51aaf7a580665ebd6d7d32e2340f0e8b6850296fc1ad389c74a293d1a26029f" -original_class_hash = "0x51aaf7a580665ebd6d7d32e2340f0e8b6850296fc1ad389c74a293d1a26029f" -base_class_hash = "0x0" -abi = "manifests/dev/base/abis/contracts/bytebeasts-bag_system-7ad8a155.json" -reads = [] -writes = [] -init_calldata = [] -tag = "bytebeasts-bag_system" -manifest_name = "bytebeasts-bag_system-7ad8a155" diff --git a/manifests/dev/base/contracts/bytebeasts-battle_system-461868ac.toml b/manifests/dev/base/contracts/bytebeasts-battle_system-461868ac.toml deleted file mode 100644 index f38ae95..0000000 --- a/manifests/dev/base/contracts/bytebeasts-battle_system-461868ac.toml +++ /dev/null @@ -1,10 +0,0 @@ -kind = "DojoContract" -class_hash = "0x22eff2287b74c9f79832f32132c8154f28f916551d8650c8425f6c1c49adc31" -original_class_hash = "0x22eff2287b74c9f79832f32132c8154f28f916551d8650c8425f6c1c49adc31" -base_class_hash = "0x0" -abi = "manifests/dev/base/abis/contracts/bytebeasts-battle_system-461868ac.json" -reads = [] -writes = [] -init_calldata = [] -tag = "bytebeasts-battle_system" -manifest_name = "bytebeasts-battle_system-461868ac" diff --git a/manifests/dev/base/contracts/bytebeasts-move_action-62decdb8.toml b/manifests/dev/base/contracts/bytebeasts-move_action-62decdb8.toml deleted file mode 100644 index aea78af..0000000 --- a/manifests/dev/base/contracts/bytebeasts-move_action-62decdb8.toml +++ /dev/null @@ -1,10 +0,0 @@ -kind = "DojoContract" -class_hash = "0x6ab57932e6f1d360557867a6775d89180d623a481695d4349f6d356c8cd31ee" -original_class_hash = "0x6ab57932e6f1d360557867a6775d89180d623a481695d4349f6d356c8cd31ee" -base_class_hash = "0x0" -abi = "manifests/dev/base/abis/contracts/bytebeasts-move_action-62decdb8.json" -reads = [] -writes = [] -init_calldata = [] -tag = "bytebeasts-move_action" -manifest_name = "bytebeasts-move_action-62decdb8" diff --git a/manifests/dev/base/contracts/bytebeasts-spawn_action-5176c1e8.toml b/manifests/dev/base/contracts/bytebeasts-spawn_action-5176c1e8.toml deleted file mode 100644 index 2d56eaf..0000000 --- a/manifests/dev/base/contracts/bytebeasts-spawn_action-5176c1e8.toml +++ /dev/null @@ -1,10 +0,0 @@ -kind = "DojoContract" -class_hash = "0x394b6a9219ec1e5e1e3afdec390794e017870eb56b58ad18252d3c1eaf2a0f0" -original_class_hash = "0x394b6a9219ec1e5e1e3afdec390794e017870eb56b58ad18252d3c1eaf2a0f0" -base_class_hash = "0x0" -abi = "manifests/dev/base/abis/contracts/bytebeasts-spawn_action-5176c1e8.json" -reads = [] -writes = [] -init_calldata = [] -tag = "bytebeasts-spawn_action" -manifest_name = "bytebeasts-spawn_action-5176c1e8" diff --git a/manifests/dev/base/contracts/bytebeasts-tournament_system-1f2bbf20.toml b/manifests/dev/base/contracts/bytebeasts-tournament_system-1f2bbf20.toml deleted file mode 100644 index 97f792e..0000000 --- a/manifests/dev/base/contracts/bytebeasts-tournament_system-1f2bbf20.toml +++ /dev/null @@ -1,10 +0,0 @@ -kind = "DojoContract" -class_hash = "0x20aead2ca71d2f0bfcbfa28a41b4b7687aa1af2579394c256ca0c4dc73bd2e8" -original_class_hash = "0x20aead2ca71d2f0bfcbfa28a41b4b7687aa1af2579394c256ca0c4dc73bd2e8" -base_class_hash = "0x0" -abi = "manifests/dev/base/abis/contracts/bytebeasts-tournament_system-1f2bbf20.json" -reads = [] -writes = [] -init_calldata = [] -tag = "bytebeasts-tournament_system" -manifest_name = "bytebeasts-tournament_system-1f2bbf20" diff --git a/manifests/dev/base/contracts/bytebeasts-world_setup-674b640b.toml b/manifests/dev/base/contracts/bytebeasts-world_setup-674b640b.toml deleted file mode 100644 index 37f98ba..0000000 --- a/manifests/dev/base/contracts/bytebeasts-world_setup-674b640b.toml +++ /dev/null @@ -1,10 +0,0 @@ -kind = "DojoContract" -class_hash = "0xad9d2da0783e3a31f6198d7c355bd293e496019e0e335449377a2c0146880" -original_class_hash = "0xad9d2da0783e3a31f6198d7c355bd293e496019e0e335449377a2c0146880" -base_class_hash = "0x0" -abi = "manifests/dev/base/abis/contracts/bytebeasts-world_setup-674b640b.json" -reads = [] -writes = [] -init_calldata = [] -tag = "bytebeasts-world_setup" -manifest_name = "bytebeasts-world_setup-674b640b" diff --git a/manifests/dev/base/dojo-base.toml b/manifests/dev/base/dojo-base.toml deleted file mode 100644 index 44b3746..0000000 --- a/manifests/dev/base/dojo-base.toml +++ /dev/null @@ -1,6 +0,0 @@ -kind = "Class" -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 deleted file mode 100644 index 5a8ae57..0000000 --- a/manifests/dev/base/dojo-world.toml +++ /dev/null @@ -1,6 +0,0 @@ -kind = "Class" -class_hash = "0x76ced5a15cb43c7be7176cff4779cd57c56638a46ddf2c9da709d22298c5e5a" -original_class_hash = "0x76ced5a15cb43c7be7176cff4779cd57c56638a46ddf2c9da709d22298c5e5a" -abi = "manifests/dev/base/abis/dojo-world.json" -tag = "dojo-world" -manifest_name = "dojo-world" diff --git a/manifests/dev/base/models/bytebeasts-Achievement-58a03b97.toml b/manifests/dev/base/models/bytebeasts-Achievement-58a03b97.toml deleted file mode 100644 index 3ee7ecc..0000000 --- a/manifests/dev/base/models/bytebeasts-Achievement-58a03b97.toml +++ /dev/null @@ -1,41 +0,0 @@ -kind = "DojoModel" -class_hash = "0x41f50347f6f957bc556346a2cdea3f31523f3c25966826e7ca7dea1de185c40" -original_class_hash = "0x41f50347f6f957bc556346a2cdea3f31523f3c25966826e7ca7dea1de185c40" -abi = "manifests/dev/base/abis/models/bytebeasts-Achievement-58a03b97.json" -tag = "bytebeasts-Achievement" -manifest_name = "bytebeasts-Achievement-58a03b97" - -[[members]] -name = "achievement_id" -type = "u64" -key = true - -[[members]] -name = "achievement_type" -type = "AchievementType" -key = false - -[[members]] -name = "rarity" -type = "AchievementRarity" -key = false - -[[members]] -name = "name" -type = "felt252" -key = false - -[[members]] -name = "description" -type = "ByteArray" -key = false - -[[members]] -name = "is_hidden" -type = "bool" -key = false - -[[members]] -name = "is_unlocked" -type = "bool" -key = false diff --git a/manifests/dev/base/models/bytebeasts-AchievementProgress-221f2719.toml b/manifests/dev/base/models/bytebeasts-AchievementProgress-221f2719.toml deleted file mode 100644 index 4bc457c..0000000 --- a/manifests/dev/base/models/bytebeasts-AchievementProgress-221f2719.toml +++ /dev/null @@ -1,26 +0,0 @@ -kind = "DojoModel" -class_hash = "0x494e5a6534846cd68b493aab6f9954333c64c854dbe99144c427f4301477f15" -original_class_hash = "0x494e5a6534846cd68b493aab6f9954333c64c854dbe99144c427f4301477f15" -abi = "manifests/dev/base/abis/models/bytebeasts-AchievementProgress-221f2719.json" -tag = "bytebeasts-AchievementProgress" -manifest_name = "bytebeasts-AchievementProgress-221f2719" - -[[members]] -name = "player_id" -type = "u64" -key = true - -[[members]] -name = "achievement_id" -type = "u64" -key = false - -[[members]] -name = "progress" -type = "u32" -key = false - -[[members]] -name = "is_unlocked" -type = "bool" -key = false diff --git a/manifests/dev/base/models/bytebeasts-Bag-2571b77d.toml b/manifests/dev/base/models/bytebeasts-Bag-2571b77d.toml deleted file mode 100644 index 7c911f6..0000000 --- a/manifests/dev/base/models/bytebeasts-Bag-2571b77d.toml +++ /dev/null @@ -1,26 +0,0 @@ -kind = "DojoModel" -class_hash = "0x4e0fab7bc052de0008be5606ad3b37576afd2bda323443fc98a8f37bcc10c1c" -original_class_hash = "0x4e0fab7bc052de0008be5606ad3b37576afd2bda323443fc98a8f37bcc10c1c" -abi = "manifests/dev/base/abis/models/bytebeasts-Bag-2571b77d.json" -tag = "bytebeasts-Bag" -manifest_name = "bytebeasts-Bag-2571b77d" - -[[members]] -name = "bag_id" -type = "u32" -key = true - -[[members]] -name = "player_id" -type = "u32" -key = true - -[[members]] -name = "max_capacity" -type = "u32" -key = false - -[[members]] -name = "potions" -type = "Array" -key = false diff --git a/manifests/dev/base/models/bytebeasts-Battle-55b5860b.toml b/manifests/dev/base/models/bytebeasts-Battle-55b5860b.toml deleted file mode 100644 index 2b8c0cc..0000000 --- a/manifests/dev/base/models/bytebeasts-Battle-55b5860b.toml +++ /dev/null @@ -1,41 +0,0 @@ -kind = "DojoModel" -class_hash = "0x239c54e950b5c50d445f9a8db758ea0af1440b75a5f1921dfe014b927476c32" -original_class_hash = "0x239c54e950b5c50d445f9a8db758ea0af1440b75a5f1921dfe014b927476c32" -abi = "manifests/dev/base/abis/models/bytebeasts-Battle-55b5860b.json" -tag = "bytebeasts-Battle" -manifest_name = "bytebeasts-Battle-55b5860b" - -[[members]] -name = "battle_id" -type = "u32" -key = true - -[[members]] -name = "player_id" -type = "u32" -key = false - -[[members]] -name = "opponent_id" -type = "u32" -key = false - -[[members]] -name = "active_beast_player" -type = "u32" -key = false - -[[members]] -name = "active_beast_opponent" -type = "u32" -key = false - -[[members]] -name = "battle_active" -type = "u32" -key = false - -[[members]] -name = "turn" -type = "u32" -key = false diff --git a/manifests/dev/base/models/bytebeasts-Beast-27809d20.toml b/manifests/dev/base/models/bytebeasts-Beast-27809d20.toml deleted file mode 100644 index e5855ea..0000000 --- a/manifests/dev/base/models/bytebeasts-Beast-27809d20.toml +++ /dev/null @@ -1,81 +0,0 @@ -kind = "DojoModel" -class_hash = "0x7bef5c17e52dab476cd7ae664bbb0f0024aae955ed8b12592e2d6faf7ff6a3c" -original_class_hash = "0x7bef5c17e52dab476cd7ae664bbb0f0024aae955ed8b12592e2d6faf7ff6a3c" -abi = "manifests/dev/base/abis/models/bytebeasts-Beast-27809d20.json" -tag = "bytebeasts-Beast" -manifest_name = "bytebeasts-Beast-27809d20" - -[[members]] -name = "beast_id" -type = "u32" -key = true - -[[members]] -name = "beast_name" -type = "felt252" -key = false - -[[members]] -name = "beast_type" -type = "WorldElements" -key = false - -[[members]] -name = "beast_description" -type = "felt252" -key = false - -[[members]] -name = "player_id" -type = "u32" -key = false - -[[members]] -name = "hp" -type = "u32" -key = false - -[[members]] -name = "current_hp" -type = "u32" -key = false - -[[members]] -name = "attack" -type = "u32" -key = false - -[[members]] -name = "defense" -type = "u32" -key = false - -[[members]] -name = "mt1" -type = "u32" -key = false - -[[members]] -name = "mt2" -type = "u32" -key = false - -[[members]] -name = "mt3" -type = "u32" -key = false - -[[members]] -name = "mt4" -type = "u32" -key = false - -[[members]] -name = "level" -type = "u32" -key = false - -[[members]] -name = "experience_to_next_level" -type = "u64" -key = false diff --git a/manifests/dev/base/models/bytebeasts-Game-e91217d7.toml b/manifests/dev/base/models/bytebeasts-Game-e91217d7.toml deleted file mode 100644 index ec70c0e..0000000 --- a/manifests/dev/base/models/bytebeasts-Game-e91217d7.toml +++ /dev/null @@ -1,41 +0,0 @@ -kind = "DojoModel" -class_hash = "0x57c477846284e274054c78c5b265af51f8815abbf0147828080c274b0639764" -original_class_hash = "0x57c477846284e274054c78c5b265af51f8815abbf0147828080c274b0639764" -abi = "manifests/dev/base/abis/models/bytebeasts-Game-e91217d7.json" -tag = "bytebeasts-Game" -manifest_name = "bytebeasts-Game-e91217d7" - -[[members]] -name = "game_id" -type = "u128" -key = true - -[[members]] -name = "player_1" -type = "ContractAddress" -key = false - -[[members]] -name = "player_2" -type = "ContractAddress" -key = false - -[[members]] -name = "player_3" -type = "ContractAddress" -key = false - -[[members]] -name = "player_4" -type = "ContractAddress" -key = false - -[[members]] -name = "status" -type = "GameStatus" -key = false - -[[members]] -name = "is_private" -type = "bool" -key = false diff --git a/manifests/dev/base/models/bytebeasts-GameId-344511d3.toml b/manifests/dev/base/models/bytebeasts-GameId-344511d3.toml deleted file mode 100644 index 70f5838..0000000 --- a/manifests/dev/base/models/bytebeasts-GameId-344511d3.toml +++ /dev/null @@ -1,16 +0,0 @@ -kind = "DojoModel" -class_hash = "0x7dc1689aa3f1e6b123cadfed4066a70f09be69c9a166bfe824c61b916925efe" -original_class_hash = "0x7dc1689aa3f1e6b123cadfed4066a70f09be69c9a166bfe824c61b916925efe" -abi = "manifests/dev/base/abis/models/bytebeasts-GameId-344511d3.json" -tag = "bytebeasts-GameId" -manifest_name = "bytebeasts-GameId-344511d3" - -[[members]] -name = "id" -type = "u32" -key = true - -[[members]] -name = "game_id" -type = "u128" -key = false diff --git a/manifests/dev/base/models/bytebeasts-GamePlayer-596ef4a1.toml b/manifests/dev/base/models/bytebeasts-GamePlayer-596ef4a1.toml deleted file mode 100644 index a75c8c4..0000000 --- a/manifests/dev/base/models/bytebeasts-GamePlayer-596ef4a1.toml +++ /dev/null @@ -1,56 +0,0 @@ -kind = "DojoModel" -class_hash = "0x52df62dec799bbf7ba4725f74e32e579dec2d90a7a995638761646157bb7e18" -original_class_hash = "0x52df62dec799bbf7ba4725f74e32e579dec2d90a7a995638761646157bb7e18" -abi = "manifests/dev/base/abis/models/bytebeasts-GamePlayer-596ef4a1.json" -tag = "bytebeasts-GamePlayer" -manifest_name = "bytebeasts-GamePlayer-596ef4a1" - -[[members]] -name = "address" -type = "ContractAddress" -key = true - -[[members]] -name = "game_id" -type = "u128" -key = true - -[[members]] -name = "beast_1" -type = "u8" -key = false - -[[members]] -name = "beast_2" -type = "u8" -key = false - -[[members]] -name = "beast_3" -type = "u8" -key = false - -[[members]] -name = "beast_4" -type = "u8" -key = false - -[[members]] -name = "bag_id" -type = "u8" -key = false - -[[members]] -name = "active_mount" -type = "u8" -key = false - -[[members]] -name = "mounts" -type = "Array" -key = false - -[[members]] -name = "position" -type = "Array" -key = false diff --git a/manifests/dev/base/models/bytebeasts-Mt-37360d30.toml b/manifests/dev/base/models/bytebeasts-Mt-37360d30.toml deleted file mode 100644 index 16c51f0..0000000 --- a/manifests/dev/base/models/bytebeasts-Mt-37360d30.toml +++ /dev/null @@ -1,31 +0,0 @@ -kind = "DojoModel" -class_hash = "0x341a07493baed313e741253a241aa31fc9d40a9c373cd2bae49f85ab66f98cc" -original_class_hash = "0x341a07493baed313e741253a241aa31fc9d40a9c373cd2bae49f85ab66f98cc" -abi = "manifests/dev/base/abis/models/bytebeasts-Mt-37360d30.json" -tag = "bytebeasts-Mt" -manifest_name = "bytebeasts-Mt-37360d30" - -[[members]] -name = "mt_id" -type = "u32" -key = true - -[[members]] -name = "mt_name" -type = "felt252" -key = false - -[[members]] -name = "mt_type" -type = "WorldElements" -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-NPC-4c5239ac.toml b/manifests/dev/base/models/bytebeasts-NPC-4c5239ac.toml deleted file mode 100644 index 3133b94..0000000 --- a/manifests/dev/base/models/bytebeasts-NPC-4c5239ac.toml +++ /dev/null @@ -1,66 +0,0 @@ -kind = "DojoModel" -class_hash = "0x3ba44df67a037c20f004b7f5ab7725932d4519eed6beb6bc223a03e96c0f0f9" -original_class_hash = "0x3ba44df67a037c20f004b7f5ab7725932d4519eed6beb6bc223a03e96c0f0f9" -abi = "manifests/dev/base/abis/models/bytebeasts-NPC-4c5239ac.json" -tag = "bytebeasts-NPC" -manifest_name = "bytebeasts-NPC-4c5239ac" - -[[members]] -name = "npc_id" -type = "u32" -key = true - -[[members]] -name = "npc_name" -type = "felt252" -key = false - -[[members]] -name = "npc_description" -type = "felt252" -key = false - -[[members]] -name = "npc_role" -type = "Role" -key = false - -[[members]] -name = "dialogue" -type = "ByteArray" -key = false - -[[members]] -name = "is_active" -type = "bool" -key = false - -[[members]] -name = "location" -type = "Coordinates" -key = false - -[[members]] -name = "importance_level" -type = "u8" -key = false - -[[members]] -name = "mission_status" -type = "MissionStatus" -key = false - -[[members]] -name = "reward" -type = "u16" -key = false - -[[members]] -name = "experience_points" -type = "u16" -key = false - -[[members]] -name = "potions" -type = "Array" -key = false diff --git a/manifests/dev/base/models/bytebeasts-Player-14f5e45e.toml b/manifests/dev/base/models/bytebeasts-Player-14f5e45e.toml deleted file mode 100644 index d6b7186..0000000 --- a/manifests/dev/base/models/bytebeasts-Player-14f5e45e.toml +++ /dev/null @@ -1,41 +0,0 @@ -kind = "DojoModel" -class_hash = "0x5d992305e6f7ce0965d5bbe71e33cab817c31514ba83c8fca4610ab574e8016" -original_class_hash = "0x5d992305e6f7ce0965d5bbe71e33cab817c31514ba83c8fca4610ab574e8016" -abi = "manifests/dev/base/abis/models/bytebeasts-Player-14f5e45e.json" -tag = "bytebeasts-Player" -manifest_name = "bytebeasts-Player-14f5e45e" - -[[members]] -name = "player_id" -type = "u32" -key = true - -[[members]] -name = "player_name" -type = "felt252" -key = false - -[[members]] -name = "beast_1" -type = "u32" -key = false - -[[members]] -name = "beast_2" -type = "u32" -key = false - -[[members]] -name = "beast_3" -type = "u32" -key = false - -[[members]] -name = "beast_4" -type = "u32" -key = false - -[[members]] -name = "potions" -type = "u32" -key = false diff --git a/manifests/dev/base/models/bytebeasts-Position-78f28df6.toml b/manifests/dev/base/models/bytebeasts-Position-78f28df6.toml deleted file mode 100644 index 40aa1fc..0000000 --- a/manifests/dev/base/models/bytebeasts-Position-78f28df6.toml +++ /dev/null @@ -1,16 +0,0 @@ -kind = "DojoModel" -class_hash = "0x91da9f380b960e2dc7f9a59d4e1242ed718590d2270fd28e2311a5e1ee54f2" -original_class_hash = "0x91da9f380b960e2dc7f9a59d4e1242ed718590d2270fd28e2311a5e1ee54f2" -abi = "manifests/dev/base/abis/models/bytebeasts-Position-78f28df6.json" -tag = "bytebeasts-Position" -manifest_name = "bytebeasts-Position-78f28df6" - -[[members]] -name = "player" -type = "Player" -key = true - -[[members]] -name = "coordinates" -type = "Coordinates" -key = false diff --git a/manifests/dev/base/models/bytebeasts-Potion-6a2114b0.toml b/manifests/dev/base/models/bytebeasts-Potion-6a2114b0.toml deleted file mode 100644 index 6f85a22..0000000 --- a/manifests/dev/base/models/bytebeasts-Potion-6a2114b0.toml +++ /dev/null @@ -1,21 +0,0 @@ -kind = "DojoModel" -class_hash = "0x4eac23f35a0e71954b8f000d9d8999579ba49ffc918e8b78924562449bdf8d4" -original_class_hash = "0x4eac23f35a0e71954b8f000d9d8999579ba49ffc918e8b78924562449bdf8d4" -abi = "manifests/dev/base/abis/models/bytebeasts-Potion-6a2114b0.json" -tag = "bytebeasts-Potion" -manifest_name = "bytebeasts-Potion-6a2114b0" - -[[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/base/models/bytebeasts-Status-6595af0f.toml b/manifests/dev/base/models/bytebeasts-Status-6595af0f.toml deleted file mode 100644 index 7c1c791..0000000 --- a/manifests/dev/base/models/bytebeasts-Status-6595af0f.toml +++ /dev/null @@ -1,16 +0,0 @@ -kind = "DojoModel" -class_hash = "0xe446a8c3773fbfae6e2e0e87a6d1db12143224cf47e217e12bf9cfc76428ef" -original_class_hash = "0xe446a8c3773fbfae6e2e0e87a6d1db12143224cf47e217e12bf9cfc76428ef" -abi = "manifests/dev/base/abis/models/bytebeasts-Status-6595af0f.json" -tag = "bytebeasts-Status" -manifest_name = "bytebeasts-Status-6595af0f" - -[[members]] -name = "player_id" -type = "u32" -key = true - -[[members]] -name = "message" -type = "felt252" -key = false diff --git a/manifests/dev/base/models/bytebeasts-StatusBattle-161fdb64.toml b/manifests/dev/base/models/bytebeasts-StatusBattle-161fdb64.toml deleted file mode 100644 index 9d5cc6d..0000000 --- a/manifests/dev/base/models/bytebeasts-StatusBattle-161fdb64.toml +++ /dev/null @@ -1,16 +0,0 @@ -kind = "DojoModel" -class_hash = "0x5ba495f80b653be6df964eb97ac2e7b3f7f72508d17b54b1d51595231db8fae" -original_class_hash = "0x5ba495f80b653be6df964eb97ac2e7b3f7f72508d17b54b1d51595231db8fae" -abi = "manifests/dev/base/abis/models/bytebeasts-StatusBattle-161fdb64.json" -tag = "bytebeasts-StatusBattle" -manifest_name = "bytebeasts-StatusBattle-161fdb64" - -[[members]] -name = "battle_id" -type = "u32" -key = true - -[[members]] -name = "message" -type = "felt252" -key = false diff --git a/manifests/dev/base/models/bytebeasts-Tournament-12bdecb1.toml b/manifests/dev/base/models/bytebeasts-Tournament-12bdecb1.toml deleted file mode 100644 index a4d790e..0000000 --- a/manifests/dev/base/models/bytebeasts-Tournament-12bdecb1.toml +++ /dev/null @@ -1,41 +0,0 @@ -kind = "DojoModel" -class_hash = "0x6d38c864554f8be34be3ab85e56ce73c86ad695b61b8ccec9553cf208631d0b" -original_class_hash = "0x6d38c864554f8be34be3ab85e56ce73c86ad695b61b8ccec9553cf208631d0b" -abi = "manifests/dev/base/abis/models/bytebeasts-Tournament-12bdecb1.json" -tag = "bytebeasts-Tournament" -manifest_name = "bytebeasts-Tournament-12bdecb1" - -[[members]] -name = "tournament_id" -type = "u32" -key = true - -[[members]] -name = "name" -type = "felt252" -key = false - -[[members]] -name = "status" -type = "TournamentStatus" -key = false - -[[members]] -name = "entry_fee" -type = "u32" -key = false - -[[members]] -name = "max_participants" -type = "u32" -key = false - -[[members]] -name = "current_participants" -type = "Array" -key = false - -[[members]] -name = "prize_pool" -type = "u32" -key = false diff --git a/manifests/dev/deployment/abis/contracts/bytebeasts-actions-648ac931.json b/manifests/dev/deployment/abis/contracts/bytebeasts-actions-648ac931.json deleted file mode 100644 index d13a4e7..0000000 --- a/manifests/dev/deployment/abis/contracts/bytebeasts-actions-648ac931.json +++ /dev/null @@ -1,317 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "ActionsImpl", - "interface_name": "bytebeasts::systems::realms::IActions" - }, - { - "type": "enum", - "name": "bytebeasts::models::game::GameStatus", - "variants": [ - { - "name": "Pending", - "type": "()" - }, - { - "name": "InProgress", - "type": "()" - }, - { - "name": "Finished", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::game::Game", - "members": [ - { - "name": "game_id", - "type": "core::integer::u128" - }, - { - "name": "player_1", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_2", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_3", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_4", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "status", - "type": "bytebeasts::models::game::GameStatus" - }, - { - "name": "is_private", - "type": "core::bool" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::realms::IActions", - "items": [ - { - "type": "function", - "name": "create_initial_game_id", - "inputs": [], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "create_game", - "inputs": [], - "outputs": [ - { - "type": "bytebeasts::models::game::Game" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "join_game", - "inputs": [ - { - "name": "game_id", - "type": "core::integer::u128" - }, - { - "name": "player_2_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::realms::actions::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::realms::actions::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::realms::actions::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/contracts/bytebeasts-bag_system-7ad8a155.json b/manifests/dev/deployment/abis/contracts/bytebeasts-bag_system-7ad8a155.json deleted file mode 100644 index c0b8530..0000000 --- a/manifests/dev/deployment/abis/contracts/bytebeasts-bag_system-7ad8a155.json +++ /dev/null @@ -1,291 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "BagActionImpl", - "interface_name": "bytebeasts::systems::bag::IBagAction" - }, - { - "type": "struct", - "name": "bytebeasts::models::potion::Potion", - "members": [ - { - "name": "potion_id", - "type": "core::integer::u32" - }, - { - "name": "potion_name", - "type": "core::felt252" - }, - { - "name": "potion_effect", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::bag::IBagAction", - "items": [ - { - "type": "function", - "name": "init_bag", - "inputs": [ - { - "name": "bag_id", - "type": "core::integer::u32" - }, - { - "name": "player_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "add_item", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "bag_id", - "type": "core::integer::u32" - }, - { - "name": "potion", - "type": "bytebeasts::models::potion::Potion" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "take_out_item", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "bag_id", - "type": "core::integer::u32" - } - ], - "outputs": [ - { - "type": "bytebeasts::models::potion::Potion" - } - ], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::bag::bag_system::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::bag::bag_system::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::bag::bag_system::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/contracts/bytebeasts-battle_system-461868ac.json b/manifests/dev/deployment/abis/contracts/bytebeasts-battle_system-461868ac.json deleted file mode 100644 index 0c52cee..0000000 --- a/manifests/dev/deployment/abis/contracts/bytebeasts-battle_system-461868ac.json +++ /dev/null @@ -1,469 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "BattleActionsImpl", - "interface_name": "bytebeasts::systems::battle::IBattleActions" - }, - { - "type": "enum", - "name": "bytebeasts::models::world_elements::WorldElements", - "variants": [ - { - "name": "Crystal", - "type": "()" - }, - { - "name": "Draconic", - "type": "()" - }, - { - "name": "Shadow", - "type": "()" - }, - { - "name": "Light", - "type": "()" - }, - { - "name": "Titanium", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::beast::Beast", - "members": [ - { - "name": "beast_id", - "type": "core::integer::u32" - }, - { - "name": "beast_name", - "type": "core::felt252" - }, - { - "name": "beast_type", - "type": "bytebeasts::models::world_elements::WorldElements" - }, - { - "name": "beast_description", - "type": "core::felt252" - }, - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "hp", - "type": "core::integer::u32" - }, - { - "name": "current_hp", - "type": "core::integer::u32" - }, - { - "name": "attack", - "type": "core::integer::u32" - }, - { - "name": "defense", - "type": "core::integer::u32" - }, - { - "name": "mt1", - "type": "core::integer::u32" - }, - { - "name": "mt2", - "type": "core::integer::u32" - }, - { - "name": "mt3", - "type": "core::integer::u32" - }, - { - "name": "mt4", - "type": "core::integer::u32" - }, - { - "name": "level", - "type": "core::integer::u32" - }, - { - "name": "experience_to_next_level", - "type": "core::integer::u64" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::mt::Mt", - "members": [ - { - "name": "mt_id", - "type": "core::integer::u32" - }, - { - "name": "mt_name", - "type": "core::felt252" - }, - { - "name": "mt_type", - "type": "bytebeasts::models::world_elements::WorldElements" - }, - { - "name": "mt_power", - "type": "core::integer::u32" - }, - { - "name": "mt_accuracy", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::battle::IBattleActions", - "items": [ - { - "type": "function", - "name": "init_battle", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "opponent_id", - "type": "core::integer::u32" - } - ], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "check_flee_success", - "inputs": [ - { - "name": "player_beast", - "type": "bytebeasts::models::beast::Beast" - }, - { - "name": "opponent_beast", - "type": "bytebeasts::models::beast::Beast" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "calculate_damage", - "inputs": [ - { - "name": "mt", - "type": "bytebeasts::models::mt::Mt" - }, - { - "name": "attacker", - "type": "bytebeasts::models::beast::Beast" - }, - { - "name": "defender", - "type": "bytebeasts::models::beast::Beast" - } - ], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "opponent_turn", - "inputs": [ - { - "name": "battle_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "attack", - "inputs": [ - { - "name": "battle_id", - "type": "core::integer::u32" - }, - { - "name": "mt_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "use_potion", - "inputs": [ - { - "name": "battle_id", - "type": "core::integer::u32" - }, - { - "name": "potion_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "flee", - "inputs": [ - { - "name": "battle_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::battle::battle_system::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::battle::battle_system::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::battle::battle_system::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/contracts/bytebeasts-move_action-62decdb8.json b/manifests/dev/deployment/abis/contracts/bytebeasts-move_action-62decdb8.json deleted file mode 100644 index ed34d1f..0000000 --- a/manifests/dev/deployment/abis/contracts/bytebeasts-move_action-62decdb8.json +++ /dev/null @@ -1,237 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "MoveActionImpl", - "interface_name": "bytebeasts::systems::move::IMoveAction" - }, - { - "type": "interface", - "name": "bytebeasts::systems::move::IMoveAction", - "items": [ - { - "type": "function", - "name": "move", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "new_x", - "type": "core::integer::u32" - }, - { - "name": "new_y", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::move::move_action::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::move::move_action::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::move::move_action::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/contracts/bytebeasts-spawn_action-5176c1e8.json b/manifests/dev/deployment/abis/contracts/bytebeasts-spawn_action-5176c1e8.json deleted file mode 100644 index da498df..0000000 --- a/manifests/dev/deployment/abis/contracts/bytebeasts-spawn_action-5176c1e8.json +++ /dev/null @@ -1,229 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "SpawnActionImpl", - "interface_name": "bytebeasts::systems::spawn::ISpawnAction" - }, - { - "type": "interface", - "name": "bytebeasts::systems::spawn::ISpawnAction", - "items": [ - { - "type": "function", - "name": "spawn", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::spawn::spawn_action::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::spawn::spawn_action::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::spawn::spawn_action::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/contracts/bytebeasts-world_setup-674b640b.json b/manifests/dev/deployment/abis/contracts/bytebeasts-world_setup-674b640b.json deleted file mode 100644 index edd696c..0000000 --- a/manifests/dev/deployment/abis/contracts/bytebeasts-world_setup-674b640b.json +++ /dev/null @@ -1,224 +0,0 @@ -[ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldSetupImpl", - "interface_name": "bytebeasts::systems::world_setup::IWorldSetup" - }, - { - "type": "interface", - "name": "bytebeasts::systems::world_setup::IWorldSetup", - "items": [ - { - "type": "function", - "name": "setWorld", - "inputs": [], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::world_setup::world_setup::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::world_setup::world_setup::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::world_setup::world_setup::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/dojo-base.json b/manifests/dev/deployment/abis/dojo-base.json deleted file mode 100644 index 4800464..0000000 --- a/manifests/dev/deployment/abis/dojo-base.json +++ /dev/null @@ -1,98 +0,0 @@ -[ - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::base_contract::base::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "flat" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/dojo-world.json b/manifests/dev/deployment/abis/dojo-world.json deleted file mode 100644 index 897b4d9..0000000 --- a/manifests/dev/deployment/abis/dojo-world.json +++ /dev/null @@ -1,1226 +0,0 @@ -[ - { - "type": "impl", - "name": "World", - "interface_name": "dojo::world::world_contract::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::model::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": "enum", - "name": "dojo::model::model::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::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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": "dojo::world::world_contract::Resource", - "variants": [ - { - "name": "Model", - "type": "(core::starknet::class_hash::ClassHash, core::starknet::contract_address::ContractAddress)" - }, - { - "name": "Contract", - "type": "(core::starknet::class_hash::ClassHash, core::starknet::contract_address::ContractAddress)" - }, - { - "name": "Namespace", - "type": "()" - }, - { - "name": "World", - "type": "()" - }, - { - "name": "Unregistered", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorld", - "items": [ - { - "type": "function", - "name": "metadata", - "inputs": [ - { - "name": "resource_selector", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "dojo::model::metadata::ResourceMetadata" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_metadata", - "inputs": [ - { - "name": "metadata", - "type": "dojo::model::metadata::ResourceMetadata" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_namespace", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_model", - "inputs": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_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" - } - ], - "outputs": [ - { - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_contract", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "init_contract", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "init_calldata", - "type": "core::array::Span::" - } - ], - "outputs": [], - "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_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::model::ModelIndex" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::model::ModelIndex" - }, - { - "name": "values", - "type": "core::array::Span::" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "delete_entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::model::ModelIndex" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "base", - "inputs": [], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "resource", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "dojo::world::world_contract::Resource" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "is_owner", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "grant_owner", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "revoke_owner", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "is_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "grant_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "revoke_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableWorld", - "interface_name": "dojo::world::world_contract::IUpgradeableWorld" - }, - { - "type": "interface", - "name": "dojo::world::world_contract::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::world::update::IUpgradeableState" - }, - { - "type": "struct", - "name": "dojo::world::update::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::world::update::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::world::update::IUpgradeableState", - "items": [ - { - "type": "function", - "name": "upgrade_state", - "inputs": [ - { - "name": "new_state", - "type": "core::array::Span::" - }, - { - "name": "program_output", - "type": "dojo::world::update::ProgramOutput" - }, - { - "name": "program_hash", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "ConfigImpl", - "interface_name": "dojo::world::config::IConfig" - }, - { - "type": "interface", - "name": "dojo::world::config::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_contract::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_contract::world::ContractDeployed", - "kind": "struct", - "members": [ - { - "name": "salt", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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_contract::world::ContractInitialized", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "init_calldata", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::WorldUpgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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_contract::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_contract::world::ModelRegistered", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::ModelUpgraded", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "prev_class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "prev_address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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_contract::world::StoreUpdateRecord", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreUpdateMember", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "member_selector", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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_contract::world::WriterUpdated", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "value", - "type": "core::bool", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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::world::config::Config::DifferProgramHashUpdate", - "kind": "struct", - "members": [ - { - "name": "program_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::MergerProgramHashUpdate", - "kind": "struct", - "members": [ - { - "name": "program_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::FactsRegistryUpdate", - "kind": "struct", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::Event", - "kind": "enum", - "variants": [ - { - "name": "DifferProgramHashUpdate", - "type": "dojo::world::config::Config::DifferProgramHashUpdate", - "kind": "nested" - }, - { - "name": "MergerProgramHashUpdate", - "type": "dojo::world::config::Config::MergerProgramHashUpdate", - "kind": "nested" - }, - { - "name": "FactsRegistryUpdate", - "type": "dojo::world::config::Config::FactsRegistryUpdate", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StateUpdated", - "kind": "struct", - "members": [ - { - "name": "da_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::Event", - "kind": "enum", - "variants": [ - { - "name": "WorldSpawned", - "type": "dojo::world::world_contract::world::WorldSpawned", - "kind": "nested" - }, - { - "name": "ContractDeployed", - "type": "dojo::world::world_contract::world::ContractDeployed", - "kind": "nested" - }, - { - "name": "ContractUpgraded", - "type": "dojo::world::world_contract::world::ContractUpgraded", - "kind": "nested" - }, - { - "name": "ContractInitialized", - "type": "dojo::world::world_contract::world::ContractInitialized", - "kind": "nested" - }, - { - "name": "WorldUpgraded", - "type": "dojo::world::world_contract::world::WorldUpgraded", - "kind": "nested" - }, - { - "name": "MetadataUpdate", - "type": "dojo::world::world_contract::world::MetadataUpdate", - "kind": "nested" - }, - { - "name": "NamespaceRegistered", - "type": "dojo::world::world_contract::world::NamespaceRegistered", - "kind": "nested" - }, - { - "name": "ModelRegistered", - "type": "dojo::world::world_contract::world::ModelRegistered", - "kind": "nested" - }, - { - "name": "ModelUpgraded", - "type": "dojo::world::world_contract::world::ModelUpgraded", - "kind": "nested" - }, - { - "name": "StoreSetRecord", - "type": "dojo::world::world_contract::world::StoreSetRecord", - "kind": "nested" - }, - { - "name": "StoreUpdateRecord", - "type": "dojo::world::world_contract::world::StoreUpdateRecord", - "kind": "nested" - }, - { - "name": "StoreUpdateMember", - "type": "dojo::world::world_contract::world::StoreUpdateMember", - "kind": "nested" - }, - { - "name": "StoreDelRecord", - "type": "dojo::world::world_contract::world::StoreDelRecord", - "kind": "nested" - }, - { - "name": "WriterUpdated", - "type": "dojo::world::world_contract::world::WriterUpdated", - "kind": "nested" - }, - { - "name": "OwnerUpdated", - "type": "dojo::world::world_contract::world::OwnerUpdated", - "kind": "nested" - }, - { - "name": "ConfigEvent", - "type": "dojo::world::config::Config::Event", - "kind": "nested" - }, - { - "name": "StateUpdated", - "type": "dojo::world::world_contract::world::StateUpdated", - "kind": "nested" - } - ] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-Achievement-58a03b97.json b/manifests/dev/deployment/abis/models/bytebeasts-Achievement-58a03b97.json deleted file mode 100644 index 914ec1a..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-Achievement-58a03b97.json +++ /dev/null @@ -1,517 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "achievementImpl", - "interface_name": "bytebeasts::models::achievements::Iachievement" - }, - { - "type": "enum", - "name": "bytebeasts::models::achievement_type::AchievementType", - "variants": [ - { - "name": "FirstWin", - "type": "()" - }, - { - "name": "TenWins", - "type": "()" - }, - { - "name": "HundredWins", - "type": "()" - }, - { - "name": "FirstBeast", - "type": "()" - }, - { - "name": "TenBeasts", - "type": "()" - }, - { - "name": "RareBeast", - "type": "()" - }, - { - "name": "FirstNPCInteraction", - "type": "()" - }, - { - "name": "RandomBattleChampion", - "type": "()" - }, - { - "name": "BeastMaster", - "type": "()" - }, - { - "name": "LegendaryPlayer", - "type": "()" - }, - { - "name": "TopScorer", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "bytebeasts::models::achievement_rarity::AchievementRarity", - "variants": [ - { - "name": "Common", - "type": "()" - }, - { - "name": "Uncommon", - "type": "()" - }, - { - "name": "Rare", - "type": "()" - }, - { - "name": "Epic", - "type": "()" - }, - { - "name": "Legendary", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::achievements::Achievement", - "members": [ - { - "name": "achievement_id", - "type": "core::integer::u64" - }, - { - "name": "achievement_type", - "type": "bytebeasts::models::achievement_type::AchievementType" - }, - { - "name": "rarity", - "type": "bytebeasts::models::achievement_rarity::AchievementRarity" - }, - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "description", - "type": "core::byte_array::ByteArray" - }, - { - "name": "is_hidden", - "type": "core::bool" - }, - { - "name": "is_unlocked", - "type": "core::bool" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::achievements::Iachievement", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::achievements::Achievement" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::achievements::achievement::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-AchievementProgress-221f2719.json b/manifests/dev/deployment/abis/models/bytebeasts-AchievementProgress-221f2719.json deleted file mode 100644 index 9d690e4..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-AchievementProgress-221f2719.json +++ /dev/null @@ -1,429 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "achievement_progressImpl", - "interface_name": "bytebeasts::models::achievements::Iachievement_progress" - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::achievements::AchievementProgress", - "members": [ - { - "name": "player_id", - "type": "core::integer::u64" - }, - { - "name": "achievement_id", - "type": "core::integer::u64" - }, - { - "name": "progress", - "type": "core::integer::u32" - }, - { - "name": "is_unlocked", - "type": "core::bool" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::achievements::Iachievement_progress", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::achievements::AchievementProgress" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::achievements::achievement_progress::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-Bag-2571b77d.json b/manifests/dev/deployment/abis/models/bytebeasts-Bag-2571b77d.json deleted file mode 100644 index 8723385..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-Bag-2571b77d.json +++ /dev/null @@ -1,433 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "bagImpl", - "interface_name": "bytebeasts::models::bag::Ibag" - }, - { - "type": "struct", - "name": "bytebeasts::models::potion::Potion", - "members": [ - { - "name": "potion_id", - "type": "core::integer::u32" - }, - { - "name": "potion_name", - "type": "core::felt252" - }, - { - "name": "potion_effect", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::bag::Bag", - "members": [ - { - "name": "bag_id", - "type": "core::integer::u32" - }, - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "max_capacity", - "type": "core::integer::u32" - }, - { - "name": "potions", - "type": "core::array::Array::" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::bag::Ibag", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::bag::Bag" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::bag::bag::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-Battle-55b5860b.json b/manifests/dev/deployment/abis/models/bytebeasts-Battle-55b5860b.json deleted file mode 100644 index d2d4033..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-Battle-55b5860b.json +++ /dev/null @@ -1,427 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "battleImpl", - "interface_name": "bytebeasts::models::battle::Ibattle" - }, - { - "type": "struct", - "name": "bytebeasts::models::battle::Battle", - "members": [ - { - "name": "battle_id", - "type": "core::integer::u32" - }, - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "opponent_id", - "type": "core::integer::u32" - }, - { - "name": "active_beast_player", - "type": "core::integer::u32" - }, - { - "name": "active_beast_opponent", - "type": "core::integer::u32" - }, - { - "name": "battle_active", - "type": "core::integer::u32" - }, - { - "name": "turn", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::battle::Ibattle", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::battle::Battle" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::battle::battle::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-Beast-27809d20.json b/manifests/dev/deployment/abis/models/bytebeasts-Beast-27809d20.json deleted file mode 100644 index 7cf025f..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-Beast-27809d20.json +++ /dev/null @@ -1,485 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "beastImpl", - "interface_name": "bytebeasts::models::beast::Ibeast" - }, - { - "type": "enum", - "name": "bytebeasts::models::world_elements::WorldElements", - "variants": [ - { - "name": "Crystal", - "type": "()" - }, - { - "name": "Draconic", - "type": "()" - }, - { - "name": "Shadow", - "type": "()" - }, - { - "name": "Light", - "type": "()" - }, - { - "name": "Titanium", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::beast::Beast", - "members": [ - { - "name": "beast_id", - "type": "core::integer::u32" - }, - { - "name": "beast_name", - "type": "core::felt252" - }, - { - "name": "beast_type", - "type": "bytebeasts::models::world_elements::WorldElements" - }, - { - "name": "beast_description", - "type": "core::felt252" - }, - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "hp", - "type": "core::integer::u32" - }, - { - "name": "current_hp", - "type": "core::integer::u32" - }, - { - "name": "attack", - "type": "core::integer::u32" - }, - { - "name": "defense", - "type": "core::integer::u32" - }, - { - "name": "mt1", - "type": "core::integer::u32" - }, - { - "name": "mt2", - "type": "core::integer::u32" - }, - { - "name": "mt3", - "type": "core::integer::u32" - }, - { - "name": "mt4", - "type": "core::integer::u32" - }, - { - "name": "level", - "type": "core::integer::u32" - }, - { - "name": "experience_to_next_level", - "type": "core::integer::u64" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::beast::Ibeast", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::beast::Beast" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::beast::beast::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-Game-e91217d7.json b/manifests/dev/deployment/abis/models/bytebeasts-Game-e91217d7.json deleted file mode 100644 index 63358f6..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-Game-e91217d7.json +++ /dev/null @@ -1,459 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "gameImpl", - "interface_name": "bytebeasts::models::game::Igame" - }, - { - "type": "enum", - "name": "bytebeasts::models::game::GameStatus", - "variants": [ - { - "name": "Pending", - "type": "()" - }, - { - "name": "InProgress", - "type": "()" - }, - { - "name": "Finished", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::game::Game", - "members": [ - { - "name": "game_id", - "type": "core::integer::u128" - }, - { - "name": "player_1", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_2", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_3", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_4", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "status", - "type": "bytebeasts::models::game::GameStatus" - }, - { - "name": "is_private", - "type": "core::bool" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::game::Igame", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::game::Game" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::game::game::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-GameId-344511d3.json b/manifests/dev/deployment/abis/models/bytebeasts-GameId-344511d3.json deleted file mode 100644 index 6f9a0a0..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-GameId-344511d3.json +++ /dev/null @@ -1,407 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "game_idImpl", - "interface_name": "bytebeasts::models::game_id::Igame_id" - }, - { - "type": "struct", - "name": "bytebeasts::models::game_id::GameId", - "members": [ - { - "name": "id", - "type": "core::integer::u32" - }, - { - "name": "game_id", - "type": "core::integer::u128" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::game_id::Igame_id", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::game_id::GameId" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::game_id::game_id::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-GamePlayer-596ef4a1.json b/manifests/dev/deployment/abis/models/bytebeasts-GamePlayer-596ef4a1.json deleted file mode 100644 index 7045dc4..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-GamePlayer-596ef4a1.json +++ /dev/null @@ -1,439 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "game_playerImpl", - "interface_name": "bytebeasts::models::game_player::Igame_player" - }, - { - "type": "struct", - "name": "bytebeasts::models::game_player::GamePlayer", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "game_id", - "type": "core::integer::u128" - }, - { - "name": "beast_1", - "type": "core::integer::u8" - }, - { - "name": "beast_2", - "type": "core::integer::u8" - }, - { - "name": "beast_3", - "type": "core::integer::u8" - }, - { - "name": "beast_4", - "type": "core::integer::u8" - }, - { - "name": "bag_id", - "type": "core::integer::u8" - }, - { - "name": "active_mount", - "type": "core::integer::u8" - }, - { - "name": "mounts", - "type": "core::array::Array::" - }, - { - "name": "position", - "type": "core::array::Array::" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::game_player::Igame_player", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::game_player::GamePlayer" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::game_player::game_player::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-Mt-37360d30.json b/manifests/dev/deployment/abis/models/bytebeasts-Mt-37360d30.json deleted file mode 100644 index 6d38f65..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-Mt-37360d30.json +++ /dev/null @@ -1,445 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "mtImpl", - "interface_name": "bytebeasts::models::mt::Imt" - }, - { - "type": "enum", - "name": "bytebeasts::models::world_elements::WorldElements", - "variants": [ - { - "name": "Crystal", - "type": "()" - }, - { - "name": "Draconic", - "type": "()" - }, - { - "name": "Shadow", - "type": "()" - }, - { - "name": "Light", - "type": "()" - }, - { - "name": "Titanium", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::mt::Mt", - "members": [ - { - "name": "mt_id", - "type": "core::integer::u32" - }, - { - "name": "mt_name", - "type": "core::felt252" - }, - { - "name": "mt_type", - "type": "bytebeasts::models::world_elements::WorldElements" - }, - { - "name": "mt_power", - "type": "core::integer::u32" - }, - { - "name": "mt_accuracy", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::mt::Imt", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::mt::Mt" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::mt::mt::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-NPC-4c5239ac.json b/manifests/dev/deployment/abis/models/bytebeasts-NPC-4c5239ac.json deleted file mode 100644 index 1af2b1a..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-NPC-4c5239ac.json +++ /dev/null @@ -1,537 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "npcImpl", - "interface_name": "bytebeasts::models::npc::Inpc" - }, - { - "type": "enum", - "name": "bytebeasts::models::role::Role", - "variants": [ - { - "name": "Vendor", - "type": "()" - }, - { - "name": "Trainer", - "type": "()" - }, - { - "name": "Guide", - "type": "()" - }, - { - "name": "QuestGiver", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::coordinates::Coordinates", - "members": [ - { - "name": "x", - "type": "core::integer::u32" - }, - { - "name": "y", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "bytebeasts::models::mission_status::MissionStatus", - "variants": [ - { - "name": "NotStarted", - "type": "()" - }, - { - "name": "InProgress", - "type": "()" - }, - { - "name": "Completed", - "type": "()" - }, - { - "name": "Failed", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::potion::Potion", - "members": [ - { - "name": "potion_id", - "type": "core::integer::u32" - }, - { - "name": "potion_name", - "type": "core::felt252" - }, - { - "name": "potion_effect", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::npc::NPC", - "members": [ - { - "name": "npc_id", - "type": "core::integer::u32" - }, - { - "name": "npc_name", - "type": "core::felt252" - }, - { - "name": "npc_description", - "type": "core::felt252" - }, - { - "name": "npc_role", - "type": "bytebeasts::models::role::Role" - }, - { - "name": "dialogue", - "type": "core::byte_array::ByteArray" - }, - { - "name": "is_active", - "type": "core::bool" - }, - { - "name": "location", - "type": "bytebeasts::models::coordinates::Coordinates" - }, - { - "name": "importance_level", - "type": "core::integer::u8" - }, - { - "name": "mission_status", - "type": "bytebeasts::models::mission_status::MissionStatus" - }, - { - "name": "reward", - "type": "core::integer::u16" - }, - { - "name": "experience_points", - "type": "core::integer::u16" - }, - { - "name": "potions", - "type": "core::array::Array::" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::npc::Inpc", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::npc::NPC" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::npc::npc::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-Player-14f5e45e.json b/manifests/dev/deployment/abis/models/bytebeasts-Player-14f5e45e.json deleted file mode 100644 index cc9bf5c..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-Player-14f5e45e.json +++ /dev/null @@ -1,427 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "playerImpl", - "interface_name": "bytebeasts::models::player::Iplayer" - }, - { - "type": "struct", - "name": "bytebeasts::models::player::Player", - "members": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "player_name", - "type": "core::felt252" - }, - { - "name": "beast_1", - "type": "core::integer::u32" - }, - { - "name": "beast_2", - "type": "core::integer::u32" - }, - { - "name": "beast_3", - "type": "core::integer::u32" - }, - { - "name": "beast_4", - "type": "core::integer::u32" - }, - { - "name": "potions", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::player::Iplayer", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::player::Player" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::player::player::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-Position-78f28df6.json b/manifests/dev/deployment/abis/models/bytebeasts-Position-78f28df6.json deleted file mode 100644 index ed36018..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-Position-78f28df6.json +++ /dev/null @@ -1,455 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "positionImpl", - "interface_name": "bytebeasts::models::position::Iposition" - }, - { - "type": "struct", - "name": "bytebeasts::models::player::Player", - "members": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "player_name", - "type": "core::felt252" - }, - { - "name": "beast_1", - "type": "core::integer::u32" - }, - { - "name": "beast_2", - "type": "core::integer::u32" - }, - { - "name": "beast_3", - "type": "core::integer::u32" - }, - { - "name": "beast_4", - "type": "core::integer::u32" - }, - { - "name": "potions", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::coordinates::Coordinates", - "members": [ - { - "name": "x", - "type": "core::integer::u32" - }, - { - "name": "y", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::position::Position", - "members": [ - { - "name": "player", - "type": "bytebeasts::models::player::Player" - }, - { - "name": "coordinates", - "type": "bytebeasts::models::coordinates::Coordinates" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::position::Iposition", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::position::Position" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::position::position::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-Potion-6a2114b0.json b/manifests/dev/deployment/abis/models/bytebeasts-Potion-6a2114b0.json deleted file mode 100644 index 390f77b..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-Potion-6a2114b0.json +++ /dev/null @@ -1,411 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "potionImpl", - "interface_name": "bytebeasts::models::potion::Ipotion" - }, - { - "type": "struct", - "name": "bytebeasts::models::potion::Potion", - "members": [ - { - "name": "potion_id", - "type": "core::integer::u32" - }, - { - "name": "potion_name", - "type": "core::felt252" - }, - { - "name": "potion_effect", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::potion::Ipotion", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::potion::Potion" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::potion::potion::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-Status-6595af0f.json b/manifests/dev/deployment/abis/models/bytebeasts-Status-6595af0f.json deleted file mode 100644 index 439cd90..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-Status-6595af0f.json +++ /dev/null @@ -1,407 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "statusImpl", - "interface_name": "bytebeasts::systems::battle::battle_system::Istatus" - }, - { - "type": "struct", - "name": "bytebeasts::systems::battle::battle_system::Status", - "members": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "message", - "type": "core::felt252" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::battle::battle_system::Istatus", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::systems::battle::battle_system::Status" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::battle::battle_system::status::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/abis/models/bytebeasts-StatusBattle-161fdb64.json b/manifests/dev/deployment/abis/models/bytebeasts-StatusBattle-161fdb64.json deleted file mode 100644 index e387582..0000000 --- a/manifests/dev/deployment/abis/models/bytebeasts-StatusBattle-161fdb64.json +++ /dev/null @@ -1,407 +0,0 @@ -[ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "status_battleImpl", - "interface_name": "bytebeasts::systems::battle::battle_system::Istatus_battle" - }, - { - "type": "struct", - "name": "bytebeasts::systems::battle::battle_system::StatusBattle", - "members": [ - { - "name": "battle_id", - "type": "core::integer::u32" - }, - { - "name": "message", - "type": "core::felt252" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::battle::battle_system::Istatus_battle", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::systems::battle::battle_system::StatusBattle" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::battle::battle_system::status_battle::Event", - "kind": "enum", - "variants": [] - } -] \ No newline at end of file diff --git a/manifests/dev/deployment/manifest.json b/manifests/dev/deployment/manifest.json deleted file mode 100644 index 5647cd5..0000000 --- a/manifests/dev/deployment/manifest.json +++ /dev/null @@ -1,10372 +0,0 @@ -{ - "world": { - "kind": "WorldContract", - "class_hash": "0x76ced5a15cb43c7be7176cff4779cd57c56638a46ddf2c9da709d22298c5e5a", - "original_class_hash": "0x76ced5a15cb43c7be7176cff4779cd57c56638a46ddf2c9da709d22298c5e5a", - "abi": [ - { - "type": "impl", - "name": "World", - "interface_name": "dojo::world::world_contract::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::model::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": "enum", - "name": "dojo::model::model::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::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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": "dojo::world::world_contract::Resource", - "variants": [ - { - "name": "Model", - "type": "(core::starknet::class_hash::ClassHash, core::starknet::contract_address::ContractAddress)" - }, - { - "name": "Contract", - "type": "(core::starknet::class_hash::ClassHash, core::starknet::contract_address::ContractAddress)" - }, - { - "name": "Namespace", - "type": "()" - }, - { - "name": "World", - "type": "()" - }, - { - "name": "Unregistered", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorld", - "items": [ - { - "type": "function", - "name": "metadata", - "inputs": [ - { - "name": "resource_selector", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "dojo::model::metadata::ResourceMetadata" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_metadata", - "inputs": [ - { - "name": "metadata", - "type": "dojo::model::metadata::ResourceMetadata" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_namespace", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_model", - "inputs": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_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" - } - ], - "outputs": [ - { - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_contract", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "init_contract", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "init_calldata", - "type": "core::array::Span::" - } - ], - "outputs": [], - "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_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::model::ModelIndex" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "set_entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::model::ModelIndex" - }, - { - "name": "values", - "type": "core::array::Span::" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "delete_entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::model::ModelIndex" - }, - { - "name": "layout", - "type": "dojo::model::layout::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "base", - "inputs": [], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "resource", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "dojo::world::world_contract::Resource" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "is_owner", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "grant_owner", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "revoke_owner", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "is_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "grant_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "revoke_writer", - "inputs": [ - { - "name": "resource", - "type": "core::felt252" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableWorld", - "interface_name": "dojo::world::world_contract::IUpgradeableWorld" - }, - { - "type": "interface", - "name": "dojo::world::world_contract::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::world::update::IUpgradeableState" - }, - { - "type": "struct", - "name": "dojo::world::update::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::world::update::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::world::update::IUpgradeableState", - "items": [ - { - "type": "function", - "name": "upgrade_state", - "inputs": [ - { - "name": "new_state", - "type": "core::array::Span::" - }, - { - "name": "program_output", - "type": "dojo::world::update::ProgramOutput" - }, - { - "name": "program_hash", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "ConfigImpl", - "interface_name": "dojo::world::config::IConfig" - }, - { - "type": "interface", - "name": "dojo::world::config::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_contract::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_contract::world::ContractDeployed", - "kind": "struct", - "members": [ - { - "name": "salt", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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_contract::world::ContractInitialized", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "init_calldata", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::WorldUpgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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_contract::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_contract::world::ModelRegistered", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::ModelUpgraded", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "prev_class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "prev_address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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_contract::world::StoreUpdateRecord", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreUpdateMember", - "kind": "struct", - "members": [ - { - "name": "table", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "member_selector", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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_contract::world::WriterUpdated", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "data" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "value", - "type": "core::bool", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::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::world::config::Config::DifferProgramHashUpdate", - "kind": "struct", - "members": [ - { - "name": "program_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::MergerProgramHashUpdate", - "kind": "struct", - "members": [ - { - "name": "program_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::FactsRegistryUpdate", - "kind": "struct", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::config::Config::Event", - "kind": "enum", - "variants": [ - { - "name": "DifferProgramHashUpdate", - "type": "dojo::world::config::Config::DifferProgramHashUpdate", - "kind": "nested" - }, - { - "name": "MergerProgramHashUpdate", - "type": "dojo::world::config::Config::MergerProgramHashUpdate", - "kind": "nested" - }, - { - "name": "FactsRegistryUpdate", - "type": "dojo::world::config::Config::FactsRegistryUpdate", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StateUpdated", - "kind": "struct", - "members": [ - { - "name": "da_hash", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::Event", - "kind": "enum", - "variants": [ - { - "name": "WorldSpawned", - "type": "dojo::world::world_contract::world::WorldSpawned", - "kind": "nested" - }, - { - "name": "ContractDeployed", - "type": "dojo::world::world_contract::world::ContractDeployed", - "kind": "nested" - }, - { - "name": "ContractUpgraded", - "type": "dojo::world::world_contract::world::ContractUpgraded", - "kind": "nested" - }, - { - "name": "ContractInitialized", - "type": "dojo::world::world_contract::world::ContractInitialized", - "kind": "nested" - }, - { - "name": "WorldUpgraded", - "type": "dojo::world::world_contract::world::WorldUpgraded", - "kind": "nested" - }, - { - "name": "MetadataUpdate", - "type": "dojo::world::world_contract::world::MetadataUpdate", - "kind": "nested" - }, - { - "name": "NamespaceRegistered", - "type": "dojo::world::world_contract::world::NamespaceRegistered", - "kind": "nested" - }, - { - "name": "ModelRegistered", - "type": "dojo::world::world_contract::world::ModelRegistered", - "kind": "nested" - }, - { - "name": "ModelUpgraded", - "type": "dojo::world::world_contract::world::ModelUpgraded", - "kind": "nested" - }, - { - "name": "StoreSetRecord", - "type": "dojo::world::world_contract::world::StoreSetRecord", - "kind": "nested" - }, - { - "name": "StoreUpdateRecord", - "type": "dojo::world::world_contract::world::StoreUpdateRecord", - "kind": "nested" - }, - { - "name": "StoreUpdateMember", - "type": "dojo::world::world_contract::world::StoreUpdateMember", - "kind": "nested" - }, - { - "name": "StoreDelRecord", - "type": "dojo::world::world_contract::world::StoreDelRecord", - "kind": "nested" - }, - { - "name": "WriterUpdated", - "type": "dojo::world::world_contract::world::WriterUpdated", - "kind": "nested" - }, - { - "name": "OwnerUpdated", - "type": "dojo::world::world_contract::world::OwnerUpdated", - "kind": "nested" - }, - { - "name": "ConfigEvent", - "type": "dojo::world::config::Config::Event", - "kind": "nested" - }, - { - "name": "StateUpdated", - "type": "dojo::world::world_contract::world::StateUpdated", - "kind": "nested" - } - ] - } - ], - "address": "0x644001b28f89e7ae8a39f9c48eb4961cc4f817dc40b4b527f851a56fe703652", - "transaction_hash": "0x1f1c658f1b3de98e21e98839833fb636773cf806eb7d2e3d3ec52e35c35a78", - "block_number": 3, - "seed": "bytebeasts", - "metadata": { - "profile_name": "dev", - "rpc_url": "http://0.0.0.0:5050/" - }, - "manifest_name": "dojo-world" - }, - "base": { - "kind": "Class", - "class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "original_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": "manifests/dev/deployment/abis/dojo-base.json", - "tag": "dojo-base", - "manifest_name": "dojo-base" - }, - "contracts": [ - { - "kind": "DojoContract", - "address": "0x4854bb6cc04b51e5adaed76afc0664091182fe44a9e5e68dc4f8f5f59ffd464", - "class_hash": "0x7a662a2c7e8067fd633c3840f51c671a18c2e71901995fe791281c07c855aa0", - "original_class_hash": "0x7a662a2c7e8067fd633c3840f51c671a18c2e71901995fe791281c07c855aa0", - "base_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": [ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "ActionsImpl", - "interface_name": "bytebeasts::systems::realms::IActions" - }, - { - "type": "enum", - "name": "bytebeasts::models::game::GameStatus", - "variants": [ - { - "name": "Pending", - "type": "()" - }, - { - "name": "InProgress", - "type": "()" - }, - { - "name": "Finished", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::game::Game", - "members": [ - { - "name": "game_id", - "type": "core::integer::u128" - }, - { - "name": "player_1", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_2", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_3", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_4", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "status", - "type": "bytebeasts::models::game::GameStatus" - }, - { - "name": "is_private", - "type": "core::bool" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::realms::IActions", - "items": [ - { - "type": "function", - "name": "create_initial_game_id", - "inputs": [], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "create_game", - "inputs": [], - "outputs": [ - { - "type": "bytebeasts::models::game::Game" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "join_game", - "inputs": [ - { - "name": "game_id", - "type": "core::integer::u128" - }, - { - "name": "player_2_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::realms::actions::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::realms::actions::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::realms::actions::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } - ], - "reads": [], - "writes": [], - "init_calldata": [], - "tag": "bytebeasts-actions", - "manifest_name": "bytebeasts-actions-648ac931" - }, - { - "kind": "DojoContract", - "address": "0x31d91cb20f41aa13507de40e2b7b5b85338e240388ea905ede7b799cafadcbe", - "class_hash": "0x51aaf7a580665ebd6d7d32e2340f0e8b6850296fc1ad389c74a293d1a26029f", - "original_class_hash": "0x51aaf7a580665ebd6d7d32e2340f0e8b6850296fc1ad389c74a293d1a26029f", - "base_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": [ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "BagActionImpl", - "interface_name": "bytebeasts::systems::bag::IBagAction" - }, - { - "type": "struct", - "name": "bytebeasts::models::potion::Potion", - "members": [ - { - "name": "potion_id", - "type": "core::integer::u32" - }, - { - "name": "potion_name", - "type": "core::felt252" - }, - { - "name": "potion_effect", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::bag::IBagAction", - "items": [ - { - "type": "function", - "name": "init_bag", - "inputs": [ - { - "name": "bag_id", - "type": "core::integer::u32" - }, - { - "name": "player_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "add_item", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "bag_id", - "type": "core::integer::u32" - }, - { - "name": "potion", - "type": "bytebeasts::models::potion::Potion" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "take_out_item", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "bag_id", - "type": "core::integer::u32" - } - ], - "outputs": [ - { - "type": "bytebeasts::models::potion::Potion" - } - ], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::bag::bag_system::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::bag::bag_system::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::bag::bag_system::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } - ], - "reads": [], - "writes": [], - "init_calldata": [], - "tag": "bytebeasts-bag_system", - "manifest_name": "bytebeasts-bag_system-7ad8a155" - }, - { - "kind": "DojoContract", - "address": "0x612b684f6b34356ad9a07ac3e1924f9dfa54235d0a513095b0d12695ace8b68", - "class_hash": "0x22eff2287b74c9f79832f32132c8154f28f916551d8650c8425f6c1c49adc31", - "original_class_hash": "0x22eff2287b74c9f79832f32132c8154f28f916551d8650c8425f6c1c49adc31", - "base_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": [ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "BattleActionsImpl", - "interface_name": "bytebeasts::systems::battle::IBattleActions" - }, - { - "type": "enum", - "name": "bytebeasts::models::world_elements::WorldElements", - "variants": [ - { - "name": "Crystal", - "type": "()" - }, - { - "name": "Draconic", - "type": "()" - }, - { - "name": "Shadow", - "type": "()" - }, - { - "name": "Light", - "type": "()" - }, - { - "name": "Titanium", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::beast::Beast", - "members": [ - { - "name": "beast_id", - "type": "core::integer::u32" - }, - { - "name": "beast_name", - "type": "core::felt252" - }, - { - "name": "beast_type", - "type": "bytebeasts::models::world_elements::WorldElements" - }, - { - "name": "beast_description", - "type": "core::felt252" - }, - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "hp", - "type": "core::integer::u32" - }, - { - "name": "current_hp", - "type": "core::integer::u32" - }, - { - "name": "attack", - "type": "core::integer::u32" - }, - { - "name": "defense", - "type": "core::integer::u32" - }, - { - "name": "mt1", - "type": "core::integer::u32" - }, - { - "name": "mt2", - "type": "core::integer::u32" - }, - { - "name": "mt3", - "type": "core::integer::u32" - }, - { - "name": "mt4", - "type": "core::integer::u32" - }, - { - "name": "level", - "type": "core::integer::u32" - }, - { - "name": "experience_to_next_level", - "type": "core::integer::u64" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::mt::Mt", - "members": [ - { - "name": "mt_id", - "type": "core::integer::u32" - }, - { - "name": "mt_name", - "type": "core::felt252" - }, - { - "name": "mt_type", - "type": "bytebeasts::models::world_elements::WorldElements" - }, - { - "name": "mt_power", - "type": "core::integer::u32" - }, - { - "name": "mt_accuracy", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::battle::IBattleActions", - "items": [ - { - "type": "function", - "name": "init_battle", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "opponent_id", - "type": "core::integer::u32" - } - ], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "check_flee_success", - "inputs": [ - { - "name": "player_beast", - "type": "bytebeasts::models::beast::Beast" - }, - { - "name": "opponent_beast", - "type": "bytebeasts::models::beast::Beast" - } - ], - "outputs": [ - { - "type": "core::bool" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "calculate_damage", - "inputs": [ - { - "name": "mt", - "type": "bytebeasts::models::mt::Mt" - }, - { - "name": "attacker", - "type": "bytebeasts::models::beast::Beast" - }, - { - "name": "defender", - "type": "bytebeasts::models::beast::Beast" - } - ], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "opponent_turn", - "inputs": [ - { - "name": "battle_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "attack", - "inputs": [ - { - "name": "battle_id", - "type": "core::integer::u32" - }, - { - "name": "mt_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "use_potion", - "inputs": [ - { - "name": "battle_id", - "type": "core::integer::u32" - }, - { - "name": "potion_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "flee", - "inputs": [ - { - "name": "battle_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::battle::battle_system::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::battle::battle_system::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::battle::battle_system::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } - ], - "reads": [], - "writes": [], - "init_calldata": [], - "tag": "bytebeasts-battle_system", - "manifest_name": "bytebeasts-battle_system-461868ac" - }, - { - "kind": "DojoContract", - "address": "0x6e214ac3592bdfbc7d2df77bac600e11786a1af5995f9b8422ba11a7ca105c7", - "class_hash": "0x6ab57932e6f1d360557867a6775d89180d623a481695d4349f6d356c8cd31ee", - "original_class_hash": "0x6ab57932e6f1d360557867a6775d89180d623a481695d4349f6d356c8cd31ee", - "base_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": [ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "MoveActionImpl", - "interface_name": "bytebeasts::systems::move::IMoveAction" - }, - { - "type": "interface", - "name": "bytebeasts::systems::move::IMoveAction", - "items": [ - { - "type": "function", - "name": "move", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "new_x", - "type": "core::integer::u32" - }, - { - "name": "new_y", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::move::move_action::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::move::move_action::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::move::move_action::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } - ], - "reads": [], - "writes": [ - "bytebeasts-Position" - ], - "init_calldata": [], - "tag": "bytebeasts-move_action", - "manifest_name": "bytebeasts-move_action-62decdb8" - }, - { - "kind": "DojoContract", - "address": "0x3069906b1afcae5bc379fb0e7e8aad2aa249be91229aab7d96c608bc2136f18", - "class_hash": "0x394b6a9219ec1e5e1e3afdec390794e017870eb56b58ad18252d3c1eaf2a0f0", - "original_class_hash": "0x394b6a9219ec1e5e1e3afdec390794e017870eb56b58ad18252d3c1eaf2a0f0", - "base_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": [ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "SpawnActionImpl", - "interface_name": "bytebeasts::systems::spawn::ISpawnAction" - }, - { - "type": "interface", - "name": "bytebeasts::systems::spawn::ISpawnAction", - "items": [ - { - "type": "function", - "name": "spawn", - "inputs": [ - { - "name": "player_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::spawn::spawn_action::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::spawn::spawn_action::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::spawn::spawn_action::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } - ], - "reads": [], - "writes": [ - "bytebeasts-Beast", - "bytebeasts-Mt", - "bytebeasts-Player", - "bytebeasts-Potion", - "bytebeasts-Position" - ], - "init_calldata": [], - "tag": "bytebeasts-spawn_action", - "manifest_name": "bytebeasts-spawn_action-5176c1e8" - }, - { - "kind": "DojoContract", - "address": "0x1a0997571ba63300bba592512cc9ac1daa8911ee08c049b5693d93c06377d25", - "class_hash": "0xad9d2da0783e3a31f6198d7c355bd293e496019e0e335449377a2c0146880", - "original_class_hash": "0xad9d2da0783e3a31f6198d7c355bd293e496019e0e335449377a2c0146880", - "base_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": [ - { - "type": "impl", - "name": "ContractImpl", - "interface_name": "dojo::contract::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::contract::contract::IContract", - "items": [ - { - "type": "function", - "name": "contract_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::world::world_contract::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::world_contract::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::world::world_contract::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::world_contract::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "WorldSetupImpl", - "interface_name": "bytebeasts::systems::world_setup::IWorldSetup" - }, - { - "type": "interface", - "name": "bytebeasts::systems::world_setup::IWorldSetup", - "items": [ - { - "type": "function", - "name": "setWorld", - "inputs": [], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "impl", - "name": "IDojoInitImpl", - "interface_name": "bytebeasts::systems::world_setup::world_setup::IDojoInit" - }, - { - "type": "interface", - "name": "bytebeasts::systems::world_setup::world_setup::IDojoInit", - "items": [ - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradableImpl", - "interface_name": "dojo::contract::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::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::contract::upgradeable::upgradeable::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::upgradeable::upgradeable::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::world_setup::world_setup::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::upgradeable::upgradeable::Event", - "kind": "nested" - } - ] - } - ], - "reads": [], - "writes": [ - "bytebeasts-Beast", - "bytebeasts-Mt", - "bytebeasts-Player", - "bytebeasts-Potion", - "bytebeasts-Position" - ], - "init_calldata": [], - "tag": "bytebeasts-world_setup", - "manifest_name": "bytebeasts-world_setup-674b640b" - } - ], - "models": [ - { - "kind": "DojoModel", - "members": [ - { - "name": "achievement_id", - "type": "u64", - "key": true - }, - { - "name": "achievement_type", - "type": "AchievementType", - "key": false - }, - { - "name": "rarity", - "type": "AchievementRarity", - "key": false - }, - { - "name": "name", - "type": "felt252", - "key": false - }, - { - "name": "description", - "type": "ByteArray", - "key": false - }, - { - "name": "is_hidden", - "type": "bool", - "key": false - }, - { - "name": "is_unlocked", - "type": "bool", - "key": false - } - ], - "class_hash": "0x41f50347f6f957bc556346a2cdea3f31523f3c25966826e7ca7dea1de185c40", - "original_class_hash": "0x41f50347f6f957bc556346a2cdea3f31523f3c25966826e7ca7dea1de185c40", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "achievementImpl", - "interface_name": "bytebeasts::models::achievements::Iachievement" - }, - { - "type": "enum", - "name": "bytebeasts::models::achievement_type::AchievementType", - "variants": [ - { - "name": "FirstWin", - "type": "()" - }, - { - "name": "TenWins", - "type": "()" - }, - { - "name": "HundredWins", - "type": "()" - }, - { - "name": "FirstBeast", - "type": "()" - }, - { - "name": "TenBeasts", - "type": "()" - }, - { - "name": "RareBeast", - "type": "()" - }, - { - "name": "FirstNPCInteraction", - "type": "()" - }, - { - "name": "RandomBattleChampion", - "type": "()" - }, - { - "name": "BeastMaster", - "type": "()" - }, - { - "name": "LegendaryPlayer", - "type": "()" - }, - { - "name": "TopScorer", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "bytebeasts::models::achievement_rarity::AchievementRarity", - "variants": [ - { - "name": "Common", - "type": "()" - }, - { - "name": "Uncommon", - "type": "()" - }, - { - "name": "Rare", - "type": "()" - }, - { - "name": "Epic", - "type": "()" - }, - { - "name": "Legendary", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::achievements::Achievement", - "members": [ - { - "name": "achievement_id", - "type": "core::integer::u64" - }, - { - "name": "achievement_type", - "type": "bytebeasts::models::achievement_type::AchievementType" - }, - { - "name": "rarity", - "type": "bytebeasts::models::achievement_rarity::AchievementRarity" - }, - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "description", - "type": "core::byte_array::ByteArray" - }, - { - "name": "is_hidden", - "type": "core::bool" - }, - { - "name": "is_unlocked", - "type": "core::bool" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::achievements::Iachievement", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::achievements::Achievement" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::achievements::achievement::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-Achievement", - "manifest_name": "bytebeasts-Achievement-58a03b97" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "player_id", - "type": "u64", - "key": true - }, - { - "name": "achievement_id", - "type": "u64", - "key": false - }, - { - "name": "progress", - "type": "u32", - "key": false - }, - { - "name": "is_unlocked", - "type": "bool", - "key": false - } - ], - "class_hash": "0x494e5a6534846cd68b493aab6f9954333c64c854dbe99144c427f4301477f15", - "original_class_hash": "0x494e5a6534846cd68b493aab6f9954333c64c854dbe99144c427f4301477f15", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "achievement_progressImpl", - "interface_name": "bytebeasts::models::achievements::Iachievement_progress" - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::achievements::AchievementProgress", - "members": [ - { - "name": "player_id", - "type": "core::integer::u64" - }, - { - "name": "achievement_id", - "type": "core::integer::u64" - }, - { - "name": "progress", - "type": "core::integer::u32" - }, - { - "name": "is_unlocked", - "type": "core::bool" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::achievements::Iachievement_progress", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::achievements::AchievementProgress" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::achievements::achievement_progress::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-AchievementProgress", - "manifest_name": "bytebeasts-AchievementProgress-221f2719" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "bag_id", - "type": "u32", - "key": true - }, - { - "name": "player_id", - "type": "u32", - "key": true - }, - { - "name": "max_capacity", - "type": "u32", - "key": false - }, - { - "name": "potions", - "type": "Array", - "key": false - } - ], - "class_hash": "0x4e0fab7bc052de0008be5606ad3b37576afd2bda323443fc98a8f37bcc10c1c", - "original_class_hash": "0x4e0fab7bc052de0008be5606ad3b37576afd2bda323443fc98a8f37bcc10c1c", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "bagImpl", - "interface_name": "bytebeasts::models::bag::Ibag" - }, - { - "type": "struct", - "name": "bytebeasts::models::potion::Potion", - "members": [ - { - "name": "potion_id", - "type": "core::integer::u32" - }, - { - "name": "potion_name", - "type": "core::felt252" - }, - { - "name": "potion_effect", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::bag::Bag", - "members": [ - { - "name": "bag_id", - "type": "core::integer::u32" - }, - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "max_capacity", - "type": "core::integer::u32" - }, - { - "name": "potions", - "type": "core::array::Array::" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::bag::Ibag", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::bag::Bag" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::bag::bag::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-Bag", - "manifest_name": "bytebeasts-Bag-2571b77d" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "battle_id", - "type": "u32", - "key": true - }, - { - "name": "player_id", - "type": "u32", - "key": false - }, - { - "name": "opponent_id", - "type": "u32", - "key": false - }, - { - "name": "active_beast_player", - "type": "u32", - "key": false - }, - { - "name": "active_beast_opponent", - "type": "u32", - "key": false - }, - { - "name": "battle_active", - "type": "u32", - "key": false - }, - { - "name": "turn", - "type": "u32", - "key": false - } - ], - "class_hash": "0x239c54e950b5c50d445f9a8db758ea0af1440b75a5f1921dfe014b927476c32", - "original_class_hash": "0x239c54e950b5c50d445f9a8db758ea0af1440b75a5f1921dfe014b927476c32", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "battleImpl", - "interface_name": "bytebeasts::models::battle::Ibattle" - }, - { - "type": "struct", - "name": "bytebeasts::models::battle::Battle", - "members": [ - { - "name": "battle_id", - "type": "core::integer::u32" - }, - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "opponent_id", - "type": "core::integer::u32" - }, - { - "name": "active_beast_player", - "type": "core::integer::u32" - }, - { - "name": "active_beast_opponent", - "type": "core::integer::u32" - }, - { - "name": "battle_active", - "type": "core::integer::u32" - }, - { - "name": "turn", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::battle::Ibattle", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::battle::Battle" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::battle::battle::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-Battle", - "manifest_name": "bytebeasts-Battle-55b5860b" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "beast_id", - "type": "u32", - "key": true - }, - { - "name": "beast_name", - "type": "felt252", - "key": false - }, - { - "name": "beast_type", - "type": "WorldElements", - "key": false - }, - { - "name": "beast_description", - "type": "felt252", - "key": false - }, - { - "name": "player_id", - "type": "u32", - "key": false - }, - { - "name": "hp", - "type": "u32", - "key": false - }, - { - "name": "current_hp", - "type": "u32", - "key": false - }, - { - "name": "attack", - "type": "u32", - "key": false - }, - { - "name": "defense", - "type": "u32", - "key": false - }, - { - "name": "mt1", - "type": "u32", - "key": false - }, - { - "name": "mt2", - "type": "u32", - "key": false - }, - { - "name": "mt3", - "type": "u32", - "key": false - }, - { - "name": "mt4", - "type": "u32", - "key": false - }, - { - "name": "level", - "type": "u32", - "key": false - }, - { - "name": "experience_to_next_level", - "type": "u64", - "key": false - } - ], - "class_hash": "0x7bef5c17e52dab476cd7ae664bbb0f0024aae955ed8b12592e2d6faf7ff6a3c", - "original_class_hash": "0x7bef5c17e52dab476cd7ae664bbb0f0024aae955ed8b12592e2d6faf7ff6a3c", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "beastImpl", - "interface_name": "bytebeasts::models::beast::Ibeast" - }, - { - "type": "enum", - "name": "bytebeasts::models::world_elements::WorldElements", - "variants": [ - { - "name": "Crystal", - "type": "()" - }, - { - "name": "Draconic", - "type": "()" - }, - { - "name": "Shadow", - "type": "()" - }, - { - "name": "Light", - "type": "()" - }, - { - "name": "Titanium", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::beast::Beast", - "members": [ - { - "name": "beast_id", - "type": "core::integer::u32" - }, - { - "name": "beast_name", - "type": "core::felt252" - }, - { - "name": "beast_type", - "type": "bytebeasts::models::world_elements::WorldElements" - }, - { - "name": "beast_description", - "type": "core::felt252" - }, - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "hp", - "type": "core::integer::u32" - }, - { - "name": "current_hp", - "type": "core::integer::u32" - }, - { - "name": "attack", - "type": "core::integer::u32" - }, - { - "name": "defense", - "type": "core::integer::u32" - }, - { - "name": "mt1", - "type": "core::integer::u32" - }, - { - "name": "mt2", - "type": "core::integer::u32" - }, - { - "name": "mt3", - "type": "core::integer::u32" - }, - { - "name": "mt4", - "type": "core::integer::u32" - }, - { - "name": "level", - "type": "core::integer::u32" - }, - { - "name": "experience_to_next_level", - "type": "core::integer::u64" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::beast::Ibeast", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::beast::Beast" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::beast::beast::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-Beast", - "manifest_name": "bytebeasts-Beast-27809d20" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "game_id", - "type": "u128", - "key": true - }, - { - "name": "player_1", - "type": "ContractAddress", - "key": false - }, - { - "name": "player_2", - "type": "ContractAddress", - "key": false - }, - { - "name": "player_3", - "type": "ContractAddress", - "key": false - }, - { - "name": "player_4", - "type": "ContractAddress", - "key": false - }, - { - "name": "status", - "type": "GameStatus", - "key": false - }, - { - "name": "is_private", - "type": "bool", - "key": false - } - ], - "class_hash": "0x57c477846284e274054c78c5b265af51f8815abbf0147828080c274b0639764", - "original_class_hash": "0x57c477846284e274054c78c5b265af51f8815abbf0147828080c274b0639764", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "gameImpl", - "interface_name": "bytebeasts::models::game::Igame" - }, - { - "type": "enum", - "name": "bytebeasts::models::game::GameStatus", - "variants": [ - { - "name": "Pending", - "type": "()" - }, - { - "name": "InProgress", - "type": "()" - }, - { - "name": "Finished", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::game::Game", - "members": [ - { - "name": "game_id", - "type": "core::integer::u128" - }, - { - "name": "player_1", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_2", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_3", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_4", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "status", - "type": "bytebeasts::models::game::GameStatus" - }, - { - "name": "is_private", - "type": "core::bool" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::game::Igame", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::game::Game" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::game::game::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-Game", - "manifest_name": "bytebeasts-Game-e91217d7" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "id", - "type": "u32", - "key": true - }, - { - "name": "game_id", - "type": "u128", - "key": false - } - ], - "class_hash": "0x7dc1689aa3f1e6b123cadfed4066a70f09be69c9a166bfe824c61b916925efe", - "original_class_hash": "0x7dc1689aa3f1e6b123cadfed4066a70f09be69c9a166bfe824c61b916925efe", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "game_idImpl", - "interface_name": "bytebeasts::models::game_id::Igame_id" - }, - { - "type": "struct", - "name": "bytebeasts::models::game_id::GameId", - "members": [ - { - "name": "id", - "type": "core::integer::u32" - }, - { - "name": "game_id", - "type": "core::integer::u128" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::game_id::Igame_id", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::game_id::GameId" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::game_id::game_id::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-GameId", - "manifest_name": "bytebeasts-GameId-344511d3" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "address", - "type": "ContractAddress", - "key": true - }, - { - "name": "game_id", - "type": "u128", - "key": true - }, - { - "name": "beast_1", - "type": "u8", - "key": false - }, - { - "name": "beast_2", - "type": "u8", - "key": false - }, - { - "name": "beast_3", - "type": "u8", - "key": false - }, - { - "name": "beast_4", - "type": "u8", - "key": false - }, - { - "name": "bag_id", - "type": "u8", - "key": false - }, - { - "name": "active_mount", - "type": "u8", - "key": false - }, - { - "name": "mounts", - "type": "Array", - "key": false - }, - { - "name": "position", - "type": "Array", - "key": false - } - ], - "class_hash": "0x52df62dec799bbf7ba4725f74e32e579dec2d90a7a995638761646157bb7e18", - "original_class_hash": "0x52df62dec799bbf7ba4725f74e32e579dec2d90a7a995638761646157bb7e18", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "game_playerImpl", - "interface_name": "bytebeasts::models::game_player::Igame_player" - }, - { - "type": "struct", - "name": "bytebeasts::models::game_player::GamePlayer", - "members": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "game_id", - "type": "core::integer::u128" - }, - { - "name": "beast_1", - "type": "core::integer::u8" - }, - { - "name": "beast_2", - "type": "core::integer::u8" - }, - { - "name": "beast_3", - "type": "core::integer::u8" - }, - { - "name": "beast_4", - "type": "core::integer::u8" - }, - { - "name": "bag_id", - "type": "core::integer::u8" - }, - { - "name": "active_mount", - "type": "core::integer::u8" - }, - { - "name": "mounts", - "type": "core::array::Array::" - }, - { - "name": "position", - "type": "core::array::Array::" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::game_player::Igame_player", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::game_player::GamePlayer" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::game_player::game_player::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-GamePlayer", - "manifest_name": "bytebeasts-GamePlayer-596ef4a1" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "mt_id", - "type": "u32", - "key": true - }, - { - "name": "mt_name", - "type": "felt252", - "key": false - }, - { - "name": "mt_type", - "type": "WorldElements", - "key": false - }, - { - "name": "mt_power", - "type": "u32", - "key": false - }, - { - "name": "mt_accuracy", - "type": "u32", - "key": false - } - ], - "class_hash": "0x341a07493baed313e741253a241aa31fc9d40a9c373cd2bae49f85ab66f98cc", - "original_class_hash": "0x341a07493baed313e741253a241aa31fc9d40a9c373cd2bae49f85ab66f98cc", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "mtImpl", - "interface_name": "bytebeasts::models::mt::Imt" - }, - { - "type": "enum", - "name": "bytebeasts::models::world_elements::WorldElements", - "variants": [ - { - "name": "Crystal", - "type": "()" - }, - { - "name": "Draconic", - "type": "()" - }, - { - "name": "Shadow", - "type": "()" - }, - { - "name": "Light", - "type": "()" - }, - { - "name": "Titanium", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::mt::Mt", - "members": [ - { - "name": "mt_id", - "type": "core::integer::u32" - }, - { - "name": "mt_name", - "type": "core::felt252" - }, - { - "name": "mt_type", - "type": "bytebeasts::models::world_elements::WorldElements" - }, - { - "name": "mt_power", - "type": "core::integer::u32" - }, - { - "name": "mt_accuracy", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::mt::Imt", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::mt::Mt" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::mt::mt::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-Mt", - "manifest_name": "bytebeasts-Mt-37360d30" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "npc_id", - "type": "u32", - "key": true - }, - { - "name": "npc_name", - "type": "felt252", - "key": false - }, - { - "name": "npc_description", - "type": "felt252", - "key": false - }, - { - "name": "npc_role", - "type": "Role", - "key": false - }, - { - "name": "dialogue", - "type": "ByteArray", - "key": false - }, - { - "name": "is_active", - "type": "bool", - "key": false - }, - { - "name": "location", - "type": "Coordinates", - "key": false - }, - { - "name": "importance_level", - "type": "u8", - "key": false - }, - { - "name": "mission_status", - "type": "MissionStatus", - "key": false - }, - { - "name": "reward", - "type": "u16", - "key": false - }, - { - "name": "experience_points", - "type": "u16", - "key": false - }, - { - "name": "potions", - "type": "Array", - "key": false - } - ], - "class_hash": "0x3ba44df67a037c20f004b7f5ab7725932d4519eed6beb6bc223a03e96c0f0f9", - "original_class_hash": "0x3ba44df67a037c20f004b7f5ab7725932d4519eed6beb6bc223a03e96c0f0f9", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "npcImpl", - "interface_name": "bytebeasts::models::npc::Inpc" - }, - { - "type": "enum", - "name": "bytebeasts::models::role::Role", - "variants": [ - { - "name": "Vendor", - "type": "()" - }, - { - "name": "Trainer", - "type": "()" - }, - { - "name": "Guide", - "type": "()" - }, - { - "name": "QuestGiver", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::coordinates::Coordinates", - "members": [ - { - "name": "x", - "type": "core::integer::u32" - }, - { - "name": "y", - "type": "core::integer::u32" - } - ] - }, - { - "type": "enum", - "name": "bytebeasts::models::mission_status::MissionStatus", - "variants": [ - { - "name": "NotStarted", - "type": "()" - }, - { - "name": "InProgress", - "type": "()" - }, - { - "name": "Completed", - "type": "()" - }, - { - "name": "Failed", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::potion::Potion", - "members": [ - { - "name": "potion_id", - "type": "core::integer::u32" - }, - { - "name": "potion_name", - "type": "core::felt252" - }, - { - "name": "potion_effect", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::npc::NPC", - "members": [ - { - "name": "npc_id", - "type": "core::integer::u32" - }, - { - "name": "npc_name", - "type": "core::felt252" - }, - { - "name": "npc_description", - "type": "core::felt252" - }, - { - "name": "npc_role", - "type": "bytebeasts::models::role::Role" - }, - { - "name": "dialogue", - "type": "core::byte_array::ByteArray" - }, - { - "name": "is_active", - "type": "core::bool" - }, - { - "name": "location", - "type": "bytebeasts::models::coordinates::Coordinates" - }, - { - "name": "importance_level", - "type": "core::integer::u8" - }, - { - "name": "mission_status", - "type": "bytebeasts::models::mission_status::MissionStatus" - }, - { - "name": "reward", - "type": "core::integer::u16" - }, - { - "name": "experience_points", - "type": "core::integer::u16" - }, - { - "name": "potions", - "type": "core::array::Array::" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::npc::Inpc", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::npc::NPC" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::npc::npc::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-NPC", - "manifest_name": "bytebeasts-NPC-4c5239ac" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "player_id", - "type": "u32", - "key": true - }, - { - "name": "player_name", - "type": "felt252", - "key": false - }, - { - "name": "beast_1", - "type": "u32", - "key": false - }, - { - "name": "beast_2", - "type": "u32", - "key": false - }, - { - "name": "beast_3", - "type": "u32", - "key": false - }, - { - "name": "beast_4", - "type": "u32", - "key": false - }, - { - "name": "potions", - "type": "u32", - "key": false - } - ], - "class_hash": "0x5d992305e6f7ce0965d5bbe71e33cab817c31514ba83c8fca4610ab574e8016", - "original_class_hash": "0x5d992305e6f7ce0965d5bbe71e33cab817c31514ba83c8fca4610ab574e8016", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "playerImpl", - "interface_name": "bytebeasts::models::player::Iplayer" - }, - { - "type": "struct", - "name": "bytebeasts::models::player::Player", - "members": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "player_name", - "type": "core::felt252" - }, - { - "name": "beast_1", - "type": "core::integer::u32" - }, - { - "name": "beast_2", - "type": "core::integer::u32" - }, - { - "name": "beast_3", - "type": "core::integer::u32" - }, - { - "name": "beast_4", - "type": "core::integer::u32" - }, - { - "name": "potions", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::player::Iplayer", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::player::Player" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::player::player::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-Player", - "manifest_name": "bytebeasts-Player-14f5e45e" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "player", - "type": "Player", - "key": true - }, - { - "name": "coordinates", - "type": "Coordinates", - "key": false - } - ], - "class_hash": "0x91da9f380b960e2dc7f9a59d4e1242ed718590d2270fd28e2311a5e1ee54f2", - "original_class_hash": "0x91da9f380b960e2dc7f9a59d4e1242ed718590d2270fd28e2311a5e1ee54f2", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "positionImpl", - "interface_name": "bytebeasts::models::position::Iposition" - }, - { - "type": "struct", - "name": "bytebeasts::models::player::Player", - "members": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "player_name", - "type": "core::felt252" - }, - { - "name": "beast_1", - "type": "core::integer::u32" - }, - { - "name": "beast_2", - "type": "core::integer::u32" - }, - { - "name": "beast_3", - "type": "core::integer::u32" - }, - { - "name": "beast_4", - "type": "core::integer::u32" - }, - { - "name": "potions", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::coordinates::Coordinates", - "members": [ - { - "name": "x", - "type": "core::integer::u32" - }, - { - "name": "y", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "bytebeasts::models::position::Position", - "members": [ - { - "name": "player", - "type": "bytebeasts::models::player::Player" - }, - { - "name": "coordinates", - "type": "bytebeasts::models::coordinates::Coordinates" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::position::Iposition", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::position::Position" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::position::position::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-Position", - "manifest_name": "bytebeasts-Position-78f28df6" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "potion_id", - "type": "u32", - "key": true - }, - { - "name": "potion_name", - "type": "felt252", - "key": false - }, - { - "name": "potion_effect", - "type": "u32", - "key": false - } - ], - "class_hash": "0x4eac23f35a0e71954b8f000d9d8999579ba49ffc918e8b78924562449bdf8d4", - "original_class_hash": "0x4eac23f35a0e71954b8f000d9d8999579ba49ffc918e8b78924562449bdf8d4", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "potionImpl", - "interface_name": "bytebeasts::models::potion::Ipotion" - }, - { - "type": "struct", - "name": "bytebeasts::models::potion::Potion", - "members": [ - { - "name": "potion_id", - "type": "core::integer::u32" - }, - { - "name": "potion_name", - "type": "core::felt252" - }, - { - "name": "potion_effect", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::models::potion::Ipotion", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::models::potion::Potion" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::models::potion::potion::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-Potion", - "manifest_name": "bytebeasts-Potion-6a2114b0" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "player_id", - "type": "u32", - "key": true - }, - { - "name": "message", - "type": "felt252", - "key": false - } - ], - "class_hash": "0xe446a8c3773fbfae6e2e0e87a6d1db12143224cf47e217e12bf9cfc76428ef", - "original_class_hash": "0xe446a8c3773fbfae6e2e0e87a6d1db12143224cf47e217e12bf9cfc76428ef", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "statusImpl", - "interface_name": "bytebeasts::systems::battle::battle_system::Istatus" - }, - { - "type": "struct", - "name": "bytebeasts::systems::battle::battle_system::Status", - "members": [ - { - "name": "player_id", - "type": "core::integer::u32" - }, - { - "name": "message", - "type": "core::felt252" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::battle::battle_system::Istatus", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::systems::battle::battle_system::Status" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::battle::battle_system::status::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-Status", - "manifest_name": "bytebeasts-Status-6595af0f" - }, - { - "kind": "DojoModel", - "members": [ - { - "name": "battle_id", - "type": "u32", - "key": true - }, - { - "name": "message", - "type": "felt252", - "key": false - } - ], - "class_hash": "0x5ba495f80b653be6df964eb97ac2e7b3f7f72508d17b54b1d51595231db8fae", - "original_class_hash": "0x5ba495f80b653be6df964eb97ac2e7b3f7f72508d17b54b1d51595231db8fae", - "abi": [ - { - "type": "impl", - "name": "DojoModelImpl", - "interface_name": "dojo::model::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::model::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::model::layout::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::model::layout::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::model::introspect::Member", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "ty", - "type": "dojo::model::introspect::Ty" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::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::model::introspect::Ty)>", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "dojo::model::introspect::Enum", - "members": [ - { - "name": "name", - "type": "core::felt252" - }, - { - "name": "attrs", - "type": "core::array::Span::" - }, - { - "name": "children", - "type": "core::array::Span::<(core::felt252, dojo::model::introspect::Ty)>" - } - ] - }, - { - "type": "struct", - "name": "core::array::Span::", - "members": [ - { - "name": "snapshot", - "type": "@core::array::Array::" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::introspect::Ty", - "variants": [ - { - "name": "Primitive", - "type": "core::felt252" - }, - { - "name": "Struct", - "type": "dojo::model::introspect::Struct" - }, - { - "name": "Enum", - "type": "dojo::model::introspect::Enum" - }, - { - "name": "Tuple", - "type": "core::array::Span::" - }, - { - "name": "Array", - "type": "core::array::Span::" - }, - { - "name": "ByteArray", - "type": "()" - } - ] - }, - { - "type": "interface", - "name": "dojo::model::model::IModel", - "items": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "tag", - "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": "selector", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "name_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "namespace_hash", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "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::model::layout::Layout" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ - { - "type": "dojo::model::introspect::Ty" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "status_battleImpl", - "interface_name": "bytebeasts::systems::battle::battle_system::Istatus_battle" - }, - { - "type": "struct", - "name": "bytebeasts::systems::battle::battle_system::StatusBattle", - "members": [ - { - "name": "battle_id", - "type": "core::integer::u32" - }, - { - "name": "message", - "type": "core::felt252" - } - ] - }, - { - "type": "interface", - "name": "bytebeasts::systems::battle::battle_system::Istatus_battle", - "items": [ - { - "type": "function", - "name": "ensure_abi", - "inputs": [ - { - "name": "model", - "type": "bytebeasts::systems::battle::battle_system::StatusBattle" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "event", - "name": "bytebeasts::systems::battle::battle_system::status_battle::Event", - "kind": "enum", - "variants": [] - } - ], - "tag": "bytebeasts-StatusBattle", - "manifest_name": "bytebeasts-StatusBattle-161fdb64" - } - ] -} \ No newline at end of file diff --git a/manifests/dev/deployment/manifest.toml b/manifests/dev/deployment/manifest.toml deleted file mode 100644 index eb90f3f..0000000 --- a/manifests/dev/deployment/manifest.toml +++ /dev/null @@ -1,677 +0,0 @@ -[world] -kind = "WorldContract" -class_hash = "0x76ced5a15cb43c7be7176cff4779cd57c56638a46ddf2c9da709d22298c5e5a" -original_class_hash = "0x76ced5a15cb43c7be7176cff4779cd57c56638a46ddf2c9da709d22298c5e5a" -abi = "manifests/dev/deployment/abis/dojo-world.json" -address = "0x644001b28f89e7ae8a39f9c48eb4961cc4f817dc40b4b527f851a56fe703652" -transaction_hash = "0x1f1c658f1b3de98e21e98839833fb636773cf806eb7d2e3d3ec52e35c35a78" -block_number = 3 -seed = "bytebeasts" -manifest_name = "dojo-world" - -[world.metadata] -profile_name = "dev" -rpc_url = "http://0.0.0.0:5050/" - -[base] -kind = "Class" -class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -original_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/dojo-base.json" -tag = "dojo-base" -manifest_name = "dojo-base" - -[[contracts]] -kind = "DojoContract" -address = "0x4854bb6cc04b51e5adaed76afc0664091182fe44a9e5e68dc4f8f5f59ffd464" -class_hash = "0x7a662a2c7e8067fd633c3840f51c671a18c2e71901995fe791281c07c855aa0" -original_class_hash = "0x7a662a2c7e8067fd633c3840f51c671a18c2e71901995fe791281c07c855aa0" -base_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/contracts/bytebeasts-actions-648ac931.json" -reads = [] -writes = [] -init_calldata = [] -tag = "bytebeasts-actions" -manifest_name = "bytebeasts-actions-648ac931" - -[[contracts]] -kind = "DojoContract" -address = "0x31d91cb20f41aa13507de40e2b7b5b85338e240388ea905ede7b799cafadcbe" -class_hash = "0x51aaf7a580665ebd6d7d32e2340f0e8b6850296fc1ad389c74a293d1a26029f" -original_class_hash = "0x51aaf7a580665ebd6d7d32e2340f0e8b6850296fc1ad389c74a293d1a26029f" -base_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/contracts/bytebeasts-bag_system-7ad8a155.json" -reads = [] -writes = [] -init_calldata = [] -tag = "bytebeasts-bag_system" -manifest_name = "bytebeasts-bag_system-7ad8a155" - -[[contracts]] -kind = "DojoContract" -address = "0x612b684f6b34356ad9a07ac3e1924f9dfa54235d0a513095b0d12695ace8b68" -class_hash = "0x22eff2287b74c9f79832f32132c8154f28f916551d8650c8425f6c1c49adc31" -original_class_hash = "0x22eff2287b74c9f79832f32132c8154f28f916551d8650c8425f6c1c49adc31" -base_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/contracts/bytebeasts-battle_system-461868ac.json" -reads = [] -writes = [] -init_calldata = [] -tag = "bytebeasts-battle_system" -manifest_name = "bytebeasts-battle_system-461868ac" - -[[contracts]] -kind = "DojoContract" -address = "0x6e214ac3592bdfbc7d2df77bac600e11786a1af5995f9b8422ba11a7ca105c7" -class_hash = "0x6ab57932e6f1d360557867a6775d89180d623a481695d4349f6d356c8cd31ee" -original_class_hash = "0x6ab57932e6f1d360557867a6775d89180d623a481695d4349f6d356c8cd31ee" -base_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/contracts/bytebeasts-move_action-62decdb8.json" -reads = [] -writes = ["bytebeasts-Position"] -init_calldata = [] -tag = "bytebeasts-move_action" -manifest_name = "bytebeasts-move_action-62decdb8" - -[[contracts]] -kind = "DojoContract" -address = "0x3069906b1afcae5bc379fb0e7e8aad2aa249be91229aab7d96c608bc2136f18" -class_hash = "0x394b6a9219ec1e5e1e3afdec390794e017870eb56b58ad18252d3c1eaf2a0f0" -original_class_hash = "0x394b6a9219ec1e5e1e3afdec390794e017870eb56b58ad18252d3c1eaf2a0f0" -base_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/contracts/bytebeasts-spawn_action-5176c1e8.json" -reads = [] -writes = [ - "bytebeasts-Beast", - "bytebeasts-Mt", - "bytebeasts-Player", - "bytebeasts-Potion", - "bytebeasts-Position", -] -init_calldata = [] -tag = "bytebeasts-spawn_action" -manifest_name = "bytebeasts-spawn_action-5176c1e8" - -[[contracts]] -kind = "DojoContract" -address = "0x1a0997571ba63300bba592512cc9ac1daa8911ee08c049b5693d93c06377d25" -class_hash = "0xad9d2da0783e3a31f6198d7c355bd293e496019e0e335449377a2c0146880" -original_class_hash = "0xad9d2da0783e3a31f6198d7c355bd293e496019e0e335449377a2c0146880" -base_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/contracts/bytebeasts-world_setup-674b640b.json" -reads = [] -writes = [ - "bytebeasts-Beast", - "bytebeasts-Mt", - "bytebeasts-Player", - "bytebeasts-Potion", - "bytebeasts-Position", -] -init_calldata = [] -tag = "bytebeasts-world_setup" -manifest_name = "bytebeasts-world_setup-674b640b" - -[[models]] -kind = "DojoModel" -class_hash = "0x41f50347f6f957bc556346a2cdea3f31523f3c25966826e7ca7dea1de185c40" -original_class_hash = "0x41f50347f6f957bc556346a2cdea3f31523f3c25966826e7ca7dea1de185c40" -abi = "manifests/dev/deployment/abis/models/bytebeasts-Achievement-58a03b97.json" -tag = "bytebeasts-Achievement" -manifest_name = "bytebeasts-Achievement-58a03b97" - -[[models.members]] -name = "achievement_id" -type = "u64" -key = true - -[[models.members]] -name = "achievement_type" -type = "AchievementType" -key = false - -[[models.members]] -name = "rarity" -type = "AchievementRarity" -key = false - -[[models.members]] -name = "name" -type = "felt252" -key = false - -[[models.members]] -name = "description" -type = "ByteArray" -key = false - -[[models.members]] -name = "is_hidden" -type = "bool" -key = false - -[[models.members]] -name = "is_unlocked" -type = "bool" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x494e5a6534846cd68b493aab6f9954333c64c854dbe99144c427f4301477f15" -original_class_hash = "0x494e5a6534846cd68b493aab6f9954333c64c854dbe99144c427f4301477f15" -abi = "manifests/dev/deployment/abis/models/bytebeasts-AchievementProgress-221f2719.json" -tag = "bytebeasts-AchievementProgress" -manifest_name = "bytebeasts-AchievementProgress-221f2719" - -[[models.members]] -name = "player_id" -type = "u64" -key = true - -[[models.members]] -name = "achievement_id" -type = "u64" -key = false - -[[models.members]] -name = "progress" -type = "u32" -key = false - -[[models.members]] -name = "is_unlocked" -type = "bool" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x4e0fab7bc052de0008be5606ad3b37576afd2bda323443fc98a8f37bcc10c1c" -original_class_hash = "0x4e0fab7bc052de0008be5606ad3b37576afd2bda323443fc98a8f37bcc10c1c" -abi = "manifests/dev/deployment/abis/models/bytebeasts-Bag-2571b77d.json" -tag = "bytebeasts-Bag" -manifest_name = "bytebeasts-Bag-2571b77d" - -[[models.members]] -name = "bag_id" -type = "u32" -key = true - -[[models.members]] -name = "player_id" -type = "u32" -key = true - -[[models.members]] -name = "max_capacity" -type = "u32" -key = false - -[[models.members]] -name = "potions" -type = "Array" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x239c54e950b5c50d445f9a8db758ea0af1440b75a5f1921dfe014b927476c32" -original_class_hash = "0x239c54e950b5c50d445f9a8db758ea0af1440b75a5f1921dfe014b927476c32" -abi = "manifests/dev/deployment/abis/models/bytebeasts-Battle-55b5860b.json" -tag = "bytebeasts-Battle" -manifest_name = "bytebeasts-Battle-55b5860b" - -[[models.members]] -name = "battle_id" -type = "u32" -key = true - -[[models.members]] -name = "player_id" -type = "u32" -key = false - -[[models.members]] -name = "opponent_id" -type = "u32" -key = false - -[[models.members]] -name = "active_beast_player" -type = "u32" -key = false - -[[models.members]] -name = "active_beast_opponent" -type = "u32" -key = false - -[[models.members]] -name = "battle_active" -type = "u32" -key = false - -[[models.members]] -name = "turn" -type = "u32" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x7bef5c17e52dab476cd7ae664bbb0f0024aae955ed8b12592e2d6faf7ff6a3c" -original_class_hash = "0x7bef5c17e52dab476cd7ae664bbb0f0024aae955ed8b12592e2d6faf7ff6a3c" -abi = "manifests/dev/deployment/abis/models/bytebeasts-Beast-27809d20.json" -tag = "bytebeasts-Beast" -manifest_name = "bytebeasts-Beast-27809d20" - -[[models.members]] -name = "beast_id" -type = "u32" -key = true - -[[models.members]] -name = "beast_name" -type = "felt252" -key = false - -[[models.members]] -name = "beast_type" -type = "WorldElements" -key = false - -[[models.members]] -name = "beast_description" -type = "felt252" -key = false - -[[models.members]] -name = "player_id" -type = "u32" -key = false - -[[models.members]] -name = "hp" -type = "u32" -key = false - -[[models.members]] -name = "current_hp" -type = "u32" -key = false - -[[models.members]] -name = "attack" -type = "u32" -key = false - -[[models.members]] -name = "defense" -type = "u32" -key = false - -[[models.members]] -name = "mt1" -type = "u32" -key = false - -[[models.members]] -name = "mt2" -type = "u32" -key = false - -[[models.members]] -name = "mt3" -type = "u32" -key = false - -[[models.members]] -name = "mt4" -type = "u32" -key = false - -[[models.members]] -name = "level" -type = "u32" -key = false - -[[models.members]] -name = "experience_to_next_level" -type = "u64" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x57c477846284e274054c78c5b265af51f8815abbf0147828080c274b0639764" -original_class_hash = "0x57c477846284e274054c78c5b265af51f8815abbf0147828080c274b0639764" -abi = "manifests/dev/deployment/abis/models/bytebeasts-Game-e91217d7.json" -tag = "bytebeasts-Game" -manifest_name = "bytebeasts-Game-e91217d7" - -[[models.members]] -name = "game_id" -type = "u128" -key = true - -[[models.members]] -name = "player_1" -type = "ContractAddress" -key = false - -[[models.members]] -name = "player_2" -type = "ContractAddress" -key = false - -[[models.members]] -name = "player_3" -type = "ContractAddress" -key = false - -[[models.members]] -name = "player_4" -type = "ContractAddress" -key = false - -[[models.members]] -name = "status" -type = "GameStatus" -key = false - -[[models.members]] -name = "is_private" -type = "bool" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x7dc1689aa3f1e6b123cadfed4066a70f09be69c9a166bfe824c61b916925efe" -original_class_hash = "0x7dc1689aa3f1e6b123cadfed4066a70f09be69c9a166bfe824c61b916925efe" -abi = "manifests/dev/deployment/abis/models/bytebeasts-GameId-344511d3.json" -tag = "bytebeasts-GameId" -manifest_name = "bytebeasts-GameId-344511d3" - -[[models.members]] -name = "id" -type = "u32" -key = true - -[[models.members]] -name = "game_id" -type = "u128" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x52df62dec799bbf7ba4725f74e32e579dec2d90a7a995638761646157bb7e18" -original_class_hash = "0x52df62dec799bbf7ba4725f74e32e579dec2d90a7a995638761646157bb7e18" -abi = "manifests/dev/deployment/abis/models/bytebeasts-GamePlayer-596ef4a1.json" -tag = "bytebeasts-GamePlayer" -manifest_name = "bytebeasts-GamePlayer-596ef4a1" - -[[models.members]] -name = "address" -type = "ContractAddress" -key = true - -[[models.members]] -name = "game_id" -type = "u128" -key = true - -[[models.members]] -name = "beast_1" -type = "u8" -key = false - -[[models.members]] -name = "beast_2" -type = "u8" -key = false - -[[models.members]] -name = "beast_3" -type = "u8" -key = false - -[[models.members]] -name = "beast_4" -type = "u8" -key = false - -[[models.members]] -name = "bag_id" -type = "u8" -key = false - -[[models.members]] -name = "active_mount" -type = "u8" -key = false - -[[models.members]] -name = "mounts" -type = "Array" -key = false - -[[models.members]] -name = "position" -type = "Array" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x341a07493baed313e741253a241aa31fc9d40a9c373cd2bae49f85ab66f98cc" -original_class_hash = "0x341a07493baed313e741253a241aa31fc9d40a9c373cd2bae49f85ab66f98cc" -abi = "manifests/dev/deployment/abis/models/bytebeasts-Mt-37360d30.json" -tag = "bytebeasts-Mt" -manifest_name = "bytebeasts-Mt-37360d30" - -[[models.members]] -name = "mt_id" -type = "u32" -key = true - -[[models.members]] -name = "mt_name" -type = "felt252" -key = false - -[[models.members]] -name = "mt_type" -type = "WorldElements" -key = false - -[[models.members]] -name = "mt_power" -type = "u32" -key = false - -[[models.members]] -name = "mt_accuracy" -type = "u32" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x3ba44df67a037c20f004b7f5ab7725932d4519eed6beb6bc223a03e96c0f0f9" -original_class_hash = "0x3ba44df67a037c20f004b7f5ab7725932d4519eed6beb6bc223a03e96c0f0f9" -abi = "manifests/dev/deployment/abis/models/bytebeasts-NPC-4c5239ac.json" -tag = "bytebeasts-NPC" -manifest_name = "bytebeasts-NPC-4c5239ac" - -[[models.members]] -name = "npc_id" -type = "u32" -key = true - -[[models.members]] -name = "npc_name" -type = "felt252" -key = false - -[[models.members]] -name = "npc_description" -type = "felt252" -key = false - -[[models.members]] -name = "npc_role" -type = "Role" -key = false - -[[models.members]] -name = "dialogue" -type = "ByteArray" -key = false - -[[models.members]] -name = "is_active" -type = "bool" -key = false - -[[models.members]] -name = "location" -type = "Coordinates" -key = false - -[[models.members]] -name = "importance_level" -type = "u8" -key = false - -[[models.members]] -name = "mission_status" -type = "MissionStatus" -key = false - -[[models.members]] -name = "reward" -type = "u16" -key = false - -[[models.members]] -name = "experience_points" -type = "u16" -key = false - -[[models.members]] -name = "potions" -type = "Array" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x5d992305e6f7ce0965d5bbe71e33cab817c31514ba83c8fca4610ab574e8016" -original_class_hash = "0x5d992305e6f7ce0965d5bbe71e33cab817c31514ba83c8fca4610ab574e8016" -abi = "manifests/dev/deployment/abis/models/bytebeasts-Player-14f5e45e.json" -tag = "bytebeasts-Player" -manifest_name = "bytebeasts-Player-14f5e45e" - -[[models.members]] -name = "player_id" -type = "u32" -key = true - -[[models.members]] -name = "player_name" -type = "felt252" -key = false - -[[models.members]] -name = "beast_1" -type = "u32" -key = false - -[[models.members]] -name = "beast_2" -type = "u32" -key = false - -[[models.members]] -name = "beast_3" -type = "u32" -key = false - -[[models.members]] -name = "beast_4" -type = "u32" -key = false - -[[models.members]] -name = "potions" -type = "u32" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x91da9f380b960e2dc7f9a59d4e1242ed718590d2270fd28e2311a5e1ee54f2" -original_class_hash = "0x91da9f380b960e2dc7f9a59d4e1242ed718590d2270fd28e2311a5e1ee54f2" -abi = "manifests/dev/deployment/abis/models/bytebeasts-Position-78f28df6.json" -tag = "bytebeasts-Position" -manifest_name = "bytebeasts-Position-78f28df6" - -[[models.members]] -name = "player" -type = "Player" -key = true - -[[models.members]] -name = "coordinates" -type = "Coordinates" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x4eac23f35a0e71954b8f000d9d8999579ba49ffc918e8b78924562449bdf8d4" -original_class_hash = "0x4eac23f35a0e71954b8f000d9d8999579ba49ffc918e8b78924562449bdf8d4" -abi = "manifests/dev/deployment/abis/models/bytebeasts-Potion-6a2114b0.json" -tag = "bytebeasts-Potion" -manifest_name = "bytebeasts-Potion-6a2114b0" - -[[models.members]] -name = "potion_id" -type = "u32" -key = true - -[[models.members]] -name = "potion_name" -type = "felt252" -key = false - -[[models.members]] -name = "potion_effect" -type = "u32" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0xe446a8c3773fbfae6e2e0e87a6d1db12143224cf47e217e12bf9cfc76428ef" -original_class_hash = "0xe446a8c3773fbfae6e2e0e87a6d1db12143224cf47e217e12bf9cfc76428ef" -abi = "manifests/dev/deployment/abis/models/bytebeasts-Status-6595af0f.json" -tag = "bytebeasts-Status" -manifest_name = "bytebeasts-Status-6595af0f" - -[[models.members]] -name = "player_id" -type = "u32" -key = true - -[[models.members]] -name = "message" -type = "felt252" -key = false - -[[models]] -kind = "DojoModel" -class_hash = "0x5ba495f80b653be6df964eb97ac2e7b3f7f72508d17b54b1d51595231db8fae" -original_class_hash = "0x5ba495f80b653be6df964eb97ac2e7b3f7f72508d17b54b1d51595231db8fae" -abi = "manifests/dev/deployment/abis/models/bytebeasts-StatusBattle-161fdb64.json" -tag = "bytebeasts-StatusBattle" -manifest_name = "bytebeasts-StatusBattle-161fdb64" - -[[models.members]] -name = "battle_id" -type = "u32" -key = true - -[[models.members]] -name = "message" -type = "felt252" -key = false diff --git a/overlays/dev/move_action.toml b/overlays/dev/move_action.toml deleted file mode 100644 index 87200e6..0000000 --- a/overlays/dev/move_action.toml +++ /dev/null @@ -1,2 +0,0 @@ -tag = "bytebeasts-move_action" -writes = ["bytebeasts-Position"] diff --git a/overlays/dev/spawn_action.toml b/overlays/dev/spawn_action.toml deleted file mode 100644 index 77aa297..0000000 --- a/overlays/dev/spawn_action.toml +++ /dev/null @@ -1,2 +0,0 @@ -tag = "bytebeasts-spawn_action" -writes = [ "bytebeasts-Beast", "bytebeasts-Mt", "bytebeasts-Player", "bytebeasts-Potion","bytebeasts-Position"] diff --git a/overlays/dev/world_setup.toml b/overlays/dev/world_setup.toml deleted file mode 100644 index 91f3297..0000000 --- a/overlays/dev/world_setup.toml +++ /dev/null @@ -1,2 +0,0 @@ -tag = "bytebeasts-world_setup" -writes = ["bytebeasts-Beast", "bytebeasts-Mt", "bytebeasts-Player", "bytebeasts-Potion","bytebeasts-Position"] diff --git a/scripts/move.sh b/scripts/move.sh deleted file mode 100755 index c2bae16..0000000 --- a/scripts/move.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -euo pipefail -pushd $(dirname "$0")/.. - -export RPC_URL="http://0.0.0.0:5050"; - -export WORLD_ADDRESS="$(cat ./manifests/dev/deployment/manifest.json | jq -r '.world.address')" - -echo $WORLD_ADDRESS - -# sozo execute --world -sozo execute --world $WORLD_ADDRESS move_action move -c 1,15,15 --wait diff --git a/scripts/setWorld.sh b/scripts/setWorld.sh deleted file mode 100755 index 653e5cd..0000000 --- a/scripts/setWorld.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -euo pipefail -pushd $(dirname "$0")/.. - -export RPC_URL="http://0.0.0.0:5050"; - -export WORLD_ADDRESS=$(cat ./manifests/dev/deployment/manifest.json | jq -r '.world.address') - -echo $WORLD_ADDRESS - -# sozo execute --world -sozo execute --world $WORLD_ADDRESS world_setup setWorld --wait diff --git a/scripts/setup.sh b/scripts/setup.sh deleted file mode 100755 index dd1d9cf..0000000 --- a/scripts/setup.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -set -e -if [ -d "target" ]; then - rm -rf "target" -fi - -if [ -d "manifests" ]; then - rm -rf "manifests" -fi - -echo "sozo build && sozo migrate apply" -sozo build && sozo migrate apply - -echo -e "\nโœ… Setup finish!" - -export world_address=$(cat ./manifests/dev/deployment/manifest.json | jq -r '.world.address') - -echo -e "\nโœ… Init Torii!" -torii --world $world_address --allowed-origins "*" diff --git a/scripts/spawn.sh b/scripts/spawn.sh deleted file mode 100755 index f0da181..0000000 --- a/scripts/spawn.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -euo pipefail -pushd $(dirname "$0")/.. - -export RPC_URL="http://0.0.0.0:5050"; - -export WORLD_ADDRESS="$(cat ./manifests/dev/deployment/manifest.json | jq -r '.world.address')" - -echo $WORLD_ADDRESS - -# sozo execute --world -sozo execute --world $WORLD_ADDRESS spawn_action spawn -c 1 --wait diff --git a/src/lib.cairo b/src/lib.cairo deleted file mode 100644 index 44d6b37..0000000 --- a/src/lib.cairo +++ /dev/null @@ -1,37 +0,0 @@ -mod systems { - mod battle; - mod realms; - mod move; - mod spawn; - mod world_setup; - mod bag; - mod tournament; -} - -mod models { - mod bag; - mod battle; - mod beast; - mod coordinates; - mod game_id; - mod game_player; - mod game; - mod mission_status; - mod mt; - mod npc; - mod player; - mod position; - mod potion; - mod role; - mod world_elements; - mod achievement_rarity; - mod achievement_type; - mod achievements; - mod tournament; -} - -mod tests { - mod test_battle; - mod test_bag; - mod test_tournament; -} diff --git a/src/models/achievement_rarity.cairo b/src/models/achievement_rarity.cairo deleted file mode 100644 index 53014ea..0000000 --- a/src/models/achievement_rarity.cairo +++ /dev/null @@ -1,42 +0,0 @@ -#[derive(Serde, Copy, Drop, Introspect, PartialEq)] -pub enum AchievementRarity { - Common, - Uncommon, - Rare, - Epic, - Legendary, -} - -impl AchievementRarityIntoFelt252 of Into { - fn into(self: AchievementRarity) -> felt252 { - match self { - AchievementRarity::Common => 0, - AchievementRarity::Uncommon => 1, - AchievementRarity::Rare => 2, - AchievementRarity::Epic => 3, - AchievementRarity::Legendary => 4, - } - } -} - - -#[cfg(test)] -mod tests { - use super::{AchievementRarity, AchievementRarityIntoFelt252}; - - #[test] - fn test_achievement_rarity_into_felt252() { - - let common = AchievementRarity::Common; - let uncommon = AchievementRarity::Uncommon; - let rare = AchievementRarity::Rare; - let epic = AchievementRarity::Epic; - let legendary = AchievementRarity::Legendary; - - assert_eq!(common.into(), 0, "AchievementRarity::Common deberia convertirse a 0"); - assert_eq!(uncommon.into(), 1, "AchievementRarity::Uncommon deberia convertirse a 1"); - assert_eq!(rare.into(), 2, "AchievementRarity::Rare deberia convertirse a 2"); - assert_eq!(epic.into(), 3, "AchievementRarity::Epic deberia convertirse a 3"); - assert_eq!(legendary.into(), 4, "AchievementRarity::Legendary deberia convertirse a 4"); - } -} diff --git a/src/models/achievement_type.cairo b/src/models/achievement_type.cairo deleted file mode 100644 index 381e6cd..0000000 --- a/src/models/achievement_type.cairo +++ /dev/null @@ -1,65 +0,0 @@ -#[derive(Serde, Copy, Drop, Introspect, PartialEq)] -pub enum AchievementType { - FirstWin, - TenWins, - HundredWins, - FirstBeast, - TenBeasts, - RareBeast, - FirstNPCInteraction, - RandomBattleChampion, - BeastMaster, - LegendaryPlayer, - TopScorer, -} - -impl AchievementTypeIntoFelt252 of Into { - fn into(self: AchievementType) -> felt252 { - match self { - AchievementType::FirstWin => 0, - AchievementType::TenWins => 1, - AchievementType::HundredWins => 2, - AchievementType::FirstBeast => 3, - AchievementType::TenBeasts => 4, - AchievementType::RareBeast => 5, - AchievementType::FirstNPCInteraction => 6, - AchievementType::RandomBattleChampion => 7, - AchievementType::BeastMaster => 8, - AchievementType::LegendaryPlayer => 9, - AchievementType::TopScorer => 10, - } - } -} - -#[cfg(test)] -mod tests { - use super::{AchievementType, AchievementTypeIntoFelt252}; - - #[test] - fn test_achievement_type_into_felt252() { - - let first_win = AchievementType::FirstWin; - let ten_wins = AchievementType::TenWins; - let hundred_wins = AchievementType::HundredWins; - let first_beast = AchievementType::FirstBeast; - let ten_beast = AchievementType::TenBeasts; - let rare_beast = AchievementType::RareBeast; - let first_npc_interaction = AchievementType::FirstNPCInteraction; - let random_battle = AchievementType::RandomBattleChampion; - let beast_master = AchievementType::BeastMaster; - let legendary_player = AchievementType::LegendaryPlayer; - let top_scorer = AchievementType::TopScorer; - - assert_eq!(first_win.into(), 0, "AchievementType::FirstWin deberia convertirse a 0"); - assert_eq!(ten_wins.into(), 1, "AchievementType::TenWins deberia convertirse a 1"); - assert_eq!(hundred_wins.into(), 2, "AchievementType::HundredWins deberia convertirse a 2"); - assert_eq!(first_beast.into(), 3, "AchievementType::FirstBeast deberia convertirse a 3"); - assert_eq!(ten_beast.into(), 4, "AchievementType::TenBeasts deberia convertirse a 4"); - assert_eq!(rare_beast.into(), 5, "AchievementType::RareBeast deberia convertirse a 5"); - assert_eq!(first_npc_interaction.into(), 6, "AchievementType::FirstNPCInteraction deberia convertirse a 6"); - assert_eq!(random_battle.into(), 7, "AchievementType::RandomBattleChampion deberia convertirse a 7"); - assert_eq!(beast_master.into(), 8, "AchievementType::BeastMaster deberia convertirse a 8"); - assert_eq!(legendary_player.into(), 9, "AchievementType::LegendaryPlayer deberia convertirse a 9"); - assert_eq!(top_scorer.into(), 10, "AchievementType::TopScorer deberia convertirse a 10"); - } -} diff --git a/src/models/achievements.cairo b/src/models/achievements.cairo deleted file mode 100644 index a020a78..0000000 --- a/src/models/achievements.cairo +++ /dev/null @@ -1,387 +0,0 @@ -use super::achievement_type::AchievementType; -use super::achievement_rarity::AchievementRarity; -use array::ArrayTrait; -use option::OptionTrait; - -#[derive(Drop, Serde)] -#[dojo::model] -pub struct Achievement { - #[key] - pub achievement_id: u64, // Unique ID for the achievement - pub achievement_type: AchievementType, // Type of achievement (e.g., FirstWin, TenWins) - pub rarity: AchievementRarity, // Rarity of the achievement - pub name: felt252, // Name of the achievement - pub description: ByteArray, // Detailed description of the achievement - pub is_hidden: bool, // Whether the achievement is hidden by default - pub is_unlocked: bool, // Whether the achievement has been unlocked by the player -} - -#[derive(Copy, Drop, Serde)] -#[dojo::model] -pub struct AchievementProgress { - #[key] - pub player_id: u64, // Player ID - pub achievement_id: u64, // Achievement ID - pub progress: u32, // Progress to unlock achievement - pub is_unlocked: bool, // If achievement is unlock or not -} - -#[generate_trait] -impl AchievementImpl of AchievementTrait { - fn check_unlock_condition(self: @Achievement, progress: u32) -> bool { - match self.achievement_type { - AchievementType::FirstWin => progress >= 1, - AchievementType::TenWins => progress >= 10, - AchievementType::HundredWins => progress >= 100, - AchievementType::FirstBeast => progress >= 1, - AchievementType::TenBeasts => progress >= 10, - AchievementType::RareBeast => progress >= 1, - AchievementType::FirstNPCInteraction => progress >= 1, - AchievementType::RandomBattleChampion => progress >= 3, - AchievementType::BeastMaster => progress >= 5, - AchievementType::LegendaryPlayer => progress >= 50, - AchievementType::TopScorer => progress >= 100, - } - } - - fn unlock(ref self: Achievement, ref progress: AchievementProgress) -> bool { - if !progress.is_unlocked && self.check_unlock_condition(progress.progress) { - progress.is_unlocked = true; - self.is_unlocked = true; - true - } else { - false - } - } -} - - -fn initialize_default_achievements() -> Array { - let mut achievements = ArrayTrait::new(); - - achievements - .append( - Achievement { - achievement_id: 1, - achievement_type: AchievementType::FirstWin, - rarity: AchievementRarity::Common, - name: 'First Victory', - description: "Win your first battle", - is_hidden: false, - is_unlocked: false, - } - ); - - achievements - .append( - Achievement { - achievement_id: 2, - achievement_type: AchievementType::TenWins, - rarity: AchievementRarity::Uncommon, - name: 'Battle Veteran', - description: "Win 10 battles", - is_hidden: false, - is_unlocked: false, - } - ); - - achievements - .append( - Achievement { - achievement_id: 3, - achievement_type: AchievementType::HundredWins, - rarity: AchievementRarity::Rare, - name: 'Centurion', - description: "Win 100 battles", - is_hidden: false, - is_unlocked: false, - } - ); - - achievements - .append( - Achievement { - achievement_id: 4, - achievement_type: AchievementType::FirstBeast, - rarity: AchievementRarity::Common, - name: 'Beast Tamer', - description: "Capture your first beast", - is_hidden: false, - is_unlocked: false, - } - ); - - achievements - .append( - Achievement { - achievement_id: 5, - achievement_type: AchievementType::TenBeasts, - rarity: AchievementRarity::Uncommon, - name: 'Beast Collector', - description: "Capture 10 different beasts", - is_hidden: false, - is_unlocked: false, - } - ); - - achievements - .append( - Achievement { - achievement_id: 6, - achievement_type: AchievementType::RareBeast, - rarity: AchievementRarity::Rare, - name: 'Rare Find', - description: "Capture a rare beast", - is_hidden: false, - is_unlocked: false, - } - ); - - achievements - .append( - Achievement { - achievement_id: 7, - achievement_type: AchievementType::FirstNPCInteraction, - rarity: AchievementRarity::Common, - name: 'Social Butterfly', - description: "Interact with your first NPC", - is_hidden: false, - is_unlocked: false, - } - ); - - achievements - .append( - Achievement { - achievement_id: 8, - achievement_type: AchievementType::RandomBattleChampion, - rarity: AchievementRarity::Uncommon, - name: 'Lucky Victor', - description: "Win 3 random encounters in a row", - is_hidden: false, - is_unlocked: false, - } - ); - - achievements - .append( - Achievement { - achievement_id: 9, - achievement_type: AchievementType::BeastMaster, - rarity: AchievementRarity::Epic, - name: 'Beast Master', - description: "Fully evolve 5 different beasts", - is_hidden: false, - is_unlocked: false, - } - ); - - achievements - .append( - Achievement { - achievement_id: 10, - achievement_type: AchievementType::LegendaryPlayer, - rarity: AchievementRarity::Legendary, - name: 'Living Legend', - description: "Complete all main story quests", - is_hidden: true, - is_unlocked: false, - } - ); - - achievements - .append( - Achievement { - achievement_id: 11, - achievement_type: AchievementType::TopScorer, - rarity: AchievementRarity::Epic, - name: 'High Scorer', - description: "Achieve a total score of 100,000 points", - is_hidden: false, - is_unlocked: false, - } - ); - - achievements -} - - -fn initialize_player_achievement_progress(player_id: u64) -> Array { - let default_achievements = initialize_default_achievements(); - let mut player_progress = ArrayTrait::new(); - - let mut i = 0; - loop { - if i == default_achievements.len() { - break; - } - let achievement = default_achievements.at(i); - player_progress - .append( - AchievementProgress { - player_id, - achievement_id: *achievement.achievement_id, - progress: 0, - is_unlocked: false, - } - ); - i += 1; - }; - - player_progress -} - - -fn update_achievement_progress( - ref achievement: Achievement, ref progress: AchievementProgress, increment: u32 -) -> felt252 { - if progress.is_unlocked { - // If it is unlocked, just update the progress - progress.progress += increment; - return 'Progress updated'; - } - - // If it is not unlocked, just update the progress and verify if it should be unlock - progress.progress += increment; - if achievement.check_unlock_condition(progress.progress) { - progress.is_unlocked = true; - achievement.is_unlocked = true; - 'Achievement unlocked!' - } else { - 'Progress updated' - } -} - - -fn get_unlocked_achievements(player_progress: Array) -> Array { - let mut unlocked = ArrayTrait::new(); - let mut i = 0; - loop { - if i == player_progress.len() { - break; - } - let progress = player_progress.at(i); - if *progress.is_unlocked { - unlocked.append(*progress.achievement_id); - } - i += 1; - }; - unlocked -} - - -#[cfg(test)] -mod tests { - use super::{ - AchievementType, AchievementImpl, AchievementRarity, Achievement, AchievementProgress, - initialize_default_achievements, initialize_player_achievement_progress, - update_achievement_progress, get_unlocked_achievements - }; - use array::ArrayTrait; - use option::OptionTrait; - - #[test] - fn test_initialize_default_achievements() { - let achievements = initialize_default_achievements(); - - // Verify all achievements are created - assert(achievements.len() == 11, 'Should have 11 achievements'); - - // Verify first achievement - let first_achievement = achievements.at(0); - assert(*first_achievement.achievement_id == 1, 'First achievement ID should be'); - assert(*first_achievement.name == 'First Victory', 'First achievement name mismatch'); - assert( - *first_achievement.achievement_type == AchievementType::FirstWin, - 'First achievement type mismatch' - ); - assert( - *first_achievement.rarity == AchievementRarity::Common, 'Achievement rarity mismatch' - ); - assert(!*first_achievement.is_hidden, 'This should not be hidden'); - assert(!*first_achievement.is_unlocked, 'This should not be unlocked'); - - // Verify last achievement - let last_achievement = achievements.at(10); - assert(*last_achievement.achievement_id == 11, 'Achievement ID should be 11'); - assert(*last_achievement.name == 'High Scorer', 'Last achievement name mismatch'); - assert( - *last_achievement.achievement_type == AchievementType::TopScorer, - 'Last achievement type mismatch' - ); - } - - - #[test] - fn test_initialize_player_achievement_progress() { - let player_id = 1; - let progress = initialize_player_achievement_progress(player_id); - - assert(progress.len() == 11, 'Should have 11 progress entries'); - - let first_progress = progress.at(0); - assert(*first_progress.player_id == player_id, 'Player ID mismatch'); - assert(*first_progress.achievement_id == 1, 'Achievement ID should be 1'); - assert(*first_progress.progress == 0, 'Initial progress should be 0'); - assert(!*first_progress.is_unlocked, 'Should not be unlocked'); - } - - - #[test] - fn test_get_unlocked_achievements() { - let mut progress_array = ArrayTrait::new(); - progress_array - .append( - AchievementProgress { - player_id: 1, achievement_id: 1, progress: 1, is_unlocked: true - } - ); - progress_array - .append( - AchievementProgress { - player_id: 1, achievement_id: 2, progress: 5, is_unlocked: false - } - ); - progress_array - .append( - AchievementProgress { - player_id: 1, achievement_id: 3, progress: 10, is_unlocked: true - } - ); - - let unlocked = get_unlocked_achievements(progress_array); - assert(unlocked.len() == 2, 'Have 2 unlocked achievements'); - assert(*unlocked.at(0) == 1, 'First unlocked should be ID 1'); - assert(*unlocked.at(1) == 3, 'Second unlocked should be ID 3'); - } - - - #[test] - fn test_update_achievement_progress() { - let mut achievement = Achievement { - achievement_id: 1, - achievement_type: AchievementType::FirstWin, - rarity: AchievementRarity::Common, - name: 'First Victory', - description: "Win your first battle", - is_hidden: false, - is_unlocked: false, - }; - - let mut progress = AchievementProgress { - player_id: 1, achievement_id: 1, progress: 0, is_unlocked: false, - }; - - let result = update_achievement_progress(ref achievement, ref progress, 1); - assert(result == 'Achievement unlocked!', 'Should unlock achievement'); - assert(progress.is_unlocked, 'Progress should be unlocked'); - assert(achievement.is_unlocked, 'Achievement should be unlocked'); - assert(progress.progress == 1, 'Progress should be 1'); - - let result2 = update_achievement_progress(ref achievement, ref progress, 1); - assert(result2 == 'Progress updated', 'Should only update progress'); - assert(progress.progress == 2, 'Progress should be 2'); - assert(progress.is_unlocked, 'Progress should be unlocked'); - assert(achievement.is_unlocked, 'Achievement should be unlocked'); - } -} diff --git a/src/models/bag.cairo b/src/models/bag.cairo deleted file mode 100644 index aedebed..0000000 --- a/src/models/bag.cairo +++ /dev/null @@ -1,42 +0,0 @@ -use super::potion::Potion; -use array::ArrayTrait; - -#[derive(Drop, Serde)] -#[dojo::model] -struct Bag { - #[key] - pub bag_id: u32, - #[key] - pub player_id: u32, - pub max_capacity: u32, - pub potions: Array, -} - -#[cfg(test)] -mod tests { - use bytebeasts::{models::{bag::Bag, potion::Potion}}; - use array::ArrayTrait; - - #[test] - fn test_bag_initialization() { - let mut bag = Bag { - bag_id: 1, - player_id: 1, - max_capacity: 10, - potions: ArrayTrait::new(), - }; - - let potion = Potion { - potion_id: 1, - potion_name: 'Restore everything', - potion_effect: 50, - }; - bag.potions.append(potion); - - assert_eq!(bag.bag_id, 1, "Bag ID should be 1"); - assert_eq!(bag.player_id, 1, "Player ID should be 1"); - assert_eq!(bag.potions.len(), 1, "Bag should have 1 potion"); - assert_eq!(bag.max_capacity, 10, "Bag should have a max capacity of 10"); - assert_eq!(bag.potions.pop_front().unwrap().potion_id, 1, "Bag potion ID should be 1"); - } -} diff --git a/src/models/battle.cairo b/src/models/battle.cairo deleted file mode 100644 index 8c87ecc..0000000 --- a/src/models/battle.cairo +++ /dev/null @@ -1,55 +0,0 @@ -// Defines the `Battle` Model, which represents a battle between two players. -// Includes various fields to track the state and progress of the battle. -#[derive(Copy, Drop, Serde)] -#[dojo::model] -pub struct Battle { - // Unique identifier for the battle. - #[key] - pub battle_id: u32, - - // ID of the player involved in the battle. - pub player_id: u32, - - // ID of the opponent involved in the battle. - pub opponent_id: u32, - - // ID of the active beast for the player. - pub active_beast_player: u32, - - // ID of the active beast for the opponent. - pub active_beast_opponent: u32, - - // Flag to indicate if the battle is currently active (1 for active, 0 for inactive). - pub battle_active: u32, - - // Current turn number in the battle. - pub turn: u32, -} - - -#[cfg(test)] -mod tests { - - use bytebeasts::{models::{battle::Battle},}; - - - - #[test] - fn test_battle_initialization() { - let battle = Battle { - battle_id: 1, - player_id: 1, - opponent_id: 2, - active_beast_player: 1, - active_beast_opponent: 2, - battle_active: 1, - turn: 1, - }; - - assert_eq!(battle.battle_id, 1, "Battle ID should be 1"); - assert_eq!(battle.player_id, 1, "Player ID should be 1"); - assert_eq!(battle.opponent_id, 2, "Opponent ID should be 2"); - assert_eq!(battle.battle_active, 1, "Battle should be active"); - assert_eq!(battle.turn, 1, "Turn should be 1"); - } -} diff --git a/src/models/beast.cairo b/src/models/beast.cairo deleted file mode 100644 index c434506..0000000 --- a/src/models/beast.cairo +++ /dev/null @@ -1,59 +0,0 @@ -use starknet::ContractAddress; -use super::world_elements::WorldElements; - -#[derive(Copy, Drop, Serde)] -#[dojo::model] -pub struct Beast { - #[key] - pub beast_id: u32, - pub beast_name: felt252, - pub beast_type: WorldElements, - pub beast_description: felt252, - pub player_id: u32, - pub hp: u32, - pub current_hp: u32, - pub attack: u32, - pub defense: u32, - pub mt1: u32, - pub mt2: u32, - pub mt3: u32, - pub mt4: u32, - pub level: u32, - pub experience_to_next_level: u64, -} - - -#[generate_trait] -impl BeastImpl of BeastTrait { - fn exist(self: Beast) -> bool { - self.hp > 0 - } -} - -#[cfg(test)] -mod tests { - use bytebeasts::{models::{beast::{Beast, BeastTrait}, world_elements::WorldElements},}; - - #[test] - fn test_beast_exist() { - let beast = Beast { - beast_id: 1, - beast_name: 0, - beast_type: WorldElements::Crystal, - beast_description: 0, - player_id: 1, - hp: 100, - current_hp: 100, - attack: 50, - defense: 40, - mt1: 1, // Fire Blast - mt2: 2, // Ember - mt3: 3, // Flame Wheel - mt4: 4, // Fire Punch - level: 5, - experience_to_next_level: 1000, - }; - assert(beast.exist(), 'Beast is alive'); - assert_eq!(beast.hp, 100, "HP should be initialized to 100"); - } -} diff --git a/src/models/coordinates.cairo b/src/models/coordinates.cairo deleted file mode 100644 index 405c9b8..0000000 --- a/src/models/coordinates.cairo +++ /dev/null @@ -1,41 +0,0 @@ -#[derive(Drop, Copy, Serde, Introspect)] -struct Coordinates { - x: u32, - y: u32 -} - -#[cfg(test)] -mod tests { - use super::Coordinates; - - #[test] - fn test_coordinates_initialization() { - // Crear una instancia de Coordinates - let coord = Coordinates { x: 10, y: 20 }; - - // Verificar que los valores se inicializan correctamente - assert_eq!(coord.x, 10, "El valor de x deberia ser 10"); - assert_eq!(coord.y, 20, "El valor de y deberia ser 20"); - } - - #[test] - fn test_coordinates_equality() { - // Crear dos instancias de Coordinates - let coord1 = Coordinates { x: 5, y: 15 }; - let coord2 = Coordinates { x: 5, y: 15 }; - - // Verificar que dos coordenadas iguales son comparables correctamente - assert_eq!(coord1.x, coord2.x, "Las coordenadas x deberian ser iguales"); - assert_eq!(coord1.y, coord2.y, "Las coordenadas y deberian ser iguales"); - } - - #[test] - fn test_coordinates_copy() { - // Verificar que la estructura puede copiarse correctamente - let coord1 = Coordinates { x: 30, y: 40 }; - let coord2 = coord1; // Como la estructura implementa `Copy`, esto deberรญa funcionar - - assert_eq!(coord2.x, 30, "El valor de x en coord2 deberia ser 30"); - assert_eq!(coord2.y, 40, "El valor de y en coord2 deberia ser 40"); - } -} diff --git a/src/models/erc20/erc20.cairo b/src/models/erc20/erc20.cairo deleted file mode 100644 index 62a8ea8..0000000 --- a/src/models/erc20/erc20.cairo +++ /dev/null @@ -1,266 +0,0 @@ -#[starknet::contract] -mod ERC20 { - use origami_token::erc20::models::{ERC20Allowance, ERC20Balance, ERC20Meta}; - use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; - use origami_token::erc20::interface; - use core::num::traits::Bounded; - use starknet::ContractAddress; - use starknet::{get_caller_address, get_contract_address}; - use zeroable::Zeroable; - - - #[storage] - struct Storage { - _world: ContractAddress, - } - - #[event] - #[derive(Copy, Drop, starknet::Event)] - enum Event { - Transfer: Transfer, - Approval: Approval, - } - - #[derive(Copy, Drop, starknet::Event)] - struct Transfer { - from: ContractAddress, - to: ContractAddress, - value: u256 - } - - #[derive(Copy, Drop, starknet::Event)] - struct Approval { - owner: ContractAddress, - spender: ContractAddress, - value: u256 - } - - mod Errors { - const APPROVE_FROM_ZERO: felt252 = 'ERC20: approve from 0'; - const APPROVE_TO_ZERO: felt252 = 'ERC20: approve to 0'; - const TRANSFER_FROM_ZERO: felt252 = 'ERC20: transfer from 0'; - const TRANSFER_TO_ZERO: felt252 = 'ERC20: transfer to 0'; - const BURN_FROM_ZERO: felt252 = 'ERC20: burn from 0'; - const MINT_TO_ZERO: felt252 = 'ERC20: mint to 0'; - } - - #[constructor] - fn constructor( - ref self: ContractState, - world: ContractAddress, - name: felt252, - symbol: felt252, - initial_supply: u256, - recipient: ContractAddress - ) { - self._world.write(world); - self.initializer(name, symbol); - self._mint(recipient, initial_supply); - } - - // - // External - // - - #[abi(embed_v0)] - impl ERC20MetadataImpl of interface::IERC20Metadata { - fn name(self: @ContractState) -> felt252 { - self.get_meta().name - } - - fn symbol(self: @ContractState) -> felt252 { - self.get_meta().symbol - } - - fn decimals(self: @ContractState) -> u8 { - 18 - } - } - - #[abi(embed_v0)] - impl ERC20Impl of interface::IERC20 { - fn total_supply(self: @ContractState) -> u256 { - self.get_meta().total_supply - } - - fn balance_of(self: @ContractState, account: ContractAddress) -> u256 { - self.get_balance(account).amount - } - - fn allowance( - self: @ContractState, owner: ContractAddress, spender: ContractAddress - ) -> u256 { - self.get_allowance(owner, spender).amount - } - - fn transfer(ref self: ContractState, recipient: ContractAddress, amount: u256) -> bool { - let sender = get_caller_address(); - self._transfer(sender, recipient, amount); - true - } - - fn transfer_from( - ref self: ContractState, - sender: ContractAddress, - recipient: ContractAddress, - amount: u256 - ) -> bool { - let caller = get_caller_address(); - self._spend_allowance(sender, caller, amount); - self._transfer(sender, recipient, amount); - true - } - - fn approve(ref self: ContractState, spender: ContractAddress, amount: u256) -> bool { - let owner = get_caller_address(); - self - .set_allowance( - ERC20Allowance { token: get_contract_address(), owner, spender, amount } - ); - true - } - } - - #[abi(embed_v0)] - impl ERC20CamelOnlyImpl of interface::IERC20CamelOnly { - fn totalSupply(self: @ContractState) -> u256 { - ERC20Impl::total_supply(self) - } - - fn balanceOf(self: @ContractState, account: ContractAddress) -> u256 { - ERC20Impl::balance_of(self, account) - } - - fn transferFrom( - ref self: ContractState, - sender: ContractAddress, - recipient: ContractAddress, - amount: u256 - ) -> bool { - ERC20Impl::transfer_from(ref self, sender, recipient, amount) - } - } - - // - // Internal - // - - #[generate_trait] - impl WorldInteractionsImpl of WorldInteractionsTrait { - fn world(self: @ContractState) -> IWorldDispatcher { - IWorldDispatcher { contract_address: self._world.read() } - } - - fn get_meta(self: @ContractState) -> ERC20Meta { - get!(self.world(), get_contract_address(), ERC20Meta) - } - - // Helper function to update total_supply model - fn update_total_supply(ref self: ContractState, subtract: u256, add: u256) { - let mut meta = self.get_meta(); - // adding and subtracting is fewer steps than if - meta.total_supply = meta.total_supply - subtract; - meta.total_supply = meta.total_supply + add; - set!(self.world(), (meta)); - } - - // Helper function for balance model - fn get_balance(self: @ContractState, account: ContractAddress) -> ERC20Balance { - get!(self.world(), (get_contract_address(), account), ERC20Balance) - } - - fn update_balance( - ref self: ContractState, account: ContractAddress, subtract: u256, add: u256 - ) { - let mut balance: ERC20Balance = self.get_balance(account); - // adding and subtracting is fewer steps than if - balance.amount = balance.amount - subtract; - balance.amount = balance.amount + add; - set!(self.world(), (balance)); - } - - // Helper function for allowance model - fn get_allowance( - self: @ContractState, owner: ContractAddress, spender: ContractAddress, - ) -> ERC20Allowance { - get!(self.world(), (get_contract_address(), owner, spender), ERC20Allowance) - } - - fn set_allowance(ref self: ContractState, allowance: ERC20Allowance) { - assert(!allowance.owner.is_zero(), Errors::APPROVE_FROM_ZERO); - assert(!allowance.spender.is_zero(), Errors::APPROVE_TO_ZERO); - set!(self.world(), (allowance)); - - let approval_event = Approval { - owner: allowance.owner, spender: allowance.spender, value: allowance.amount - }; - - self.emit(approval_event.clone()); - emit!(self.world(), (Event::Approval(approval_event))); - } - } - - #[generate_trait] - impl InternalImpl of InternalTrait { - fn initializer(ref self: ContractState, name: felt252, symbol: felt252) { - let meta = ERC20Meta { token: get_contract_address(), name, symbol, total_supply: 0 }; - set!(self.world(), (meta)); - } - - fn _mint(ref self: ContractState, recipient: ContractAddress, amount: u256) { - assert(!recipient.is_zero(), Errors::MINT_TO_ZERO); - self.update_total_supply(0, amount); - self.update_balance(recipient, 0, amount); - - let transfer_event = Transfer { from: Zeroable::zero(), to: recipient, value: amount }; - - self.emit(transfer_event.clone()); - emit!(self.world(), (Event::Transfer(transfer_event))); - } - - fn _burn(ref self: ContractState, account: ContractAddress, amount: u256) { - assert(!account.is_zero(), Errors::BURN_FROM_ZERO); - self.update_total_supply(amount, 0); - self.update_balance(account, amount, 0); - - let transfer_event = Transfer { from: account, to: Zeroable::zero(), value: amount }; - - self.emit(transfer_event.clone()); - emit!(self.world(), (Event::Transfer(transfer_event))); - } - - fn _approve( - ref self: ContractState, owner: ContractAddress, spender: ContractAddress, amount: u256 - ) { - self - .set_allowance( - ERC20Allowance { token: get_contract_address(), owner, spender, amount } - ); - } - - fn _transfer( - ref self: ContractState, - sender: ContractAddress, - recipient: ContractAddress, - amount: u256 - ) { - assert(!sender.is_zero(), Errors::TRANSFER_FROM_ZERO); - assert(!recipient.is_zero(), Errors::TRANSFER_TO_ZERO); - self.update_balance(sender, amount, 0); - self.update_balance(recipient, 0, amount); - - let transfer_event = Transfer { from: sender, to: recipient, value: amount }; - - self.emit(transfer_event.clone()); - emit!(self.world(), (Event::Transfer(transfer_event))); - } - - fn _spend_allowance( - ref self: ContractState, owner: ContractAddress, spender: ContractAddress, amount: u256 - ) { - let mut allowance = self.get_allowance(owner, spender); - allowance.amount = allowance.amount - amount; - self.set_allowance(allowance); - } - } -} diff --git a/src/models/erc20/interface.cairo b/src/models/erc20/interface.cairo deleted file mode 100644 index 577ce7d..0000000 --- a/src/models/erc20/interface.cairo +++ /dev/null @@ -1,66 +0,0 @@ -use starknet::ContractAddress; - -#[starknet::interface] -trait IERC20 { - fn total_supply(self: @TState) -> u256; - fn balance_of(self: @TState, account: ContractAddress) -> u256; - fn allowance(self: @TState, owner: ContractAddress, spender: ContractAddress) -> u256; - fn transfer(ref self: TState, recipient: ContractAddress, amount: u256) -> bool; - fn transfer_from( - ref self: TState, sender: ContractAddress, recipient: ContractAddress, amount: u256 - ) -> bool; - fn approve(ref self: TState, spender: ContractAddress, amount: u256) -> bool; -} - -#[starknet::interface] -trait IERC20Metadata { - fn name(self: @TState) -> felt252; - fn symbol(self: @TState) -> felt252; - fn decimals(self: @TState) -> u8; -} - -#[starknet::interface] -trait IERC20Camel { - fn totalSupply(self: @TState) -> u256; - fn balanceOf(self: @TState, account: ContractAddress) -> u256; - fn allowance(self: @TState, owner: ContractAddress, spender: ContractAddress) -> u256; - fn transfer(ref self: TState, recipient: ContractAddress, amount: u256) -> bool; - fn transferFrom( - ref self: TState, sender: ContractAddress, recipient: ContractAddress, amount: u256 - ) -> bool; - fn approve(ref self: TState, spender: ContractAddress, amount: u256) -> bool; -} - -#[starknet::interface] -trait IERC20CamelOnly { - fn totalSupply(self: @TState) -> u256; - fn balanceOf(self: @TState, account: ContractAddress) -> u256; - fn transferFrom( - ref self: TState, sender: ContractAddress, recipient: ContractAddress, amount: u256 - ) -> bool; -} - -#[starknet::interface] -trait ERC20ABI { - // IERC20 - fn total_supply(self: @TState) -> u256; - fn balance_of(self: @TState, account: ContractAddress) -> u256; - fn allowance(self: @TState, owner: ContractAddress, spender: ContractAddress) -> u256; - fn transfer(ref self: TState, recipient: ContractAddress, amount: u256) -> bool; - fn transfer_from( - ref self: TState, sender: ContractAddress, recipient: ContractAddress, amount: u256 - ) -> bool; - fn approve(ref self: TState, spender: ContractAddress, amount: u256) -> bool; - - // IERC20Metadata - fn name(self: @TState) -> felt252; - fn symbol(self: @TState) -> felt252; - fn decimals(self: @TState) -> u8; - - // IERC20CamelOnly - fn totalSupply(self: @TState) -> u256; - fn balanceOf(self: @TState, account: ContractAddress) -> u256; - fn transferFrom( - ref self: TState, sender: ContractAddress, recipient: ContractAddress, amount: u256 - ) -> bool; -} diff --git a/src/models/erc20/models.cairo b/src/models/erc20/models.cairo deleted file mode 100644 index 3f6ec16..0000000 --- a/src/models/erc20/models.cairo +++ /dev/null @@ -1,35 +0,0 @@ -// Starknet imports - -use starknet::ContractAddress; - -#[dojo::model] -#[derive(Copy, Drop, Serde)] -struct ERC20Balance { - #[key] - token: ContractAddress, - #[key] - account: ContractAddress, - amount: u256, -} - -#[dojo::model] -#[derive(Copy, Drop, Serde)] -struct ERC20Allowance { - #[key] - token: ContractAddress, - #[key] - owner: ContractAddress, - #[key] - spender: ContractAddress, - amount: u256, -} - -#[dojo::model] -#[derive(Copy, Drop, Serde)] -struct ERC20Meta { - #[key] - token: ContractAddress, - name: felt252, - symbol: felt252, - total_supply: u256, -} diff --git a/src/models/erc20/tests.cairo b/src/models/erc20/tests.cairo deleted file mode 100644 index d0cb4ea..0000000 --- a/src/models/erc20/tests.cairo +++ /dev/null @@ -1,361 +0,0 @@ -use core::num::traits::Bounded; -use integer::u256; -use integer::u256_from_felt252; -use origami_token::tests::utils; -use origami_token::tests::constants::{ - ZERO, OWNER, SPENDER, RECIPIENT, NAME, SYMBOL, DECIMALS, SUPPLY, VALUE -}; -use origami_token::erc20::ERC20::Approval; -use origami_token::erc20::ERC20::ERC20Impl; -use origami_token::erc20::ERC20::ERC20MetadataImpl; -use origami_token::erc20::ERC20::InternalImpl; -use origami_token::erc20::ERC20::Transfer; -use origami_token::erc20::ERC20; -use starknet::ContractAddress; -use starknet::contract_address_const; -use starknet::testing; -use zeroable::Zeroable; -use dojo::test_utils::spawn_test_world; -use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; - -use origami_token::erc20::models::{ - ERC20Allowance, erc_20_allowance, ERC20Balance, erc_20_balance, ERC20Meta, erc_20_meta -}; -use starknet::storage::{StorageMemberAccessTrait}; - -use debug::PrintTrait; - -// -// Setup -// - -fn STATE() -> (IWorldDispatcher, ERC20::ContractState) { - let world = spawn_test_world( - [].span(), - [ - erc_20_allowance::TEST_CLASS_HASH, - erc_20_balance::TEST_CLASS_HASH, - erc_20_meta::TEST_CLASS_HASH, - ] - ); - let mut state = ERC20::contract_state_for_testing(); - state._world.write(world.contract_address); - (world, state) -} - -fn setup() -> ERC20::ContractState { - let (world, mut state) = STATE(); - ERC20::constructor(ref state, world.contract_address, NAME, SYMBOL, SUPPLY, OWNER()); - utils::drop_event(ZERO()); - state -} - -// -// initializer & constructor -// - -#[test] -fn test_initializer() { - let (_world, mut state) = STATE(); - InternalImpl::initializer(ref state, NAME, SYMBOL); - - assert(ERC20MetadataImpl::name(@state) == NAME, 'Name should be NAME'); - assert(ERC20MetadataImpl::symbol(@state) == SYMBOL, 'Symbol should be SYMBOL'); - assert(ERC20MetadataImpl::decimals(@state) == DECIMALS, 'Decimals should be 18'); - assert(ERC20Impl::total_supply(@state) == 0, 'Supply should eq 0'); -} - - -#[test] -fn test_constructor() { - let (world, mut state) = STATE(); - ERC20::constructor(ref state, world.contract_address, NAME, SYMBOL, SUPPLY, OWNER()); - - assert_only_event_transfer(ZERO(), OWNER(), SUPPLY); - - assert(ERC20Impl::balance_of(@state, OWNER()) == SUPPLY, 'Should eq inital_supply'); - assert(ERC20Impl::total_supply(@state) == SUPPLY, 'Should eq inital_supply'); - assert(ERC20MetadataImpl::name(@state) == NAME, 'Name should be NAME'); - assert(ERC20MetadataImpl::symbol(@state) == SYMBOL, 'Symbol should be SYMBOL'); - assert(ERC20MetadataImpl::decimals(@state) == DECIMALS, 'Decimals should be 18'); -} - -// -// Getters -// - -#[test] -fn test_total_supply() { - let (_world, mut state) = STATE(); - InternalImpl::_mint(ref state, OWNER(), SUPPLY); - assert(ERC20Impl::total_supply(@state) == SUPPLY, 'Should eq SUPPLY'); -} - -#[test] -fn test_balance_of() { - let (_world, mut state) = STATE(); - InternalImpl::_mint(ref state, OWNER(), SUPPLY); - assert(ERC20Impl::balance_of(@state, OWNER()) == SUPPLY, 'Should eq SUPPLY'); -} - - -#[test] -fn test_allowance() { - let mut state = setup(); - testing::set_caller_address(OWNER()); - ERC20Impl::approve(ref state, SPENDER(), VALUE); - - assert(ERC20Impl::allowance(@state, OWNER(), SPENDER()) == VALUE, 'Should eq VALUE'); -} - -// -// approve & _approve -// - -#[test] -fn test_approve() { - let mut state = setup(); - testing::set_caller_address(OWNER()); - assert(ERC20Impl::approve(ref state, SPENDER(), VALUE), 'Should return true'); - - assert_only_event_approval(OWNER(), SPENDER(), VALUE); - assert( - ERC20Impl::allowance(@state, OWNER(), SPENDER()) == VALUE, 'Spender not approved correctly' - ); -} - -#[test] -#[should_panic(expected: ('ERC20: approve from 0',))] -fn test_approve_from_zero() { - let mut state = setup(); - ERC20Impl::approve(ref state, SPENDER(), VALUE); -} - -#[test] -#[should_panic(expected: ('ERC20: approve to 0',))] -fn test_approve_to_zero() { - let mut state = setup(); - testing::set_caller_address(OWNER()); - ERC20Impl::approve(ref state, Zeroable::zero(), VALUE); -} - -#[test] -fn test__approve() { - let mut state = setup(); - testing::set_caller_address(OWNER()); - InternalImpl::_approve(ref state, OWNER(), SPENDER(), VALUE); - - assert_only_event_approval(OWNER(), SPENDER(), VALUE); - assert( - ERC20Impl::allowance(@state, OWNER(), SPENDER()) == VALUE, 'Spender not approved correctly' - ); -} - -#[test] -#[should_panic(expected: ('ERC20: approve from 0',))] -fn test__approve_from_zero() { - let mut state = setup(); - InternalImpl::_approve(ref state, Zeroable::zero(), SPENDER(), VALUE); -} - -#[test] -#[should_panic(expected: ('ERC20: approve to 0',))] -fn test__approve_to_zero() { - let mut state = setup(); - testing::set_caller_address(OWNER()); - InternalImpl::_approve(ref state, OWNER(), Zeroable::zero(), VALUE); -} - -// -// transfer & _transfer -// - -#[test] -fn test_transfer() { - let mut state = setup(); - testing::set_caller_address(OWNER()); - assert(ERC20Impl::transfer(ref state, RECIPIENT(), VALUE), 'Should return true'); - - assert_only_event_transfer(OWNER(), RECIPIENT(), VALUE); - assert(ERC20Impl::balance_of(@state, RECIPIENT()) == VALUE, 'Balance should eq VALUE'); - assert(ERC20Impl::balance_of(@state, OWNER()) == SUPPLY - VALUE, 'Should eq supply - VALUE'); - assert(ERC20Impl::total_supply(@state) == SUPPLY, 'Total supply should not change'); -} - -#[test] -fn test__transfer() { - let mut state = setup(); - - InternalImpl::_transfer(ref state, OWNER(), RECIPIENT(), VALUE); - - assert_only_event_transfer(OWNER(), RECIPIENT(), VALUE); - assert(ERC20Impl::balance_of(@state, RECIPIENT()) == VALUE, 'Balance should eq amount'); - assert(ERC20Impl::balance_of(@state, OWNER()) == SUPPLY - VALUE, 'Should eq supply - amount'); - assert(ERC20Impl::total_supply(@state) == SUPPLY, 'Total supply should not change'); -} - -#[test] -#[should_panic(expected: ('u256_sub Overflow',))] -fn test__transfer_not_enough_balance() { - let mut state = setup(); - testing::set_caller_address(OWNER()); - - let balance_plus_one = SUPPLY + 1; - InternalImpl::_transfer(ref state, OWNER(), RECIPIENT(), balance_plus_one); -} - -#[test] -#[should_panic(expected: ('ERC20: transfer from 0',))] -fn test__transfer_from_zero() { - let mut state = setup(); - InternalImpl::_transfer(ref state, Zeroable::zero(), RECIPIENT(), VALUE); -} - -#[test] -#[should_panic(expected: ('ERC20: transfer to 0',))] -fn test__transfer_to_zero() { - let mut state = setup(); - InternalImpl::_transfer(ref state, OWNER(), Zeroable::zero(), VALUE); -} - -// -// transfer_from -// - -#[test] -fn test_transfer_from() { - let mut state = setup(); - testing::set_caller_address(OWNER()); - ERC20Impl::approve(ref state, SPENDER(), VALUE); - utils::drop_event(ZERO()); - - testing::set_caller_address(SPENDER()); - assert(ERC20Impl::transfer_from(ref state, OWNER(), RECIPIENT(), VALUE), 'Should return true'); - - assert_event_approval(OWNER(), SPENDER(), 0); - assert_only_event_transfer(OWNER(), RECIPIENT(), VALUE); - - assert(ERC20Impl::balance_of(@state, RECIPIENT()) == VALUE, 'Should eq amount'); - assert(ERC20Impl::balance_of(@state, OWNER()) == SUPPLY - VALUE, 'Should eq suppy - amount'); - assert(ERC20Impl::allowance(@state, OWNER(), SPENDER()) == 0, 'Should eq 0'); - assert(ERC20Impl::total_supply(@state) == SUPPLY, 'Total supply should not change'); -} - -#[test] -#[should_panic(expected: ('u256_sub Overflow',))] -fn test_transfer_from_greater_than_allowance() { - let mut state = setup(); - testing::set_caller_address(OWNER()); - ERC20Impl::approve(ref state, SPENDER(), VALUE); - - testing::set_caller_address(SPENDER()); - let allowance_plus_one = VALUE + 1; - ERC20Impl::transfer_from(ref state, OWNER(), RECIPIENT(), allowance_plus_one); -} - -#[test] -#[should_panic(expected: ('ERC20: transfer to 0',))] -fn test_transfer_from_to_zero_address() { - let mut state = setup(); - testing::set_caller_address(OWNER()); - ERC20Impl::approve(ref state, SPENDER(), VALUE); - - testing::set_caller_address(SPENDER()); - ERC20Impl::transfer_from(ref state, OWNER(), Zeroable::zero(), VALUE); -} - -#[test] -#[should_panic(expected: ('u256_sub Overflow',))] -fn test_transfer_from_from_zero_address() { - let mut state = setup(); - ERC20Impl::transfer_from(ref state, Zeroable::zero(), RECIPIENT(), VALUE); -} - -// -// _spend_allowance -// - -#[test] -fn test__spend_allowance_not_unlimited() { - let mut state = setup(); - - InternalImpl::_approve(ref state, OWNER(), SPENDER(), SUPPLY); - utils::drop_event(ZERO()); - - InternalImpl::_spend_allowance(ref state, OWNER(), SPENDER(), VALUE); - - assert_only_event_approval(OWNER(), SPENDER(), SUPPLY - VALUE); - assert( - ERC20Impl::allowance(@state, OWNER(), SPENDER()) == SUPPLY - VALUE, - 'Should eq supply - amount' - ); -} - -// -// _mint -// - -#[test] -fn test__mint() { - let (_world, mut state) = STATE(); - InternalImpl::_mint(ref state, OWNER(), VALUE); - assert_only_event_transfer(ZERO(), OWNER(), VALUE); - assert(ERC20Impl::balance_of(@state, OWNER()) == VALUE, 'Should eq amount'); - assert(ERC20Impl::total_supply(@state) == VALUE, 'Should eq total supply'); -} - -#[test] -#[should_panic(expected: ('ERC20: mint to 0',))] -fn test__mint_to_zero() { - let (_world, mut state) = STATE(); - InternalImpl::_mint(ref state, Zeroable::zero(), VALUE); -} - -// -// _burn -// - -#[test] -fn test__burn() { - let mut state = setup(); - InternalImpl::_burn(ref state, OWNER(), VALUE); - - assert_only_event_transfer(OWNER(), ZERO(), VALUE); - assert(ERC20Impl::total_supply(@state) == SUPPLY - VALUE, 'Should eq supply - amount'); - assert(ERC20Impl::balance_of(@state, OWNER()) == SUPPLY - VALUE, 'Should eq supply - amount'); -} - -#[test] -#[should_panic(expected: ('ERC20: burn from 0',))] -fn test__burn_from_zero() { - let mut state = setup(); - InternalImpl::_burn(ref state, Zeroable::zero(), VALUE); -} - -// -// Helpers -// - -fn assert_event_approval(owner: ContractAddress, spender: ContractAddress, value: u256) { - let event = utils::pop_log::(ZERO()).unwrap(); - assert(event.owner == owner, 'Invalid `owner`'); - assert(event.spender == spender, 'Invalid `spender`'); - assert(event.value == value, 'Invalid `value`'); -} - -fn assert_only_event_approval(owner: ContractAddress, spender: ContractAddress, value: u256) { - assert_event_approval(owner, spender, value); - utils::assert_no_events_left(ZERO()); -} - -fn assert_event_transfer(from: ContractAddress, to: ContractAddress, value: u256) { - let event = utils::pop_log::(ZERO()).unwrap(); - assert(event.from == from, 'Invalid `from`'); - assert(event.to == to, 'Invalid `to`'); - assert(event.value == value, 'Invalid `value`'); -} - -fn assert_only_event_transfer(from: ContractAddress, to: ContractAddress, value: u256) { - assert_event_transfer(from, to, value); - utils::assert_no_events_left(ZERO()); -} diff --git a/src/models/erc721/erc721.cairo b/src/models/erc721/erc721.cairo deleted file mode 100644 index 6a1bc7a..0000000 --- a/src/models/erc721/erc721.cairo +++ /dev/null @@ -1,414 +0,0 @@ -#[starknet::contract] -mod ERC721 { - use origami_token::erc721::models::{ - ERC721Meta, ERC721OperatorApproval, ERC721Owner, ERC721Balance, ERC721TokenApproval - }; - use origami_token::erc721::interface; - use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; - use core::num::traits::Bounded; - use starknet::ContractAddress; - use starknet::{get_caller_address, get_contract_address}; - use zeroable::Zeroable; - - - #[storage] - struct Storage { - _world: ContractAddress, - } - - #[event] - #[derive(Copy, Drop, starknet::Event)] - enum Event { - Transfer: Transfer, - Approval: Approval, - ApprovalForAll: ApprovalForAll - } - - #[derive(Copy, Drop, starknet::Event)] - struct Transfer { - from: ContractAddress, - to: ContractAddress, - token_id: u256 - } - - #[derive(Copy, Drop, starknet::Event)] - struct Approval { - owner: ContractAddress, - approved: ContractAddress, - token_id: u256 - } - - #[derive(Copy, Drop, starknet::Event)] - struct ApprovalForAll { - owner: ContractAddress, - operator: ContractAddress, - approved: bool - } - - mod Errors { - const INVALID_TOKEN_ID: felt252 = 'ERC721: invalid token ID'; - const INVALID_ACCOUNT: felt252 = 'ERC721: invalid account'; - const UNAUTHORIZED: felt252 = 'ERC721: unauthorized caller'; - const APPROVAL_TO_OWNER: felt252 = 'ERC721: approval to owner'; - const SELF_APPROVAL: felt252 = 'ERC721: self approval'; - const INVALID_RECEIVER: felt252 = 'ERC721: invalid receiver'; - const ALREADY_MINTED: felt252 = 'ERC721: token already minted'; - const WRONG_SENDER: felt252 = 'ERC721: wrong sender'; - const SAFE_MINT_FAILED: felt252 = 'ERC721: safe mint failed'; - const SAFE_TRANSFER_FAILED: felt252 = 'ERC721: safe transfer failed'; - } - - #[constructor] - fn constructor( - ref self: ContractState, - world: ContractAddress, - name: felt252, - symbol: felt252, - base_uri: felt252, - recipient: ContractAddress, - token_id: u256 - ) { - self._world.write(world); - self.initializer(name, symbol, base_uri); - self._mint(recipient, token_id); - } - - #[abi(embed_v0)] - impl ERC721MetadataImpl of interface::IERC721Metadata { - fn name(self: @ContractState) -> felt252 { - self.get_meta().name - } - - fn symbol(self: @ContractState) -> felt252 { - self.get_meta().symbol - } - - fn token_uri(self: @ContractState, token_id: u256) -> felt252 { - assert(self._exists(token_id), Errors::INVALID_TOKEN_ID); - // TODO : concat with id - self.get_uri(token_id) - } - } - - #[abi(embed_v0)] - impl ERC721MetadataCamelOnlyImpl of interface::IERC721MetadataCamelOnly { - fn tokenURI(self: @ContractState, tokenId: u256) -> felt252 { - assert(self._exists(tokenId), Errors::INVALID_TOKEN_ID); - self.get_uri(tokenId) - } - } - - #[abi(embed_v0)] - impl ERC721Impl of interface::IERC721 { - fn balance_of(self: @ContractState, account: ContractAddress) -> u256 { - assert(account.is_non_zero(), Errors::INVALID_ACCOUNT); - self.get_balance(account).amount - } - - fn owner_of(self: @ContractState, token_id: u256) -> ContractAddress { - self._owner_of(token_id) - } - - fn get_approved(self: @ContractState, token_id: u256) -> ContractAddress { - assert(self._exists(token_id), Errors::INVALID_TOKEN_ID); - self.get_token_approval(token_id).address - } - - fn is_approved_for_all( - self: @ContractState, owner: ContractAddress, operator: ContractAddress - ) -> bool { - self.get_operator_approval(owner, operator).approved - } - - fn approve(ref self: ContractState, to: ContractAddress, token_id: u256) { - let owner = self._owner_of(token_id); - - let caller = get_caller_address(); - assert( - owner == caller || Self::is_approved_for_all(@self, owner, caller), - Errors::UNAUTHORIZED - ); - self._approve(to, token_id); - } - - fn set_approval_for_all( - ref self: ContractState, operator: ContractAddress, approved: bool - ) { - self._set_approval_for_all(get_caller_address(), operator, approved) - } - - fn transfer_from( - ref self: ContractState, from: ContractAddress, to: ContractAddress, token_id: u256 - ) { - assert( - self._is_approved_or_owner(get_caller_address(), token_id), Errors::UNAUTHORIZED - ); - self._transfer(from, to, token_id); - } - - fn safe_transfer_from( - ref self: ContractState, - from: ContractAddress, - to: ContractAddress, - token_id: u256, - data: Span - ) { - assert( - self._is_approved_or_owner(get_caller_address(), token_id), Errors::UNAUTHORIZED - ); - self._safe_transfer(from, to, token_id, data); - } - } - - #[abi(embed_v0)] - impl ERC721CamelOnlyImpl of interface::IERC721CamelOnly { - fn balanceOf(self: @ContractState, account: ContractAddress) -> u256 { - ERC721Impl::balance_of(self, account) - } - - fn ownerOf(self: @ContractState, tokenId: u256) -> ContractAddress { - ERC721Impl::owner_of(self, tokenId) - } - - fn getApproved(self: @ContractState, tokenId: u256) -> ContractAddress { - ERC721Impl::get_approved(self, tokenId) - } - - fn isApprovedForAll( - self: @ContractState, owner: ContractAddress, operator: ContractAddress - ) -> bool { - ERC721Impl::is_approved_for_all(self, owner, operator) - } - - fn setApprovalForAll(ref self: ContractState, operator: ContractAddress, approved: bool) { - ERC721Impl::set_approval_for_all(ref self, operator, approved) - } - - fn transferFrom( - ref self: ContractState, from: ContractAddress, to: ContractAddress, tokenId: u256 - ) { - ERC721Impl::transfer_from(ref self, from, to, tokenId) - } - - fn safeTransferFrom( - ref self: ContractState, - from: ContractAddress, - to: ContractAddress, - tokenId: u256, - data: Span - ) { - ERC721Impl::safe_transfer_from(ref self, from, to, tokenId, data) - } - } - - // - // Internal - // - - #[generate_trait] - impl WorldInteractionsImpl of WorldInteractionsTrait { - fn world(self: @ContractState) -> IWorldDispatcher { - IWorldDispatcher { contract_address: self._world.read() } - } - - fn get_meta(self: @ContractState) -> ERC721Meta { - get!(self.world(), get_contract_address(), ERC721Meta) - } - - fn get_uri(self: @ContractState, token_id: u256) -> felt252 { - // TODO : concat with id when we have string type - self.get_meta().base_uri - } - - fn get_balance(self: @ContractState, account: ContractAddress) -> ERC721Balance { - get!(self.world(), (get_contract_address(), account), ERC721Balance) - } - - fn get_owner_of(self: @ContractState, token_id: u256) -> ERC721Owner { - get!( - self.world(), - (get_contract_address(), TryInto::::try_into(token_id).unwrap()), - ERC721Owner - ) - } - - fn get_token_approval(self: @ContractState, token_id: u256) -> ERC721TokenApproval { - get!( - self.world(), - (get_contract_address(), TryInto::::try_into(token_id).unwrap()), - ERC721TokenApproval - ) - } - - fn get_operator_approval( - self: @ContractState, owner: ContractAddress, operator: ContractAddress - ) -> ERC721OperatorApproval { - get!(self.world(), (get_contract_address(), owner, operator), ERC721OperatorApproval) - } - - fn set_token_approval( - ref self: ContractState, - owner: ContractAddress, - to: ContractAddress, - token_id: u256, - emit: bool - ) { - set!( - self.world(), - ERC721TokenApproval { - token: get_contract_address(), - token_id: token_id.try_into().unwrap(), - address: to, - } - ); - if emit { - let approval_event = Approval { owner, approved: to, token_id: token_id }; - - self.emit(approval_event.clone()); - emit!(self.world(), (Event::Approval(approval_event))); - } - } - - fn set_operator_approval( - ref self: ContractState, - owner: ContractAddress, - operator: ContractAddress, - approved: bool - ) { - set!( - self.world(), - ERC721OperatorApproval { token: get_contract_address(), owner, operator, approved } - ); - - let approval_for_all_event = ApprovalForAll { owner, operator, approved }; - - self.emit(approval_for_all_event.clone()); - emit!(self.world(), (Event::ApprovalForAll(approval_for_all_event))); - } - - fn set_balance(ref self: ContractState, account: ContractAddress, amount: u256) { - set!(self.world(), ERC721Balance { token: get_contract_address(), account, amount }); - } - - fn set_owner(ref self: ContractState, token_id: u256, address: ContractAddress) { - set!( - self.world(), - ERC721Owner { - token: get_contract_address(), token_id: token_id.try_into().unwrap(), address - } - ); - } - } - - #[generate_trait] - impl InternalImpl of InternalTrait { - fn initializer(ref self: ContractState, name: felt252, symbol: felt252, base_uri: felt252) { - let meta = ERC721Meta { token: get_contract_address(), name, symbol, base_uri }; - set!(self.world(), (meta)); - } - - fn _owner_of(self: @ContractState, token_id: u256) -> ContractAddress { - let owner = self.get_owner_of(token_id).address; - match owner.is_zero() { - bool::False(()) => owner, - bool::True(()) => panic_with_felt252(Errors::INVALID_TOKEN_ID) - } - } - - fn _exists(self: @ContractState, token_id: u256) -> bool { - let owner = self.get_owner_of(token_id).address; - owner.is_non_zero() - } - - fn _is_approved_or_owner( - self: @ContractState, spender: ContractAddress, token_id: u256 - ) -> bool { - let owner = self._owner_of(token_id); - let is_approved_for_all = ERC721Impl::is_approved_for_all(self, owner, spender); - owner == spender - || is_approved_for_all - || spender == ERC721Impl::get_approved(self, token_id) - } - - fn _approve(ref self: ContractState, to: ContractAddress, token_id: u256) { - let owner = self._owner_of(token_id); - assert(owner != to, Errors::APPROVAL_TO_OWNER); - - self.set_token_approval(owner, to, token_id, true); - } - - fn _set_approval_for_all( - ref self: ContractState, - owner: ContractAddress, - operator: ContractAddress, - approved: bool - ) { - assert(owner != operator, Errors::SELF_APPROVAL); - self.set_operator_approval(owner, operator, approved); - } - - fn _mint(ref self: ContractState, to: ContractAddress, token_id: u256) { - assert(!to.is_zero(), Errors::INVALID_RECEIVER); - assert(!self._exists(token_id), Errors::ALREADY_MINTED); - - self.set_balance(to, self.get_balance(to).amount + 1); - self.set_owner(token_id, to); - - let transfer_event = Transfer { from: Zeroable::zero(), to, token_id }; - - self.emit(transfer_event.clone()); - emit!(self.world(), (Event::Transfer(transfer_event))); - } - - fn _transfer( - ref self: ContractState, from: ContractAddress, to: ContractAddress, token_id: u256 - ) { - assert(!to.is_zero(), Errors::INVALID_RECEIVER); - let owner = self._owner_of(token_id); - assert(from == owner, Errors::WRONG_SENDER); - - // Implicit clear approvals, no need to emit an event - self.set_token_approval(owner, Zeroable::zero(), token_id, false); - - self.set_balance(from, self.get_balance(from).amount - 1); - self.set_balance(to, self.get_balance(to).amount + 1); - self.set_owner(token_id, to); - - let transfer_event = Transfer { from, to, token_id }; - - self.emit(transfer_event.clone()); - emit!(self.world(), (Event::Transfer(transfer_event))); - } - - fn _burn(ref self: ContractState, token_id: u256) { - let owner = self._owner_of(token_id); - - // Implicit clear approvals, no need to emit an event - self.set_token_approval(owner, Zeroable::zero(), token_id, false); - - self.set_balance(owner, self.get_balance(owner).amount - 1); - self.set_owner(token_id, Zeroable::zero()); - - let transfer_event = Transfer { from: owner, to: Zeroable::zero(), token_id }; - - self.emit(transfer_event.clone()); - emit!(self.world(), (Event::Transfer(transfer_event))); - } - - fn _safe_mint( - ref self: ContractState, to: ContractAddress, token_id: u256, data: Span - ) { - self._mint(to, token_id); - } - - fn _safe_transfer( - ref self: ContractState, - from: ContractAddress, - to: ContractAddress, - token_id: u256, - data: Span - ) { - self._transfer(from, to, token_id); - } - } -} diff --git a/src/models/erc721/interface.cairo b/src/models/erc721/interface.cairo deleted file mode 100644 index d257cc9..0000000 --- a/src/models/erc721/interface.cairo +++ /dev/null @@ -1,130 +0,0 @@ -use starknet::ContractAddress; - -const IERC721_ID: felt252 = 0x33eb2f84c309543403fd69f0d0f363781ef06ef6faeb0131ff16ea3175bd943; -const IERC721_METADATA_ID: felt252 = - 0x6069a70848f907fa57668ba1875164eb4dcee693952468581406d131081bbd; -const IERC721_RECEIVER_ID: felt252 = - 0x3a0dff5f70d80458ad14ae37bb182a728e3c8cdda0402a5daa86620bdf910bc; - -#[starknet::interface] -trait IERC721 { - fn balance_of(self: @TState, account: ContractAddress) -> u256; - fn owner_of(self: @TState, token_id: u256) -> ContractAddress; - fn safe_transfer_from( - ref self: TState, - from: ContractAddress, - to: ContractAddress, - token_id: u256, - data: Span - ); - fn transfer_from(ref self: TState, from: ContractAddress, to: ContractAddress, token_id: u256); - fn approve(ref self: TState, to: ContractAddress, token_id: u256); - fn set_approval_for_all(ref self: TState, operator: ContractAddress, approved: bool); - fn get_approved(self: @TState, token_id: u256) -> ContractAddress; - fn is_approved_for_all( - self: @TState, owner: ContractAddress, operator: ContractAddress - ) -> bool; -} - -#[starknet::interface] -trait IERC721Metadata { - fn name(self: @TState) -> felt252; - fn symbol(self: @TState) -> felt252; - fn token_uri(self: @TState, token_id: u256) -> felt252; -} - -#[starknet::interface] -trait IERC721CamelOnly { - fn balanceOf(self: @TState, account: ContractAddress) -> u256; - fn ownerOf(self: @TState, tokenId: u256) -> ContractAddress; - fn safeTransferFrom( - ref self: TState, - from: ContractAddress, - to: ContractAddress, - tokenId: u256, - data: Span - ); - fn transferFrom(ref self: TState, from: ContractAddress, to: ContractAddress, tokenId: u256); - fn setApprovalForAll(ref self: TState, operator: ContractAddress, approved: bool); - fn getApproved(self: @TState, tokenId: u256) -> ContractAddress; - fn isApprovedForAll(self: @TState, owner: ContractAddress, operator: ContractAddress) -> bool; -} - -#[starknet::interface] -trait IERC721MetadataCamelOnly { - fn tokenURI(self: @TState, tokenId: u256) -> felt252; -} - -// -// ERC721 ABI -// - -#[starknet::interface] -trait ERC721ABI { - // IERC721 - fn balance_of(self: @TState, account: ContractAddress) -> u256; - fn owner_of(self: @TState, token_id: u256) -> ContractAddress; - fn safe_transfer_from( - ref self: TState, - from: ContractAddress, - to: ContractAddress, - token_id: u256, - data: Span - ); - fn transfer_from(ref self: TState, from: ContractAddress, to: ContractAddress, token_id: u256); - fn approve(ref self: TState, to: ContractAddress, token_id: u256); - fn set_approval_for_all(ref self: TState, operator: ContractAddress, approved: bool); - fn get_approved(self: @TState, token_id: u256) -> ContractAddress; - fn is_approved_for_all( - self: @TState, owner: ContractAddress, operator: ContractAddress - ) -> bool; - - // IERC721Metadata - fn name(self: @TState) -> felt252; - fn symbol(self: @TState) -> felt252; - fn token_uri(self: @TState, token_id: u256) -> felt252; - - // IERC721CamelOnly - fn balanceOf(self: @TState, account: ContractAddress) -> u256; - fn ownerOf(self: @TState, tokenId: u256) -> ContractAddress; - fn safeTransferFrom( - ref self: TState, - from: ContractAddress, - to: ContractAddress, - tokenId: u256, - data: Span - ); - fn transferFrom(ref self: TState, from: ContractAddress, to: ContractAddress, tokenId: u256); - fn setApprovalForAll(ref self: TState, operator: ContractAddress, approved: bool); - fn getApproved(self: @TState, tokenId: u256) -> ContractAddress; - fn isApprovedForAll(self: @TState, owner: ContractAddress, operator: ContractAddress) -> bool; - - // IERC721MetadataCamelOnly - fn tokenURI(self: @TState, tokenId: u256) -> felt252; -} - -// -// ERC721Receiver -// - -#[starknet::interface] -trait IERC721Receiver { - fn on_erc721_received( - self: @TState, - operator: ContractAddress, - from: ContractAddress, - token_id: u256, - data: Span - ) -> felt252; -} - -#[starknet::interface] -trait IERC721ReceiverCamel { - fn onERC721Received( - self: @TState, - operator: ContractAddress, - from: ContractAddress, - tokenId: u256, - data: Span - ) -> felt252; -} diff --git a/src/models/erc721/models.cairo b/src/models/erc721/models.cairo deleted file mode 100644 index aa44c64..0000000 --- a/src/models/erc721/models.cairo +++ /dev/null @@ -1,55 +0,0 @@ -// Starknet imports - -use starknet::ContractAddress; - -#[dojo::model] -#[derive(Copy, Drop, Serde)] -struct ERC721Meta { - #[key] - token: ContractAddress, - name: felt252, - symbol: felt252, - base_uri: felt252, -} - -#[dojo::model] -#[derive(Copy, Drop, Serde)] -struct ERC721OperatorApproval { - #[key] - token: ContractAddress, - #[key] - owner: ContractAddress, - #[key] - operator: ContractAddress, - approved: bool -} - -#[dojo::model] -#[derive(Copy, Drop, Serde)] -struct ERC721Owner { - #[key] - token: ContractAddress, - #[key] - token_id: felt252, - address: ContractAddress -} - -#[dojo::model] -#[derive(Model, Copy, Drop, Serde)] -struct ERC721Balance { - #[key] - token: ContractAddress, - #[key] - account: ContractAddress, - amount: u256, -} - -#[dojo::model] -#[derive(Copy, Drop, Serde)] -struct ERC721TokenApproval { - #[key] - token: ContractAddress, - #[key] - token_id: felt252, - address: ContractAddress, -} diff --git a/src/models/erc721/tests.cairo b/src/models/erc721/tests.cairo deleted file mode 100644 index 7d7d960..0000000 --- a/src/models/erc721/tests.cairo +++ /dev/null @@ -1,1378 +0,0 @@ -// Core imports - -use integer::u256; -use integer::u256_from_felt252; -use zeroable::Zeroable; -use debug::PrintTrait; - -// Starknet imports - -use starknet::ContractAddress; -use starknet::contract_address_const; -use starknet::testing; - -// Dojo imports - -use dojo::test_utils::spawn_test_world; -use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; - -// External imports - -// Internal imports - -use origami_token::tests::utils; -use origami_token::tests::constants::{ - ZERO, OWNER, SPENDER, RECIPIENT, OPERATOR, OTHER, NAME, SYMBOL, URI, TOKEN_ID -}; -use origami_token::erc721::ERC721::ERC721Impl; -use origami_token::erc721::ERC721::ERC721CamelOnlyImpl; -use origami_token::erc721::ERC721::ERC721MetadataImpl; -use origami_token::erc721::ERC721::InternalImpl; -use origami_token::erc721::ERC721::WorldInteractionsImpl; -use origami_token::erc721::ERC721::{Approval, ApprovalForAll, Transfer}; -use origami_token::erc721::ERC721; -use origami_token::erc721::models::{ - ERC721Meta, erc_721_meta, ERC721OperatorApproval, erc_721_operator_approval, ERC721Owner, - erc_721_owner, ERC721Balance, erc_721_balance, ERC721TokenApproval, erc_721_token_approval -}; -use starknet::storage::{StorageMemberAccessTrait}; - - -// -// Setup -// - -fn STATE() -> (IWorldDispatcher, ERC721::ContractState) { - let world = spawn_test_world( - [].span(), - [ - erc_721_meta::TEST_CLASS_HASH, - erc_721_operator_approval::TEST_CLASS_HASH, - erc_721_owner::TEST_CLASS_HASH, - erc_721_balance::TEST_CLASS_HASH, - erc_721_token_approval::TEST_CLASS_HASH, - ].span() - ); - let mut state = ERC721::contract_state_for_testing(); - state._world.write(world.contract_address); - (world, state) -} - -fn setup() -> ERC721::ContractState { - let (world, mut state) = STATE(); - ERC721::constructor(ref state, world.contract_address, NAME, SYMBOL, URI, OWNER(), TOKEN_ID); - utils::drop_event(ZERO()); - state -} - -// fn setup_receiver() -> ContractAddress { -// utils::deploy(ERC721Receiver::TEST_CLASS_HASH, array![]) -// } - -// fn setup_camel_receiver() -> ContractAddress { -// utils::deploy(CamelERC721ReceiverMock::TEST_CLASS_HASH, array![]) -// } - -// fn setup_account() -> ContractAddress { -// let mut calldata = array![PUBKEY]; -// utils::deploy(Account::TEST_CLASS_HASH, calldata) -// } - -// fn setup_camel_account() -> ContractAddress { -// let mut calldata = array![PUBKEY]; -// utils::deploy(CamelAccountMock::TEST_CLASS_HASH, calldata) -// } - -// -// initializer & constructor -// - -#[test] -fn test_constructor() { - let (world, mut state) = STATE(); - ERC721::constructor(ref state, world.contract_address, NAME, SYMBOL, URI, OWNER(), TOKEN_ID); - - assert(ERC721MetadataImpl::name(@state) == NAME, 'Name should be NAME'); - assert(ERC721MetadataImpl::symbol(@state) == SYMBOL, 'Symbol should be SYMBOL'); - assert(ERC721Impl::balance_of(@state, OWNER()) == 1, 'Balance should be one'); - assert(ERC721Impl::owner_of(@state, TOKEN_ID) == OWNER(), 'OWNER should be owner'); - // assert( -// SRC5Impl::supports_interface(@state, erc721::interface::IERC721_ID), 'Missing interface -// ID' -// ); -// assert( -// SRC5Impl::supports_interface(@state, erc721::interface::IERC721_METADATA_ID), -// 'missing interface ID' -// ); -// assert( -// SRC5Impl::supports_interface(@state, introspection::interface::ISRC5_ID), -// 'missing interface ID' -// ); -} - -#[test] -fn test_initializer() { - let (_world, mut state) = STATE(); - InternalImpl::initializer(ref state, NAME, SYMBOL, URI); - - assert(ERC721MetadataImpl::name(@state) == NAME, 'Name should be NAME'); - assert(ERC721MetadataImpl::symbol(@state) == SYMBOL, 'Symbol should be SYMBOL'); - - assert(ERC721Impl::balance_of(@state, OWNER()) == 0, 'Balance should be zero'); - // assert( -// SRC5Impl::supports_interface(@state, erc721::interface::IERC721_ID), 'Missing interface -// ID' -// ); -// assert( -// SRC5Impl::supports_interface(@state, erc721::interface::IERC721_METADATA_ID), -// 'missing interface ID' -// ); -// assert( -// SRC5Impl::supports_interface(@state, introspection::interface::ISRC5_ID), -// 'missing interface ID' -// ); -} - - -// -// Getters -// - -#[test] -fn test_balance_of() { - let state = setup(); - assert(ERC721Impl::balance_of(@state, OWNER()) == 1, 'Should return balance'); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid account',))] -fn test_balance_of_zero() { - let state = setup(); - ERC721Impl::balance_of(@state, ZERO()); -} - -#[test] -fn test_owner_of() { - let state = setup(); - assert(ERC721Impl::owner_of(@state, TOKEN_ID) == OWNER(), 'Should return owner'); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid token ID',))] -fn test_owner_of_non_minted() { - let state = setup(); - ERC721Impl::owner_of(@state, u256_from_felt252(7)); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid token ID',))] -fn test_token_uri_non_minted() { - let state = setup(); - ERC721MetadataImpl::token_uri(@state, u256_from_felt252(7)); -} - -#[test] -fn test_get_approved() { - let mut state = setup(); - let spender = SPENDER(); - let token_id = TOKEN_ID; - - assert(ERC721Impl::get_approved(@state, token_id) == ZERO(), 'Should return non-approval'); - InternalImpl::_approve(ref state, spender, token_id); - assert(ERC721Impl::get_approved(@state, token_id) == spender, 'Should return approval'); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid token ID',))] -fn test_get_approved_nonexistent() { - let mut state = setup(); - ERC721Impl::get_approved(@state, u256_from_felt252(7)); -} - -#[test] -fn test__exists() { - let (_world, mut state) = STATE(); - let token_id = TOKEN_ID; - - assert(!InternalImpl::_exists(@state, token_id), 'Token should not exist'); - assert( - WorldInteractionsImpl::get_owner_of(@state, token_id).address == ZERO(), 'Invalid owner' - ); - - InternalImpl::_mint(ref state, RECIPIENT(), token_id); - - assert(InternalImpl::_exists(@state, token_id), 'Token should exist'); - assert( - WorldInteractionsImpl::get_owner_of(@state, token_id).address == RECIPIENT(), - 'Invalid owner' - ); - - InternalImpl::_burn(ref state, token_id); - - assert(!InternalImpl::_exists(@state, token_id), 'Token should not exist'); - assert( - WorldInteractionsImpl::get_owner_of(@state, token_id).address == ZERO(), 'Invalid owner' - ); -} - - -// -// approve & _approve -// - -#[test] -fn test_approve_from_owner() { - let mut state = setup(); - - testing::set_caller_address(OWNER()); - ERC721Impl::approve(ref state, SPENDER(), TOKEN_ID); - assert_event_approval(OWNER(), SPENDER(), TOKEN_ID); - - assert( - ERC721Impl::get_approved(@state, TOKEN_ID) == SPENDER(), 'Spender not approved correctly' - ); -} - -#[test] -fn test_approve_from_operator() { - let mut state = setup(); - - testing::set_caller_address(OWNER()); - ERC721Impl::set_approval_for_all(ref state, OPERATOR(), true); - utils::drop_event(ZERO()); - - testing::set_caller_address(OPERATOR()); - ERC721Impl::approve(ref state, SPENDER(), TOKEN_ID); - assert_event_approval(OWNER(), SPENDER(), TOKEN_ID); - - assert( - ERC721Impl::get_approved(@state, TOKEN_ID) == SPENDER(), 'Spender not approved correctly' - ); -} - -#[test] -#[should_panic(expected: ('ERC721: unauthorized caller',))] -fn test_approve_from_unauthorized() { - let mut state = setup(); - - testing::set_caller_address(OTHER()); - ERC721Impl::approve(ref state, SPENDER(), TOKEN_ID); -} - -#[test] -#[should_panic(expected: ('ERC721: approval to owner',))] -fn test_approve_to_owner() { - let mut state = setup(); - - testing::set_caller_address(OWNER()); - ERC721Impl::approve(ref state, OWNER(), TOKEN_ID); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid token ID',))] -fn test_approve_nonexistent() { - // let mut state = STATE(); - let (_world, mut state) = STATE(); - ERC721Impl::approve(ref state, SPENDER(), TOKEN_ID); -} - -#[test] -fn test__approve() { - let mut state = setup(); - InternalImpl::_approve(ref state, SPENDER(), TOKEN_ID); - assert_event_approval(OWNER(), SPENDER(), TOKEN_ID); - - assert( - ERC721Impl::get_approved(@state, TOKEN_ID) == SPENDER(), 'Spender not approved correctly' - ); -} - -#[test] -#[should_panic(expected: ('ERC721: approval to owner',))] -fn test__approve_to_owner() { - let mut state = setup(); - InternalImpl::_approve(ref state, OWNER(), TOKEN_ID); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid token ID',))] -fn test__approve_nonexistent() { - //let mut state = STATE(); - let (_world, mut state) = STATE(); - InternalImpl::_approve(ref state, SPENDER(), TOKEN_ID); -} - -// -// set_approval_for_all & _set_approval_for_all -// - -#[test] -fn test_set_approval_for_all() { - //let mut state = STATE(); - let (_world, mut state) = STATE(); - testing::set_caller_address(OWNER()); - - assert(!ERC721Impl::is_approved_for_all(@state, OWNER(), OPERATOR()), 'Invalid default value'); - - ERC721Impl::set_approval_for_all(ref state, OPERATOR(), true); - assert_event_approval_for_all(OWNER(), OPERATOR(), true); - - assert( - ERC721Impl::is_approved_for_all(@state, OWNER(), OPERATOR()), - 'Operator not approved correctly' - ); - - ERC721Impl::set_approval_for_all(ref state, OPERATOR(), false); - assert_event_approval_for_all(OWNER(), OPERATOR(), false); - - assert( - !ERC721Impl::is_approved_for_all(@state, OWNER(), OPERATOR()), - 'Approval not revoked correctly' - ); -} - -#[test] -#[should_panic(expected: ('ERC721: self approval',))] -fn test_set_approval_for_all_owner_equal_operator_true() { - //let mut state = STATE(); - let (_world, mut state) = STATE(); - testing::set_caller_address(OWNER()); - ERC721Impl::set_approval_for_all(ref state, OWNER(), true); -} - -#[test] -#[should_panic(expected: ('ERC721: self approval',))] -fn test_set_approval_for_all_owner_equal_operator_false() { - //let mut state = STATE(); - let (_world, mut state) = STATE(); - testing::set_caller_address(OWNER()); - ERC721Impl::set_approval_for_all(ref state, OWNER(), false); -} - -#[test] -fn test__set_approval_for_all() { - //let mut state = STATE(); - let (_world, mut state) = STATE(); - assert(!ERC721Impl::is_approved_for_all(@state, OWNER(), OPERATOR()), 'Invalid default value'); - - InternalImpl::_set_approval_for_all(ref state, OWNER(), OPERATOR(), true); - assert_event_approval_for_all(OWNER(), OPERATOR(), true); - - assert( - ERC721Impl::is_approved_for_all(@state, OWNER(), OPERATOR()), - 'Operator not approved correctly' - ); - - InternalImpl::_set_approval_for_all(ref state, OWNER(), OPERATOR(), false); - assert_event_approval_for_all(OWNER(), OPERATOR(), false); - - assert( - !ERC721Impl::is_approved_for_all(@state, OWNER(), OPERATOR()), - 'Operator not approved correctly' - ); -} - -#[test] -#[should_panic(expected: ('ERC721: self approval',))] -fn test__set_approval_for_all_owner_equal_operator_true() { - //let mut state = STATE(); - let (_world, mut state) = STATE(); - InternalImpl::_set_approval_for_all(ref state, OWNER(), OWNER(), true); -} - -#[test] -#[should_panic(expected: ('ERC721: self approval',))] -fn test__set_approval_for_all_owner_equal_operator_false() { - // let mut state = STATE(); - let (_world, mut state) = STATE(); - InternalImpl::_set_approval_for_all(ref state, OWNER(), OWNER(), false); -} - - -// -// transfer_from & transferFrom -// - -#[test] -fn test_transfer_from_owner() { - let mut state = setup(); - let token_id = TOKEN_ID; - let owner = OWNER(); - let recipient = RECIPIENT(); - // set approval to check reset - InternalImpl::_approve(ref state, OTHER(), token_id); - utils::drop_event(ZERO()); - - assert_state_before_transfer(@state, owner, recipient, token_id); - assert(ERC721Impl::get_approved(@state, token_id) == OTHER(), 'Approval not implicitly reset'); - - testing::set_caller_address(owner); - ERC721Impl::transfer_from(ref state, owner, recipient, token_id); - assert_event_transfer(owner, recipient, token_id); - - assert_state_after_transfer(@state, owner, recipient, token_id); -} - -#[test] -fn test_transferFrom_owner() { - let mut state = setup(); - let token_id = TOKEN_ID; - let owner = OWNER(); - let recipient = RECIPIENT(); - // set approval to check reset - InternalImpl::_approve(ref state, OTHER(), token_id); - utils::drop_event(ZERO()); - - assert_state_before_transfer(@state, owner, recipient, token_id); - assert(ERC721Impl::get_approved(@state, token_id) == OTHER(), 'Approval not implicitly reset'); - - testing::set_caller_address(owner); - ERC721CamelOnlyImpl::transferFrom(ref state, owner, recipient, token_id); - assert_event_transfer(owner, recipient, token_id); - - assert_state_after_transfer(@state, owner, recipient, token_id); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid token ID',))] -fn test_transfer_from_nonexistent() { - //let mut state = STATE(); - let (_world, mut state) = STATE(); - ERC721Impl::transfer_from(ref state, ZERO(), RECIPIENT(), TOKEN_ID); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid token ID',))] -fn test_transferFrom_nonexistent() { - //let mut state = STATE(); - let (_world, mut state) = STATE(); - ERC721CamelOnlyImpl::transferFrom(ref state, ZERO(), RECIPIENT(), TOKEN_ID); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid receiver',))] -fn test_transfer_from_to_zero() { - let mut state = setup(); - testing::set_caller_address(OWNER()); - ERC721Impl::transfer_from(ref state, OWNER(), ZERO(), TOKEN_ID); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid receiver',))] -fn test_transferFrom_to_zero() { - let mut state = setup(); - - testing::set_caller_address(OWNER()); - ERC721CamelOnlyImpl::transferFrom(ref state, OWNER(), ZERO(), TOKEN_ID); -} - -#[test] -fn test_transfer_from_to_owner() { - let mut state = setup(); - - assert(ERC721Impl::owner_of(@state, TOKEN_ID) == OWNER(), 'Ownership before'); - assert(ERC721Impl::balance_of(@state, OWNER()) == 1, 'Balance of owner before'); - - testing::set_caller_address(OWNER()); - ERC721Impl::transfer_from(ref state, OWNER(), OWNER(), TOKEN_ID); - assert_event_transfer(OWNER(), OWNER(), TOKEN_ID); - - assert(ERC721Impl::owner_of(@state, TOKEN_ID) == OWNER(), 'Ownership after'); - assert(ERC721Impl::balance_of(@state, OWNER()) == 1, 'Balance of owner after'); -} - -#[test] -fn test_transferFrom_to_owner() { - let mut state = setup(); - - assert(ERC721Impl::owner_of(@state, TOKEN_ID) == OWNER(), 'Ownership before'); - assert(ERC721Impl::balance_of(@state, OWNER()) == 1, 'Balance of owner before'); - - testing::set_caller_address(OWNER()); - ERC721CamelOnlyImpl::transferFrom(ref state, OWNER(), OWNER(), TOKEN_ID); - assert_event_transfer(OWNER(), OWNER(), TOKEN_ID); - - assert(ERC721Impl::owner_of(@state, TOKEN_ID) == OWNER(), 'Ownership after'); - assert(ERC721Impl::balance_of(@state, OWNER()) == 1, 'Balance of owner after'); -} - -#[test] -fn test_transfer_from_approved() { - let mut state = setup(); - let token_id = TOKEN_ID; - let owner = OWNER(); - let recipient = RECIPIENT(); - assert_state_before_transfer(@state, owner, recipient, token_id); - - testing::set_caller_address(owner); - ERC721Impl::approve(ref state, OPERATOR(), token_id); - utils::drop_event(ZERO()); - - testing::set_caller_address(OPERATOR()); - ERC721Impl::transfer_from(ref state, owner, recipient, token_id); - assert_event_transfer(owner, recipient, token_id); - - assert_state_after_transfer(@state, owner, recipient, token_id); -} - -#[test] -fn test_transferFrom_approved() { - let mut state = setup(); - let token_id = TOKEN_ID; - let owner = OWNER(); - let recipient = RECIPIENT(); - assert_state_before_transfer(@state, owner, recipient, token_id); - - testing::set_caller_address(owner); - ERC721Impl::approve(ref state, OPERATOR(), token_id); - utils::drop_event(ZERO()); - - testing::set_caller_address(OPERATOR()); - ERC721CamelOnlyImpl::transferFrom(ref state, owner, recipient, token_id); - assert_event_transfer(owner, recipient, token_id); - - assert_state_after_transfer(@state, owner, recipient, token_id); -} - -#[test] -fn test_transfer_from_approved_for_all() { - let mut state = setup(); - let token_id = TOKEN_ID; - let owner = OWNER(); - let recipient = RECIPIENT(); - - assert_state_before_transfer(@state, owner, recipient, token_id); - - testing::set_caller_address(owner); - ERC721Impl::set_approval_for_all(ref state, OPERATOR(), true); - utils::drop_event(ZERO()); - - testing::set_caller_address(OPERATOR()); - ERC721Impl::transfer_from(ref state, owner, recipient, token_id); - assert_event_transfer(owner, recipient, token_id); - - assert_state_after_transfer(@state, owner, recipient, token_id); -} - -#[test] -fn test_transferFrom_approved_for_all() { - let mut state = setup(); - let token_id = TOKEN_ID; - let owner = OWNER(); - let recipient = RECIPIENT(); - - assert_state_before_transfer(@state, owner, recipient, token_id); - - testing::set_caller_address(owner); - ERC721Impl::set_approval_for_all(ref state, OPERATOR(), true); - utils::drop_event(ZERO()); - - testing::set_caller_address(OPERATOR()); - ERC721CamelOnlyImpl::transferFrom(ref state, owner, recipient, token_id); - assert_event_transfer(owner, recipient, token_id); - - assert_state_after_transfer(@state, owner, recipient, token_id); -} - -#[test] -#[should_panic(expected: ('ERC721: unauthorized caller',))] -fn test_transfer_from_unauthorized() { - let mut state = setup(); - testing::set_caller_address(OTHER()); - ERC721Impl::transfer_from(ref state, OWNER(), RECIPIENT(), TOKEN_ID); -} - -#[test] -#[should_panic(expected: ('ERC721: unauthorized caller',))] -fn test_transferFrom_unauthorized() { - let mut state = setup(); - testing::set_caller_address(OTHER()); - ERC721CamelOnlyImpl::transferFrom(ref state, OWNER(), RECIPIENT(), TOKEN_ID); -} - -// // -// // safe_transfer_from & safeTransferFrom -// // - -// #[test] -// fn test_safe_transfer_from_to_account() { -// let mut state = setup(); -// let account = setup_account(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, account, token_id); - -// testing::set_caller_address(owner); -// ERC721Impl::safe_transfer_from(ref state, owner, account, token_id, DATA(true)); -// assert_event_transfer(owner, account, token_id); - -// assert_state_after_transfer(@state,owner, account, token_id); -// } - -// #[test] -// fn test_safeTransferFrom_to_account() { -// let mut state = setup(); -// let account = setup_account(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, account, token_id); - -// testing::set_caller_address(owner); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, account, token_id, DATA(true)); -// assert_event_transfer(owner, account, token_id); - -// assert_state_after_transfer(@state,owner, account, token_id); -// } - -// #[test] -// fn test_safe_transfer_from_to_account_camel() { -// let mut state = setup(); -// let account = setup_camel_account(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, account, token_id); - -// testing::set_caller_address(owner); -// ERC721Impl::safe_transfer_from(ref state, owner, account, token_id, DATA(true)); -// assert_event_transfer(owner, account, token_id); - -// assert_state_after_transfer(@state,owner, account, token_id); -// } - -// #[test] -// fn test_safeTransferFrom_to_account_camel() { -// let mut state = setup(); -// let account = setup_camel_account(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, account, token_id); - -// testing::set_caller_address(owner); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, account, token_id, DATA(true)); -// assert_event_transfer(owner, account, token_id); - -// assert_state_after_transfer(@state,owner, account, token_id); -// } - -// #[test] -// fn test_safe_transfer_from_to_receiver() { -// let mut state = setup(); -// let receiver = setup_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, receiver, token_id); - -// testing::set_caller_address(owner); -// ERC721Impl::safe_transfer_from(ref state, owner, receiver, token_id, DATA(true)); -// assert_event_transfer(owner, receiver, token_id); - -// assert_state_after_transfer(@state,owner, receiver, token_id); -// } - -// #[test] -// fn test_safeTransferFrom_to_receiver() { -// let mut state = setup(); -// let receiver = setup_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, receiver, token_id); - -// testing::set_caller_address(owner); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, receiver, token_id, DATA(true)); -// assert_event_transfer(owner, receiver, token_id); - -// assert_state_after_transfer(@state,owner, receiver, token_id); -// } - -// #[test] -// fn test_safe_transfer_from_to_receiver_camel() { -// let mut state = setup(); -// let receiver = setup_camel_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, receiver, token_id); - -// testing::set_caller_address(owner); -// ERC721Impl::safe_transfer_from(ref state, owner, receiver, token_id, DATA(true)); -// assert_event_transfer(owner, receiver, token_id); - -// assert_state_after_transfer(@state,owner, receiver, token_id); -// } - -// #[test] -// fn test_safeTransferFrom_to_receiver_camel() { -// let mut state = setup(); -// let receiver = setup_camel_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, receiver, token_id); - -// testing::set_caller_address(owner); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, receiver, token_id, DATA(true)); -// assert_event_transfer(owner, receiver, token_id); - -// assert_state_after_transfer(@state,owner, receiver, token_id); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: safe transfer failed',))] -// fn test_safe_transfer_from_to_receiver_failure() { -// let mut state = setup(); -// let receiver = setup_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// testing::set_caller_address(owner); -// ERC721Impl::safe_transfer_from(ref state, owner, receiver, token_id, DATA(false)); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: safe transfer failed',))] -// fn test_safeTransferFrom_to_receiver_failure() { -// let mut state = setup(); -// let receiver = setup_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// testing::set_caller_address(owner); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, receiver, token_id, DATA(false)); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: safe transfer failed',))] -// fn test_safe_transfer_from_to_receiver_failure_camel() { -// let mut state = setup(); -// let receiver = setup_camel_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// testing::set_caller_address(owner); -// ERC721Impl::safe_transfer_from(ref state, owner, receiver, token_id, DATA(false)); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: safe transfer failed',))] -// fn test_safeTransferFrom_to_receiver_failure_camel() { -// let mut state = setup(); -// let receiver = setup_camel_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// testing::set_caller_address(owner); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, receiver, token_id, DATA(false)); -// } - -// #[test] -// #[should_panic(expected: ('ENTRYPOINT_NOT_FOUND',))] -// fn test_safe_transfer_from_to_non_receiver() { -// let mut state = setup(); -// let recipient = utils::deploy(NonImplementingMock::TEST_CLASS_HASH, array![]); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// testing::set_caller_address(owner); -// ERC721Impl::safe_transfer_from(ref state, owner, recipient, token_id, DATA(true)); -// } - -// #[test] -// #[should_panic(expected: ('ENTRYPOINT_NOT_FOUND',))] -// fn test_safeTransferFrom_to_non_receiver() { -// let mut state = setup(); -// let recipient = utils::deploy(NonImplementingMock::TEST_CLASS_HASH, array![]); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// testing::set_caller_address(owner); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, recipient, token_id, DATA(true)); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: invalid token ID',))] -// fn test_safe_transfer_from_nonexistent() { -// let mut state = STATE(); -// ERC721Impl::safe_transfer_from(ref state, ZERO(), RECIPIENT(), TOKEN_ID, DATA(true)); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: invalid token ID',))] -// fn test_safeTransferFrom_nonexistent() { -// let mut state = STATE(); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, ZERO(), RECIPIENT(), TOKEN_ID, DATA(true)); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: invalid receiver',))] -// fn test_safe_transfer_from_to_zero() { -// let mut state = setup(); -// testing::set_caller_address(OWNER()); -// ERC721Impl::safe_transfer_from(ref state, OWNER(), ZERO(), TOKEN_ID, DATA(true)); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: invalid receiver',))] -// fn test_safeTransferFrom_to_zero() { -// let mut state = setup(); -// testing::set_caller_address(OWNER()); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, OWNER(), ZERO(), TOKEN_ID, DATA(true)); -// } - -// #[test] -// fn test_safe_transfer_from_to_owner() { -// let mut state = STATE(); -// let token_id = TOKEN_ID; -// let owner = setup_receiver(); -// InternalImpl::initializer(ref state, NAME, SYMBOL); -// InternalImpl::_mint(ref state, owner, token_id); -// utils::drop_event(ZERO()); - -// assert(ERC721Impl::owner_of(@state, token_id) == owner, 'Ownership before'); -// assert(ERC721Impl::balance_of(@state, owner) == 1, 'Balance of owner before'); - -// testing::set_caller_address(owner); -// ERC721Impl::safe_transfer_from(ref state, owner, owner, token_id, DATA(true)); -// assert_event_transfer(owner, owner, token_id); - -// assert(ERC721Impl::owner_of(@state, token_id) == owner, 'Ownership after'); -// assert(ERC721Impl::balance_of(@state, owner) == 1, 'Balance of owner after'); -// } - -// #[test] -// fn test_safeTransferFrom_to_owner() { -// let mut state = STATE(); -// let token_id = TOKEN_ID; -// let owner = setup_receiver(); -// InternalImpl::initializer(ref state, NAME, SYMBOL); -// InternalImpl::_mint(ref state, owner, token_id); -// utils::drop_event(ZERO()); - -// assert(ERC721Impl::owner_of(@state, token_id) == owner, 'Ownership before'); -// assert(ERC721Impl::balance_of(@state, owner) == 1, 'Balance of owner before'); - -// testing::set_caller_address(owner); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, owner, token_id, DATA(true)); -// assert_event_transfer(owner, owner, token_id); - -// assert(ERC721Impl::owner_of(@state, token_id) == owner, 'Ownership after'); -// assert(ERC721Impl::balance_of(@state, owner) == 1, 'Balance of owner after'); -// } - -// #[test] -// fn test_safe_transfer_from_to_owner_camel() { -// let mut state = STATE(); -// let token_id = TOKEN_ID; -// let owner = setup_camel_receiver(); -// InternalImpl::initializer(ref state, NAME, SYMBOL); -// InternalImpl::_mint(ref state, owner, token_id); -// utils::drop_event(ZERO()); - -// assert(ERC721Impl::owner_of(@state, token_id) == owner, 'Ownership before'); -// assert(ERC721Impl::balance_of(@state, owner) == 1, 'Balance of owner before'); - -// testing::set_caller_address(owner); -// ERC721Impl::safe_transfer_from(ref state, owner, owner, token_id, DATA(true)); -// assert_event_transfer(owner, owner, token_id); - -// assert(ERC721Impl::owner_of(@state, token_id) == owner, 'Ownership after'); -// assert(ERC721Impl::balance_of(@state, owner) == 1, 'Balance of owner after'); -// } - -// #[test] -// fn test_safeTransferFrom_to_owner_camel() { -// let mut state = STATE(); -// let token_id = TOKEN_ID; -// let owner = setup_camel_receiver(); -// InternalImpl::initializer(ref state, NAME, SYMBOL); -// InternalImpl::_mint(ref state, owner, token_id); -// utils::drop_event(ZERO()); - -// assert(ERC721Impl::owner_of(@state, token_id) == owner, 'Ownership before'); -// assert(ERC721Impl::balance_of(@state, owner) == 1, 'Balance of owner before'); - -// testing::set_caller_address(owner); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, owner, token_id, DATA(true)); -// assert_event_transfer(owner, owner, token_id); - -// assert(ERC721Impl::owner_of(@state, token_id) == owner, 'Ownership after'); -// assert(ERC721Impl::balance_of(@state, owner) == 1, 'Balance of owner after'); -// } - -// #[test] -// fn test_safe_transfer_from_approved() { -// let mut state = setup(); -// let receiver = setup_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, receiver, token_id); - -// testing::set_caller_address(owner); -// ERC721Impl::approve(ref state, OPERATOR(), token_id); -// utils::drop_event(ZERO()); - -// testing::set_caller_address(OPERATOR()); -// ERC721Impl::safe_transfer_from(ref state, owner, receiver, token_id, DATA(true)); -// assert_event_transfer(owner, receiver, token_id); - -// assert_state_after_transfer(@state,owner, receiver, token_id); -// } - -// #[test] -// fn test_safeTransferFrom_approved() { -// let mut state = setup(); -// let receiver = setup_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, receiver, token_id); - -// testing::set_caller_address(owner); -// ERC721Impl::approve(ref state, OPERATOR(), token_id); -// utils::drop_event(ZERO()); - -// testing::set_caller_address(OPERATOR()); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, receiver, token_id, DATA(true)); -// assert_event_transfer(owner, receiver, token_id); - -// assert_state_after_transfer(@state,owner, receiver, token_id); -// } - -// #[test] -// fn test_safe_transfer_from_approved_camel() { -// let mut state = setup(); -// let receiver = setup_camel_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, receiver, token_id); - -// testing::set_caller_address(owner); -// ERC721Impl::approve(ref state, OPERATOR(), token_id); -// utils::drop_event(ZERO()); - -// testing::set_caller_address(OPERATOR()); -// ERC721Impl::safe_transfer_from(ref state, owner, receiver, token_id, DATA(true)); -// assert_event_transfer(owner, receiver, token_id); - -// assert_state_after_transfer(@state,owner, receiver, token_id); -// } - -// #[test] -// fn test_safeTransferFrom_approved_camel() { -// let mut state = setup(); -// let receiver = setup_camel_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, receiver, token_id); - -// testing::set_caller_address(owner); -// ERC721Impl::approve(ref state, OPERATOR(), token_id); -// utils::drop_event(ZERO()); - -// testing::set_caller_address(OPERATOR()); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, receiver, token_id, DATA(true)); -// assert_event_transfer(owner, receiver, token_id); - -// assert_state_after_transfer(@state,owner, receiver, token_id); -// } - -// #[test] -// fn test_safe_transfer_from_approved_for_all() { -// let mut state = setup(); -// let receiver = setup_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, receiver, token_id); - -// testing::set_caller_address(owner); -// ERC721Impl::set_approval_for_all(ref state, OPERATOR(), true); -// utils::drop_event(ZERO()); - -// testing::set_caller_address(OPERATOR()); -// ERC721Impl::safe_transfer_from(ref state, owner, receiver, token_id, DATA(true)); -// assert_event_transfer(owner, receiver, token_id); - -// assert_state_after_transfer(@state,owner, receiver, token_id); -// } - -// #[test] -// fn test_safeTransferFrom_approved_for_all() { -// let mut state = setup(); -// let receiver = setup_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, receiver, token_id); - -// testing::set_caller_address(owner); -// ERC721Impl::set_approval_for_all(ref state, OPERATOR(), true); -// utils::drop_event(ZERO()); - -// testing::set_caller_address(OPERATOR()); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, receiver, token_id, DATA(true)); -// assert_event_transfer(owner, receiver, token_id); - -// assert_state_after_transfer(@state,owner, receiver, token_id); -// } - -// #[test] -// fn test_safe_transfer_from_approved_for_all_camel() { -// let mut state = setup(); -// let receiver = setup_camel_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, receiver, token_id); - -// testing::set_caller_address(owner); -// ERC721Impl::set_approval_for_all(ref state, OPERATOR(), true); -// utils::drop_event(ZERO()); - -// testing::set_caller_address(OPERATOR()); -// ERC721Impl::safe_transfer_from(ref state, owner, receiver, token_id, DATA(true)); -// assert_event_transfer(owner, receiver, token_id); - -// assert_state_after_transfer(@state,owner, receiver, token_id); -// } - -// #[test] -// fn test_safeTransferFrom_approved_for_all_camel() { -// let mut state = setup(); -// let receiver = setup_camel_receiver(); -// let token_id = TOKEN_ID; -// let owner = OWNER(); - -// assert_state_before_transfer(@state,owner, receiver, token_id); - -// testing::set_caller_address(owner); -// ERC721Impl::set_approval_for_all(ref state, OPERATOR(), true); -// utils::drop_event(ZERO()); - -// testing::set_caller_address(OPERATOR()); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, owner, receiver, token_id, DATA(true)); -// assert_event_transfer(owner, receiver, token_id); - -// assert_state_after_transfer(@state,owner, receiver, token_id); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: unauthorized caller',))] -// fn test_safe_transfer_from_unauthorized() { -// let mut state = setup(); -// testing::set_caller_address(OTHER()); -// ERC721Impl::safe_transfer_from(ref state, OWNER(), RECIPIENT(), TOKEN_ID, DATA(true)); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: unauthorized caller',))] -// fn test_safeTransferFrom_unauthorized() { -// let mut state = setup(); -// testing::set_caller_address(OTHER()); -// ERC721CamelOnlyImpl::safeTransferFrom(ref state, OWNER(), RECIPIENT(), TOKEN_ID, DATA(true)); -// } - -// -// _transfer -// - -#[test] -fn test__transfer() { - let mut state = setup(); - let token_id = TOKEN_ID; - let owner = OWNER(); - let recipient = RECIPIENT(); - - assert_state_before_transfer(@state, owner, recipient, token_id); - - InternalImpl::_transfer(ref state, owner, recipient, token_id); - assert_event_transfer(owner, recipient, token_id); - - assert_state_after_transfer(@state, owner, recipient, token_id); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid token ID',))] -fn test__transfer_nonexistent() { - let (_world, mut state) = STATE(); - InternalImpl::_transfer(ref state, ZERO(), RECIPIENT(), TOKEN_ID); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid receiver',))] -fn test__transfer_to_zero() { - let mut state = setup(); - InternalImpl::_transfer(ref state, OWNER(), ZERO(), TOKEN_ID); -} - -#[test] -#[should_panic(expected: ('ERC721: wrong sender',))] -fn test__transfer_from_invalid_owner() { - let mut state = setup(); - InternalImpl::_transfer(ref state, RECIPIENT(), OWNER(), TOKEN_ID); -} - -// -// _mint -// - -#[test] -fn test__mint() { - let (_world, mut state) = STATE(); - let recipient = RECIPIENT(); - let token_id = TOKEN_ID; - - assert_state_before_mint(@state, recipient); - InternalImpl::_mint(ref state, recipient, TOKEN_ID); - assert_event_transfer(ZERO(), recipient, token_id); - - assert_state_after_mint(@state, recipient, token_id); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid receiver',))] -fn test__mint_to_zero() { - let (_world, mut state) = STATE(); - InternalImpl::_mint(ref state, ZERO(), TOKEN_ID); -} - -#[test] -#[should_panic(expected: ('ERC721: token already minted',))] -fn test__mint_already_exist() { - let mut state = setup(); - InternalImpl::_mint(ref state, RECIPIENT(), TOKEN_ID); -} - -// // -// // _safe_mint -// // - -// #[test] -// fn test__safe_mint_to_receiver() { -// let mut state = STATE(); -// let recipient = setup_receiver(); -// let token_id = TOKEN_ID; - -// assert_state_before_mint(@state,recipient); -// InternalImpl::_safe_mint(ref state, recipient, token_id, DATA(true)); -// assert_event_transfer(ZERO(), recipient, token_id); - -// assert_state_after_mint(@state,recipient, token_id); -// } - -// #[test] -// fn test__safe_mint_to_receiver_camel() { -// let mut state = STATE(); -// let recipient = setup_camel_receiver(); -// let token_id = TOKEN_ID; - -// assert_state_before_mint(@state,recipient); -// InternalImpl::_safe_mint(ref state, recipient, token_id, DATA(true)); -// assert_event_transfer(ZERO(), recipient, token_id); - -// assert_state_after_mint(@state,recipient, token_id); -// } - -// #[test] -// fn test__safe_mint_to_account() { -// let mut state = STATE(); -// let account = setup_account(); -// let token_id = TOKEN_ID; - -// assert_state_before_mint(@state,account); -// InternalImpl::_safe_mint(ref state, account, token_id, DATA(true)); -// assert_event_transfer(ZERO(), account, token_id); - -// assert_state_after_mint(@state,account, token_id); -// } - -// #[test] -// fn test__safe_mint_to_account_camel() { -// let mut state = STATE(); -// let account = setup_camel_account(); -// let token_id = TOKEN_ID; - -// assert_state_before_mint(@state,account); -// InternalImpl::_safe_mint(ref state, account, token_id, DATA(true)); -// assert_event_transfer(ZERO(), account, token_id); - -// assert_state_after_mint(@state,account, token_id); -// } - -// #[test] -// #[should_panic(expected: ('ENTRYPOINT_NOT_FOUND',))] -// fn test__safe_mint_to_non_receiver() { -// let mut state = STATE(); -// let recipient = utils::deploy(NonImplementingMock::TEST_CLASS_HASH, array![]); -// let token_id = TOKEN_ID; - -// assert_state_before_mint(@state,recipient); -// InternalImpl::_safe_mint(ref state, recipient, token_id, DATA(true)); -// assert_state_after_mint(@state,recipient, token_id); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: safe mint failed',))] -// fn test__safe_mint_to_receiver_failure() { -// let mut state = STATE(); -// let recipient = setup_receiver(); -// let token_id = TOKEN_ID; - -// assert_state_before_mint(@state,recipient); -// InternalImpl::_safe_mint(ref state, recipient, token_id, DATA(false)); -// assert_state_after_mint(@state,recipient, token_id); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: safe mint failed',))] -// fn test__safe_mint_to_receiver_failure_camel() { -// let mut state = STATE(); -// let recipient = setup_camel_receiver(); -// let token_id = TOKEN_ID; - -// assert_state_before_mint(@state,recipient); -// InternalImpl::_safe_mint(ref state, recipient, token_id, DATA(false)); -// assert_state_after_mint(@state,recipient, token_id); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: invalid receiver',))] -// fn test__safe_mint_to_zero() { -// let mut state = STATE(); -// InternalImpl::_safe_mint(ref state, ZERO(), TOKEN_ID, DATA(true)); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: token already minted',))] -// fn test__safe_mint_already_exist() { -// let mut state = setup(); -// InternalImpl::_safe_mint(ref state, RECIPIENT(), TOKEN_ID, DATA(true)); -// } - -// -// _burn -// - -#[test] -fn test__burn() { - let mut state = setup(); - - InternalImpl::_approve(ref state, OTHER(), TOKEN_ID); - utils::drop_event(ZERO()); - - assert(ERC721Impl::owner_of(@state, TOKEN_ID) == OWNER(), 'Ownership before'); - assert(ERC721Impl::balance_of(@state, OWNER()) == 1, 'Balance of owner before'); - assert(ERC721Impl::get_approved(@state, TOKEN_ID) == OTHER(), 'Approval before'); - - InternalImpl::_burn(ref state, TOKEN_ID); - assert_event_transfer(OWNER(), ZERO(), TOKEN_ID); - - assert( - WorldInteractionsImpl::get_owner_of(@state, TOKEN_ID).address == ZERO(), 'Ownership after' - ); - assert(ERC721Impl::balance_of(@state, OWNER()) == 0, 'Balance of owner after'); - assert( - WorldInteractionsImpl::get_token_approval(@state, TOKEN_ID).address == ZERO(), - 'Approval after' - ); -} - -#[test] -#[should_panic(expected: ('ERC721: invalid token ID',))] -fn test__burn_nonexistent() { - let (mut _world, mut state) = STATE(); - InternalImpl::_burn(ref state, TOKEN_ID); -} - -// -// _set_token_uri -// - -// #[test] -// fn test__set_token_uri() { -// let mut state = setup(); - -// assert(ERC721MetadataImpl::token_uri(@state, TOKEN_ID) == 0, 'URI should be 0'); -// InternalImpl::_set_token_uri(ref state, TOKEN_ID, URI); -// assert(ERC721MetadataImpl::token_uri(@state, TOKEN_ID) == URI, 'URI should be set'); -// } - -// #[test] -// #[should_panic(expected: ('ERC721: invalid token ID',))] -// fn test__set_token_uri_nonexistent() { -// let mut state = STATE(); -// InternalImpl::_set_token_uri(ref state, TOKEN_ID, URI); -// } - -// -// Helpers -// - -fn assert_state_before_transfer( - state: @ERC721::ContractState, - owner: ContractAddress, - recipient: ContractAddress, - token_id: u256 -) { - assert(ERC721Impl::owner_of(state, token_id) == owner, 'Ownership before'); - assert(ERC721Impl::balance_of(state, owner) == 1, 'Balance of owner before'); - assert(ERC721Impl::balance_of(state, recipient) == 0, 'Balance of recipient before'); -} - -fn assert_state_after_transfer( - state: @ERC721::ContractState, - owner: ContractAddress, - recipient: ContractAddress, - token_id: u256 -) { - assert(ERC721Impl::owner_of(state, token_id) == recipient, 'Ownership after'); - assert(ERC721Impl::balance_of(state, owner) == 0, 'Balance of owner after'); - assert(ERC721Impl::balance_of(state, recipient) == 1, 'Balance of recipient after'); - assert(ERC721Impl::get_approved(state, token_id) == ZERO(), 'Approval not implicitly reset'); -} - -fn assert_state_before_mint(state: @ERC721::ContractState, recipient: ContractAddress) { - assert(ERC721Impl::balance_of(state, recipient) == 0, 'Balance of recipient before'); -} - -fn assert_state_after_mint( - state: @ERC721::ContractState, recipient: ContractAddress, token_id: u256 -) { - assert(ERC721Impl::owner_of(state, token_id) == recipient, 'Ownership after'); - assert(ERC721Impl::balance_of(state, recipient) == 1, 'Balance of recipient after'); - assert(ERC721Impl::get_approved(state, token_id) == ZERO(), 'Approval implicitly set'); -} - -fn assert_event_approval_for_all( - owner: ContractAddress, operator: ContractAddress, approved: bool -) { - let event = utils::pop_log::(ZERO()).unwrap(); - assert(event.owner == owner, 'Invalid `owner`'); - assert(event.operator == operator, 'Invalid `operator`'); - assert(event.approved == approved, 'Invalid `approved`'); - utils::assert_no_events_left(ZERO()); -} - -fn assert_event_approval(owner: ContractAddress, approved: ContractAddress, token_id: u256) { - let event = utils::pop_log::(ZERO()).unwrap(); - assert(event.owner == owner, 'Invalid `owner`'); - assert(event.approved == approved, 'Invalid `approved`'); - assert(event.token_id == token_id, 'Invalid `token_id`'); - utils::assert_no_events_left(ZERO()); -} - -fn assert_event_transfer(from: ContractAddress, to: ContractAddress, token_id: u256) { - let event = utils::pop_log::(ZERO()).unwrap(); - assert(event.from == from, 'Invalid `from`'); - assert(event.to == to, 'Invalid `to`'); - assert(event.token_id == token_id, 'Invalid `token_id`'); - utils::assert_no_events_left(ZERO()); -} diff --git a/src/models/game.cairo b/src/models/game.cairo deleted file mode 100644 index cf7f661..0000000 --- a/src/models/game.cairo +++ /dev/null @@ -1,100 +0,0 @@ -use starknet::ContractAddress; -use super::game_player::GamePlayer; - -#[derive(Serde, Copy, Drop, Introspect, PartialEq)] -pub enum GameStatus { - Pending: (), - InProgress: (), - Finished: (), -} - -#[derive(Copy, Drop, Serde)] -#[dojo::model] -pub struct Game { - #[key] - pub game_id: u128, - pub player_1: ContractAddress, - pub player_2: ContractAddress, - pub player_3: ContractAddress, - pub player_4: ContractAddress, - pub status: GameStatus, - pub is_private: bool, -} - -pub trait GameTrait { - fn new(game_id: u128, player_1: ContractAddress) -> Game; - fn join_game(ref self: Game, player_2: GamePlayer); -} - -pub impl GameImpl of GameTrait { - // create the game - fn new(game_id: u128, player_1: ContractAddress) -> Game { - let game: Game = Game { - game_id: game_id, - player_1: player_1, - player_2: core::num::traits::Zero::::zero(), - player_3: core::num::traits::Zero::::zero(), - player_4: core::num::traits::Zero::::zero(), - status: GameStatus::InProgress, - is_private: false, - }; - game - } - - // player two can join the game - fn join_game(ref self: Game, player_2: GamePlayer) { - self.player_2 = player_2.address; - } -} - -#[cfg(test)] -mod tests { - use bytebeasts::{models::{game_player::GamePlayer, game::GameStatus, game::GameTrait}}; - use starknet::{ContractAddress, get_caller_address, SyscallResultTrait}; - - #[test] - fn test_game_creation() { - // Crear una direcciรณn de contrato de prueba - let player_1_address = get_caller_address(); - let game_id = 98765432101234567890123456789012_u128; - - // Crear el juego usando el mรฉtodo `new` - let game = GameTrait::new(game_id, player_1_address); - - // Verificar que los campos se inicializan correctamente - assert_eq!(game.game_id, game_id, "El game_id deberia ser el esperado"); - assert_eq!(game.player_1, player_1_address, "El player_1 deberia ser la direccion del jugador 1"); - assert_eq!(game.is_private, false, "El juego deberia ser publico por defecto"); - } - - #[test] - fn test_player_2_joins_game() { - // Crear direcciones de contrato de prueba - let player_1_address = get_caller_address(); - let player_2_address = get_caller_address(); - let game_id = 98765432101234567890123456789012_u128; - - // Crear un juego con el jugador 1 - let mut game = GameTrait::new(game_id, player_1_address); - - // Crear un jugador 2 con la direcciรณn de contrato de prueba - let player_2 = GamePlayer { - address: player_2_address, - game_id, - beast_1: 0, - beast_2: 0, - beast_3: 0, - beast_4: 0, - bag_id: 0, - active_mount: 0, - mounts: ArrayTrait::new(), - position: ArrayTrait::new(), - }; - - // Hacer que el jugador 2 se una al juego - game.join_game(player_2); - - // Verificar que player_2 se haya unido al juego correctamente - assert_eq!(game.player_2, player_2_address, "El player_2 deberia ser la direccion del jugador 2"); - } -} diff --git a/src/models/game_id.cairo b/src/models/game_id.cairo deleted file mode 100644 index beec4bb..0000000 --- a/src/models/game_id.cairo +++ /dev/null @@ -1,53 +0,0 @@ -#[derive(Copy, Drop, Serde)] -#[dojo::model] -pub struct GameId { - #[key] - pub id: u32, - pub game_id: u128 -} - -#[cfg(test)] -mod tests { - use super::GameId; - - #[test] - fn test_game_id_initialization() { - // Crear una instancia de GameId - let game_id = GameId { id: 1, game_id: 12345678901234567890123456789012 }; - - // Verificar que los valores se inicializan correctamente - assert_eq!(game_id.id, 1, "El valor de id deberia ser 1"); - assert_eq!(game_id.game_id, 12345678901234567890123456789012, "El valor de game_id deberia ser el esperado"); - } - - #[test] - fn test_game_id_equality() { - // Crear dos instancias de GameId con los mismos valores - let game_id1 = GameId { id: 2, game_id: 98765432109876543210987654321098 }; - let game_id2 = GameId { id: 2, game_id: 98765432109876543210987654321098 }; - - // Verificar que las instancias con los mismos valores son iguales - assert_eq!(game_id1.id, game_id2.id, "Los valores de id deberian ser iguales"); - assert_eq!(game_id1.game_id, game_id2.game_id, "Los valores de game_id deberian ser iguales"); - } - - #[test] - fn test_game_id_copy() { - // Verificar que la estructura puede copiarse correctamente - let game_id1 = GameId { id: 3, game_id: 11111111111111111111111111111111 }; - let game_id2 = game_id1; // Como la estructura implementa `Copy`, esto deberรญa funcionar - - assert_eq!(game_id2.id, 3, "El valor de id en game_id2 deberia ser 3"); - assert_eq!(game_id2.game_id, 11111111111111111111111111111111, "El valor de game_id en game_id2 deberia ser el esperado"); - } - - #[test] - fn test_game_id_invalid() { - // Crear una instancia con un valor de id inesperado - let game_id = GameId { id: 0, game_id: 12345678901234567890123456789012 }; - - // Verificar que no cumple ciertas condiciones (puedes adaptar segรบn la lรณgica de tu aplicaciรณn) - assert_ne!(game_id.id, 1, "El valor de id no deberia ser 1"); - assert_eq!(game_id.game_id, 12345678901234567890123456789012, "El valor de game_id deberia ser el esperado"); - } -} diff --git a/src/models/game_player.cairo b/src/models/game_player.cairo deleted file mode 100644 index 249ca1a..0000000 --- a/src/models/game_player.cairo +++ /dev/null @@ -1,71 +0,0 @@ -use starknet::ContractAddress; - -#[derive(Drop, Serde, Debug)] -#[dojo::model] -pub struct GamePlayer { - #[key] - pub address: ContractAddress, - #[key] - pub game_id: u128, - pub beast_1: u8, - pub beast_2: u8, - pub beast_3: u8, - pub beast_4: u8, - pub bag_id: u8, - pub active_mount: u8, - pub mounts: Array, - pub position: Array -} - -pub trait GamePlayerTrait { - fn new(game_id: u128, address: ContractAddress) -> GamePlayer; -} - -impl GamePlayerImpl of GamePlayerTrait { - // logic to create an instance of a game player - fn new(game_id: u128, address: ContractAddress) -> GamePlayer { - let game_player = GamePlayer { - address: address, - game_id: game_id, - beast_1: 0_u8, - beast_2: 0_u8, - beast_3: 0_u8, - beast_4: 0_u8, - bag_id: 0_u8, - active_mount: 0_u8, - mounts: ArrayTrait::new(), - position: ArrayTrait::new(), - }; - game_player - } -} - -#[cfg(test)] -mod tests { - use bytebeasts::{models::{game_player::GamePlayer, game_player::GamePlayerTrait}}; - use starknet::{ContractAddress, get_caller_address, SyscallResultTrait}; - - #[test] - fn test_game_player_initialization() { - // Crear una direcciรณn de contrato de prueba - let address = get_caller_address(); - let game_id = 98765432101234567890123456789012_u128; - - // Crear un jugador usando el mรฉtodo `new` - let mut game_player = GamePlayerTrait::new(game_id, address); - - // Verificar que los campos se inicializan correctamente - assert_eq!(game_player.address, address, "La direccion deberia ser la esperada"); - assert_eq!(game_player.game_id, game_id, "El game_id deberia ser el esperado"); - assert_eq!(game_player.beast_1, 0_u8, "El beast_1 deberia inicializarse en 0"); - assert_eq!(game_player.beast_2, 0_u8, "El beast_2 deberia inicializarse en 0"); - assert_eq!(game_player.beast_3, 0_u8, "El beast_3 deberia inicializarse en 0"); - assert_eq!(game_player.beast_4, 0_u8, "El beast_4 deberia inicializarse en 0"); - assert_eq!(game_player.bag_id, 0_u8, "El bag_id deberia inicializarse en 0"); - assert_eq!(game_player.active_mount, 0_u8, "El active_mount deberia inicializarse en 0"); - - // Verificar que los arrays de mounts y position estรฉn vacรญos al inicio - assert!(game_player.mounts.is_empty(), "El array de mounts deberia estar vacio"); - assert!(game_player.position.is_empty(), "El array de position deberia estar vacio"); - } -} diff --git a/src/models/mission_status.cairo b/src/models/mission_status.cairo deleted file mode 100644 index 1e5fa79..0000000 --- a/src/models/mission_status.cairo +++ /dev/null @@ -1,38 +0,0 @@ -#[derive(Serde, Copy, Drop, Introspect)] -pub enum MissionStatus { - NotStarted, - InProgress, - Completed, - Failed, -} - -impl MissionStatusIntoFelt252 of Into { - fn into(self: MissionStatus) -> felt252 { - match self { - MissionStatus::NotStarted => 0, - MissionStatus::InProgress => 1, - MissionStatus::Completed => 2, - MissionStatus::Failed => 3, - } - } -} - -#[cfg(test)] -mod tests { - use super::{MissionStatus, MissionStatusIntoFelt252}; - - #[test] - fn test_mission_status_into_felt252() { - // Probar la conversiรณn de cada estado de MissionStatus a felt252 - - let not_started = MissionStatus::NotStarted; - let in_progress = MissionStatus::InProgress; - let completed = MissionStatus::Completed; - let failed = MissionStatus::Failed; - - assert_eq!(not_started.into(), 0, "MissionStatus::NotStarted deberia convertirse a 0"); - assert_eq!(in_progress.into(), 1, "MissionStatus::InProgress deberia convertirse a 1"); - assert_eq!(completed.into(), 2, "MissionStatus::Completed deberia convertirse a 2"); - assert_eq!(failed.into(), 3, "MissionStatus::Failed deberia convertirse a 3"); - } -} diff --git a/src/models/mt.cairo b/src/models/mt.cairo deleted file mode 100644 index 1e3b79d..0000000 --- a/src/models/mt.cairo +++ /dev/null @@ -1,32 +0,0 @@ -use super::world_elements::WorldElements; - -#[derive(Copy, Drop, Serde)] -#[dojo::model] -pub struct Mt { - #[key] - pub mt_id: u32, - pub mt_name: felt252, - pub mt_type: WorldElements, - pub mt_power: u32, - pub mt_accuracy: u32, -} - -#[cfg(test)] -mod tests { - use bytebeasts::{models::{mt::Mt, world_elements::WorldElements},}; - - #[test] - fn test_mt_initialization() { - let mt = Mt { - mt_id: 1, - mt_name: 0, // Assume mt_name is felt252 type - mt_type: WorldElements::Light, - mt_power: 75, - mt_accuracy: 90, - }; - - assert_eq!(mt.mt_id, 1, "MT ID should be 1"); - assert_eq!(mt.mt_power, 75, "MT power should be 75"); - assert_eq!(mt.mt_accuracy, 90, "MT accuracy should be 90"); - } -} diff --git a/src/models/npc.cairo b/src/models/npc.cairo deleted file mode 100644 index 4507b3c..0000000 --- a/src/models/npc.cairo +++ /dev/null @@ -1,90 +0,0 @@ -use super::role::Role; -use super::coordinates::Coordinates; -use super::mission_status::MissionStatus; -use super::potion::Potion; - -use array::ArrayTrait; - -#[derive(Drop, Serde)] -#[dojo::model] -pub struct NPC { - #[key] - pub npc_id: u32, // Unique identifier for the NPC - pub npc_name: felt252, // Name of the NPC - pub npc_description: felt252, // Description of the NPC - pub npc_role: Role, // Role of the NPC, defined by the Role enum - pub dialogue: ByteArray, // Default dialogue for the NPC - pub is_active: bool, // Whether the NPC is currently active in the game - pub location: Coordinates, // Fixed location of the NPC on the map - pub importance_level: u8, // Level of importance of the NPC in the game - pub mission_status: MissionStatus, // Status of the mission associated with the NPC - pub reward: u16, // Fixed reward given by the NPC - pub experience_points: u16, // Experience points given by the NPC - pub potions: Array, // Items held by the NPC -} - - -#[cfg(test)] -mod tests { - use bytebeasts::{ - models::{role::Role, coordinates::Coordinates, mission_status::MissionStatus, npc::NPC, potion::Potion}, - }; - use array::ArrayTrait; - - #[test] - fn test_npc_creation() { - let mut npc = NPC { - npc_id: 1, - npc_name: 'Gandalf', - npc_description: 'A wise old wizard', - npc_role: Role::Guide, - dialogue: "Welcome to Middle-earth!", - is_active: true, - location: Coordinates { x: 100, y: 200 }, - importance_level: 5, - mission_status: MissionStatus::NotStarted, - reward: 50, - experience_points: 100, - potions: ArrayTrait::new(), - }; - let potion = Potion { - potion_id: 1, - potion_name: 'Restore everything', - potion_effect: 50, - }; - - npc.potions.append(potion); - - assert_eq!(npc.npc_id, 1); - assert_eq!(npc.npc_name, 'Gandalf'); - assert_eq!(npc.npc_description, 'A wise old wizard'); - assert_eq!(npc.npc_role.into(), 2); // Role::Guide -> 2 - assert!(npc.is_active); - assert_eq!(npc.location.x, 100); - assert_eq!(npc.location.y, 200); - assert_eq!(npc.importance_level, 5); - assert_eq!(npc.mission_status.into(), 0); // MissionStatus::NotStarted -> 0 - assert_eq!(npc.reward, 50); - assert_eq!(npc.experience_points, 100); - assert_eq!(npc.potions.len(), 1, "NPC should have 1 potion"); - assert_eq!(npc.potions.pop_front().unwrap().potion_id, 1, "NPC potion ID should be 1"); - } - - #[test] - fn test_npc_role_conversion() { - let role_guide: felt252 = Role::Guide.into(); - assert_eq!(role_guide, 2); - - let role_vendor: felt252 = Role::Vendor.into(); - assert_eq!(role_vendor, 0); - } - - #[test] - fn test_mission_status_conversion() { - let status_in_progress: felt252 = MissionStatus::InProgress.into(); - assert_eq!(status_in_progress, 1); - - let status_completed: felt252 = MissionStatus::Completed.into(); - assert_eq!(status_completed, 2); - } -} diff --git a/src/models/player.cairo b/src/models/player.cairo deleted file mode 100644 index 4d5e875..0000000 --- a/src/models/player.cairo +++ /dev/null @@ -1,33 +0,0 @@ -#[derive(Copy, Drop, Serde)] -#[dojo::model] -struct Player { - #[key] - pub player_id: u32, - pub player_name: felt252, - pub beast_1: u32, - pub beast_2: u32, - pub beast_3: u32, - pub beast_4: u32, - pub potions: u32, -} - -#[cfg(test)] -mod tests { - use bytebeasts::{models::{player::Player},}; - - #[test] - fn test_player_initialization() { - let player = Player { - player_id: 1, - player_name: 'Hero', - beast_1: 1, - beast_2: 2, - beast_3: 3, - beast_4: 4, - potions: 5, - }; - - assert_eq!(player.player_name, 'Hero', "Player name should be 'Hero'"); - assert_eq!(player.potions, 5, "Player should have 5 potions"); - } -} diff --git a/src/models/position.cairo b/src/models/position.cairo deleted file mode 100644 index fbf1bf6..0000000 --- a/src/models/position.cairo +++ /dev/null @@ -1,36 +0,0 @@ -use super::coordinates::Coordinates; -use super::player::Player; - -#[derive(Drop, Copy, Serde)] -#[dojo::model] -struct Position { - #[key] - player: Player, - coordinates: Coordinates, -} - -#[cfg(test)] -mod tests { - use bytebeasts::{models::{position::Position, coordinates::Coordinates, player::Player},}; - - #[test] - fn test_position_initialization() { - let player = Player { - player_id: 1, - player_name: 'Hero', - beast_1: 1, - beast_2: 2, - beast_3: 3, - beast_4: 4, - potions: 5, - }; - - let coordinates = Coordinates { x: 10, y: 10, }; - - let position = Position { player: player, coordinates: coordinates }; - - assert_eq!(position.player.player_id, 1, "Player ID should be 1"); - assert_eq!(position.coordinates.x, 10, "Player X coordinate should be 10"); - assert_eq!(position.coordinates.y, 10, "Player Y coordinate should be 10"); - } -} diff --git a/src/models/potion.cairo b/src/models/potion.cairo deleted file mode 100644 index 4b8505a..0000000 --- a/src/models/potion.cairo +++ /dev/null @@ -1,25 +0,0 @@ -#[derive(Copy, Drop, Serde)] -#[dojo::model] -struct Potion { - #[key] - pub potion_id: u32, - pub potion_name: felt252, - pub potion_effect: u32, -} - -#[cfg(test)] -mod tests { - use bytebeasts::{models::{potion::Potion},}; - - #[test] - fn test_potion_initialization() { - let potion = Potion { - potion_id: 1, - potion_name: 0, // Assume potion_name is felt252 type - potion_effect: 50, // Heals 50 HP - }; - - assert_eq!(potion.potion_id, 1, "Potion ID should be 1"); - assert_eq!(potion.potion_effect, 50, "Potion effect should be 50"); - } -} diff --git a/src/models/role.cairo b/src/models/role.cairo deleted file mode 100644 index 63c3fd7..0000000 --- a/src/models/role.cairo +++ /dev/null @@ -1,18 +0,0 @@ -#[derive(Serde, Copy, Drop, Introspect)] -pub enum Role { - Vendor, - Trainer, - Guide, - QuestGiver, -} - -impl RoleIntoFelt252 of Into { - fn into(self: Role) -> felt252 { - match self { - Role::Vendor => 0, - Role::Trainer => 1, - Role::Guide => 2, - Role::QuestGiver => 3, - } - } -} diff --git a/src/models/tournament.cairo b/src/models/tournament.cairo deleted file mode 100644 index 47b6118..0000000 --- a/src/models/tournament.cairo +++ /dev/null @@ -1,55 +0,0 @@ -#[derive(Serde, Copy, Drop, Introspect, PartialEq, Debug)] -pub enum TournamentStatus { - Pending, - Ongoing, - Completed, -} - - -#[derive(Drop, Serde)] -#[dojo::model] -pub struct Tournament { - #[key] - pub tournament_id: u32, - pub name: felt252, - pub status: TournamentStatus, - pub entry_fee: u32, - pub max_participants: u32, - pub current_participants: Array, - pub prize_pool: u32, -} - - -#[cfg(test)] -mod tests { - use bytebeasts::{ - models::{tournament::Tournament, tournament::TournamentStatus} - }; - - - #[test] - fn test_tournament_initialization() { - let tournament = Tournament { - tournament_id: 1, - name: 'gersonwashere', - status: TournamentStatus::Pending, - entry_fee: 1, - max_participants: 2, - current_participants: array![1], - prize_pool: 1, - }; - - assert_eq!(tournament.tournament_id, 1, "Tournament ID should be 1"); - assert_eq!(tournament.name, 'gersonwashere', "Tournament name should be gersonwashere"); - assert_eq!( - tournament.status, TournamentStatus::Pending, "Tournament status should be pending" - ); - assert_eq!(tournament.entry_fee, 1, "Tournament entry fee should be 1"); - assert_eq!(tournament.max_participants, 2, "Tournament max participants should be 2"); - assert_eq!( - tournament.current_participants.len(), 1, "Tournament current participants should be 1" - ); - assert_eq!(tournament.prize_pool, 1, "Tournament prize pool should be 1"); - } -} - diff --git a/src/models/world_elements.cairo b/src/models/world_elements.cairo deleted file mode 100644 index f9a843c..0000000 --- a/src/models/world_elements.cairo +++ /dev/null @@ -1,42 +0,0 @@ -#[derive(Serde, Copy, Drop, Introspect)] -pub enum WorldElements { - Crystal, - Draconic, - Shadow, - Light, - Titanium, -} - -impl WorldElementsIntoFelt252 of Into { - fn into(self: WorldElements) -> felt252 { - match self { - WorldElements::Crystal => 0, - WorldElements::Draconic => 1, - WorldElements::Shadow => 2, - WorldElements::Light => 3, - WorldElements::Titanium => 4, - } - } -} - -#[cfg(test)] -mod tests { - use super::WorldElements; - - #[test] - fn test_world_elements_to_felt252() { - // Verificar que cada variante de WorldElements se convierta correctamente en el valor felt252 esperado - let crystal: felt252 = WorldElements::Crystal.into(); - let draconic: felt252 = WorldElements::Draconic.into(); - let shadow: felt252 = WorldElements::Shadow.into(); - let light: felt252 = WorldElements::Light.into(); - let titanium: felt252 = WorldElements::Titanium.into(); - - // Comprobar los valores - assert_eq!(crystal, 0, "Crystal deberia convertirse a 0"); - assert_eq!(draconic, 1, "Draconic deberia convertirse a 1"); - assert_eq!(shadow, 2, "Shadow deberia convertirse a 2"); - assert_eq!(light, 3, "Light deberia convertirse a 3"); - assert_eq!(titanium, 4, "Titanium deberia convertirse a 4"); - } -} diff --git a/src/systems/bag.cairo b/src/systems/bag.cairo deleted file mode 100644 index c141676..0000000 --- a/src/systems/bag.cairo +++ /dev/null @@ -1,49 +0,0 @@ -use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; -use bytebeasts::{ - models::{player::Player, potion::Potion, bag::Bag}, -}; - -#[dojo::interface] -trait IBagAction { - fn init_bag(ref world: IWorldDispatcher, bag_id: u32, player_id: u32); - fn add_item(ref world: IWorldDispatcher, player_id: u32, bag_id: u32, potion: Potion); - fn take_out_item(ref world: IWorldDispatcher, player_id: u32, bag_id: u32) -> Potion; -} - -#[dojo::contract] -mod bag_system { - use super::IBagAction; - use array::ArrayTrait; - use bytebeasts::{ - models::{player::Player, potion::Potion, bag::Bag}, - }; - - const MAX_BAG_SIZE: usize = 10; - - #[abi(embed_v0)] - impl BagActionImpl of IBagAction { - fn init_bag(ref world: IWorldDispatcher, bag_id: u32, player_id: u32) { - let bag = Bag { - bag_id: bag_id, - player_id: player_id, - max_capacity: MAX_BAG_SIZE, - potions: ArrayTrait::new(), - }; - - set!(world, (bag)) - } - - fn add_item(ref world: IWorldDispatcher, player_id: u32, bag_id: u32, potion: Potion) { - let mut bag = get!(world, (bag_id, player_id), (Bag)); - bag.potions.append(potion); - set!(world, (bag)); - } - - fn take_out_item(ref world: IWorldDispatcher, player_id: u32, bag_id: u32) -> Potion { - let mut bag = get!(world, (bag_id, player_id), (Bag)); - let potion = bag.potions.pop_front().unwrap(); - set!(world, (bag)); - return potion; - } - } -} \ No newline at end of file diff --git a/src/systems/battle.cairo b/src/systems/battle.cairo deleted file mode 100644 index a57cdb1..0000000 --- a/src/systems/battle.cairo +++ /dev/null @@ -1,216 +0,0 @@ -// Required modules and models for the battle system. -use bytebeasts::{ - models::{beast::Beast, mt::Mt, player::Player, battle::Battle, potion::Potion}, -}; - -// Interface defining battle-related actions. -#[dojo::interface] -trait IBattleActions { - // Initializes a battle - fn init_battle(ref world: IWorldDispatcher, player_id: u32, opponent_id: u32) -> u32; - // Checks flee success - fn check_flee_success(player_beast: Beast, opponent_beast: Beast) -> bool; - // Calculates damage - fn calculate_damage(mt: Mt, attacker: Beast, defender: Beast) -> u32; - // Handles opponent's turn - fn opponent_turn(ref world: IWorldDispatcher, battle_id: u32); - // Executes an attack - fn attack(ref world: IWorldDispatcher, battle_id: u32, mt_id: u32); - // Uses a potion - fn use_potion(ref world: IWorldDispatcher, battle_id: u32, potion_id: u32); - // Attempts to flee - fn flee(ref world: IWorldDispatcher, battle_id: u32); -} - -// Contract implementing battle actions. -#[dojo::contract] -mod battle_system { - use super::{IBattleActions}; - use bytebeasts::{ - models::{beast::Beast, mt::Mt, player::Player, battle::Battle, potion::Potion}, - }; - - // Event emitted for battle status updates. - #[derive(Copy, Drop, Serde)] - #[dojo::model] - #[dojo::event] - struct StatusBattle { - #[key] - battle_id: u32, // Battle identifier - message: felt252, // Event message - } - - // Event emitted for player status updates. - #[derive(Copy, Drop, Serde)] - #[dojo::model] - #[dojo::event] - struct Status { - #[key] - player_id: u32, // Player identifier - message: felt252, // Event message - } - - #[abi(embed_v0)] - impl BattleActionsImpl of IBattleActions { - // Initializes a new battle. - fn init_battle(ref world: IWorldDispatcher, player_id: u32, opponent_id: u32) -> u32 { - let player = get!(world, player_id, (Player)); // Fetch player data - let opponent = get!(world, opponent_id, (Player)); // Fetch opponent data - let active_beast_player = get!(world, player.beast_1, (Beast)); // Player's beast - let active_beast_opponent = get!(world, opponent.beast_1, (Beast)); // Opponent's beast - - let battle_created_id = 1; // Hardcoded for now - set!( - world, - (Battle { - battle_id: battle_created_id, - player_id: player_id, - opponent_id: opponent_id, - active_beast_player: active_beast_player.beast_id, - active_beast_opponent: active_beast_opponent.beast_id, - battle_active: 1, - turn: 0, - }) - ); - - let message = 'Battle started'; - emit!(world, (Status { player_id: player_id, message: message })); // Emit player status - - emit!(world, (StatusBattle { battle_id: battle_created_id, message: message })); // Emit battle status - - return battle_created_id; // Return battle ID - } - - // Checks if the player can flee based on beast levels. - fn check_flee_success(player_beast: Beast, opponent_beast: Beast) -> bool { - player_beast.level > opponent_beast.level - } - - // Calculates the damage dealt by an attacker to a defender. - fn calculate_damage(mt: Mt, attacker: Beast, defender: Beast) -> u32 { - let base_damage = mt.mt_power * attacker.attack / defender.defense; - - //TODO: extend with effectivity by type, randomness, etc - let effective_damage = base_damage; - - // TODO: investigate how can we make It random - // let hit_chance = random_felt252() % 100_u32; - - let hit_chance = 80_u32; // Hardcoded for now - if hit_chance > mt.mt_accuracy { - return 0_u32; // Misses if hit chance is greater than accuracy - } - - effective_damage - } - - // Executes the opponent's turn in the battle. - fn opponent_turn(ref world: IWorldDispatcher, battle_id: u32) { - let mut battle = get!(world, battle_id, (Battle)); // Retrieve battle details - - let mut player_beast = get!(world, battle.active_beast_player, (Beast)); - let mut opponent_beast = get!(world, battle.active_beast_opponent, (Beast)); - let opponent_attack = get!(world, opponent_beast.mt1, (Mt)); // Opponent's chosen move - - // Calculate damage dealt by the opponent to the player - let damage = self.calculate_damage(opponent_attack, opponent_beast, player_beast); - if damage >= player_beast.current_hp { - player_beast.current_hp = 0; // Knock out playerโ€™s beast if damage exceeds current HP - } else { - player_beast.current_hp -= damage; // Subtract damage from player's beast HP - } - set!(world, (player_beast)); // Update player's beast in the world - - // Check if the player's beast is knocked out - if player_beast.current_hp <= 0_u32 { - let message = 'Player Beast Knocked Out!'; - emit!(world, (StatusBattle { battle_id, message })); // Emit battle status update - battle.battle_active = 0; // Emit battle status update - set!(world, (battle)); // Update battle status in the world - } - } - - // Executes the player's attack in the battle. - fn attack(ref world: IWorldDispatcher, battle_id: u32, mt_id: u32) { - let mut battle = get!(world, battle_id, (Battle)); // Retrieve battle details - - // Fetch the player's and opponent's active beasts and the chosen move (mt) of the player - let player_beast = get!(world, battle.active_beast_player, (Beast)); - let mut opponent_beast = get!(world, battle.active_beast_opponent, (Beast)); - let mt = get!(world, mt_id, (Mt)); - - // Calculate damage dealt by the player to the opponent - let damage = self.calculate_damage(mt, player_beast, opponent_beast); - - // Apply damage to opponent's beast HP - if damage >= opponent_beast.current_hp { - opponent_beast.current_hp = 0; // Knock out opponentโ€™s beast if damage exceeds current HP - } else { - opponent_beast.current_hp -= damage; // Subtract damage from opponent's beast HP - } - set!(world, (opponent_beast)); // Update opponent's beast in the world - - // Check if the opponent's beast is knocked out - if opponent_beast.current_hp <= 0_u32 { - let message = 'Opponent Beast Knocked Out!'; - emit!(world, (StatusBattle { battle_id, message })); // Emit battle status update - battle.battle_active = 0; // End the battle - set!(world, (battle)); // Update battle status in the world - } else { - let message = 'Attack Performed!'; - emit!(world, (StatusBattle { battle_id, message })); // Emit message indicating the attack was performed - } - - } - - // Allows the player to use a potion on their beast to restore health. - fn use_potion(ref world: IWorldDispatcher, battle_id: u32, potion_id: u32) { - let mut battle = get!(world, battle_id, (Battle)); // Retrieve battle details - - // Fetch the player's active beast and the potion being used - let mut player_beast = get!(world, battle.active_beast_player, (Beast)); - let potion = get!(world, potion_id, (Potion)); - - // Restore health points based on potion's effect without exceeding max HP - if potion.potion_effect <= player_beast.current_hp { - player_beast.current_hp += potion.potion_effect; // Add potion effect to current HP - } - else { - player_beast.current_hp = player_beast.hp; // Cap HP to the beast's max health - } - - set!(world, (player_beast)); // Update the player's beast in the world - player_beast = get!(world, battle.active_beast_player, (Beast)); - - // Emit an event to notify that the potion has been used - let message = 'Item Used!'; - emit!(world, (StatusBattle { battle_id, message })); - } - - // Attempts to flee the battle. Success is determined by the relative levels of the player and opponent beasts. - fn flee(ref world: IWorldDispatcher, battle_id: u32) { - let mut battle = get!(world, battle_id, (Battle)); // Retrieve battle details - - // Fetch both player's and opponent's active beasts - let player_beast = get!(world, battle.active_beast_player, (Beast)); - let opponent_beast = get!(world, battle.active_beast_opponent, (Beast)); - - // Determine if flee attempt is successful based on beast levels - let flee_success = self.check_flee_success(player_beast, opponent_beast); - if flee_success { - battle.battle_active = 0; // Set battle as inactive upon successful flee - set!(world, (battle)); // Update battle status in the world - - // Emit event indicating the player successfully fled the battle - let message = 'Player Fled!'; - emit!(world, (StatusBattle { battle_id, message })); - } else { - // Emit event indicating flee attempt failed - let message = 'Flee failed!'; - emit!(world, (StatusBattle { battle_id, message })); - } - - } - } -} - diff --git a/src/systems/move.cairo b/src/systems/move.cairo deleted file mode 100644 index 3439537..0000000 --- a/src/systems/move.cairo +++ /dev/null @@ -1,33 +0,0 @@ -use bytebeasts::{ - models::{player::Player, coordinates::Coordinates, position::Position}, -}; - -#[dojo::interface] -trait IMoveAction { - fn move(ref world: IWorldDispatcher, player_id: u32, new_x: u32, new_y: u32); -} - -#[dojo::contract] -mod move_action { - use super::IMoveAction; - use starknet::{ContractAddress, get_caller_address}; - use bytebeasts::{ - models::{player::Player, coordinates::Coordinates, position::Position}, - }; - - #[abi(embed_v0)] - impl MoveActionImpl of IMoveAction { - fn move(ref world: IWorldDispatcher, player_id: u32, new_x: u32, new_y: u32) { - let player_from_world = get!(world, player_id, (Player)); - - set!( - world, - ( - Position { - player: player_from_world, coordinates: Coordinates { x: new_x, y: new_y } - }, - ) - ); - } - } -} \ No newline at end of file diff --git a/src/systems/realms.cairo b/src/systems/realms.cairo deleted file mode 100644 index 55e4594..0000000 --- a/src/systems/realms.cairo +++ /dev/null @@ -1,72 +0,0 @@ -use starknet::ContractAddress; -use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; - -use bytebeasts::{models::{ - game_id::GameId, - game::GameStatus, - game::Game, - game::GameTrait, - game_player::GamePlayer, - game_player::GamePlayerTrait -}}; - -#[dojo::interface] -trait IActions { - fn create_initial_game_id(ref world: IWorldDispatcher); - fn create_game(ref world: IWorldDispatcher) -> Game; - fn join_game(ref world: IWorldDispatcher, game_id: u128, player_2_address: ContractAddress); -} - -#[dojo::contract] -mod actions { - use starknet::{ContractAddress, get_caller_address, SyscallResultTrait}; - use starknet::{get_tx_info, get_block_number}; - use bytebeasts::{ - models::{ - game_id::GameId, - game::GameStatus, - game::Game, - game::GameTrait, - game_player::GamePlayer, - game_player::GamePlayerTrait - }, - }; - - use super::IActions; - - #[abi(embed_v0)] - impl ActionsImpl of IActions { - fn create_initial_game_id(ref world: IWorldDispatcher) { - let existing_game_id = get!(world, 1, (GameId)); - if (existing_game_id.game_id > 0) { - panic!("error global game id already created"); - } - let game_id: GameId = GameId { id: 1, game_id: 1 }; - set!(world, (game_id)); - } - - fn create_game(ref world: IWorldDispatcher) -> Game { - let player_1_address = get_caller_address(); - let mut game_id: GameId = get!(world, 1, (GameId)); - let player_1 = GamePlayerTrait::new(game_id.game_id, player_1_address); - let game: Game = GameTrait::new(game_id.game_id, player_1_address); - game_id.game_id += 1; - set!(world, (player_1, game, game_id)); - game - } - - fn join_game( - ref world: IWorldDispatcher, game_id: u128, player_2_address: ContractAddress - ) { - let mut game = get!(world, game_id, (Game)); - assert!( - game.player_2 == core::num::traits::Zero::::zero(), - "player_2 already set" - ); - let player_2 = GamePlayerTrait::new(game.game_id, player_2_address); - game.join_game(player_2); - let player_2 = GamePlayerTrait::new(game.game_id, player_2_address); - set!(world, (player_2, game)); - } - } -} diff --git a/src/systems/spawn.cairo b/src/systems/spawn.cairo deleted file mode 100644 index 352d334..0000000 --- a/src/systems/spawn.cairo +++ /dev/null @@ -1,29 +0,0 @@ -use bytebeasts::{ - models::{player::Player, coordinates::Coordinates, position::Position}, -}; - -#[dojo::interface] -trait ISpawnAction { - fn spawn(ref world: IWorldDispatcher, player_id: u32); -} - -#[dojo::contract] -mod spawn_action { - use super::ISpawnAction; - use starknet::{ContractAddress, get_caller_address}; - use bytebeasts::{ - models::{player::Player, coordinates::Coordinates, position::Position}, - }; - - #[abi(embed_v0)] - impl SpawnActionImpl of ISpawnAction { - fn spawn(ref world: IWorldDispatcher, player_id: u32) { - let player_from_world = get!(world, player_id, (Player)); - - set!( - world, - (Position { player: player_from_world, coordinates: Coordinates { x: 10, y: 10 } },) - ); - } - } -} \ No newline at end of file diff --git a/src/systems/tournament.cairo b/src/systems/tournament.cairo deleted file mode 100644 index 33411d6..0000000 --- a/src/systems/tournament.cairo +++ /dev/null @@ -1,111 +0,0 @@ -use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; -use bytebeasts::{models::{tournament::Tournament, tournament::TournamentStatus},}; - -#[dojo::interface] -trait ITournamentAction { - fn create_tournament( - ref world: IWorldDispatcher, - tournament_id: u32, - name: felt252, - status: TournamentStatus, - entry_fee: u32, - max_participants: u32, - current_participants: Array, - prize_pool: u32 - ); - fn register_player(ref world: IWorldDispatcher, tournament_id: u32, new_player_id: u32); - fn start_tournament(ref world: IWorldDispatcher, tournament_id: u32); - fn complete_tournament(ref world: IWorldDispatcher, tournament_id: u32, player_id: u32); - fn get_tournament(world: @IWorldDispatcher, tournament_id: u32) -> Tournament; -} - - -#[dojo::contract] -mod tournament_system { - use super::ITournamentAction; - use bytebeasts::{ - models::{tournament::Tournament, tournament::TournamentStatus}, - }; - - #[abi(embed_v0)] - impl TournamentActionImpl of ITournamentAction { - fn create_tournament( - ref world: IWorldDispatcher, - tournament_id: u32, - name: felt252, - status: TournamentStatus, - entry_fee: u32, - max_participants: u32, - current_participants: Array, - prize_pool: u32 - ) { - let tournament = Tournament { - tournament_id: tournament_id, - name: name, - status: status, - entry_fee: entry_fee, - max_participants: max_participants, - current_participants: current_participants, - prize_pool: prize_pool - }; - set!(world, (tournament)) - } - - fn register_player(ref world: IWorldDispatcher, tournament_id: u32, new_player_id: u32) { - let mut tournament = get!(world, tournament_id, (Tournament)); - - assert!(tournament.status == TournamentStatus::Pending, "Tournament not open for registration"); - - assert!( - tournament.current_participants.len() < tournament.max_participants.try_into().unwrap(), - "Tournament is full" - ); - - tournament.current_participants.append(new_player_id); - - set!(world, (tournament)); - } - - fn start_tournament(ref world: IWorldDispatcher, tournament_id: u32) { - let mut tournament = get!(world, tournament_id, (Tournament)); - - assert!(tournament.status == TournamentStatus::Pending, "Tournament not pending"); - - assert!( - tournament.current_participants.len() >= 2, - "Not enough participants to start" - ); - - tournament.status = TournamentStatus::Ongoing; - - set!(world, (tournament)); - } - - fn complete_tournament(ref world: IWorldDispatcher, tournament_id: u32, player_id: u32) { - let tournament = get!(world, tournament_id, (Tournament)); - - assert!(tournament.status == TournamentStatus::Ongoing, "Tournament not ongoing"); - - // Validate winner is a participant - let mut is_participant = false; - for participant in tournament.current_participants { - if participant == player_id { - is_participant = true; - break; - } - }; - assert!(is_participant, "Winner not participant"); - - // TODO distribute prize pool to winner - let mut tournament = get!(world, tournament_id, (Tournament)); - tournament.status = TournamentStatus::Completed; - - set!(world, (tournament)); - } - - fn get_tournament(world: @IWorldDispatcher, tournament_id: u32) -> Tournament { - let tournament_from_world = get!(world, tournament_id, (Tournament)); - tournament_from_world - } - } -} diff --git a/src/systems/world_setup.cairo b/src/systems/world_setup.cairo deleted file mode 100644 index 1b8d5b4..0000000 --- a/src/systems/world_setup.cairo +++ /dev/null @@ -1,191 +0,0 @@ -use bytebeasts::{ - models::{ - beast::Beast, mt::Mt, player::Player, coordinates::Coordinates, position::Position, - potion::Potion, world_elements::WorldElements - }, -}; - -#[dojo::interface] -trait IWorldSetup { - fn setWorld(ref world: IWorldDispatcher); -} - -#[dojo::contract] -mod world_setup { - use super::IWorldSetup; - use starknet::{ContractAddress, get_caller_address}; - use bytebeasts::{ - models::{ - beast::Beast, mt::Mt, player::Player, coordinates::Coordinates, position::Position, - potion::Potion, world_elements::WorldElements - }, - }; - - #[abi(embed_v0)] - impl WorldSetupImpl of IWorldSetup { - fn setWorld(ref world: IWorldDispatcher) { - // Set Beasts - set!( - world, - (Beast { - beast_id: 1, - beast_name: 'Firebeast', - beast_type: WorldElements::Draconic(()), - beast_description: 'A fiery beast.', - player_id: 1, - hp: 100, - current_hp: 100, - attack: 50, - defense: 40, - mt1: 1, // Fire Blast - mt2: 2, // Ember - mt3: 3, // Flame Wheel - mt4: 4, // Fire Punch - level: 5, - experience_to_next_level: 1000 - }) - ); - - set!( - world, - (Beast { - beast_id: 2, - beast_name: 'Aqua', - beast_type: WorldElements::Crystal(()), - beast_description: 'A water beast', - player_id: 2, - hp: 110, - current_hp: 110, - attack: 45, - defense: 50, - mt1: 5, // Water Gun - mt2: 6, // Bubble - mt3: 7, // Aqua Tail - mt4: 8, // Hydro Pump - level: 5, - experience_to_next_level: 1000 - }) - ); - - // Set Trainers - set!( - world, - (Player { - player_id: 1, - player_name: 'Ash', - beast_1: 1, // Hellooo - beast_2: 0, // No beast assigned - beast_3: 0, // No beast assigned - beast_4: 0, // No beast assigned - potions: 2 - }) - ); - - set!( - world, - (Player { - player_id: 2, - player_name: 'Misty', - beast_1: 2, // Aqua - beast_2: 0, // No beast assigned - beast_3: 0, // No beast assigned - beast_4: 0, // No beast assigned - potions: 3 - }) - ); - - // Set Potions - set!(world, (Potion { potion_id: 1, potion_name: 'Health Potion', potion_effect: 50 })); - set!(world, (Potion { potion_id: 2, potion_name: 'Super Potion', potion_effect: 100 })); - - // Set Mts - set!( - world, - (Mt { - mt_id: 1, - mt_name: 'Fire Blast', - mt_type: WorldElements::Draconic(()), - mt_power: 90, - mt_accuracy: 85 - }) - ); - - set!( - world, - (Mt { - mt_id: 2, - mt_name: 'Ember', - mt_type: WorldElements::Crystal(()), - mt_power: 40, - mt_accuracy: 100 - }) - ); - - set!( - world, - (Mt { - mt_id: 3, - mt_name: 'Flame Wheel', - mt_type: WorldElements::Draconic(()), - mt_power: 60, - mt_accuracy: 95 - }) - ); - - set!( - world, - (Mt { - mt_id: 4, - mt_name: 'Fire Punch', - mt_type: WorldElements::Crystal(()), - mt_power: 75, - mt_accuracy: 100 - }) - ); - - set!( - world, - (Mt { - mt_id: 5, - mt_name: 'Water Gun', - mt_type: WorldElements::Crystal(()), - mt_power: 40, - mt_accuracy: 100 - }) - ); - - set!( - world, - (Mt { - mt_id: 6, - mt_name: 'Bubble', - mt_type: WorldElements::Draconic(()), - mt_power: 20, - mt_accuracy: 100 - }) - ); - - set!( - world, - (Mt { - mt_id: 7, - mt_name: 'Aqua Tail', - mt_type: WorldElements::Crystal(()), - mt_power: 90, - mt_accuracy: 90 - }) - ); - - set!( - world, - (Mt { - mt_id: 8, - mt_name: 'Hydro Pump', - mt_type: WorldElements::Crystal(()), - mt_power: 110, - mt_accuracy: 80 - }) - ); - } - } -} \ No newline at end of file diff --git a/src/tests/test_bag.cairo b/src/tests/test_bag.cairo deleted file mode 100644 index 194a88e..0000000 --- a/src/tests/test_bag.cairo +++ /dev/null @@ -1,76 +0,0 @@ -#[cfg(test)] -mod tests { - use starknet::ContractAddress; - - use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; - use dojo::utils::test::{spawn_test_world, deploy_contract}; - - use bytebeasts::{ - systems::{bag::{bag_system, IBagActionDispatcher, IBagActionDispatcherTrait}}, - }; - - use bytebeasts::{ - models::bag::{{Bag, bag}}, - models::player::{{Player, player}}, - models::potion::{{Potion, potion}}, - }; - - - // Helper function - // This function create the world and define the required models - #[test] - fn setup_world() -> (IWorldDispatcher, IBagActionDispatcher) { - let mut models = array![ - bag::TEST_CLASS_HASH, - player::TEST_CLASS_HASH, - potion::TEST_CLASS_HASH, - - ]; - - let world = spawn_test_world("bytebeasts", models); - - let contract_address = world.deploy_contract('salt', bag_system::TEST_CLASS_HASH.try_into().unwrap()); - - let bag_system = IBagActionDispatcher { contract_address }; - - world.grant_writer(dojo::utils::bytearray_hash(@"bytebeasts"), contract_address); - - (world, bag_system) - } - - - #[test] - fn test_setup_player_bag() -> (IWorldDispatcher, IBagActionDispatcher) { - let (world, bag_system) = setup_world(); - - let player_ash = Player { - player_id: 1, - player_name: 'Ash', - beast_1: 1, // Beast 1 assigned - beast_2: 0, // No beast assigned - beast_3: 0, // No beast assigned - beast_4: 0, // No beast assigned - potions: 2 - }; - - let bag = Bag { - bag_id: 1, - player_id: 1, - max_capacity: 10, - potions: ArrayTrait::new(), - }; - - set!(world,(player_ash)); - - set!(world,(bag)); - - (world, bag_system) - } - - #[test] - fn test_setup() { - let (_, _,) = setup_world(); - let (_, _,) = test_setup_player_bag(); - - } -} \ No newline at end of file diff --git a/src/tests/test_battle.cairo b/src/tests/test_battle.cairo deleted file mode 100644 index 1c1dd72..0000000 --- a/src/tests/test_battle.cairo +++ /dev/null @@ -1,397 +0,0 @@ -#[cfg(test)] -mod tests { - use starknet::ContractAddress; - - use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; - use dojo::utils::test::{spawn_test_world, deploy_contract}; - - use bytebeasts::{ - systems::{battle::{battle_system, IBattleActionsDispatcher, IBattleActionsDispatcherTrait}}, - }; - - use bytebeasts::{ - models::battle::{{Battle, battle}}, - models::beast::{{Beast, beast}}, - models::mt::{{Mt, mt}}, - models::player::{{Player, player}}, - models::potion::{{Potion, potion}}, - models::world_elements::{{WorldElements}} - }; - - // Initializes the testing environment by creating the world with the required models and deploying the battle contract. - #[test] - fn setup_world() -> (IWorldDispatcher, IBattleActionsDispatcher) { - let mut models = array![ - beast::TEST_CLASS_HASH, - mt::TEST_CLASS_HASH, - player::TEST_CLASS_HASH, - potion::TEST_CLASS_HASH, - battle::TEST_CLASS_HASH, - - ]; - - // Spawns a test world with the specified name and models - let world = spawn_test_world("bytebeasts", models); - - // Deploys the battle system contract and retrieves its address - let contract_address = world.deploy_contract('salt', battle_system::TEST_CLASS_HASH.try_into().unwrap()); - - // Initializes the battle system dispatcher with the deployed contract address - let battle_system = IBattleActionsDispatcher { contract_address }; - - // Grants write permissions for the battle system contract - world.grant_writer(dojo::utils::bytearray_hash(@"bytebeasts"), contract_address); - - // Returns the world instance and battle system dispatcher - (world, battle_system) - } - - // Initializes a battle setup with two players and their beasts, as well as moves and a potion. - #[test] - fn setup_battle() -> (IWorldDispatcher, IBattleActionsDispatcher) { - let (world, battle_system) = setup_world(); - - // Define Player 1 (Ash) and his beast (Firebeast) - let player_ash = Player { - player_id: 1, - player_name: 'Ash', - beast_1: 1, // Beast 1 assigned - beast_2: 0, // No beast assigned - beast_3: 0, // No beast assigned - beast_4: 0, // No beast assigned - potions: 2 - }; - - let beast_1 = Beast { - beast_id: 1, - beast_name: 'Firebeast', - beast_type: WorldElements::Draconic(()), - beast_description: 'A fiery beast.', - player_id: 1, - hp: 200, - current_hp: 200, - attack: 7, - defense: 7, - mt1: 1, // Move: Fire Blast - mt2: 2, // Move: Ember - mt3: 3, // Move: Flame Wheel - mt4: 4, // Move: Fire Punch - level: 10, - experience_to_next_level: 1000 - }; - - // Define Player 2 (Red) and his beast (Aqua) - let opponent_red = Player { - player_id: 2, - player_name: 'Red', - beast_1: 2, // Beast 2 assigned - beast_2: 0, // No beast assigned - beast_3: 0, // No beast assigned - beast_4: 0, // No beast assigned - potions: 2 - }; - - let beast_2 = Beast { - beast_id: 2, - beast_name: 'Aqua', - beast_type: WorldElements::Crystal(()), - beast_description: 'A water beast', - player_id: 2, - hp: 200, - current_hp: 200, - attack: 5, - defense: 5, - mt1: 8, // Move: Hydro Pump - mt2: 6, // Move: Bubble - mt3: 7, // Move: Aqua Tail - mt4: 5, // Move: Water Gun - level: 5, - experience_to_next_level: 1000 - }; - - // Define a potion to be used in the battle - let potion = Potion { - potion_id: 1, - potion_name: 'Restore everything', - potion_effect: 250 - }; - - // Set moves (Mts) in the world - set!( - world, - (Mt { - mt_id: 1, - mt_name: 'Fire Blast', - mt_type: WorldElements::Draconic(()), - mt_power: 90, - mt_accuracy: 85 - }) - ); - - set!( - world, - (Mt { - mt_id: 2, - mt_name: 'Ember', - mt_type: WorldElements::Crystal(()), - mt_power: 40, - mt_accuracy: 100 - }) - ); - - set!( - world, - (Mt { - mt_id: 3, - mt_name: 'Flame Wheel', - mt_type: WorldElements::Draconic(()), - mt_power: 60, - mt_accuracy: 95 - }) - ); - - set!( - world, - (Mt { - mt_id: 4, - mt_name:'Fire Punch', - mt_type: WorldElements::Crystal(()), - mt_power: 500, - mt_accuracy: 100 - }) - ); - - set!( - world, - (Mt { - mt_id: 5, - mt_name: 'Water Gun', - mt_type: WorldElements::Crystal(()), - mt_power: 40, - mt_accuracy: 100 - }) - ); - - set!( - world, - (Mt { - mt_id: 6, - mt_name: 'Bubble', - mt_type: WorldElements::Draconic(()), - mt_power: 20, - mt_accuracy: 100 - }) - ); - - set!( - world, - (Mt { - mt_id: 7, - mt_name: 'Aqua Tail', - mt_type: WorldElements::Crystal(()), - mt_power: 90, - mt_accuracy: 90 - }) - ); - - set!( - world, - (Mt { - mt_id: 8, - mt_name: 'Hydro Pump', - mt_type: WorldElements::Crystal(()), - mt_power: 110, - mt_accuracy: 80 - }) - ); - - // Register players, beasts, and potion in the world - set!(world,(player_ash)); - - set!(world,(opponent_red)); - - set!(world, (beast_1)); - - set!(world, (beast_2)); - - set!(world, (potion)); - - // Initialize the battle between the two players - let _ = battle_system.init_battle(player_ash.player_id, opponent_red.player_id); - - (world, battle_system) - } - - // This test verifies the initialization of a battle between two players. - #[test] - fn test_init_battle() { - // Setup world and battle system - let (world, battle_system) = setup_world(); - - // Define Player 1 (Ash) with a single beast - let player_ash = Player { - player_id: 1, - player_name: 'Ash', - beast_1: 1, // Beast 1 assigned - beast_2: 0, // No beast assigned - beast_3: 0, // No beast assigned - beast_4: 0, // No beast assigned - potions: 2 - }; - - // Define Player 2 (Red) with a single beast - let opponent_red = Player { - player_id: 2, - player_name: 'Red', - beast_1: 2, // Beast 2 assigned - beast_2: 0, // No beast assigned - beast_3: 0, // No beast assigned - beast_4: 0, // No beast assigned - potions: 2 - }; - - // Register players in the world - set!(world,(player_ash)); - set!(world,(opponent_red)); - - // Initialize battle between Ash and Red - let battle_id = battle_system.init_battle(player_ash.player_id, opponent_red.player_id); - - // Retrieve battle data and validate initialization values - let battle = get!(world, battle_id,(Battle)); - - assert!(battle.battle_id == 1, "Wrong battle id"); - assert!(battle.player_id == 1, "Wrong player id"); - assert!(battle.opponent_id == 2, "Wrong opponent id"); - assert!(battle.active_beast_player == 1, "Wrong player beast id"); - assert!(battle.active_beast_opponent == 2, "Wrong oppponent beast id"); - assert!(battle.battle_active == 1, "Wrong active state"); - assert!(battle.turn == 0, "Wrong turn"); - } - - - // This test simulates a full battle scenario where the player wins. - #[test] - fn test_battle_player_wins() { - println!("-> Battle Started!"); - - // Initialize the battle setup with a predefined player and opponent - let (world, battle_system) = setup_battle(); - let battle_id = 1; - - // Retrieve initial battle and beast states - let mut battle = get!(world, battle_id, (Battle)); - let mut player_beast = get!(world, battle.active_beast_player, (Beast)); - let mut opponent_beast = get!(world, battle.active_beast_opponent, (Beast)); - - // Display initial health points for clarity - println!("-> Player beast: {}", player_beast.beast_name); - println!("-> Health points: {}", player_beast.hp); - - println!("-> Opponent beast: {}", opponent_beast.beast_name); - println!("-> Health points: {}", opponent_beast.hp); - - // Retrieve move (MT) for both player and opponent beasts - let mt_player_beast_id = player_beast.mt1; - let mt_player_beast = get!(world, mt_player_beast_id, (Mt)); - - let mt_opponent_beast_id = opponent_beast.mt1; - let mt_opponent_beast = get!(world, mt_opponent_beast_id, (Mt)); - - // Calculate damage for initial attacks from both sides - let player_beast_damage = battle_system.calculate_damage(mt_player_beast, player_beast, opponent_beast); - let opponent_beast_damage = battle_system.calculate_damage(mt_opponent_beast, opponent_beast, player_beast); - - // Player's turn to attack - battle_system.attack(battle_id, mt_player_beast_id); - opponent_beast = get!(world, battle.active_beast_opponent, (Beast)); - assert!(opponent_beast.current_hp == opponent_beast.hp - player_beast_damage, "Wrong opponent beast health"); - println!("-> Player has performed an attack with MT: {}", mt_player_beast.mt_name); - println!("-> Opponent beast health points: {}", opponent_beast.current_hp); - - // Opponent's turn to attack - battle_system.opponent_turn(battle_id); - player_beast = get!(world, battle.active_beast_player, (Beast)); - assert!(player_beast.current_hp == player_beast.hp - opponent_beast_damage, "Wrong player beast health"); - println!("-> Opponent has performed an attack with MT: {}", mt_opponent_beast.mt_name); - println!("-> Player beast health points: {}", player_beast.current_hp); - - // Player uses a potion to restore health - let potion_id = 1; - let potion = get!(world, potion_id, (Potion)); - battle_system.use_potion(battle_id, potion_id); - player_beast = get!(world, battle.active_beast_player, (Beast)); - assert!(player_beast.current_hp == 200, "Wrong beast health after potion"); - println!("-> Player used a {} potion", potion.potion_name); - println!("-> Player beast health points after potion: {}", player_beast.current_hp); - - // Final attack with a powerful move, knocking out the opponent - battle_system.attack(battle_id, 4); - opponent_beast = get!(world, battle.active_beast_opponent, (Beast)); - assert!(opponent_beast.current_hp == 0, "Wrong opponent beast health"); - println!("-> Player has performed an attack with MT: {}", mt_player_beast.mt_name); - println!("-> Opponent beast health points: {}", opponent_beast.current_hp); - println!("-> Player wins the battle!"); - - // Verify that the battle is no longer active - battle = get!(world, battle_id, (Battle)); - assert!(battle.battle_active == 0, "Wrong battle status"); - } - - // This test simulates a battle scenario where the opponent wins. - #[test] - fn test_battle_opponent_wins() { - // Initialize the battle with a predefined player and opponent - let (world, battle_system) = setup_battle(); - let battle_id = 1; - - // Retrieve initial battle and beast states - let mut battle = get!(world, battle_id, (Battle)); - let mut player_beast = get!(world, battle.active_beast_player, (Beast)); - let mut opponent_beast = get!(world, battle.active_beast_opponent, (Beast)); - - // Retrieve and calculate damage for playerโ€™s initial attack - let mt_player_beast_id = player_beast.mt1; - let mt_player_beast = get!(world, mt_player_beast_id, (Mt)); - let player_beast_damage = battle_system.calculate_damage(mt_player_beast, player_beast, opponent_beast); - - // Player attacks the opponent - battle_system.attack(battle_id, mt_player_beast_id); - opponent_beast = get!(world, battle.active_beast_opponent, (Beast)); - assert!(opponent_beast.current_hp == opponent_beast.hp - player_beast_damage, "Wrong opponent beast health"); - - // Final attack with a powerful move, knocking out the opponent - let mut mt_opponent_beast = get!(world, 8, (Mt)); // Opponent always attack with mt1 - mt_opponent_beast.mt_power = 500; - set!(world,(mt_opponent_beast)); - - // Opponent's turn to attack - battle_system.opponent_turn(battle_id); - player_beast = get!(world, battle.active_beast_player, (Beast)); - assert!(player_beast.current_hp == 0, "Wrong player beast health"); - - // Verify that the battle is no longer active - battle = get!(world, battle_id, (Battle)); - assert!(battle.battle_active == 0, "Wrong battle status"); - } - - // This test simulates the scenario where the player attempts to flee the battle. - #[test] - fn test_flee() { - // Initialize the battle setup - let (world, battle_system) = setup_battle(); - let battle_id = 1; - - // Attempt to flee - battle_system.flee(battle_id); - let battle = get!(world, battle_id, (Battle)); - assert!(battle.battle_active == 0, "Wrong battle status"); - } - - // Verifies that the setup functions execute correctly. - #[test] - fn test_setup() { - let (_, _,) = setup_world(); - let (_, _,) = setup_battle(); - } -} diff --git a/src/tests/test_tournament.cairo b/src/tests/test_tournament.cairo deleted file mode 100644 index 7e67f7a..0000000 --- a/src/tests/test_tournament.cairo +++ /dev/null @@ -1,313 +0,0 @@ -#[cfg(test)] -mod tests { - use starknet::ContractAddress; - - use dojo::world::{IWorldDispatcher, IWorldDispatcherTrait}; - use dojo::utils::test::{spawn_test_world, deploy_contract}; - - use bytebeasts::{ - systems::{tournament::{tournament_system, ITournamentActionDispatcher, ITournamentActionDispatcherTrait}} - }; - - use bytebeasts::{ - models::player::{Player, player}, - models::tournament::{Tournament, tournament, TournamentStatus}, - }; - - const TOURNAMENT_ID: u32 = 1; - const TOURNAMENT_NAME: felt252 = 'TOURNAMENT_NAME'; - const TOURNAMENT_ENTRY_FEE: u32 = 0; - const TOURNAMENT_MAX_PARTICIPANTS: u32 = 2; - const TOURNAMENT_PRIZE_POOL: u32 = 0; - - const PLAYER1_ID: u32 = 1; - const PLAYER1_NAME: felt252 = 'PLAYER1'; - const PLAYER1_BEAST1: u32 = 0; - const PLAYER1_BEAST2: u32 = 0; - const PLAYER1_BEAST3: u32 = 0; - const PLAYER1_BEAST4: u32 = 0; - const PLAYER1_POTIONS: u32 = 0; - - // Helper function to create the first player - fn get_player1() -> Player { - Player { - player_id: PLAYER1_ID, - player_name: PLAYER1_NAME, - beast_1: PLAYER1_BEAST1, - beast_2: PLAYER1_BEAST2, - beast_3: PLAYER1_BEAST3, - beast_4: PLAYER1_BEAST4, - potions: PLAYER1_POTIONS - } - } - - const PLAYER2_ID: u32 = 2; - const PLAYER2_NAME: felt252 = 'PLAYER2'; - const PLAYER2_BEAST1: u32 = 0; - const PLAYER2_BEAST2: u32 = 0; - const PLAYER2_BEAST3: u32 = 0; - const PLAYER2_BEAST4: u32 = 0; - const PLAYER2_POTIONS: u32 = 0; - - // Helper function to create the second player - fn get_player2() -> Player { - Player { - player_id: PLAYER2_ID, - player_name: PLAYER2_NAME, - beast_1: PLAYER2_BEAST1, - beast_2: PLAYER2_BEAST2, - beast_3: PLAYER2_BEAST3, - beast_4: PLAYER2_BEAST4, - potions: PLAYER2_POTIONS - } - } - - const PLAYER3_ID: u32 = 3; - const PLAYER3_NAME: felt252 = 'PLAYER3'; - const PLAYER3_BEAST1: u32 = 0; - const PLAYER3_BEAST2: u32 = 0; - const PLAYER3_BEAST3: u32 = 0; - const PLAYER3_BEAST4: u32 = 0; - const PLAYER3_POTIONS: u32 = 0; - - // Helper function to create the third player - fn get_player3() -> Player { - Player { - player_id: PLAYER3_ID, - player_name: PLAYER3_NAME, - beast_1: PLAYER3_BEAST1, - beast_2: PLAYER3_BEAST2, - beast_3: PLAYER3_BEAST3, - beast_4: PLAYER3_BEAST4, - potions: PLAYER3_POTIONS - } - } - - // Initializes the testing environment by creating the world with the required models and deploying the tournament contract - fn setup_world() -> (IWorldDispatcher, ITournamentActionDispatcher) { - let mut models = array![ - player::TEST_CLASS_HASH, - tournament::TEST_CLASS_HASH - ]; - - // Spawns a test world with the specified name and models - let world = spawn_test_world("bytebeasts", models); - - // Deploys the tournament system contract and retrieves its address - let contract_address = world.deploy_contract('salt', tournament_system::TEST_CLASS_HASH.try_into().unwrap()); - - // Initializes the tournament system dispatcher with the deployed contract address - let tournament_system = ITournamentActionDispatcher { contract_address }; - - // Grants write permissions for the tournament system contract - world.grant_writer(dojo::utils::bytearray_hash(@"bytebeasts"), contract_address); - - // Returns the world instance and tournament system dispatcher - (world, tournament_system) - } - - // Initializes an empty tournament - fn setup_tournament() -> (IWorldDispatcher, ITournamentActionDispatcher) { - let (world, tournament_system) = setup_world(); - - // Creates an empty pending tournament with no participants - tournament_system.create_tournament( - TOURNAMENT_ID, - TOURNAMENT_NAME, - TournamentStatus::Pending, - TOURNAMENT_ENTRY_FEE, - TOURNAMENT_MAX_PARTICIPANTS, - array![], - TOURNAMENT_PRIZE_POOL - ); - - (world, tournament_system) - } - - // Initializes a tournament with 2 players - fn setup_tournament_with_players() -> (IWorldDispatcher, ITournamentActionDispatcher) { - let (world, tournament_system) = setup_world(); - - // Creates the 2 players - let player1 = get_player1(); - set!(world, (player1)); - let player2 = get_player2(); - set!(world, (player2)); - - // Creates a tournament with 2 participants - tournament_system.create_tournament( - TOURNAMENT_ID, - TOURNAMENT_NAME, - TournamentStatus::Pending, - TOURNAMENT_ENTRY_FEE, - TOURNAMENT_MAX_PARTICIPANTS, - array![player1.player_id, player2.player_id], - TOURNAMENT_PRIZE_POOL - ); - - (world, tournament_system) - } - - // This test verifies the creation of an empty tournament - #[test] - fn test_create_tournament() { - let (world, _) = setup_tournament(); - - let tournament = get!(world, TOURNAMENT_ID, (Tournament)); - - assert_eq!(tournament.tournament_id, TOURNAMENT_ID); - assert_eq!(tournament.name, TOURNAMENT_NAME); - assert_eq!(tournament.status, TournamentStatus::Pending); - assert_eq!(tournament.entry_fee, TOURNAMENT_ENTRY_FEE); - assert_eq!(tournament.max_participants, TOURNAMENT_MAX_PARTICIPANTS); - assert_eq!(tournament.current_participants, array![]); - assert_eq!(tournament.prize_pool, TOURNAMENT_PRIZE_POOL); - } - - // This test verifies the creation of a tournament with 2 players - #[test] - fn test_create_tournament_with_players() { - let (world, _) = setup_tournament_with_players(); - - let tournament = get!(world, TOURNAMENT_ID, (Tournament)); - - assert_eq!(tournament.tournament_id, TOURNAMENT_ID); - assert_eq!(tournament.name, TOURNAMENT_NAME); - assert_eq!(tournament.status, TournamentStatus::Pending); - assert_eq!(tournament.entry_fee, TOURNAMENT_ENTRY_FEE); - assert_eq!(tournament.max_participants, TOURNAMENT_MAX_PARTICIPANTS); - assert_eq!(tournament.current_participants, array![PLAYER1_ID, PLAYER2_ID]); - assert_eq!(tournament.prize_pool, TOURNAMENT_PRIZE_POOL); - } - - // This test verifies a player can't be registered if the tournament status is not pending - #[test] - #[should_panic(expected: ("Tournament not open for registration", 'ENTRYPOINT_FAILED'))] - fn test_register_player_not_pending() { - let (world, tournament_system) = setup_tournament(); - - // Mutates the status to ongoing to make player registration fail - let mut tournament = get!(world, TOURNAMENT_ID, (Tournament)); - tournament.status = TournamentStatus::Ongoing; - set!(world, (tournament)); - - let player1 = get_player1(); - set!(world, (player1)); - - tournament_system.register_player(TOURNAMENT_ID, player1.player_id); - } - - // This test verifies it's impossible for a player to join an already full tournament - #[test] - #[should_panic(expected: ("Tournament is full", 'ENTRYPOINT_FAILED'))] - fn test_register_player_tournament_full() { - let (world, tournament_system) = setup_tournament_with_players(); - - let player3 = get_player3(); - set!(world, (player3)); - - tournament_system.register_player(TOURNAMENT_ID, player3.player_id); - } - - // This test verifies the tournament can register players - #[test] - fn test_register_players() { - let (world, tournament_system) = setup_tournament(); - - let player1 = get_player1(); - set!(world, (player1)); - tournament_system.register_player(TOURNAMENT_ID, player1.player_id); - let tournament = get!(world, TOURNAMENT_ID, (Tournament)); - assert_eq!(tournament.current_participants, array![player1.player_id]); - - let player2 = get_player2(); - set!(world, (player2)); - tournament_system.register_player(TOURNAMENT_ID, player2.player_id); - let tournament = get!(world, TOURNAMENT_ID, (Tournament)); - assert_eq!(tournament.current_participants, array![player1.player_id, player2.player_id]); - } - - // This test verifies the tournament cannot be started if not in the pending status - #[test] - #[should_panic(expected: ("Tournament not pending", 'ENTRYPOINT_FAILED'))] - fn test_start_tournament_not_pending() { - let (world, tournament_system) = setup_tournament(); - - // Mutates the status to ongoing so that the tournament will fail to start - let mut tournament = get!(world, TOURNAMENT_ID, (Tournament)); - tournament.status = TournamentStatus::Ongoing; - set!(world, (tournament)); - - tournament_system.start_tournament(TOURNAMENT_ID); - } - - // This test verifies the tournament cannot be started until we reach at least 2 participants - #[test] - #[should_panic(expected: ("Not enough participants to start", 'ENTRYPOINT_FAILED'))] - fn test_start_tournament_not_enough_participants() { - let (_, tournament_system) = setup_tournament(); - - tournament_system.start_tournament(TOURNAMENT_ID); - } - - // This test verifies the tournament can be started correctly - #[test] - fn test_start_tournament() { - let (world, tournament_system) = setup_tournament_with_players(); - - tournament_system.start_tournament(TOURNAMENT_ID); - - let tournament = get!(world, TOURNAMENT_ID, (Tournament)); - assert_eq!(tournament.status, TournamentStatus::Ongoing); - } - - // This test verifies the tournament can't be completed if not ongoing - #[test] - #[should_panic(expected: ("Tournament not ongoing", 'ENTRYPOINT_FAILED'))] - fn test_complete_tournament_not_ongoing() { - let (_, tournament_system) = setup_tournament(); - - tournament_system.complete_tournament(TOURNAMENT_ID, PLAYER1_ID); - } - - // This test verifies that the declared winner of a tournament must be a participant - #[test] - #[should_panic(expected: ("Winner not participant", 'ENTRYPOINT_FAILED'))] - fn test_complete_tournament_not_participant() { - let (_, tournament_system) = setup_tournament_with_players(); - - tournament_system.start_tournament(TOURNAMENT_ID); - - tournament_system.complete_tournament(TOURNAMENT_ID, PLAYER3_ID); - } - - // This test verifies the tournament can be completed correctly - #[test] - fn test_complete_tournament() { - let (world, tournament_system) = setup_tournament_with_players(); - - tournament_system.start_tournament(TOURNAMENT_ID); - - tournament_system.complete_tournament(TOURNAMENT_ID, PLAYER1_ID); - - let tournament = get!(world, TOURNAMENT_ID, (Tournament)); - assert_eq!(tournament.status, TournamentStatus::Completed); - } - - // This test verifies the custom getter returns the same data stored in the world - #[test] - fn test_get_tournament() { - let (world, tournament_system) = setup_tournament(); - - let tournament_from_system = tournament_system.get_tournament(TOURNAMENT_ID); - let tournament_from_world = get!(world, TOURNAMENT_ID, (Tournament)); - - assert_eq!(tournament_from_system.tournament_id, tournament_from_world.tournament_id); - assert_eq!(tournament_from_system.name, tournament_from_world.name); - assert_eq!(tournament_from_system.status, tournament_from_world.status); - assert_eq!(tournament_from_system.entry_fee, tournament_from_world.entry_fee); - assert_eq!(tournament_from_system.max_participants, tournament_from_world.max_participants); - assert_eq!(tournament_from_system.current_participants, tournament_from_world.current_participants); - assert_eq!(tournament_from_system.prize_pool, tournament_from_world.prize_pool); - } -}