diff --git a/Scarb.toml b/Scarb.toml index 469a5f3..6a331ac 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -18,3 +18,6 @@ dojo = { path = "/Users/nasr/Documents/development.nosync/dojo/crates/dojo-core" [tool.dojo] initializer_class_hash = "0xbeef" + +[profile.dev] +[profile.sepolia] diff --git a/dojo_dev.toml b/dojo_dev.toml index c0c523f..ea8c3c8 100644 --- a/dojo_dev.toml +++ b/dojo_dev.toml @@ -1,11 +1,11 @@ -initializer_class_hash = "0xbeef" - [env] rpc_url = "http://localhost:5050/" # Default account for katana with seed = 0 account_address = "0xb3ff441a68610b30fd5e2abbf3a1548eb6ba6f3559f2862bf2dc757e5828ca" private_key = "0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a" -world_address = "0x1ca8e3b7bc101ffd443a1e3b452a4f49607841461b168cb2cc365322722b67" # Uncomment and update this line with your world address. +#world_address = "0x1ca8e3b7bc101ffd443a1e3b452a4f49607841461b168cb2cc365322722b67" # Uncomment and update this line with your world address. +#world_address = "0x025Ee38b230906EA41B00401cC12bb51f58DC62198cf058a336655696908863D" +world_address = "0x4ffd05bfe505d883481ab1bba815301c482f44cc368aa141ed83d4b2eba4a83" [world] name = "Flippy Flop" @@ -13,7 +13,7 @@ description = "The official Dojo Starter guide, the quickest and most streamline cover_uri = "file://assets/cover.png" icon_uri = "file://assets/icon.png" website = "https://github.com/dojoengine/dojo-starter" -seed = "flippyflop" +seed = "flippyflop-katana" [namespace] default = "flippyflop" diff --git a/dojo_sepolia.toml b/dojo_sepolia.toml new file mode 100644 index 0000000..88b880d --- /dev/null +++ b/dojo_sepolia.toml @@ -0,0 +1,25 @@ +[env] +rpc_url = "https://api.cartridge.gg/x/starknet/sepolia" +# Default account for katana with seed = 0 +account_address = "0xb3ff441a68610b30fd5e2abbf3a1548eb6ba6f3559f2862bf2dc757e5828ca" +private_key = "0x2bbf4f9fd0bbb2e60b0316c1fe0b76cf7a4d0198bd493ced9b8df2a3a24d68a" +#world_address = "0x1ca8e3b7bc101ffd443a1e3b452a4f49607841461b168cb2cc365322722b67" # Uncomment and update this line with your world address. +#world_address = "0x025Ee38b230906EA41B00401cC12bb51f58DC62198cf058a336655696908863D" +world_address = "0x3e61be69b2e12ba2d5fe6f3b39103014e1c2c708a61704ecdb0e3bb41f8bb3" + +[world] +name = "Flippy Flop" +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" +seed = "flippyflop-sepolia-1000" + +[namespace] +default = "flippyflop" + +[socials] +x = "https://x.com/ohayo_dojo" +discord = "https://discord.gg/FB2wR6uF" +github = "https://github.com/dojoengine/dojo-starter" +telegram = "https://t.me/dojoengine" diff --git a/indexer.db b/indexer.db index a18b22e..2219364 100644 Binary files a/indexer.db and b/indexer.db differ diff --git a/manifests/dev/base/contracts/flippyflop-actions-4407e5f5.toml b/manifests/dev/base/contracts/flippyflop-actions-4407e5f5.toml index 38cb9f0..9eacc5d 100644 --- a/manifests/dev/base/contracts/flippyflop-actions-4407e5f5.toml +++ b/manifests/dev/base/contracts/flippyflop-actions-4407e5f5.toml @@ -1,10 +1,14 @@ kind = "DojoContract" -class_hash = "0x5728ae47027cc1a450ef87fa6388d2dd47ef198f3521b85bee7be955c838802" -original_class_hash = "0x5728ae47027cc1a450ef87fa6388d2dd47ef198f3521b85bee7be955c838802" +class_hash = "0x3cb3054e8698d29882d99d95408ced1a14fbf6fe85296e89f76cf2462646f44" +original_class_hash = "0x3cb3054e8698d29882d99d95408ced1a14fbf6fe85296e89f76cf2462646f44" base_class_hash = "0x0" abi = "manifests/dev/base/abis/contracts/flippyflop-actions-4407e5f5.json" reads = [] writes = [] init_calldata = [] tag = "flippyflop-actions" +systems = [ + "flip", + "flop", +] manifest_name = "flippyflop-actions-4407e5f5" diff --git a/manifests/dev/base/models/flippyflop-Tile-61fb9291.toml b/manifests/dev/base/models/flippyflop-Tile-61fb9291.toml index 1dc2610..5403478 100644 --- a/manifests/dev/base/models/flippyflop-Tile-61fb9291.toml +++ b/manifests/dev/base/models/flippyflop-Tile-61fb9291.toml @@ -3,6 +3,7 @@ class_hash = "0x7824b845296994a22d3df72db34fdea9f7aeec2fb0487459a07574ffe57549e" original_class_hash = "0x7824b845296994a22d3df72db34fdea9f7aeec2fb0487459a07574ffe57549e" abi = "manifests/dev/base/abis/models/flippyflop-Tile-61fb9291.json" tag = "flippyflop-Tile" +qualified_path = "flippyflop::models::tile" manifest_name = "flippyflop-Tile-61fb9291" [[members]] diff --git a/manifests/dev/base/models/flippyflop-User-25ca4606.toml b/manifests/dev/base/models/flippyflop-User-25ca4606.toml index a6250f8..799f3b3 100644 --- a/manifests/dev/base/models/flippyflop-User-25ca4606.toml +++ b/manifests/dev/base/models/flippyflop-User-25ca4606.toml @@ -3,6 +3,7 @@ class_hash = "0x3b76de62f8e30048590802eb9b8a74235bc6456dcdf04d086df0321ff91c909" original_class_hash = "0x3b76de62f8e30048590802eb9b8a74235bc6456dcdf04d086df0321ff91c909" abi = "manifests/dev/base/abis/models/flippyflop-User-25ca4606.json" tag = "flippyflop-User" +qualified_path = "flippyflop::models::user" manifest_name = "flippyflop-User-25ca4606" [[members]] diff --git a/manifests/dev/deployment/abis/contracts/flippyflop-actions-4407e5f5.json b/manifests/sepolia/base/abis/contracts/flippyflop-actions-4407e5f5.json similarity index 100% rename from manifests/dev/deployment/abis/contracts/flippyflop-actions-4407e5f5.json rename to manifests/sepolia/base/abis/contracts/flippyflop-actions-4407e5f5.json diff --git a/manifests/dev/deployment/abis/dojo-base.json b/manifests/sepolia/base/abis/dojo-base.json similarity index 100% rename from manifests/dev/deployment/abis/dojo-base.json rename to manifests/sepolia/base/abis/dojo-base.json diff --git a/manifests/dev/deployment/abis/dojo-world.json b/manifests/sepolia/base/abis/dojo-world.json similarity index 100% rename from manifests/dev/deployment/abis/dojo-world.json rename to manifests/sepolia/base/abis/dojo-world.json diff --git a/manifests/dev/deployment/abis/models/flippyflop-Tile-61fb9291.json b/manifests/sepolia/base/abis/models/flippyflop-Tile-61fb9291.json similarity index 100% rename from manifests/dev/deployment/abis/models/flippyflop-Tile-61fb9291.json rename to manifests/sepolia/base/abis/models/flippyflop-Tile-61fb9291.json diff --git a/manifests/dev/deployment/abis/models/flippyflop-User-25ca4606.json b/manifests/sepolia/base/abis/models/flippyflop-User-25ca4606.json similarity index 100% rename from manifests/dev/deployment/abis/models/flippyflop-User-25ca4606.json rename to manifests/sepolia/base/abis/models/flippyflop-User-25ca4606.json diff --git a/manifests/sepolia/base/contracts/flippyflop-actions-4407e5f5.toml b/manifests/sepolia/base/contracts/flippyflop-actions-4407e5f5.toml new file mode 100644 index 0000000..c008c47 --- /dev/null +++ b/manifests/sepolia/base/contracts/flippyflop-actions-4407e5f5.toml @@ -0,0 +1,14 @@ +kind = "DojoContract" +class_hash = "0x3cb3054e8698d29882d99d95408ced1a14fbf6fe85296e89f76cf2462646f44" +original_class_hash = "0x3cb3054e8698d29882d99d95408ced1a14fbf6fe85296e89f76cf2462646f44" +base_class_hash = "0x0" +abi = "manifests/sepolia/base/abis/contracts/flippyflop-actions-4407e5f5.json" +reads = [] +writes = [] +init_calldata = [] +tag = "flippyflop-actions" +systems = [ + "flip", + "flop", +] +manifest_name = "flippyflop-actions-4407e5f5" diff --git a/manifests/sepolia/base/dojo-base.toml b/manifests/sepolia/base/dojo-base.toml new file mode 100644 index 0000000..336ad03 --- /dev/null +++ b/manifests/sepolia/base/dojo-base.toml @@ -0,0 +1,6 @@ +kind = "Class" +class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" +original_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" +abi = "manifests/sepolia/base/abis/dojo-base.json" +tag = "dojo-base" +manifest_name = "dojo-base" diff --git a/manifests/sepolia/base/dojo-world.toml b/manifests/sepolia/base/dojo-world.toml new file mode 100644 index 0000000..b0bca6e --- /dev/null +++ b/manifests/sepolia/base/dojo-world.toml @@ -0,0 +1,6 @@ +kind = "Class" +class_hash = "0x215f0e85953fb8a60ac54211eaa2368eaa5cda3427ca4eeb17078099d09a43d" +original_class_hash = "0x215f0e85953fb8a60ac54211eaa2368eaa5cda3427ca4eeb17078099d09a43d" +abi = "manifests/sepolia/base/abis/dojo-world.json" +tag = "dojo-world" +manifest_name = "dojo-world" diff --git a/manifests/sepolia/base/models/flippyflop-Tile-61fb9291.toml b/manifests/sepolia/base/models/flippyflop-Tile-61fb9291.toml new file mode 100644 index 0000000..c800f77 --- /dev/null +++ b/manifests/sepolia/base/models/flippyflop-Tile-61fb9291.toml @@ -0,0 +1,22 @@ +kind = "DojoModel" +class_hash = "0x7824b845296994a22d3df72db34fdea9f7aeec2fb0487459a07574ffe57549e" +original_class_hash = "0x7824b845296994a22d3df72db34fdea9f7aeec2fb0487459a07574ffe57549e" +abi = "manifests/sepolia/base/abis/models/flippyflop-Tile-61fb9291.json" +tag = "flippyflop-Tile" +qualified_path = "flippyflop::models::tile" +manifest_name = "flippyflop-Tile-61fb9291" + +[[members]] +name = "x" +type = "u32" +key = true + +[[members]] +name = "y" +type = "u32" +key = true + +[[members]] +name = "flipped" +type = "felt252" +key = false diff --git a/manifests/sepolia/base/models/flippyflop-User-25ca4606.toml b/manifests/sepolia/base/models/flippyflop-User-25ca4606.toml new file mode 100644 index 0000000..ca091bd --- /dev/null +++ b/manifests/sepolia/base/models/flippyflop-User-25ca4606.toml @@ -0,0 +1,27 @@ +kind = "DojoModel" +class_hash = "0x3b76de62f8e30048590802eb9b8a74235bc6456dcdf04d086df0321ff91c909" +original_class_hash = "0x3b76de62f8e30048590802eb9b8a74235bc6456dcdf04d086df0321ff91c909" +abi = "manifests/sepolia/base/abis/models/flippyflop-User-25ca4606.json" +tag = "flippyflop-User" +qualified_path = "flippyflop::models::user" +manifest_name = "flippyflop-User-25ca4606" + +[[members]] +name = "identity" +type = "ContractAddress" +key = true + +[[members]] +name = "last_message" +type = "ByteArray" +key = false + +[[members]] +name = "hovering_tile_x" +type = "u32" +key = false + +[[members]] +name = "hovering_tile_y" +type = "u32" +key = false diff --git a/manifests/sepolia/deployment/abis/contracts/flippyflop-actions-4407e5f5.json b/manifests/sepolia/deployment/abis/contracts/flippyflop-actions-4407e5f5.json new file mode 100644 index 0000000..733ef4f --- /dev/null +++ b/manifests/sepolia/deployment/abis/contracts/flippyflop-actions-4407e5f5.json @@ -0,0 +1,240 @@ +[ + { + "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": "flippyflop::systems::actions::IActions" + }, + { + "type": "interface", + "name": "flippyflop::systems::actions::IActions", + "items": [ + { + "type": "function", + "name": "flip", + "inputs": [ + { + "name": "x", + "type": "core::integer::u32" + }, + { + "name": "y", + "type": "core::integer::u32" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "flop", + "inputs": [], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "impl", + "name": "IDojoInitImpl", + "interface_name": "flippyflop::systems::actions::actions::IDojoInit" + }, + { + "type": "interface", + "name": "flippyflop::systems::actions::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": "flippyflop::systems::actions::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/sepolia/deployment/abis/dojo-base.json b/manifests/sepolia/deployment/abis/dojo-base.json new file mode 100644 index 0000000..4800464 --- /dev/null +++ b/manifests/sepolia/deployment/abis/dojo-base.json @@ -0,0 +1,98 @@ +[ + { + "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/sepolia/deployment/abis/dojo-world.json b/manifests/sepolia/deployment/abis/dojo-world.json new file mode 100644 index 0000000..03bdfbb --- /dev/null +++ b/manifests/sepolia/deployment/abis/dojo-world.json @@ -0,0 +1,1286 @@ +[ + { + "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_lobotomized", + "inputs": [ + { + "name": "model_selector", + "type": "core::felt252" + }, + { + "name": "entity_id", + "type": "core::felt252" + } + ], + "outputs": [ + { + "type": "core::felt252" + } + ], + "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": "set_entity_lobotomized", + "inputs": [ + { + "name": "model_selector", + "type": "core::felt252" + }, + { + "name": "keys", + "type": "core::array::Span::" + }, + { + "name": "entity_id", + "type": "core::felt252" + }, + { + "name": "value", + "type": "core::felt252" + } + ], + "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": "delete_entity_lobotomized", + "inputs": [ + { + "name": "model_selector", + "type": "core::felt252" + }, + { + "name": "entity_id", + "type": "core::felt252" + } + ], + "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/sepolia/deployment/abis/models/flippyflop-Tile-61fb9291.json b/manifests/sepolia/deployment/abis/models/flippyflop-Tile-61fb9291.json new file mode 100644 index 0000000..0c7a6a4 --- /dev/null +++ b/manifests/sepolia/deployment/abis/models/flippyflop-Tile-61fb9291.json @@ -0,0 +1,411 @@ +[ + { + "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": "tileImpl", + "interface_name": "flippyflop::models::Itile" + }, + { + "type": "struct", + "name": "flippyflop::models::Tile", + "members": [ + { + "name": "x", + "type": "core::integer::u32" + }, + { + "name": "y", + "type": "core::integer::u32" + }, + { + "name": "flipped", + "type": "core::felt252" + } + ] + }, + { + "type": "interface", + "name": "flippyflop::models::Itile", + "items": [ + { + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "flippyflop::models::Tile" + } + ], + "outputs": [], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "flippyflop::models::tile::Event", + "kind": "enum", + "variants": [] + } +] \ No newline at end of file diff --git a/manifests/sepolia/deployment/abis/models/flippyflop-User-25ca4606.json b/manifests/sepolia/deployment/abis/models/flippyflop-User-25ca4606.json new file mode 100644 index 0000000..580eeba --- /dev/null +++ b/manifests/sepolia/deployment/abis/models/flippyflop-User-25ca4606.json @@ -0,0 +1,415 @@ +[ + { + "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": "userImpl", + "interface_name": "flippyflop::models::Iuser" + }, + { + "type": "struct", + "name": "flippyflop::models::User", + "members": [ + { + "name": "identity", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "last_message", + "type": "core::byte_array::ByteArray" + }, + { + "name": "hovering_tile_x", + "type": "core::integer::u32" + }, + { + "name": "hovering_tile_y", + "type": "core::integer::u32" + } + ] + }, + { + "type": "interface", + "name": "flippyflop::models::Iuser", + "items": [ + { + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "flippyflop::models::User" + } + ], + "outputs": [], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "flippyflop::models::user::Event", + "kind": "enum", + "variants": [] + } +] \ No newline at end of file diff --git a/manifests/dev/deployment/manifest.json b/manifests/sepolia/deployment/manifest.json similarity index 98% rename from manifests/dev/deployment/manifest.json rename to manifests/sepolia/deployment/manifest.json index 525abf3..e34496f 100644 --- a/manifests/dev/deployment/manifest.json +++ b/manifests/sepolia/deployment/manifest.json @@ -1289,13 +1289,13 @@ ] } ], - "address": "0x1ca8e3b7bc101ffd443a1e3b452a4f49607841461b168cb2cc365322722b67", - "transaction_hash": "0xbf63131ca74cb8d3edac57de7678de1b49e649c6aeb5fc92ee4898446dd60", - "block_number": 3, - "seed": "flippyflop", + "address": "0x3e61be69b2e12ba2d5fe6f3b39103014e1c2c708a61704ecdb0e3bb41f8bb3", + "transaction_hash": "0x4043d120a94b68f1fd67c6dcc42be2db59770182cb0b0381308045421ca0c0", + "block_number": null, + "seed": "flippyflop-sepolia-1000", "metadata": { - "profile_name": "dev", - "rpc_url": "http://localhost:5050/" + "profile_name": "sepolia", + "rpc_url": "https://api.cartridge.gg/x/starknet/sepolia" }, "manifest_name": "dojo-world" }, @@ -1303,16 +1303,16 @@ "kind": "Class", "class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", "original_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", - "abi": "manifests/dev/deployment/abis/dojo-base.json", + "abi": "manifests/sepolia/deployment/abis/dojo-base.json", "tag": "dojo-base", "manifest_name": "dojo-base" }, "contracts": [ { "kind": "DojoContract", - "address": "0x6dc710c0589d8ceb1a924c6632f4c9a8623f85c38a7e0cbed845157727b9b54", - "class_hash": "0x5728ae47027cc1a450ef87fa6388d2dd47ef198f3521b85bee7be955c838802", - "original_class_hash": "0x5728ae47027cc1a450ef87fa6388d2dd47ef198f3521b85bee7be955c838802", + "address": "0x68f0a9e8c6b953ed6afcb557cd8de6d6cd763d4b735f9a3081ce48271c44965", + "class_hash": "0x3cb3054e8698d29882d99d95408ced1a14fbf6fe85296e89f76cf2462646f44", + "original_class_hash": "0x3cb3054e8698d29882d99d95408ced1a14fbf6fe85296e89f76cf2462646f44", "base_class_hash": "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2", "abi": [ { @@ -1555,11 +1555,13 @@ } ], "reads": [], - "writes": [ - "flippyflop-Tile" - ], + "writes": [], "init_calldata": [], "tag": "flippyflop-actions", + "systems": [ + "flip", + "flop" + ], "manifest_name": "flippyflop-actions-4407e5f5" } ], @@ -1997,6 +1999,7 @@ } ], "tag": "flippyflop-Tile", + "qualified_path": "flippyflop::models::tile", "manifest_name": "flippyflop-Tile-61fb9291" }, { @@ -2441,6 +2444,7 @@ } ], "tag": "flippyflop-User", + "qualified_path": "flippyflop::models::user", "manifest_name": "flippyflop-User-25ca4606" } ] diff --git a/manifests/dev/deployment/manifest.toml b/manifests/sepolia/deployment/manifest.toml similarity index 62% rename from manifests/dev/deployment/manifest.toml rename to manifests/sepolia/deployment/manifest.toml index ae929ec..cac6361 100644 --- a/manifests/dev/deployment/manifest.toml +++ b/manifests/sepolia/deployment/manifest.toml @@ -2,44 +2,48 @@ kind = "WorldContract" class_hash = "0x215f0e85953fb8a60ac54211eaa2368eaa5cda3427ca4eeb17078099d09a43d" original_class_hash = "0x215f0e85953fb8a60ac54211eaa2368eaa5cda3427ca4eeb17078099d09a43d" -abi = "manifests/dev/deployment/abis/dojo-world.json" -address = "0x1ca8e3b7bc101ffd443a1e3b452a4f49607841461b168cb2cc365322722b67" -transaction_hash = "0xbf63131ca74cb8d3edac57de7678de1b49e649c6aeb5fc92ee4898446dd60" -block_number = 3 -seed = "flippyflop" +abi = "manifests/sepolia/deployment/abis/dojo-world.json" +address = "0x3e61be69b2e12ba2d5fe6f3b39103014e1c2c708a61704ecdb0e3bb41f8bb3" +transaction_hash = "0x4043d120a94b68f1fd67c6dcc42be2db59770182cb0b0381308045421ca0c0" +seed = "flippyflop-sepolia-1000" manifest_name = "dojo-world" [world.metadata] -profile_name = "dev" -rpc_url = "http://localhost:5050/" +profile_name = "sepolia" +rpc_url = "https://api.cartridge.gg/x/starknet/sepolia" [base] kind = "Class" class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" original_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/dojo-base.json" +abi = "manifests/sepolia/deployment/abis/dojo-base.json" tag = "dojo-base" manifest_name = "dojo-base" [[contracts]] kind = "DojoContract" -address = "0x6dc710c0589d8ceb1a924c6632f4c9a8623f85c38a7e0cbed845157727b9b54" -class_hash = "0x5728ae47027cc1a450ef87fa6388d2dd47ef198f3521b85bee7be955c838802" -original_class_hash = "0x5728ae47027cc1a450ef87fa6388d2dd47ef198f3521b85bee7be955c838802" +address = "0x68f0a9e8c6b953ed6afcb557cd8de6d6cd763d4b735f9a3081ce48271c44965" +class_hash = "0x3cb3054e8698d29882d99d95408ced1a14fbf6fe85296e89f76cf2462646f44" +original_class_hash = "0x3cb3054e8698d29882d99d95408ced1a14fbf6fe85296e89f76cf2462646f44" base_class_hash = "0x2427dd10a58850ac9a5ca6ce04b7771b05330fd18f2e481831ad903b969e6b2" -abi = "manifests/dev/deployment/abis/contracts/flippyflop-actions-4407e5f5.json" +abi = "manifests/sepolia/deployment/abis/contracts/flippyflop-actions-4407e5f5.json" reads = [] -writes = ["flippyflop-Tile"] +writes = [] init_calldata = [] tag = "flippyflop-actions" +systems = [ + "flip", + "flop", +] manifest_name = "flippyflop-actions-4407e5f5" [[models]] kind = "DojoModel" class_hash = "0x7824b845296994a22d3df72db34fdea9f7aeec2fb0487459a07574ffe57549e" original_class_hash = "0x7824b845296994a22d3df72db34fdea9f7aeec2fb0487459a07574ffe57549e" -abi = "manifests/dev/deployment/abis/models/flippyflop-Tile-61fb9291.json" +abi = "manifests/sepolia/deployment/abis/models/flippyflop-Tile-61fb9291.json" tag = "flippyflop-Tile" +qualified_path = "flippyflop::models::tile" manifest_name = "flippyflop-Tile-61fb9291" [[models.members]] @@ -61,8 +65,9 @@ key = false kind = "DojoModel" class_hash = "0x3b76de62f8e30048590802eb9b8a74235bc6456dcdf04d086df0321ff91c909" original_class_hash = "0x3b76de62f8e30048590802eb9b8a74235bc6456dcdf04d086df0321ff91c909" -abi = "manifests/dev/deployment/abis/models/flippyflop-User-25ca4606.json" +abi = "manifests/sepolia/deployment/abis/models/flippyflop-User-25ca4606.json" tag = "flippyflop-User" +qualified_path = "flippyflop::models::user" manifest_name = "flippyflop-User-25ca4606" [[models.members]] diff --git a/sepolia.db b/sepolia.db new file mode 100644 index 0000000..e2263fd Binary files /dev/null and b/sepolia.db differ diff --git a/src/models.cairo b/src/models.cairo index 517d0d4..b24b8a3 100644 --- a/src/models.cairo +++ b/src/models.cairo @@ -20,4 +20,3 @@ pub struct User { pub hovering_tile_x: u32, pub hovering_tile_y: u32, } - diff --git a/src/systems/actions.cairo b/src/systems/actions.cairo index 7b82c55..39cb67f 100644 --- a/src/systems/actions.cairo +++ b/src/systems/actions.cairo @@ -9,11 +9,13 @@ const TILE_MODEL_SELECTOR: felt252 = 0x61fb9291a47fbce6a74257be2400d0f807067fd73e6437aa3f7461c38153492; const TILE_FLIPPED_SELECTOR: felt252 = 0x1cc1e903b2099cf12a3c9efcefe94e8820db24825120dfb35aa6c519a16b10e; +const X_BOUND: u32 = 1000; +const Y_BOUND: u32 = 1000; // dojo decorator #[dojo::contract] mod actions { - use super::{IActions, TILE_MODEL_SELECTOR, TILE_FLIPPED_SELECTOR}; + use super::{IActions, TILE_MODEL_SELECTOR, TILE_FLIPPED_SELECTOR, X_BOUND, Y_BOUND}; use starknet::{ContractAddress, get_caller_address, info::get_tx_info}; use flippyflop::models::Tile; use core::poseidon::poseidon_hash_span; @@ -23,6 +25,9 @@ mod actions { impl ActionsImpl of IActions { // Humans can only flip unflipped tiles, but they can chose their tile to unflip. fn flip(ref world: IWorldDispatcher, x: u32, y: u32) { + assert!(x < X_BOUND, "x out of bounds"); + assert!(y < Y_BOUND, "y out of bounds"); + let player = get_caller_address(); let hash = poseidon_hash_span(array![x.into(), y.into()].span()); let tile = world.entity_lobotomized(TILE_MODEL_SELECTOR, hash); @@ -43,8 +48,8 @@ mod actions { let hash: u256 = poseidon_hash_span(array![evil_address.into(), nonce.into()].into()) .into(); - let x: u32 = (hash % 100).try_into().unwrap(); - let y: u32 = ((hash / 100) % 100).try_into().unwrap(); + let x: u32 = (hash % X_BOUND.into()).try_into().unwrap(); + let y: u32 = ((hash / Y_BOUND.into()) % Y_BOUND.into()).try_into().unwrap(); let entity_hash = poseidon_hash_span(array![x.into(), y.into()].span()); world