diff --git a/Scarb.toml b/Scarb.toml index 3a0c40a..da27815 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -20,21 +20,12 @@ dojo = { git = "https://github.com/dojoengine/dojo", tag = "v0.7.1" } initializer_class_hash = "0xbeef" [tool.dojo.env] -rpc_url = "https://api.cartridge.gg/x/bytebeast/katana" +rpc_url = "https://api.cartridge.gg/x/work/katana" # Default account for katana with seed = 0 -account_address = "0x69562e297da25abcc1fd34e53b4a534e939fcc445f946e8d8d2bcb3e0e44e44" -private_key = "0x4710e214ec335128592d179195a0b52a641d32bdb780803f30f6ee5805783c4" +account_address = "0x63eee6e20919b06f8198151c9951e5cf616077d395599ec124824bc6a505c9c" +private_key = "0x2334657b5ee62ab3b3845b7f73f927cb55118b098f5eff35360dea78d5efef4" #world_address = "0xb4079627ebab1cd3cf9fd075dda1ad2454a7a448bf659591f259efa2519b18" # Uncomment and update this line with your world address. [tool.dojo.world] -name = "Dojo starter" -description = "The official Dojo Starter 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." -cover_uri = "file://assets/cover.png" -icon_uri = "file://assets/icon.png" -website = "https://github.com/dojoengine/dojo-starter" - -[tool.dojo.world.socials] -x = "https://x.com/ohayo_dojo" -discord = "https://discord.gg/FB2wR6uF" -github = "https://github.com/dojoengine/dojo-starter" -telegram = "https://t.me/dojoengine" +name = "bytebeast" +description = "This is the Dojo implementation for Bytebeast" diff --git a/bindings/unity/Contracts/dojo_starter::systems::actions::actions.gen.cs b/bindings/unity/Contracts/dojo_starter::systems::actions::actions.gen.cs deleted file mode 100644 index a5dde43..0000000 --- a/bindings/unity/Contracts/dojo_starter::systems::actions::actions.gen.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Generated by dojo-bindgen on Fri, 21 Jun 2024 20:45:31 +0000. Do not modify this file manually. -using System; -using System.Threading.Tasks; -using Dojo; -using Dojo.Starknet; -using UnityEngine; -using dojo_bindings; -using System.Collections.Generic; -using System.Linq; -using Enum = Dojo.Starknet.Enum; - -// System definitions for `dojo_starter::systems::actions::actions` contract -public class Actions : MonoBehaviour { - // The address of this contract - public string contractAddress; - - - // Call the `dojo_init` system with the specified Account and calldata - // Returns the transaction hash. Use `WaitForTransaction` to wait for the transaction to be confirmed. - public async Task dojo_init(Account account) { - List calldata = new List(); - - - return await account.ExecuteRaw(new dojo.Call[] { - new dojo.Call{ - to = contractAddress, - selector = "dojo_init", - calldata = calldata.ToArray() - } - }); - } - - - - // Call the `spawn` system with the specified Account and calldata - // Returns the transaction hash. Use `WaitForTransaction` to wait for the transaction to be confirmed. - public async Task spawn(Account account) { - List calldata = new List(); - - - return await account.ExecuteRaw(new dojo.Call[] { - new dojo.Call{ - to = contractAddress, - selector = "spawn", - calldata = calldata.ToArray() - } - }); - } - - - - // Call the `move` system with the specified Account and calldata - // Returns the transaction hash. Use `WaitForTransaction` to wait for the transaction to be confirmed. - public async Task move(Account account, Direction direction) { - List calldata = new List(); - calldata.Add(new FieldElement(Enum.GetIndex(direction)).Inner); - - return await account.ExecuteRaw(new dojo.Call[] { - new dojo.Call{ - to = contractAddress, - selector = "move", - calldata = calldata.ToArray() - } - }); - } - -} - \ No newline at end of file diff --git a/bindings/unity/Models/DirectionsAvailable.gen.cs b/bindings/unity/Models/DirectionsAvailable.gen.cs deleted file mode 100644 index 9812269..0000000 --- a/bindings/unity/Models/DirectionsAvailable.gen.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by dojo-bindgen on Fri, 21 Jun 2024 20:45:31 +0000. Do not modify this file manually. -using System; -using Dojo; -using Dojo.Starknet; -using System.Reflection; -using System.Linq; -using System.Collections.Generic; -using Enum = Dojo.Starknet.Enum; - - -// Model definition for `dojo_starter::models::moves::DirectionsAvailable` model -public class DirectionsAvailable : ModelInstance { - [ModelField("player")] - public FieldElement player; - - [ModelField("directions")] - public Direction[] directions; - - // Start is called before the first frame update - void Start() { - } - - // Update is called once per frame - void Update() { - } -} - \ No newline at end of file diff --git a/bindings/unity/Models/Moved.gen.cs b/bindings/unity/Models/Moved.gen.cs deleted file mode 100644 index 6410041..0000000 --- a/bindings/unity/Models/Moved.gen.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Generated by dojo-bindgen on Fri, 21 Jun 2024 20:45:31 +0000. Do not modify this file manually. -using System; -using Dojo; -using Dojo.Starknet; -using System.Reflection; -using System.Linq; -using System.Collections.Generic; -using Enum = Dojo.Starknet.Enum; - -// Type definition for `core::byte_array::ByteArray` struct -[Serializable] -public struct ByteArray { - public string[] data; - public FieldElement pending_word; - public uint pending_word_len; -} - -// Type definition for `core::option::Option::` enum -public abstract record Option() : Enum { - public record Some(A value) : Option; - public record None() : Option; -} - -// Type definition for `dojo_starter::models::moves::Direction` enum -public abstract record Direction() : Enum { - public record None() : Direction; - public record Left() : Direction; - public record Right() : Direction; - public record Up() : Direction; - public record Down() : Direction; -} - - -// Model definition for `dojo_starter::systems::actions::actions::Moved` model -public class Moved : ModelInstance { - [ModelField("player")] - public FieldElement player; - - [ModelField("direction")] - public Direction direction; - - // Start is called before the first frame update - void Start() { - } - - // Update is called once per frame - void Update() { - } -} - \ No newline at end of file diff --git a/bindings/unity/Models/Moves.gen.cs b/bindings/unity/Models/Moves.gen.cs deleted file mode 100644 index b0eefb0..0000000 --- a/bindings/unity/Models/Moves.gen.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Generated by dojo-bindgen on Fri, 21 Jun 2024 20:45:31 +0000. Do not modify this file manually. -using System; -using Dojo; -using Dojo.Starknet; -using System.Reflection; -using System.Linq; -using System.Collections.Generic; -using Enum = Dojo.Starknet.Enum; - - -// Model definition for `dojo_starter::models::moves::Moves` model -public class Moves : ModelInstance { - [ModelField("player")] - public FieldElement player; - - [ModelField("remaining")] - public byte remaining; - - [ModelField("last_direction")] - public Direction last_direction; - - [ModelField("can_move")] - public bool can_move; - - // Start is called before the first frame update - void Start() { - } - - // Update is called once per frame - void Update() { - } -} - \ No newline at end of file diff --git a/bindings/unity/Models/Position.gen.cs b/bindings/unity/Models/Position.gen.cs deleted file mode 100644 index bafbe31..0000000 --- a/bindings/unity/Models/Position.gen.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by dojo-bindgen on Fri, 21 Jun 2024 20:45:31 +0000. Do not modify this file manually. -using System; -using Dojo; -using Dojo.Starknet; -using System.Reflection; -using System.Linq; -using System.Collections.Generic; -using Enum = Dojo.Starknet.Enum; - -// Type definition for `dojo_starter::models::position::Vec2` struct -[Serializable] -public struct Vec2 { - public uint x; - public uint y; -} - - -// Model definition for `dojo_starter::models::position::Position` model -public class Position : ModelInstance { - [ModelField("player")] - public FieldElement player; - - [ModelField("vec")] - public Vec2 vec; - - // Start is called before the first frame update - void Start() { - } - - // Update is called once per frame - void Update() { - } -} - \ No newline at end of file diff --git a/manifests/dev/manifest.json b/manifests/dev/manifest.json index 69254f5..9403c88 100644 --- a/manifests/dev/manifest.json +++ b/manifests/dev/manifest.json @@ -1000,12 +1000,12 @@ } ], "address": "0xb4079627ebab1cd3cf9fd075dda1ad2454a7a448bf659591f259efa2519b18", - "transaction_hash": "0x3a729aa09b4ad351fbc724f94c6d599037a53d7d9b5a182097a60fb09d0486c", + "transaction_hash": "0x4b6f028e019c8db1a07e76a6183b677fba9cac8d269220207da8b9c06514638", "block_number": 3, "seed": "dojo_starter", "metadata": { "profile_name": "dev", - "rpc_url": "http://localhost:5050/" + "rpc_url": "https://api.cartridge.gg/x/work/katana" }, "name": "dojo::world::world" }, diff --git a/manifests/dev/manifest.toml b/manifests/dev/manifest.toml index 4f0382b..a1f96ea 100644 --- a/manifests/dev/manifest.toml +++ b/manifests/dev/manifest.toml @@ -4,14 +4,14 @@ class_hash = "0x3f63cecdc4964acafb921ba2934c6507d1b3c344edb64c2762cf08053169ab9" original_class_hash = "0x3f63cecdc4964acafb921ba2934c6507d1b3c344edb64c2762cf08053169ab9" abi = "manifests/dev/abis/deployments/dojo_world_world.json" address = "0xb4079627ebab1cd3cf9fd075dda1ad2454a7a448bf659591f259efa2519b18" -transaction_hash = "0x3a729aa09b4ad351fbc724f94c6d599037a53d7d9b5a182097a60fb09d0486c" +transaction_hash = "0x4b6f028e019c8db1a07e76a6183b677fba9cac8d269220207da8b9c06514638" block_number = 3 seed = "dojo_starter" name = "dojo::world::world" [world.metadata] profile_name = "dev" -rpc_url = "http://localhost:5050/" +rpc_url = "https://api.cartridge.gg/x/work/katana" [base] kind = "Class" diff --git a/scripts/default_auth.sh b/scripts/default_auth.sh index ea3247c..cae7dde 100755 --- a/scripts/default_auth.sh +++ b/scripts/default_auth.sh @@ -15,7 +15,7 @@ check_cmd() { need_cmd jq -export RPC_URL="https://api.cartridge.gg/x/bytebeast/katana" +export RPC_URL="https://api.cartridge.gg/x/work/katana" export WORLD_ADDRESS=$(cat ./manifests/dev/manifest.json | jq -r '.world.address') diff --git a/scripts/move.sh b/scripts/move.sh index 653262c..f6566c4 100755 --- a/scripts/move.sh +++ b/scripts/move.sh @@ -2,7 +2,7 @@ set -euo pipefail pushd $(dirname "$0")/.. -export RPC_URL="https://api.cartridge.gg/x/bytebeast/katana"; +export RPC_URL="https://api.cartridge.gg/x/work/katana"; export WORLD_ADDRESS=$(cat ./manifests/dev/manifest.json | jq -r '.world.address') diff --git a/scripts/spawn.sh b/scripts/spawn.sh index e99cc17..510cfdc 100755 --- a/scripts/spawn.sh +++ b/scripts/spawn.sh @@ -2,7 +2,7 @@ set -euo pipefail pushd $(dirname "$0")/.. -export RPC_URL="https://api.cartridge.gg/x/bytebeast/katana" +export RPC_URL="https://api.cartridge.gg/x/work/katana" export WORLD_ADDRESS=$(cat ./manifests/dev/manifest.json | jq -r '.world.address')