diff --git a/client/bun.lockb b/client/bun.lockb index f4dbf0ad..5fd9f3a7 100755 Binary files a/client/bun.lockb and b/client/bun.lockb differ diff --git a/client/package.json b/client/package.json index c066a2a4..1cb19f4f 100644 --- a/client/package.json +++ b/client/package.json @@ -36,8 +36,10 @@ "@dojoengine/torii-client": "^1.0.0-alpha.30", "@dojoengine/torii-wasm": "^1.0.0-alpha.30", "@dojoengine/utils": "^1.0.0-alpha.30", + "@threlte/core": "^8.0.0-next.30", "@threlte/extras": "^9.0.0-next.39", + "clsx": "^2.1.1", "lucide-svelte": "^0.445.0", "prettier": "^3.3.3", @@ -46,7 +48,6 @@ "tailwind-merge": "^2.5.4", "three": "^0.168.0", "three-inspect": "^0.7.2", - "vite-plugin-mkcert": "^1.17.6", "vite-plugin-top-level-await": "^1.4.4", "vite-plugin-wasm": "^3.3.0" }, diff --git a/client/src/dojo/manifest_octoguns_sepolia.json b/client/src/dojo/manifest_octoguns_sepolia.json deleted file mode 100644 index 1858d410..00000000 --- a/client/src/dojo/manifest_octoguns_sepolia.json +++ /dev/null @@ -1,2404 +0,0 @@ -{ - "world": { - "class_hash": "0x139239a99d627697b19b9856beaef7896fc75375caf3d750dd76982a7afeb78", - "address": "0x633afc7ba46094bb158889ba55487886c5748439433a555ca3ac16f502d7dc", - "seed": "fdsafdasasdsssfasdfssf", - "name": "Octoguns", - "abi": [ - { - "type": "impl", - "name": "World", - "interface_name": "dojo::world::iworld::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": "enum", - "name": "dojo::world::resource::Resource", - "variants": [ - { - "name": "Model", - "type": "(core::starknet::contract_address::ContractAddress, core::felt252)" - }, - { - "name": "Event", - "type": "(core::starknet::contract_address::ContractAddress, core::felt252)" - }, - { - "name": "Contract", - "type": "(core::starknet::contract_address::ContractAddress, core::felt252)" - }, - { - "name": "Namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "World", - "type": "()" - }, - { - "name": "Unregistered", - "type": "()" - } - ] - }, - { - "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": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::definition::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::meta::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::meta::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::meta::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": "interface", - "name": "dojo::world::iworld::IWorld", - "items": [ - { - "type": "function", - "name": "resource", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "dojo::world::resource::Resource" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "uuid", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "external" - }, - { - "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_event", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_model", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_contract", - "inputs": [ - { - "name": "salt", - "type": "core::felt252" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [ - { - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "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": "upgrade_event", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_model", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_contract", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "emit_event", - "inputs": [ - { - "name": "event_selector", - "type": "core::felt252" - }, - { - "name": "keys", - "type": "core::array::Span::" - }, - { - "name": "values", - "type": "core::array::Span::" - }, - { - "name": "historical", - "type": "core::bool" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::definition::ModelIndex" - }, - { - "name": "layout", - "type": "dojo::meta::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::definition::ModelIndex" - }, - { - "name": "values", - "type": "core::array::Span::" - }, - { - "name": "layout", - "type": "dojo::meta::layout::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "delete_entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::definition::ModelIndex" - }, - { - "name": "layout", - "type": "dojo::meta::layout::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "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::iworld::IUpgradeableWorld" - }, - { - "type": "interface", - "name": "dojo::world::iworld::IUpgradeableWorld", - "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": [ - { - "name": "world_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::WorldSpawned", - "kind": "struct", - "members": [ - { - "name": "creator", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "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::NamespaceRegistered", - "kind": "struct", - "members": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "key" - }, - { - "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": "key" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "key" - }, - { - "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::EventRegistered", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "key" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "key" - }, - { - "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::ContractRegistered", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "key" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "key" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "salt", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::ModelUpgraded", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "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::EventUpgraded", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "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::ContractUpgraded", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::ContractInitialized", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "init_calldata", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::EventEmitted", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "system_address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "key" - }, - { - "name": "historical", - "type": "core::bool", - "kind": "key" - }, - { - "name": "keys", - "type": "core::array::Span::", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::MetadataUpdate", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "uri", - "type": "core::byte_array::ByteArray", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreSetRecord", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "key" - }, - { - "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": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreUpdateMember", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "member_selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreDelRecord", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "key" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::WriterUpdated", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "key" - }, - { - "name": "value", - "type": "core::bool", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::OwnerUpdated", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "key" - }, - { - "name": "value", - "type": "core::bool", - "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": "WorldUpgraded", - "type": "dojo::world::world_contract::world::WorldUpgraded", - "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": "EventRegistered", - "type": "dojo::world::world_contract::world::EventRegistered", - "kind": "nested" - }, - { - "name": "ContractRegistered", - "type": "dojo::world::world_contract::world::ContractRegistered", - "kind": "nested" - }, - { - "name": "ModelUpgraded", - "type": "dojo::world::world_contract::world::ModelUpgraded", - "kind": "nested" - }, - { - "name": "EventUpgraded", - "type": "dojo::world::world_contract::world::EventUpgraded", - "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": "EventEmitted", - "type": "dojo::world::world_contract::world::EventEmitted", - "kind": "nested" - }, - { - "name": "MetadataUpdate", - "type": "dojo::world::world_contract::world::MetadataUpdate", - "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" - } - ] - } - ] - }, - "contracts": [ - { - "address": "0x3451db8ccea9054ec016d1bd9ec40cde6ba895e92762bfb0a7f4136aee7652", - "class_hash": "0x18ecc8ded7425656bfdf18bf4fcb86a12f6bc94183de10ef17c4e9704fa01e", - "abi": [ - { - "type": "impl", - "name": "actions__ContractImpl", - "interface_name": "dojo::contract::interface::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::interface::IContract", - "items": [ - { - "type": "function", - "name": "dojo_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "ActionsImpl", - "interface_name": "octoguns::systems::actions::IActions" - }, - { - "type": "enum", - "name": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "octoguns::types::IVec2", - "members": [ - { - "name": "x", - "type": "core::integer::u64" - }, - { - "name": "y", - "type": "core::integer::u64" - }, - { - "name": "xdir", - "type": "core::bool" - }, - { - "name": "ydir", - "type": "core::bool" - } - ] - }, - { - "type": "struct", - "name": "octoguns::types::Shot", - "members": [ - { - "name": "angle", - "type": "core::integer::u64" - }, - { - "name": "step", - "type": "core::integer::u32" - } - ] - }, - { - "type": "struct", - "name": "octoguns::types::TurnMove", - "members": [ - { - "name": "sub_moves", - "type": "core::array::Array::" - }, - { - "name": "shots", - "type": "core::array::Array::" - } - ] - }, - { - "type": "interface", - "name": "octoguns::systems::actions::IActions", - "items": [ - { - "type": "function", - "name": "move", - "inputs": [ - { - "name": "session_id", - "type": "core::integer::u32" - }, - { - "name": "moves", - "type": "octoguns::types::TurnMove" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::contract::components::world_provider::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::iworld::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::contract::components::world_provider::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world_dispatcher", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::iworld::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableImpl", - "interface_name": "dojo::contract::components::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::components::upgradeable::IUpgradeable", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "constructor", - "name": "constructor", - "inputs": [] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "enum", - "variants": [] - }, - { - "type": "event", - "name": "octoguns::systems::actions::actions::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "nested" - }, - { - "name": "WorldProviderEvent", - "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "nested" - } - ] - } - ], - "init_calldata": [], - "tag": "octoguns-actions", - "systems": [] - }, - { - "address": "0x7219a096b58c54f88c9d61943a3e6e278056a7d01e3ad8cb73d778a5aaa364d", - "class_hash": "0x5ebb65ccfaced79072fed9661f6c70a71389e2ea0bafe73b91ee2da13657f7a", - "abi": [ - { - "type": "impl", - "name": "mapmaker__ContractImpl", - "interface_name": "dojo::contract::interface::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::interface::IContract", - "items": [ - { - "type": "function", - "name": "dojo_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "MapmakerImpl", - "interface_name": "octoguns::systems::mapmaker::IMapmaker" - }, - { - "type": "interface", - "name": "octoguns::systems::mapmaker::IMapmaker", - "items": [ - { - "type": "function", - "name": "create", - "inputs": [ - { - "name": "grid1", - "type": "core::felt252" - }, - { - "name": "grid2", - "type": "core::felt252" - }, - { - "name": "grid3", - "type": "core::felt252" - } - ], - "outputs": [], - "state_mutability": "view" - }, - { - "type": "function", - "name": "default_map", - "inputs": [], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::contract::components::world_provider::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::iworld::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::contract::components::world_provider::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world_dispatcher", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::iworld::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableImpl", - "interface_name": "dojo::contract::components::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::components::upgradeable::IUpgradeable", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "constructor", - "name": "constructor", - "inputs": [] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "enum", - "variants": [] - }, - { - "type": "event", - "name": "octoguns::systems::mapmaker::mapmaker::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "nested" - }, - { - "name": "WorldProviderEvent", - "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "nested" - } - ] - } - ], - "init_calldata": [], - "tag": "octoguns-mapmaker", - "systems": [] - }, - { - "address": "0x4a9b6ecaa6a57875a7e1b3600d42cf6e6fd260dd85e5a4f5aa8288c08dbfd6d", - "class_hash": "0x6c3d6a7a56075c6868564c9bae1171a31267c4654d407692137940f9ad94f27", - "abi": [ - { - "type": "impl", - "name": "spawn__ContractImpl", - "interface_name": "dojo::contract::interface::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::interface::IContract", - "items": [ - { - "type": "function", - "name": "dojo_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "SpawnImpl", - "interface_name": "octoguns::systems::spawn::ISpawn" - }, - { - "type": "interface", - "name": "octoguns::systems::spawn::ISpawn", - "items": [ - { - "type": "function", - "name": "spawn", - "inputs": [ - { - "name": "session_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::contract::components::world_provider::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::iworld::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::contract::components::world_provider::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world_dispatcher", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::iworld::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableImpl", - "interface_name": "dojo::contract::components::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::components::upgradeable::IUpgradeable", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "constructor", - "name": "constructor", - "inputs": [] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "enum", - "variants": [] - }, - { - "type": "event", - "name": "octoguns::systems::spawn::spawn::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "nested" - }, - { - "name": "WorldProviderEvent", - "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "nested" - } - ] - } - ], - "init_calldata": [], - "tag": "octoguns-spawn", - "systems": [] - }, - { - "address": "0x7f938d33e2a6938082a094102d9cdd765a7688389b0de5f90e2dc8e4ee6dfcd", - "class_hash": "0xca73b71b52f9ae4fce269442a08868ef9b83aeacfbf9f32eb3e6ff69128d62", - "abi": [ - { - "type": "impl", - "name": "start__ContractImpl", - "interface_name": "dojo::contract::interface::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::interface::IContract", - "items": [ - { - "type": "function", - "name": "dojo_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "StartImpl", - "interface_name": "octoguns::systems::start::IStart" - }, - { - "type": "struct", - "name": "octoguns::types::Settings", - "members": [ - { - "name": "bullet_speed", - "type": "core::integer::u64" - }, - { - "name": "bullet_sub_steps", - "type": "core::integer::u32" - }, - { - "name": "bullets_per_turn", - "type": "core::integer::u32" - }, - { - "name": "sub_moves_per_turn", - "type": "core::integer::u32" - }, - { - "name": "max_distance_per_sub_move", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "octoguns::systems::start::IStart", - "items": [ - { - "type": "function", - "name": "create", - "inputs": [ - { - "name": "map_id", - "type": "core::integer::u32" - }, - { - "name": "settings", - "type": "octoguns::types::Settings" - } - ], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "create_closed", - "inputs": [ - { - "name": "map_id", - "type": "core::integer::u32" - }, - { - "name": "player_address_1", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "player_address_2", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "settings", - "type": "octoguns::types::Settings" - } - ], - "outputs": [ - { - "type": "core::integer::u128" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "join", - "inputs": [ - { - "name": "session_id", - "type": "core::integer::u32" - } - ], - "outputs": [], - "state_mutability": "view" - } - ] - }, - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::contract::components::world_provider::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::iworld::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::contract::components::world_provider::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world_dispatcher", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::iworld::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableImpl", - "interface_name": "dojo::contract::components::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::components::upgradeable::IUpgradeable", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "constructor", - "name": "constructor", - "inputs": [] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "enum", - "variants": [] - }, - { - "type": "event", - "name": "octoguns::systems::start::start::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "nested" - }, - { - "name": "WorldProviderEvent", - "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "nested" - } - ] - } - ], - "init_calldata": [], - "tag": "octoguns-start", - "systems": [] - }, - { - "address": "0x2adbf7a614d31d427d8227104e6796eb9c88439ccc240c5a5f9d3a19d0ea6d5", - "class_hash": "0x5e3a52d7af64c0ccba8fa8490cc790ac58c4a7694f3c872f78091e653bbbca1", - "abi": [ - { - "type": "impl", - "name": "planetelo__ContractImpl", - "interface_name": "dojo::contract::interface::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::interface::IContract", - "items": [ - { - "type": "function", - "name": "dojo_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "PlaneteloInterfaceImpl", - "interface_name": "octoguns::planetelo::IPlanetelo" - }, - { - "type": "struct", - "name": "planetelo_interface::interfaces::octoguns::Settings", - "members": [ - { - "name": "bullet_speed", - "type": "core::integer::u64" - }, - { - "name": "bullet_sub_steps", - "type": "core::integer::u32" - }, - { - "name": "bullets_per_turn", - "type": "core::integer::u32" - }, - { - "name": "sub_moves_per_turn", - "type": "core::integer::u32" - }, - { - "name": "max_distance_per_sub_move", - "type": "core::integer::u32" - } - ] - }, - { - "type": "interface", - "name": "octoguns::planetelo::IPlanetelo", - "items": [ - { - "type": "function", - "name": "create_playlist", - "inputs": [ - { - "name": "maps", - "type": "core::array::Array::" - }, - { - "name": "settings", - "type": "planetelo_interface::interfaces::octoguns::Settings" - } - ], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "spawn_default_playlist", - "inputs": [], - "outputs": [], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_result", - "inputs": [ - { - "name": "session_id", - "type": "core::integer::u32" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "OneOnOneImpl", - "interface_name": "planetelo_interface::interfaces::planetelo::IOneOnOne" - }, - { - "type": "enum", - "name": "planetelo_interface::interfaces::planetelo::Status", - "variants": [ - { - "name": "None", - "type": "()" - }, - { - "name": "Active", - "type": "()" - }, - { - "name": "Draw", - "type": "()" - }, - { - "name": "Winner", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "planetelo_interface::interfaces::planetelo::IOneOnOne", - "items": [ - { - "type": "function", - "name": "create_match", - "inputs": [ - { - "name": "p1", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "p2", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "playlist_id", - "type": "core::integer::u128" - } - ], - "outputs": [ - { - "type": "core::integer::u128" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "settle_match", - "inputs": [ - { - "name": "match_id", - "type": "core::integer::u128" - } - ], - "outputs": [ - { - "type": "planetelo_interface::interfaces::planetelo::Status" - } - ], - "state_mutability": "external" - } - ] - }, - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::contract::components::world_provider::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::iworld::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::contract::components::world_provider::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world_dispatcher", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::iworld::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableImpl", - "interface_name": "dojo::contract::components::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::components::upgradeable::IUpgradeable", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "constructor", - "name": "constructor", - "inputs": [] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "enum", - "variants": [] - }, - { - "type": "event", - "name": "octoguns::planetelo::planetelo::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "nested" - }, - { - "name": "WorldProviderEvent", - "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "nested" - } - ] - } - ], - "init_calldata": [], - "tag": "planetelo-planetelo", - "systems": [] - } - ], - "models": [ - { - "members": [], - "class_hash": "0x544d7440f53fd5cc2b484764334e97513c5dae47f892fe355f74b6da315e2cb", - "tag": "Bullet" - }, - { - "members": [], - "class_hash": "0x6c2aa2877c5127152ed5e97f4a2c36669b195ec880a7c786772ab274c01ee13", - "tag": "CharacterModel" - }, - { - "members": [], - "class_hash": "0x7650a39f52821e1d059df1220bc13a9197443a022c53dadfeebccdb083e5e98", - "tag": "CharacterPosition" - }, - { - "members": [], - "class_hash": "0x262b6417ae8473f6b637cc69bf987cbcf269ca52b90093deafeab7a52a5b9be", - "tag": "Global" - }, - { - "members": [], - "class_hash": "0x56c20192cd4dfc7fa2a2671052e324fa7b0a5ef8cfcea568359a27c006eb1ce", - "tag": "Map" - }, - { - "members": [], - "class_hash": "0x2b7cac4dbe2c765532068f745b9405fb4d4e47a8fd9a854c0f2c80dc400ec80", - "tag": "Player" - }, - { - "members": [], - "class_hash": "0x548a938b43e277e2d4e666f75f314140d836509a944c900fc9f302516ff36e7", - "tag": "Playlist" - }, - { - "members": [], - "class_hash": "0x165b93c1ab8c040de62631000c083e2fa890ab0769c821ee92b9c06bea0304e", - "tag": "PlaylistGlobal" - }, - { - "members": [], - "class_hash": "0x55429b96a3e0c2a711cd57ce27c028ce19d1dde7a090ca351743351b1672d28", - "tag": "Session" - }, - { - "members": [], - "class_hash": "0x6418324f638b2054ad0c7efd5c3579e90c1be56b44e808eda54e8fcc716677f", - "tag": "SessionMeta" - }, - { - "members": [], - "class_hash": "0x68c24665a78264d14c4a58a852a3699563f66889c09b94f32f4144ec9cd6d39", - "tag": "SessionPrimitives" - }, - { - "members": [], - "class_hash": "0x2327e0e59700b9c414026b8d39440b27bf57e9cc41f4777834a4bb12caa3970", - "tag": "TurnData" - } - ], - "events": [] - } \ No newline at end of file diff --git a/client/src/dojo/manifest_sepolia.json b/client/src/dojo/manifest_sepolia.json deleted file mode 100644 index 3465de7f..00000000 --- a/client/src/dojo/manifest_sepolia.json +++ /dev/null @@ -1,1809 +0,0 @@ -{ - "world": { - "class_hash": "0x139239a99d627697b19b9856beaef7896fc75375caf3d750dd76982a7afeb78", - "address": "0x1924653b0f449dad3ba9b1d3d354a219cd8241b63cf31f8d90728ceb3bfc7cf", - "seed": "aaasdfdasdfasffdas", - "name": "Planetelo", - "abi": [ - { - "type": "impl", - "name": "World", - "interface_name": "dojo::world::iworld::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": "enum", - "name": "dojo::world::resource::Resource", - "variants": [ - { - "name": "Model", - "type": "(core::starknet::contract_address::ContractAddress, core::felt252)" - }, - { - "name": "Event", - "type": "(core::starknet::contract_address::ContractAddress, core::felt252)" - }, - { - "name": "Contract", - "type": "(core::starknet::contract_address::ContractAddress, core::felt252)" - }, - { - "name": "Namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "World", - "type": "()" - }, - { - "name": "Unregistered", - "type": "()" - } - ] - }, - { - "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": "core::bool", - "variants": [ - { - "name": "False", - "type": "()" - }, - { - "name": "True", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "dojo::model::definition::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::meta::layout::FieldLayout", - "members": [ - { - "name": "selector", - "type": "core::felt252" - }, - { - "name": "layout", - "type": "dojo::meta::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::meta::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": "interface", - "name": "dojo::world::iworld::IWorld", - "items": [ - { - "type": "function", - "name": "resource", - "inputs": [ - { - "name": "selector", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "dojo::world::resource::Resource" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "uuid", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "external" - }, - { - "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_event", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_model", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "register_contract", - "inputs": [ - { - "name": "salt", - "type": "core::felt252" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [ - { - "type": "core::starknet::contract_address::ContractAddress" - } - ], - "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": "upgrade_event", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_model", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade_contract", - "inputs": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [ - { - "type": "core::starknet::class_hash::ClassHash" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "emit_event", - "inputs": [ - { - "name": "event_selector", - "type": "core::felt252" - }, - { - "name": "keys", - "type": "core::array::Span::" - }, - { - "name": "values", - "type": "core::array::Span::" - }, - { - "name": "historical", - "type": "core::bool" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::definition::ModelIndex" - }, - { - "name": "layout", - "type": "dojo::meta::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::definition::ModelIndex" - }, - { - "name": "values", - "type": "core::array::Span::" - }, - { - "name": "layout", - "type": "dojo::meta::layout::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "delete_entity", - "inputs": [ - { - "name": "model_selector", - "type": "core::felt252" - }, - { - "name": "index", - "type": "dojo::model::definition::ModelIndex" - }, - { - "name": "layout", - "type": "dojo::meta::layout::Layout" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "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::iworld::IUpgradeableWorld" - }, - { - "type": "interface", - "name": "dojo::world::iworld::IUpgradeableWorld", - "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": [ - { - "name": "world_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::WorldSpawned", - "kind": "struct", - "members": [ - { - "name": "creator", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "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::NamespaceRegistered", - "kind": "struct", - "members": [ - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "key" - }, - { - "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": "key" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "key" - }, - { - "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::EventRegistered", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "key" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "key" - }, - { - "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::ContractRegistered", - "kind": "struct", - "members": [ - { - "name": "name", - "type": "core::byte_array::ByteArray", - "kind": "key" - }, - { - "name": "namespace", - "type": "core::byte_array::ByteArray", - "kind": "key" - }, - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - }, - { - "name": "salt", - "type": "core::felt252", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::ModelUpgraded", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "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::EventUpgraded", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "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::ContractUpgraded", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::ContractInitialized", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "init_calldata", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::EventEmitted", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "system_address", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "key" - }, - { - "name": "historical", - "type": "core::bool", - "kind": "key" - }, - { - "name": "keys", - "type": "core::array::Span::", - "kind": "data" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::MetadataUpdate", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "uri", - "type": "core::byte_array::ByteArray", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreSetRecord", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "key" - }, - { - "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": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreUpdateMember", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "member_selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "values", - "type": "core::array::Span::", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::StoreDelRecord", - "kind": "struct", - "members": [ - { - "name": "selector", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "entity_id", - "type": "core::felt252", - "kind": "key" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::WriterUpdated", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "key" - }, - { - "name": "value", - "type": "core::bool", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::world::world_contract::world::OwnerUpdated", - "kind": "struct", - "members": [ - { - "name": "resource", - "type": "core::felt252", - "kind": "key" - }, - { - "name": "contract", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "key" - }, - { - "name": "value", - "type": "core::bool", - "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": "WorldUpgraded", - "type": "dojo::world::world_contract::world::WorldUpgraded", - "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": "EventRegistered", - "type": "dojo::world::world_contract::world::EventRegistered", - "kind": "nested" - }, - { - "name": "ContractRegistered", - "type": "dojo::world::world_contract::world::ContractRegistered", - "kind": "nested" - }, - { - "name": "ModelUpgraded", - "type": "dojo::world::world_contract::world::ModelUpgraded", - "kind": "nested" - }, - { - "name": "EventUpgraded", - "type": "dojo::world::world_contract::world::EventUpgraded", - "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": "EventEmitted", - "type": "dojo::world::world_contract::world::EventEmitted", - "kind": "nested" - }, - { - "name": "MetadataUpdate", - "type": "dojo::world::world_contract::world::MetadataUpdate", - "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" - } - ] - } - ] - }, - "contracts": [ - { - "address": "0x5be332148f819892b4f47b6404d04832b9afa9cbca1adf2175842d51be4fcd2", - "class_hash": "0x74f099c340933c8552a0616e8b8c91e7b4cd02f849e89de95fc217ff48dfb59", - "abi": [ - { - "type": "impl", - "name": "queue__ContractImpl", - "interface_name": "dojo::contract::interface::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::interface::IContract", - "items": [ - { - "type": "function", - "name": "dojo_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "QueueImpl", - "interface_name": "planetelo::systems::queue::IQueue" - }, - { - "type": "struct", - "name": "planetelo::models::QueueMember", - "members": [ - { - "name": "game", - "type": "core::felt252" - }, - { - "name": "playlist", - "type": "core::integer::u128" - }, - { - "name": "index", - "type": "core::integer::u128" - }, - { - "name": "player", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "timestamp", - "type": "core::integer::u64" - }, - { - "name": "elo", - "type": "core::integer::u64" - } - ] - }, - { - "type": "interface", - "name": "planetelo::systems::queue::IQueue", - "items": [ - { - "type": "function", - "name": "queue", - "inputs": [ - { - "name": "game", - "type": "core::felt252" - }, - { - "name": "playlist", - "type": "core::integer::u128" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "dequeue", - "inputs": [ - { - "name": "game", - "type": "core::felt252" - }, - { - "name": "playlist", - "type": "core::integer::u128" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "matchmake", - "inputs": [ - { - "name": "game", - "type": "core::felt252" - }, - { - "name": "playlist", - "type": "core::integer::u128" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "settle", - "inputs": [ - { - "name": "game", - "type": "core::felt252" - }, - { - "name": "game_id", - "type": "core::integer::u128" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "get_elo", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "game", - "type": "core::felt252" - }, - { - "name": "playlist", - "type": "core::integer::u128" - } - ], - "outputs": [ - { - "type": "core::integer::u64" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_queue_length", - "inputs": [ - { - "name": "game", - "type": "core::felt252" - }, - { - "name": "playlist", - "type": "core::integer::u128" - } - ], - "outputs": [ - { - "type": "core::integer::u128" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_status", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "game", - "type": "core::felt252" - }, - { - "name": "playlist", - "type": "core::integer::u128" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_queue_members", - "inputs": [ - { - "name": "game", - "type": "core::felt252" - }, - { - "name": "playlist", - "type": "core::integer::u128" - } - ], - "outputs": [ - { - "type": "core::array::Array::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_player_game_id", - "inputs": [ - { - "name": "address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "game", - "type": "core::felt252" - }, - { - "name": "playlist", - "type": "core::integer::u128" - } - ], - "outputs": [ - { - "type": "core::integer::u128" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::contract::components::world_provider::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::iworld::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::contract::components::world_provider::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world_dispatcher", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::iworld::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableImpl", - "interface_name": "dojo::contract::components::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::components::upgradeable::IUpgradeable", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "constructor", - "name": "constructor", - "inputs": [] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "enum", - "variants": [] - }, - { - "type": "event", - "name": "planetelo::systems::queue::queue::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "nested" - }, - { - "name": "WorldProviderEvent", - "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "nested" - } - ] - } - ], - "init_calldata": [], - "tag": "planetelo-queue", - "systems": [] - }, - { - "address": "0x55782055ef3378f23bb9d73b11112490066e235fb35393dc36ab47247ce17ae", - "class_hash": "0x23d67862ab72cf3252f37e2aff0db2cc3eb4d0ed57d10bc35138b4bd162b93a", - "abi": [ - { - "type": "impl", - "name": "tournament__ContractImpl", - "interface_name": "dojo::contract::interface::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::interface::IContract", - "items": [ - { - "type": "function", - "name": "dojo_name", - "inputs": [], - "outputs": [ - { - "type": "core::byte_array::ByteArray" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "TournamentImpl", - "interface_name": "planetelo::systems::tournament::ITournamentActionsDispatcher" - }, - { - "type": "struct", - "name": "planetelo::systems::tournament::TournamentConfig", - "members": [ - { - "name": "swiss_rounds", - "type": "core::integer::u8" - }, - { - "name": "top_cut", - "type": "core::integer::u8" - }, - { - "name": "entry_time", - "type": "core::integer::u64" - } - ] - }, - { - "type": "interface", - "name": "planetelo::systems::tournament::ITournamentActionsDispatcher", - "items": [ - { - "type": "function", - "name": "create_tournament", - "inputs": [ - { - "name": "game", - "type": "core::felt252" - }, - { - "name": "playlist", - "type": "core::integer::u128" - }, - { - "name": "config", - "type": "planetelo::systems::tournament::TournamentConfig" - } - ], - "outputs": [ - { - "type": "core::integer::u128" - } - ], - "state_mutability": "external" - }, - { - "type": "function", - "name": "join_tournament", - "inputs": [ - { - "name": "tournament_id", - "type": "core::integer::u128" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "start_tournament", - "inputs": [ - { - "name": "tournament_id", - "type": "core::integer::u128" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "advance_tournament", - "inputs": [ - { - "name": "tournament_id", - "type": "core::integer::u128" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "function", - "name": "dojo_init", - "inputs": [], - "outputs": [], - "state_mutability": "view" - }, - { - "type": "impl", - "name": "WorldProviderImpl", - "interface_name": "dojo::contract::components::world_provider::IWorldProvider" - }, - { - "type": "struct", - "name": "dojo::world::iworld::IWorldDispatcher", - "members": [ - { - "name": "contract_address", - "type": "core::starknet::contract_address::ContractAddress" - } - ] - }, - { - "type": "interface", - "name": "dojo::contract::components::world_provider::IWorldProvider", - "items": [ - { - "type": "function", - "name": "world_dispatcher", - "inputs": [], - "outputs": [ - { - "type": "dojo::world::iworld::IWorldDispatcher" - } - ], - "state_mutability": "view" - } - ] - }, - { - "type": "impl", - "name": "UpgradeableImpl", - "interface_name": "dojo::contract::components::upgradeable::IUpgradeable" - }, - { - "type": "interface", - "name": "dojo::contract::components::upgradeable::IUpgradeable", - "items": [ - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "new_class_hash", - "type": "core::starknet::class_hash::ClassHash" - } - ], - "outputs": [], - "state_mutability": "external" - } - ] - }, - { - "type": "constructor", - "name": "constructor", - "inputs": [] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "struct", - "members": [ - { - "name": "class_hash", - "type": "core::starknet::class_hash::ClassHash", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "enum", - "variants": [ - { - "name": "Upgraded", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", - "kind": "nested" - } - ] - }, - { - "type": "event", - "name": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "enum", - "variants": [] - }, - { - "type": "event", - "name": "planetelo::systems::tournament::tournament::Event", - "kind": "enum", - "variants": [ - { - "name": "UpgradeableEvent", - "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", - "kind": "nested" - }, - { - "name": "WorldProviderEvent", - "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", - "kind": "nested" - } - ] - } - ], - "init_calldata": [], - "tag": "planetelo-tournament", - "systems": [] - } - ], - "models": [ - { - "members": [], - "class_hash": "0x2b80b08ba832f3f4977bfdb4fc79c79e2a40c272c6b23b5f8d03fa5491f5ddb", - "tag": "Elo" - }, - { - "members": [], - "class_hash": "0x72addb0bbcd04d2137b1459ab713a08651084c1b64614a6fe02b29bce2f84a2", - "tag": "Game" - }, - { - "members": [], - "class_hash": "0xb499568eb655fa0603345a4070852a56a118cb50c4bdc477fd67bd2aa77c8b", - "tag": "Global" - }, - { - "members": [], - "class_hash": "0x4d9d93a52718ad7da24a04a55bcd70c05ad83142472bc8ad771381978fef7d9", - "tag": "GlobalTournament" - }, - { - "members": [], - "class_hash": "0x7d950a261d8e32a4507cd9d9d9df0c0e31dc429e889258792dc15099fdc7fb8", - "tag": "Player" - }, - { - "members": [], - "class_hash": "0x278202613e13d3c314f620a4ca593ad686cecb39a9c362a6c4734882af212cf", - "tag": "PlayerStatus" - }, - { - "members": [], - "class_hash": "0x6d86d7da1b9814f7868e210a297f25d31b57b9dd28815f82f4306cfaa380bdc", - "tag": "Pool" - }, - { - "members": [], - "class_hash": "0x4182b0a5e8e5e60e91084285042cc25ffb9793c8273be65db87a07cff6d7f3b", - "tag": "Queue" - }, - { - "members": [], - "class_hash": "0x4875c7172d1e43019ddefe8365b00c88b0984edb4b53514c39de445f1bcbe56", - "tag": "QueueMember" - }, - { - "members": [], - "class_hash": "0x71ecb997451de7da9fde253581db3df54973fe1e45df22f7b1ed9cfb5f8981c", - "tag": "Tournament" - } - ], - "events": [] - } \ No newline at end of file diff --git a/client/src/dojo/setup.ts b/client/src/dojo/setup.ts index 18234dec..05ddd091 100644 --- a/client/src/dojo/setup.ts +++ b/client/src/dojo/setup.ts @@ -10,9 +10,6 @@ import type { ArraySignatureType } from 'starknet' import { BurnerManager } from '@dojoengine/create-burner' import { getSyncEntities, getSyncEvents } from '@dojoengine/state' import { account } from '$src/stores/account' -import manifest from './manifest_sepolia.json' -import { Contract } from 'starknet' -import { planeteloStore } from '$src/stores/dojoStore' export type SetupResult = Awaited> export async function setup( @@ -21,15 +18,13 @@ export async function setup( ) { // torii client const toriiClient = await torii.createClient({ - rpcUrl: 'https://api.cartridge.gg/x/starknet/sepolia', - toriiUrl: 'https://api.cartridge.gg/x/planetelo/torii', + rpcUrl: config.rpcUrl, + toriiUrl: config.toriiUrl, relayUrl: '', worldAddress: - '0x633afc7ba46094bb158889ba55487886c5748439433a555ca3ac16f502d7dc', + '0x190ca7e6b8c28576ae3616add6f7ff4cf454ee60460238226d8284ca77445e2', }) - - // create contract components const contractComponents = defineContractComponents(world) @@ -37,8 +32,7 @@ export async function setup( const clientComponents = createClientComponents({ contractComponents }) // create dojo provider - const dojoProvider = new DojoProvider(config.manifest, 'https://api.cartridge.gg/x/starknet/sepolia') - console.log(dojoProvider) + const dojoProvider = new DojoProvider(config.manifest, config.rpcUrl) const sync = await getSyncEntities( toriiClient, @@ -47,12 +41,6 @@ export async function setup( [] ) - let contracts = JSON.parse(JSON.stringify(manifest.contracts)); - console.log(contracts[0]); - - const myTestContract = new Contract(contracts[0].abi, contracts[0].address, dojoProvider.provider).typedv2(contracts[0].abi); - planeteloStore.set(myTestContract); - // setup world // setup world const client = await setupWorld(dojoProvider) // create burner manager diff --git a/client/src/dojoConfig.ts b/client/src/dojoConfig.ts index fa0f9611..0225612a 100644 --- a/client/src/dojoConfig.ts +++ b/client/src/dojoConfig.ts @@ -1,5 +1,5 @@ import { get } from 'svelte/store' -import manifest from './dojo/manifest_octoguns_sepolia.json' +import manifest from '$manifests/manifest_slot.json' import { createDojoConfig } from '@dojoengine/core' import { CONFIG } from '$stores/network' diff --git a/client/src/lib/controller.ts b/client/src/lib/controller.ts index 51497994..f9d8cca0 100644 --- a/client/src/lib/controller.ts +++ b/client/src/lib/controller.ts @@ -14,10 +14,6 @@ export const controllerSlot = new Controller({ rpc: "https://api.cartridge.gg/x/octoguns-alpha2/katana" }) -export const controllerSepolia = new Controller({ - rpc: "https://api.cartridge.gg/x/starknet/sepolia" -}) - export async function connect(network: string) { try { if (network === "mainnet") { @@ -27,20 +23,13 @@ export async function connect(network: string) { account.set(controllerMainnet.account); username.set(await controllerMainnet.username()); } - } else if (network === "slot") { - console.log("Connecting to slot"); + } else { + console.log("Connecting to local network"); const res = await controllerSlot.connect(); if (res) { account.set(controllerSlot.account); username.set(await controllerSlot.username()); } - } if (network === "sepolia") { - console.log("Connecting to sepolia"); - const res = await controllerSepolia.connect(); - if (res) { - account.set(controllerSepolia.account); - username.set(await controllerSepolia.username()); - } } } catch (e) { console.log(e); diff --git a/client/src/routes/+page.svelte b/client/src/routes/+page.svelte index 8c25e086..53b0b981 100644 --- a/client/src/routes/+page.svelte +++ b/client/src/routes/+page.svelte @@ -20,7 +20,7 @@ async function connectAndGoto(config: string) { env.set('slot') - goto(`/sepolia/client/matchmaking`) + goto(`/slot/client/games/openGames`) } onMount(() => { diff --git a/client/src/routes/[slug]/+layout.svelte b/client/src/routes/[slug]/+layout.svelte index a89cd139..947c3373 100644 --- a/client/src/routes/[slug]/+layout.svelte +++ b/client/src/routes/[slug]/+layout.svelte @@ -21,7 +21,7 @@ let network = data.network onMount(async () => { - env.set(network as 'mainnet' | 'slot' | 'sepolia') + env.set(network as 'mainnet' | 'slot') await initStore() }) diff --git a/client/src/routes/[slug]/client/+layout.svelte b/client/src/routes/[slug]/client/+layout.svelte index a50c5172..2be48284 100644 --- a/client/src/routes/[slug]/client/+layout.svelte +++ b/client/src/routes/[slug]/client/+layout.svelte @@ -4,7 +4,7 @@ import { onMount } from 'svelte' import { connect } from '$lib/controller' import { controllerMainnet, controllerSlot } from '$lib/controller' - import { username, account } from '$stores/account' + import { username } from '$stores/account' import { env } from '$stores/network' interface Props { children?: import('svelte').Snippet @@ -44,19 +44,16 @@ {#if loading}

Loading

{/if} - {#if $username && $account} - - {/if} - {#if !$username && !$account} - {/if} - diff --git a/client/src/routes/[slug]/client/matchmaking/+page.svelte b/client/src/routes/[slug]/client/matchmaking/+page.svelte deleted file mode 100644 index c972f355..00000000 --- a/client/src/routes/[slug]/client/matchmaking/+page.svelte +++ /dev/null @@ -1,230 +0,0 @@ - - -{#if $dojoStore} -
-
-

ELO: {elo}

-

Players in Queue: {queue_length}

-
- {#if status === 2} -
-

Game Over!

- -
-
-

In Game

- -
- {:else} - - {/if} - {#if status === 1} -

Finding a match...

- {/if} -
- {:else} -

Setting up...

- {/if} - - - \ No newline at end of file diff --git a/client/src/stores/account.ts b/client/src/stores/account.ts index 598c51dc..e1cd1150 100644 --- a/client/src/stores/account.ts +++ b/client/src/stores/account.ts @@ -2,7 +2,7 @@ import { writable } from 'svelte/store' import type { AccountInterface } from 'starknet' -import { controllerMainnet, controllerSlot, controllerSepolia } from '$lib/controller' // Add this import +import { controllerMainnet, controllerSlot } from '$lib/controller' // Add this import function createPersistentStore(key: string, initialValue: T) { const storedValue = localStorage.getItem(key) diff --git a/client/src/stores/dojoStore.ts b/client/src/stores/dojoStore.ts index 4baa49ed..24859b34 100644 --- a/client/src/stores/dojoStore.ts +++ b/client/src/stores/dojoStore.ts @@ -2,8 +2,6 @@ import { dojoConfig } from '../dojoConfig' import { setup } from '$dojo/setup' import { get, writable } from 'svelte/store' import { Account } from 'starknet' -import { Contract } from 'starknet' -import { connect } from '$lib/controller' type SetupResult = Awaited> @@ -12,8 +10,6 @@ export const accountStore = writable() export const isSetup = writable(false) export const settingUp = writable(false) -export const planeteloStore = writable() - export async function initializeStore() { if (get(settingUp)) { console.warn('Concurrent setting up!') @@ -24,15 +20,13 @@ export async function initializeStore() { try { console.log('Initializing store...') const result = await setup( - '0x633afc7ba46094bb158889ba55487886c5748439433a555ca3ac16f502d7dc', + '0x0190ca7e6b8c28576ae3616add6f7ff4cf454ee60460238226d8284ca77445e2', dojoConfig ) console.log('setup complete') dojoStore.set(result) - let res = await connect('sepolia'); - console.log(res) - + accountStore.set(result.burnerManager.getActiveAccount()) console.log('set stores') isSetup.set(true) @@ -62,5 +56,5 @@ export async function getDojo(): Promise { export async function getDojoContext(): Promise<[Account, SetupResult]> { const dojo = await getDojo() - return [get(accountStore)!, dojo] + return [dojo.burnerManager.getActiveAccount()!, dojo] } diff --git a/client/src/stores/network.ts b/client/src/stores/network.ts index 4ad5e349..18c4af40 100644 --- a/client/src/stores/network.ts +++ b/client/src/stores/network.ts @@ -16,18 +16,11 @@ export const SLOT = { ENV: 'slot' }; -export const SEPOLIA: any = { - PUBLIC_TORII_URL: 'https://api.cartridge.gg/x/planetelo/torii', - PUBLIC_RPC_URL: 'https://api.cartridge.gg/x/starknet/sepolia', - PUBLIC_WORLD_ADDRESS: '0x049d36570d4e46f48e99674bd3fcc84c25dd2c13b1b4909766fee4c92cc389ed', - ENV: 'sepolia' -}; - export interface Config { PUBLIC_TORII_URL: string; PUBLIC_RPC_URL: string; PUBLIC_WORLD_ADDRESS: string; - ENV: 'mainnet' | 'slot' | 'sepolia'; + ENV: 'mainnet' | 'slot'; } -export const CONFIG = derived(env, $env => ($env === 'mainnet' ? MAINNET : $env === 'slot' ? SLOT : SEPOLIA)); +export const CONFIG = derived(env, $env => ($env === 'mainnet' ? MAINNET : SLOT)); diff --git a/client/vite.config.ts b/client/vite.config.ts index 1745749f..9422e597 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -2,10 +2,9 @@ import { sveltekit } from '@sveltejs/kit/vite' import { defineConfig } from 'vite' import wasm from 'vite-plugin-wasm' import topLevelAwait from 'vite-plugin-top-level-await' -import mkcert from 'vite-plugin-mkcert' export default defineConfig({ - plugins: [sveltekit(), wasm(), topLevelAwait(), mkcert()], + plugins: [sveltekit(), wasm(), topLevelAwait()], build: { sourcemap: false, minify: false,