From b7e67b160b1f74e58f735a46fbd6f3879560812d Mon Sep 17 00:00:00 2001 From: notV4l Date: Wed, 31 Jan 2024 16:02:00 +0100 Subject: [PATCH] 0.5.1-alpha.2 --- .github/workflows/test.yml | 3 +- Scarb.lock | 2 +- Scarb.toml | 2 +- web/manifest.json | 1960 ++++++++++++++------ web/package.json | 8 +- web/pnpm-lock.yaml | 146 +- web/src/components/Timer.tsx | 4 +- web/src/components/avatar/Avatar.tsx | 4 +- web/src/components/icons/archive/index.tsx | 28 +- web/src/components/icons/index.tsx | 52 +- web/src/dojo/context/DojoContext.tsx | 8 +- web/src/dojo/generated/contractEvents.ts | 524 +++--- web/src/dojo/hooks/useDevtools.ts | 15 +- web/src/dojo/hooks/useDojoContext.ts | 2 +- web/src/dojo/setup/setup.ts | 18 +- web/src/dojo/setup/setupNetwork.ts | 54 - web/src/hooks/media.tsx | 34 +- web/src/theme/components/accordion.tsx | 2 +- web/src/theme/components/card.tsx | 6 +- web/src/theme/components/container.tsx | 2 +- web/src/theme/components/icon.tsx | 2 +- web/src/theme/components/input.tsx | 2 - web/src/theme/components/link.tsx | 2 +- web/src/theme/components/list.tsx | 2 +- web/src/theme/components/modal.tsx | 4 +- 25 files changed, 1821 insertions(+), 1065 deletions(-) delete mode 100644 web/src/dojo/setup/setupNetwork.ts diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 195a5fbab..9532c12c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,9 +22,8 @@ jobs: sudo apt-get install -y curl - name: Download Dojo release artifact - # curl -L -o dojo-linux-x86_64.tar.gz https://github.com/dojoengine/dojo/releases/download/nightly/dojo_nightly_linux_amd64.tar.gz run: | - curl -L -o dojo-linux-x86_64.tar.gz https://github.com/dojoengine/dojo/releases/download/v0.2.2/dojo_v0.2.2_linux_amd64.tar.gz + curl -L -o dojo-linux-x86_64.tar.gz https://github.com/dojoengine/dojo/releases/download/v0.5.1-alpha.2/dojo_v0.5.1-alpha.2_linux_amd64.tar.gz tar -xzf dojo-linux-x86_64.tar.gz sudo mv sozo /usr/local/bin/ diff --git a/Scarb.lock b/Scarb.lock index ff9be959a..b3633c0cd 100644 --- a/Scarb.lock +++ b/Scarb.lock @@ -4,7 +4,7 @@ version = 1 [[package]] name = "dojo" version = "0.5.0" -source = "git+https://github.com/dojoengine/dojo.git?tag=v0.5.0#41a48b8082456e29d35913c0b81d71382c020b35" +source = "git+https://github.com/dojoengine/dojo.git?tag=v0.5.1-alpha.2#1c0ea09137570545156a6cd96aa6f693fcdf9d24" dependencies = [ "dojo_plugin", ] diff --git a/Scarb.toml b/Scarb.toml index c13fcb00a..64c9a5ead 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -7,7 +7,7 @@ version = "0.1.0" sierra-replace-ids = true [dependencies] -dojo = {git = "https://github.com/dojoengine/dojo.git", tag = "v0.5.0"} +dojo = {git = "https://github.com/dojoengine/dojo.git", tag = "v0.5.1-alpha.2"} # dojo = {git = "https://github.com/dojoengine/dojo.git", rev = "d7f46502cba3d6462b68a4dfb07336377bca2678"} [[target.dojo]] diff --git a/web/manifest.json b/web/manifest.json index 901661df5..b155e1be6 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -949,8 +949,30 @@ { "name": "rollyourown::systems::decide::decide", "address": "0x513e8a833b22e0e8fc32635427db3531166742cad938d0473b5f2342b8d670d", - "class_hash": "0x76171d991668cc42024555df0816a1f1dd05f51c8c1311eccb10ac123f4474f", + "class_hash": "0x4ac0264916c9a5b4a49bfe6a60a3818375a168330839d39543514c1b774e44e", "abi": [ + { + "type": "impl", + "name": "DojoResourceProviderImpl", + "interface_name": "dojo::world::IDojoResourceProvider" + }, + { + "type": "interface", + "name": "dojo::world::IDojoResourceProvider", + "items": [ + { + "type": "function", + "name": "dojo_resource", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + } + ] + }, { "type": "impl", "name": "WorldProviderImpl", @@ -1051,17 +1073,6 @@ } ] }, - { - "type": "function", - "name": "dojo_resource", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, { "type": "event", "name": "dojo::components::upgradeable::upgradeable::Upgraded", @@ -1279,8 +1290,30 @@ { "name": "rollyourown::systems::lobby::lobby", "address": "0x49edd91ee46f739b4ef1d945fc462c686fbdbb077a99d420f85e7c3d497795f", - "class_hash": "0x5e332543f2df8b9a15572cc766d4dbcaa09be4163131abdac39f7cd40c1199a", + "class_hash": "0x67ac71fb3b14168447d0b71747e81bd798f8470738f5efd6d56185c20c860be", "abi": [ + { + "type": "impl", + "name": "DojoResourceProviderImpl", + "interface_name": "dojo::world::IDojoResourceProvider" + }, + { + "type": "interface", + "name": "dojo::world::IDojoResourceProvider", + "items": [ + { + "type": "function", + "name": "dojo_resource", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + } + ] + }, { "type": "impl", "name": "WorldProviderImpl", @@ -1409,17 +1442,6 @@ } ] }, - { - "type": "function", - "name": "dojo_resource", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, { "type": "event", "name": "dojo::components::upgradeable::upgradeable::Upgraded", @@ -1523,8 +1545,30 @@ { "name": "rollyourown::systems::ryo::ryo", "address": "0x5b9d8d94a201bd82b8dc10f393a4187c9a513aba1d105d6b3b4a75c3e8299ad", - "class_hash": "0x6a6590e61c26c3ab361af23b480e63a90fc2453462cc4fef19e5c82e166840d", + "class_hash": "0x7e03c1da2480ff24f176bdc455621edbe70f116958d76f573999dd4c782cec", "abi": [ + { + "type": "impl", + "name": "DojoResourceProviderImpl", + "interface_name": "dojo::world::IDojoResourceProvider" + }, + { + "type": "interface", + "name": "dojo::world::IDojoResourceProvider", + "items": [ + { + "type": "function", + "name": "dojo_resource", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + } + ] + }, { "type": "impl", "name": "WorldProviderImpl", @@ -1598,17 +1642,6 @@ } ] }, - { - "type": "function", - "name": "dojo_resource", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, { "type": "event", "name": "dojo::components::upgradeable::upgradeable::Upgraded", @@ -1653,8 +1686,30 @@ { "name": "rollyourown::systems::shop::shop", "address": "0x369cb17d0b420599756dc27c11e5be1eb85182b36cb9b12f923aec7b6959f43", - "class_hash": "0x2fbd507fbb0009cc7678870b4ce472b2fe4c9090e3064ef37025844f200b60f", + "class_hash": "0x183f9273cebe4a433fbb5735f20caecb0d9e0d69d19418d5b0f73dcbd6d83d3", "abi": [ + { + "type": "impl", + "name": "DojoResourceProviderImpl", + "interface_name": "dojo::world::IDojoResourceProvider" + }, + { + "type": "interface", + "name": "dojo::world::IDojoResourceProvider", + "items": [ + { + "type": "function", + "name": "dojo_resource", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + } + ] + }, { "type": "impl", "name": "WorldProviderImpl", @@ -1865,17 +1920,6 @@ } ] }, - { - "type": "function", - "name": "dojo_resource", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, { "type": "event", "name": "dojo::components::upgradeable::upgradeable::Upgraded", @@ -1984,8 +2028,30 @@ { "name": "rollyourown::systems::trade::trade", "address": "0x37539cbd5f049814c1f0e7890e4b3acd656c4bbd45776c81f24014cf50cb0ef", - "class_hash": "0x4e6e6a3c41c4cec54d7c35d9775bab86f8a2eabe671b67fa789b0a0c1f5baa3", + "class_hash": "0xc55edfec1f9654a586a1be43c6dc8f1b5b2c6bad8b9e1d5c19d9bbcc135432", "abi": [ + { + "type": "impl", + "name": "DojoResourceProviderImpl", + "interface_name": "dojo::world::IDojoResourceProvider" + }, + { + "type": "interface", + "name": "dojo::world::IDojoResourceProvider", + "items": [ + { + "type": "function", + "name": "dojo_resource", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + } + ] + }, { "type": "impl", "name": "WorldProviderImpl", @@ -2164,17 +2230,6 @@ } ] }, - { - "type": "function", - "name": "dojo_resource", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, { "type": "event", "name": "dojo::components::upgradeable::upgradeable::Upgraded", @@ -2293,8 +2348,30 @@ { "name": "rollyourown::systems::travel::travel", "address": "0x4c24c51ab65c7a5ea606ce4b873f85481c0327c14fca2941353a408ce689e10", - "class_hash": "0x1f50c06a569b05ec3b20b97ee23dfb6b50ad320d30c5d98667d22ad915e6bc8", + "class_hash": "0x41b63c13614cb5f630f637ffd44d41e438b4c44861d7f9d022ff241ee62e4a", "abi": [ + { + "type": "impl", + "name": "DojoResourceProviderImpl", + "interface_name": "dojo::world::IDojoResourceProvider" + }, + { + "type": "interface", + "name": "dojo::world::IDojoResourceProvider", + "items": [ + { + "type": "function", + "name": "dojo_resource", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + } + ] + }, { "type": "impl", "name": "WorldProviderImpl", @@ -2441,17 +2518,6 @@ } ] }, - { - "type": "function", - "name": "dojo_resource", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, { "type": "event", "name": "dojo::components::upgradeable::upgradeable::Upgraded", @@ -2699,40 +2765,12 @@ "key": false } ], - "class_hash": "0x4392812ea3d896d2f269eda722d9746d01fa58c947b8cc6ef02e691bf03b345", + "class_hash": "0x72c204bc7b39ed9ca023aba497fbb26534d6e4050cb33b4c30c0328b331fbe1", "abi": [ { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::IDojoModel" }, { "type": "struct", @@ -2744,17 +2782,6 @@ } ] }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, { "type": "struct", "name": "core::array::Span::", @@ -2844,41 +2871,166 @@ ] }, { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ + "type": "interface", + "name": "dojo::model::IDojoModel", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, { - "type": "dojo::database::introspect::Ty" + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::database::introspect::Ty" + } + ], + "state_mutability": "view" } - ], - "state_mutability": "view" + ] }, { - "type": "event", - "name": "rollyourown::models::drug::drug::Event", - "kind": "enum", - "variants": [] - } - ] - }, - { - "name": "rollyourown::models::encounter::encounter", - "members": [ - { - "name": "game_id", - "type": "u32", - "key": true + "type": "impl", + "name": "drugImpl", + "interface_name": "rollyourown::models::drug::Idrug" }, { - "name": "player_id", - "type": "ContractAddress", - "key": true + "type": "enum", + "name": "rollyourown::models::drug::DrugEnum", + "variants": [ + { + "name": "Ludes", + "type": "()" + }, + { + "name": "Speed", + "type": "()" + }, + { + "name": "Weed", + "type": "()" + }, + { + "name": "Acid", + "type": "()" + }, + { + "name": "Heroin", + "type": "()" + }, + { + "name": "Cocaine", + "type": "()" + } + ] }, { - "name": "encounter_id", - "type": "EncounterType", - "key": true + "type": "struct", + "name": "rollyourown::models::drug::Drug", + "members": [ + { + "name": "game_id", + "type": "core::integer::u32" + }, + { + "name": "player_id", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "drug_id", + "type": "rollyourown::models::drug::DrugEnum" + }, + { + "name": "quantity", + "type": "core::integer::u32" + } + ] + }, + { + "type": "interface", + "name": "rollyourown::models::drug::Idrug", + "items": [ + { + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "rollyourown::models::drug::Drug" + } + ], + "outputs": [], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "rollyourown::models::drug::drug::Event", + "kind": "enum", + "variants": [] + } + ] + }, + { + "name": "rollyourown::models::encounter::encounter", + "members": [ + { + "name": "game_id", + "type": "u32", + "key": true + }, + { + "name": "player_id", + "type": "ContractAddress", + "key": true + }, + { + "name": "encounter_id", + "type": "EncounterType", + "key": true }, { "name": "level", @@ -2901,40 +3053,12 @@ "key": false } ], - "class_hash": "0x19e4be1aaa19b8722c4b6f59d423ceb259b71eaf0b7c3ec14bcff88994c69a1", + "class_hash": "0x153a8c11d69562cecac0e67098465d183acc6977c94e330c73d3c639e3c50df", "abi": [ { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::IDojoModel" }, { "type": "struct", @@ -2946,17 +3070,6 @@ } ] }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, { "type": "struct", "name": "core::array::Span::", @@ -3046,15 +3159,136 @@ ] }, { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ + "type": "interface", + "name": "dojo::model::IDojoModel", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::database::introspect::Ty" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "encounterImpl", + "interface_name": "rollyourown::models::encounter::Iencounter" + }, + { + "type": "enum", + "name": "rollyourown::models::encounter::EncounterType", + "variants": [ + { + "name": "Gang", + "type": "()" + }, + { + "name": "Cops", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "rollyourown::models::encounter::Encounter", + "members": [ + { + "name": "game_id", + "type": "core::integer::u32" + }, + { + "name": "player_id", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "encounter_id", + "type": "rollyourown::models::encounter::EncounterType" + }, + { + "name": "level", + "type": "core::integer::u8" + }, + { + "name": "health", + "type": "core::integer::u8" + }, + { + "name": "payout", + "type": "core::integer::u128" + }, + { + "name": "demand_pct", + "type": "core::integer::u8" + } + ] + }, + { + "type": "interface", + "name": "rollyourown::models::encounter::Iencounter", + "items": [ { - "type": "dojo::database::introspect::Ty" + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "rollyourown::models::encounter::Encounter" + } + ], + "outputs": [], + "state_mutability": "view" } - ], - "state_mutability": "view" + ] }, { "type": "event", @@ -3103,40 +3337,12 @@ "key": false } ], - "class_hash": "0x1b02f4f28871008643b2d15f6ad6c6a49c3ece6c433e764b133d84cc44c6284", + "class_hash": "0x3e41663fbdf3c02059810f62f44981f8d33485c47c60f8843e3803e2348f729", "abi": [ { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::IDojoModel" }, { "type": "struct", @@ -3148,17 +3354,6 @@ } ] }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, { "type": "struct", "name": "core::array::Span::", @@ -3248,19 +3443,140 @@ ] }, { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ + "type": "interface", + "name": "dojo::model::IDojoModel", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, { - "type": "dojo::database::introspect::Ty" + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::database::introspect::Ty" + } + ], + "state_mutability": "view" } - ], - "state_mutability": "view" + ] }, { - "type": "event", - "name": "rollyourown::models::game::game::Event", + "type": "impl", + "name": "gameImpl", + "interface_name": "rollyourown::models::game::Igame" + }, + { + "type": "enum", + "name": "rollyourown::models::game::GameMode", + "variants": [ + { + "name": "Test", + "type": "()" + }, + { + "name": "Unlimited", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "rollyourown::models::game::Game", + "members": [ + { + "name": "game_id", + "type": "core::integer::u32" + }, + { + "name": "game_mode", + "type": "rollyourown::models::game::GameMode" + }, + { + "name": "start_time", + "type": "core::integer::u64" + }, + { + "name": "max_players", + "type": "core::integer::u32" + }, + { + "name": "num_players", + "type": "core::integer::u32" + }, + { + "name": "max_turns", + "type": "core::integer::u32" + }, + { + "name": "creator", + "type": "core::starknet::contract_address::ContractAddress" + } + ] + }, + { + "type": "interface", + "name": "rollyourown::models::game::Igame", + "items": [ + { + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "rollyourown::models::game::Game" + } + ], + "outputs": [], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "rollyourown::models::game::game::Event", "kind": "enum", "variants": [] } @@ -3300,40 +3616,12 @@ "key": false } ], - "class_hash": "0x64c49434010fda4508ca33f5f39d66c7cb86225a6a2f36ff0a34fc8141e83b7", + "class_hash": "0x3dc9c5560483876d8023f5f6d023ac21ec75bc4584e7c9bdc5c1b9bd25a2ba", "abi": [ { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::IDojoModel" }, { "type": "struct", @@ -3345,17 +3633,6 @@ } ] }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, { "type": "struct", "name": "core::array::Span::", @@ -3445,15 +3722,140 @@ ] }, { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ + "type": "interface", + "name": "dojo::model::IDojoModel", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::database::introspect::Ty" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "itemImpl", + "interface_name": "rollyourown::models::item::Iitem" + }, + { + "type": "enum", + "name": "rollyourown::models::item::ItemEnum", + "variants": [ + { + "name": "Attack", + "type": "()" + }, + { + "name": "Defense", + "type": "()" + }, + { + "name": "Transport", + "type": "()" + }, + { + "name": "Speed", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "rollyourown::models::item::Item", + "members": [ + { + "name": "game_id", + "type": "core::integer::u32" + }, + { + "name": "player_id", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "item_id", + "type": "rollyourown::models::item::ItemEnum" + }, + { + "name": "level", + "type": "core::integer::u8" + }, + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "value", + "type": "core::integer::u32" + } + ] + }, + { + "type": "interface", + "name": "rollyourown::models::item::Iitem", + "items": [ { - "type": "dojo::database::introspect::Ty" + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "rollyourown::models::item::Item" + } + ], + "outputs": [], + "state_mutability": "view" } - ], - "state_mutability": "view" + ] }, { "type": "event", @@ -3482,40 +3884,12 @@ "key": false } ], - "class_hash": "0xd0e12664cb5e24a6256030b9c85db9e7898eb4f4c9c2d86f896947761ae4aa", + "class_hash": "0x22fa32610488b4c78b5e71b83aad6aed9fa3cdf86656f5149810cb14f6f6615", "abi": [ { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::IDojoModel" }, { "type": "struct", @@ -3527,17 +3901,6 @@ } ] }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, { "type": "struct", "name": "core::array::Span::", @@ -3627,87 +3990,150 @@ ] }, { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ + "type": "interface", + "name": "dojo::model::IDojoModel", + "items": [ { - "type": "dojo::database::introspect::Ty" - } - ], - "state_mutability": "view" - }, - { - "type": "event", - "name": "rollyourown::models::leaderboard::leaderboard::Event", - "kind": "enum", - "variants": [] - } - ] - }, - { - "name": "rollyourown::models::market::market", - "members": [ - { - "name": "game_id", - "type": "u32", - "key": true - }, - { - "name": "location_id", - "type": "LocationEnum", - "key": true - }, - { - "name": "drug_id", - "type": "DrugEnum", - "key": true - }, - { - "name": "cash", - "type": "u128", - "key": false - }, - { - "name": "quantity", - "type": "usize", - "key": false - } - ], - "class_hash": "0x7d2c48f40301df4d1d2b091261740a097f78e4c1faadf67ab76bc261fa8275d", - "abi": [ - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, { - "type": "core::felt252" + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::database::introspect::Ty" + } + ], + "state_mutability": "view" } - ], - "state_mutability": "view" + ] }, { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ + "type": "impl", + "name": "leaderboardImpl", + "interface_name": "rollyourown::models::leaderboard::Ileaderboard" + }, + { + "type": "struct", + "name": "rollyourown::models::leaderboard::Leaderboard", + "members": [ { + "name": "version", "type": "core::integer::u32" + }, + { + "name": "high_score", + "type": "core::integer::u128" + }, + { + "name": "next_version_timestamp", + "type": "core::integer::u64" } - ], - "state_mutability": "view" + ] }, { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ + "type": "interface", + "name": "rollyourown::models::leaderboard::Ileaderboard", + "items": [ { - "type": "core::integer::u32" + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "rollyourown::models::leaderboard::Leaderboard" + } + ], + "outputs": [], + "state_mutability": "view" } - ], - "state_mutability": "view" + ] + }, + { + "type": "event", + "name": "rollyourown::models::leaderboard::leaderboard::Event", + "kind": "enum", + "variants": [] + } + ] + }, + { + "name": "rollyourown::models::market::market", + "members": [ + { + "name": "game_id", + "type": "u32", + "key": true + }, + { + "name": "location_id", + "type": "LocationEnum", + "key": true + }, + { + "name": "drug_id", + "type": "DrugEnum", + "key": true + }, + { + "name": "cash", + "type": "u128", + "key": false + }, + { + "name": "quantity", + "type": "usize", + "key": false + } + ], + "class_hash": "0x66fddd2f975931b5929ee4e2406d91577abd332541812a0c9b694af2e4f410e", + "abi": [ + { + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::IDojoModel" }, { "type": "struct", @@ -3719,17 +4145,6 @@ } ] }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, { "type": "struct", "name": "core::array::Span::", @@ -3819,15 +4234,178 @@ ] }, { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ + "type": "interface", + "name": "dojo::model::IDojoModel", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::database::introspect::Ty" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "marketImpl", + "interface_name": "rollyourown::models::market::Imarket" + }, + { + "type": "enum", + "name": "rollyourown::models::location::LocationEnum", + "variants": [ + { + "name": "Home", + "type": "()" + }, + { + "name": "Queens", + "type": "()" + }, + { + "name": "Bronx", + "type": "()" + }, + { + "name": "Brooklyn", + "type": "()" + }, + { + "name": "Jersey", + "type": "()" + }, + { + "name": "Central", + "type": "()" + }, + { + "name": "Coney", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "rollyourown::models::drug::DrugEnum", + "variants": [ + { + "name": "Ludes", + "type": "()" + }, + { + "name": "Speed", + "type": "()" + }, + { + "name": "Weed", + "type": "()" + }, + { + "name": "Acid", + "type": "()" + }, + { + "name": "Heroin", + "type": "()" + }, + { + "name": "Cocaine", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "rollyourown::models::market::Market", + "members": [ + { + "name": "game_id", + "type": "core::integer::u32" + }, + { + "name": "location_id", + "type": "rollyourown::models::location::LocationEnum" + }, + { + "name": "drug_id", + "type": "rollyourown::models::drug::DrugEnum" + }, { - "type": "dojo::database::introspect::Ty" + "name": "cash", + "type": "core::integer::u128" + }, + { + "name": "quantity", + "type": "core::integer::u32" } - ], - "state_mutability": "view" + ] + }, + { + "type": "interface", + "name": "rollyourown::models::market::Imarket", + "items": [ + { + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "rollyourown::models::market::Market" + } + ], + "outputs": [], + "state_mutability": "view" + } + ] }, { "type": "event", @@ -3951,160 +4529,358 @@ "key": false } ], - "class_hash": "0x602d8c98eed6ebb9b1993489b0794a7518c6c2a62dc79dde21178cdf92f8cc6", + "class_hash": "0x3034bf6aee99c41bfeba285897da2c12cd64e81e4d7a313c263fa4524e5f16d", "abi": [ { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::IDojoModel" + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ { - "type": "core::felt252" + "name": "snapshot", + "type": "@core::array::Array::" } - ], - "state_mutability": "view" + ] }, { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ + "type": "struct", + "name": "core::array::Span::", + "members": [ { - "type": "core::integer::u32" + "name": "snapshot", + "type": "@core::array::Array::" } - ], - "state_mutability": "view" + ] }, { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ + "type": "struct", + "name": "core::array::Span::>", + "members": [ { - "type": "core::integer::u32" + "name": "snapshot", + "type": "@core::array::Array::>" } - ], - "state_mutability": "view" + ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "dojo::database::introspect::Struct", "members": [ { - "name": "snapshot", - "type": "@core::array::Array::" + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::>" } ] }, { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ + "type": "struct", + "name": "core::array::Span::<(core::felt252, core::array::Span::)>", + "members": [ { - "type": "core::array::Span::" + "name": "snapshot", + "type": "@core::array::Array::<(core::felt252, core::array::Span::)>" } - ], - "state_mutability": "view" + ] }, { "type": "struct", - "name": "core::array::Span::", + "name": "dojo::database::introspect::Enum", "members": [ { - "name": "snapshot", - "type": "@core::array::Array::" + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::<(core::felt252, core::array::Span::)>" + } + ] + }, + { + "type": "enum", + "name": "dojo::database::introspect::Ty", + "variants": [ + { + "name": "Primitive", + "type": "core::felt252" + }, + { + "name": "Struct", + "type": "dojo::database::introspect::Struct" + }, + { + "name": "Enum", + "type": "dojo::database::introspect::Enum" + }, + { + "name": "Tuple", + "type": "core::array::Span::>" + } + ] + }, + { + "type": "interface", + "name": "dojo::model::IDojoModel", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::database::introspect::Ty" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "playerImpl", + "interface_name": "rollyourown::models::player::Iplayer" + }, + { + "type": "enum", + "name": "rollyourown::models::player::PlayerStatus", + "variants": [ + { + "name": "Normal", + "type": "()" + }, + { + "name": "BeingMugged", + "type": "()" + }, + { + "name": "BeingArrested", + "type": "()" + }, + { + "name": "AtPawnshop", + "type": "()" } ] }, { - "type": "struct", - "name": "core::array::Span::>", - "members": [ + "type": "enum", + "name": "rollyourown::models::location::LocationEnum", + "variants": [ { - "name": "snapshot", - "type": "@core::array::Array::>" - } - ] - }, - { - "type": "struct", - "name": "dojo::database::introspect::Struct", - "members": [ + "name": "Home", + "type": "()" + }, { - "name": "name", - "type": "core::felt252" + "name": "Queens", + "type": "()" }, { - "name": "attrs", - "type": "core::array::Span::" + "name": "Bronx", + "type": "()" }, { - "name": "children", - "type": "core::array::Span::>" + "name": "Brooklyn", + "type": "()" + }, + { + "name": "Jersey", + "type": "()" + }, + { + "name": "Central", + "type": "()" + }, + { + "name": "Coney", + "type": "()" } ] }, { - "type": "struct", - "name": "core::array::Span::<(core::felt252, core::array::Span::)>", - "members": [ + "type": "enum", + "name": "core::bool", + "variants": [ { - "name": "snapshot", - "type": "@core::array::Array::<(core::felt252, core::array::Span::)>" + "name": "False", + "type": "()" + }, + { + "name": "True", + "type": "()" } ] }, { "type": "struct", - "name": "dojo::database::introspect::Enum", + "name": "rollyourown::models::player::Player", "members": [ + { + "name": "game_id", + "type": "core::integer::u32" + }, + { + "name": "player_id", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "mainnet_address", + "type": "core::starknet::contract_address::ContractAddress" + }, { "name": "name", "type": "core::felt252" }, { - "name": "attrs", - "type": "core::array::Span::" + "name": "avatar_id", + "type": "core::integer::u8" }, { - "name": "children", - "type": "core::array::Span::<(core::felt252, core::array::Span::)>" - } - ] - }, - { - "type": "enum", - "name": "dojo::database::introspect::Ty", - "variants": [ + "name": "status", + "type": "rollyourown::models::player::PlayerStatus" + }, { - "name": "Primitive", - "type": "core::felt252" + "name": "hood_id", + "type": "rollyourown::models::location::LocationEnum" }, { - "name": "Struct", - "type": "dojo::database::introspect::Struct" + "name": "location_id", + "type": "rollyourown::models::location::LocationEnum" }, { - "name": "Enum", - "type": "dojo::database::introspect::Enum" + "name": "next_location_id", + "type": "rollyourown::models::location::LocationEnum" }, { - "name": "Tuple", - "type": "core::array::Span::>" + "name": "turn", + "type": "core::integer::u32" + }, + { + "name": "max_turns", + "type": "core::integer::u32" + }, + { + "name": "max_items", + "type": "core::integer::u8" + }, + { + "name": "cash", + "type": "core::integer::u128" + }, + { + "name": "health", + "type": "core::integer::u8" + }, + { + "name": "drug_count", + "type": "core::integer::u32" + }, + { + "name": "attack", + "type": "core::integer::u32" + }, + { + "name": "defense", + "type": "core::integer::u32" + }, + { + "name": "transport", + "type": "core::integer::u32" + }, + { + "name": "speed", + "type": "core::integer::u32" + }, + { + "name": "wanted", + "type": "core::integer::u8" + }, + { + "name": "leaderboard_version", + "type": "core::integer::u32" + }, + { + "name": "game_over", + "type": "core::bool" } ] }, { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ + "type": "interface", + "name": "rollyourown::models::player::Iplayer", + "items": [ { - "type": "dojo::database::introspect::Ty" + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "rollyourown::models::player::Player" + } + ], + "outputs": [], + "state_mutability": "view" } - ], - "state_mutability": "view" + ] }, { "type": "event", @@ -4133,40 +4909,12 @@ "key": false } ], - "class_hash": "0x5c9f5d39de36e3385b5d190904ade764a347bf3c13cc51a61c1e075ac1aa844", + "class_hash": "0x1dce81bfb114cbff1645c18f5f69d2dec34da0c1dc0290a66b3febbd992a803", "abi": [ { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "unpacked_size", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "packed_size", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u32" - } - ], - "state_mutability": "view" + "type": "impl", + "name": "DojoModelImpl", + "interface_name": "dojo::model::IDojoModel" }, { "type": "struct", @@ -4178,17 +4926,6 @@ } ] }, - { - "type": "function", - "name": "layout", - "inputs": [], - "outputs": [ - { - "type": "core::array::Span::" - } - ], - "state_mutability": "view" - }, { "type": "struct", "name": "core::array::Span::", @@ -4278,15 +5015,120 @@ ] }, { - "type": "function", - "name": "schema", - "inputs": [], - "outputs": [ + "type": "interface", + "name": "dojo::model::IDojoModel", + "items": [ + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::database::introspect::Ty" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "impl", + "name": "ryo_metaImpl", + "interface_name": "rollyourown::models::ryo::Iryo_meta" + }, + { + "type": "enum", + "name": "core::bool", + "variants": [ + { + "name": "False", + "type": "()" + }, + { + "name": "True", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "rollyourown::models::ryo::RyoMeta", + "members": [ + { + "name": "id", + "type": "core::integer::u32" + }, + { + "name": "initialized", + "type": "core::bool" + }, + { + "name": "leaderboard_version", + "type": "core::integer::u32" + } + ] + }, + { + "type": "interface", + "name": "rollyourown::models::ryo::Iryo_meta", + "items": [ { - "type": "dojo::database::introspect::Ty" + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "model", + "type": "rollyourown::models::ryo::RyoMeta" + } + ], + "outputs": [], + "state_mutability": "view" } - ], - "state_mutability": "view" + ] }, { "type": "event", diff --git a/web/package.json b/web/package.json index a7894e496..bd1f5a24c 100644 --- a/web/package.json +++ b/web/package.json @@ -21,10 +21,10 @@ "dependencies": { "@chakra-ui/anatomy": "^2.1.1", "@chakra-ui/react": "^2.8.1", - "@dojoengine/core": "file:node_modules/@dojoengine/core", - "@dojoengine/create-burner": "file:../../dojo-packages/packages/create-burner", - "@dojoengine/utils": "0.3.4", - "@dojoengine/torii-client": "0.3.4", + "@dojoengine/core": "0.3.5", + "@dojoengine/create-burner": "0.3.5", + "@dojoengine/utils": "0.3.5", + "@dojoengine/torii-client": "0.3.5", "@emotion/react": "^11.10.6", "@emotion/styled": "^11.10.6", "@latticexyz/recs": "2.0.0-next.9", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index 7969e1626..38a06c957 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -12,17 +12,17 @@ dependencies: specifier: ^2.8.1 version: 2.8.2(@emotion/react@11.11.3)(@emotion/styled@11.11.0)(@types/react@18.0.28)(framer-motion@10.18.0)(react-dom@18.2.0)(react@18.2.0) '@dojoengine/core': - specifier: file:../../dojo-packages/packages/core - version: file:../../dojo-packages/packages/core(starknet@5.24.3) + specifier: 0.3.5 + version: 0.3.5(starknet@5.24.3) '@dojoengine/create-burner': - specifier: file:../../dojo-packages/packages/create-burner - version: file:../../dojo-packages/packages/create-burner(react-dom@18.2.0)(react@18.2.0)(starknet@5.24.3) + specifier: 0.3.5 + version: 0.3.5(react-dom@18.2.0)(react@18.2.0)(starknet@5.24.3) '@dojoengine/torii-client': - specifier: 0.3.4 - version: 0.3.4 + specifier: 0.3.5 + version: 0.3.5 '@dojoengine/utils': - specifier: 0.3.4 - version: 0.3.4(starknet@5.24.3)(typescript@5.2.2) + specifier: 0.3.5 + version: 0.3.5(starknet@5.24.3)(typescript@5.2.2) '@emotion/react': specifier: ^11.10.6 version: 11.11.3(@types/react@18.0.28)(react@18.2.0) @@ -2515,6 +2515,32 @@ packages: react: 18.2.0 dev: false + /@dojoengine/core@0.3.5(starknet@5.24.3): + resolution: {integrity: sha512-ubDh2FF4pKM5LkuC6lzE6+Em9P6nbvUXaRbDmXPlCUG16+0ptdH0/hJOG82KJ1KR3ID4T61+wpHZ+xZiMjEXHg==} + hasBin: true + peerDependencies: + starknet: ^5.24.3 + dependencies: + starknet: 5.24.3 + dev: false + + /@dojoengine/create-burner@0.3.5(react-dom@18.2.0)(react@18.2.0)(starknet@5.24.3): + resolution: {integrity: sha512-LaijFB+AHU7/vLofEOtq56nVuah18xKSVU3DEop1WNmQS+D3CCbQ1dYe2d6z9rhoq2RWhu0OoHmBoQiN5e0cdg==} + peerDependencies: + react: ^18.2.0 + starknet: ^5.24.3 + dependencies: + '@starknet-react/core': 1.0.4(get-starknet-core@3.2.0)(react-dom@18.2.0)(react@18.2.0)(starknet@5.24.3) + encoding: 0.1.13 + get-starknet-core: 3.2.0(starknet@5.24.3) + js-cookie: 3.0.5 + react: 18.2.0 + starknet: 5.24.3 + transitivePeerDependencies: + - react-dom + - react-native + dev: false + /@dojoengine/recs@0.1.35(typescript@5.2.2): resolution: {integrity: sha512-wWXcH5hCRByGVLbkQ/pdo80xk3fmXoUmXF7cVVdbiKS/Kh/f1iQjjBSudAaogUDPqViXvWNdpmnH/0fas/xzSQ==} dependencies: @@ -2529,19 +2555,19 @@ packages: - zod dev: false - /@dojoengine/torii-client@0.3.4: - resolution: {integrity: sha512-ZTMy9S2f6NDmUFBMhNMwc7jDn0TnWkwdhk760HSpXZmky1AZw88/9pcqr7IP3s6Q2mCx+/GKoQ/vBRoucnjGng==} + /@dojoengine/torii-client@0.3.5: + resolution: {integrity: sha512-SsfgHY7u1AvJ6wcKhrEyJJ80Kp+HECPCoV5cvo6EbrNwvV75OIdcOsvJ5gfvOfsyj3hZPQ3IuID4ZJRHuMXoog==} dependencies: - '@dojoengine/torii-wasm': 0.3.4 + '@dojoengine/torii-wasm': 0.3.5 typescript: 5.2.2 dev: false - /@dojoengine/torii-wasm@0.3.4: - resolution: {integrity: sha512-XiFQSHwKMqpVoul8Y4tpVnxa9qA1GI2/231Ar7yxgFnqSJkSYuehorJsGNuckUWZPDwzHRJ/c21OXF2qpnMydA==} + /@dojoengine/torii-wasm@0.3.5: + resolution: {integrity: sha512-cHAssd6mmrkwJmQFPCAoDXT6024j10WBMcNGt9TanK7ANhD/pRAGkk2B+tVptsh66WvFm+VtEFGtFBSvfeCY0A==} dev: false - /@dojoengine/utils@0.3.4(starknet@5.24.3)(typescript@5.2.2): - resolution: {integrity: sha512-7c4Y2dqMqjfTNAJddVmGI9qtCEOMJ6w42H0iQyIn1XF8fFECfH2iEdf5ok5p28EfGh5ihyAvNydTVlBIMmTGVg==} + /@dojoengine/utils@0.3.5(starknet@5.24.3)(typescript@5.2.2): + resolution: {integrity: sha512-Wt5pgpuZZUSjqwW2ZogcEyUopVz0jVsMR5gUcdrTeSf8TDSI9Dlhw1FB9Wlibo753lyDoKRd0lIQt+LXyyuFgg==} peerDependencies: starknet: ^5.24.3 dependencies: @@ -3564,7 +3590,7 @@ packages: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: graphql: 16.8.1 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /@graphql-tools/prisma-loader@8.0.2(@types/node@18.15.3)(graphql@16.8.1): @@ -3608,7 +3634,7 @@ packages: '@ardatan/relay-compiler': 12.0.0(graphql@16.8.1) '@graphql-tools/utils': 9.2.1(graphql@16.8.1) graphql: 16.8.1 - tslib: 2.4.1 + tslib: 2.6.2 transitivePeerDependencies: - encoding - supports-color @@ -3673,7 +3699,7 @@ packages: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: graphql: 16.8.1 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /@graphql-tools/utils@9.2.1(graphql@16.8.1): @@ -3683,7 +3709,7 @@ packages: dependencies: '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.1) graphql: 16.8.1 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /@graphql-tools/wrap@10.0.1(graphql@16.8.1): @@ -4083,7 +4109,7 @@ packages: resolution: {integrity: sha512-bcKpo1oj54hGholplGLpqPHRbIsnbixFtc06nwuNM5/dwSXOq/AAYoIBRsBmnZJSdfeNW5rnff7NTAz3ZCqR9Q==} dependencies: '@noble/curves': 1.0.0 - '@noble/hashes': 1.3.0 + '@noble/hashes': 1.3.3 '@scure/base': 1.1.5 dev: false @@ -4091,21 +4117,21 @@ packages: resolution: {integrity: sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA==} dependencies: '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.2 + '@noble/hashes': 1.3.3 '@scure/base': 1.1.5 dev: false /@scure/bip39@1.2.0: resolution: {integrity: sha512-SX/uKq52cuxm4YFXWFaVByaSHJh2w3BnokVSeUJVCv6K7WulT9u2BuNRBhuFl8vAuYnzx9bEu9WgpcNYTrYieg==} dependencies: - '@noble/hashes': 1.3.0 + '@noble/hashes': 1.3.3 '@scure/base': 1.1.5 dev: false /@scure/bip39@1.2.1: resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==} dependencies: - '@noble/hashes': 1.3.2 + '@noble/hashes': 1.3.3 '@scure/base': 1.1.5 dev: false @@ -5042,7 +5068,7 @@ packages: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} dependencies: pascal-case: 3.1.2 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /camelcase@5.3.1: @@ -5057,7 +5083,7 @@ packages: resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} dependencies: no-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 upper-case-first: 2.0.2 dev: true @@ -5120,7 +5146,7 @@ packages: path-case: 3.0.4 sentence-case: 3.0.4 snake-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /chardet@0.7.0: @@ -5256,7 +5282,7 @@ packages: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} dependencies: no-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 upper-case: 2.0.2 dev: true @@ -5482,7 +5508,7 @@ packages: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /dotenv@16.3.2: @@ -6436,7 +6462,7 @@ packages: graphql: ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: graphql: 16.8.1 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /graphql-ws@5.14.3(graphql@16.8.1): @@ -6500,7 +6526,7 @@ packages: resolution: {integrity: sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==} dependencies: capital-case: 1.0.4 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /hmac-drbg@1.0.1: @@ -6736,7 +6762,7 @@ packages: /is-lower-case@2.0.2: resolution: {integrity: sha512-bVcMJy4X5Og6VZfdOZstSexlEy20Sr0k/p/b2IlQJlfdKAQuMpiv5w2Ccxb8sKdRUNAG1PnHVHjFSdRDVS6NlQ==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: true /is-map@2.0.2: @@ -6863,7 +6889,7 @@ packages: /is-upper-case@2.0.2: resolution: {integrity: sha512-44pxmxAvnnAOwBg4tHPnkfvgjPwbc5QIsSstNU+YcJ1ovxVzCWpSGosPJOZh/a1tdl81fbgnLc9LLv+x2ywbPQ==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: true /is-weakmap@2.0.1: @@ -7221,13 +7247,13 @@ packages: /lower-case-first@2.0.2: resolution: {integrity: sha512-EVm/rR94FJTZi3zefZ82fLWab+GX14LJN4HrWBcuo6Evmsl9hEfnqxgcHCKb9q+mNf6EVdsjx/qucYFIIB84pg==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: true /lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: true /lru-cache@5.1.1: @@ -7467,7 +7493,7 @@ packages: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /node-fetch@2.7.0: @@ -7661,7 +7687,7 @@ packages: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} dependencies: dot-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /parent-module@1.0.1: @@ -7692,14 +7718,14 @@ packages: resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} dependencies: no-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /path-case@3.0.4: resolution: {integrity: sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==} dependencies: dot-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /path-exists@4.0.0: @@ -8272,7 +8298,7 @@ packages: resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} dependencies: no-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 upper-case-first: 2.0.2 dev: true @@ -8377,7 +8403,7 @@ packages: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} dependencies: dot-case: 3.0.4 - tslib: 2.4.1 + tslib: 2.6.2 dev: true /source-list-map@2.0.1: @@ -8421,7 +8447,7 @@ packages: /sponge-case@1.0.1: resolution: {integrity: sha512-dblb9Et4DAtiZ5YSUZHLl4XhH4uK80GhAZrVXdN4O2P4gQ40Wa5UIOPUHlA/nFd2PLblBZWUioLMMAVrgpoYcA==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: true /starknet@5.24.3: @@ -8579,7 +8605,7 @@ packages: /swap-case@2.0.2: resolution: {integrity: sha512-kc6S2YS/2yXbtkSMunBtKdah4VFETZ8Oh6ONSmSd9bRxhqTrtARUCBUiWXH3xVPpvR7tz2CSnkuXVE42EcGnMw==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: true /tapable@2.2.1: @@ -8656,7 +8682,7 @@ packages: /title-case@3.0.3: resolution: {integrity: sha512-e1zGYRvbffpcHIrnuqT0Dh+gEJtDaxDSoG4JAIpq4oDFyooziLBIiYQv0GBT4FUAnUop5uZ1hiIAj7oAF6sOCA==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: true /tmp@0.0.33: @@ -8886,13 +8912,13 @@ packages: /upper-case-first@2.0.2: resolution: {integrity: sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: true /upper-case@2.0.2: resolution: {integrity: sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==} dependencies: - tslib: 2.4.1 + tslib: 2.6.2 dev: true /uri-js@4.4.1: @@ -9517,33 +9543,3 @@ packages: react: 18.2.0 use-sync-external-store: 1.2.0(react@18.2.0) dev: false - - file:../../dojo-packages/packages/core(starknet@5.24.3): - resolution: {directory: ../../dojo-packages/packages/core, type: directory} - id: file:../../dojo-packages/packages/core - name: '@dojoengine/core' - hasBin: true - peerDependencies: - starknet: ^5.24.3 - dependencies: - starknet: 5.24.3 - dev: false - - file:../../dojo-packages/packages/create-burner(react-dom@18.2.0)(react@18.2.0)(starknet@5.24.3): - resolution: {directory: ../../dojo-packages/packages/create-burner, type: directory} - id: file:../../dojo-packages/packages/create-burner - name: '@dojoengine/create-burner' - peerDependencies: - react: ^18.2.0 - starknet: ^5.24.3 - dependencies: - '@starknet-react/core': 1.0.4(get-starknet-core@3.2.0)(react-dom@18.2.0)(react@18.2.0)(starknet@5.24.3) - encoding: 0.1.13 - get-starknet-core: 3.2.0(starknet@5.24.3) - js-cookie: 3.0.5 - react: 18.2.0 - starknet: 5.24.3 - transitivePeerDependencies: - - react-dom - - react-native - dev: false diff --git a/web/src/components/Timer.tsx b/web/src/components/Timer.tsx index 574036c47..d2ee365ba 100644 --- a/web/src/components/Timer.tsx +++ b/web/src/components/Timer.tsx @@ -1,5 +1,5 @@ -import { Flex, Text } from "@chakra-ui/layout"; -import React, { useState, useEffect } from "react"; +import { Flex, Text } from "@chakra-ui/react"; +import React, { useEffect, useState } from "react"; interface TimerProps { startInSeconds: number; diff --git a/web/src/components/avatar/Avatar.tsx b/web/src/components/avatar/Avatar.tsx index 172f06ce0..4cb01f32e 100644 --- a/web/src/components/avatar/Avatar.tsx +++ b/web/src/components/avatar/Avatar.tsx @@ -1,9 +1,9 @@ -import React from "react"; import { Icon as ChakraIcon, IconProps as ChakraIconProps, + ThemingProps, } from "@chakra-ui/react"; -import { ThemingProps } from "@chakra-ui/styled-system"; +import React from "react"; import { AvatarName, avatars } from "./avatars"; export interface AvatarProps extends ChakraIconProps, ThemingProps { diff --git a/web/src/components/icons/archive/index.tsx b/web/src/components/icons/archive/index.tsx index 58f90803c..3f54de5bb 100644 --- a/web/src/components/icons/archive/index.tsx +++ b/web/src/components/icons/archive/index.tsx @@ -1,8 +1,8 @@ import { Icon as ChakraIcon, IconProps as ChakraIconProps, + ThemingProps, } from "@chakra-ui/react"; -import { ThemingProps } from "@chakra-ui/styled-system"; import React from "react"; export interface IconProps extends ChakraIconProps, ThemingProps {} @@ -19,24 +19,24 @@ export const Icon = ({ }; // icons from old design -export * from "./City"; -export * from "./Chat"; +export * from "../Cigarette"; +export * from "../branding/Cartridge"; +export * from "./Argent"; +export * from "./Arrow"; // up, down, right, left variant +export * from "./Avatar"; +export * from "./Calendar"; export * from "./Cart"; -export * from "./Road"; -export * from "./User"; +export * from "./Chat"; export * from "./Check"; -export * from "./Users"; +export * from "./City"; export * from "./Clock"; -export * from "./Arrow"; // up, down, right, left variant -export * from "./Wallet"; -export * from "./Argent"; -export * from "./Avatar"; export * from "./Connect"; -export * from "./Sparkle"; // has mirrored variant -export * from "./Calendar"; -export * from "../Cigarette"; -export * from "../branding/Cartridge"; export * from "./Disconnect"; +export * from "./Road"; +export * from "./Sparkle"; // has mirrored variant +export * from "./User"; +export * from "./Users"; +export * from "./Wallet"; // Template for adding new icons. When copying svg from figma, make sure to // select parent bounding box so dimension is 24x24 diff --git a/web/src/components/icons/index.tsx b/web/src/components/icons/index.tsx index fbeab0119..9dc518db0 100644 --- a/web/src/components/icons/index.tsx +++ b/web/src/components/icons/index.tsx @@ -1,8 +1,8 @@ import { Icon as ChakraIcon, IconProps as ChakraIconProps, + ThemingProps, } from "@chakra-ui/react"; -import { ThemingProps } from "@chakra-ui/styled-system"; import React from "react"; export interface IconProps extends ChakraIconProps, ThemingProps {} @@ -18,41 +18,41 @@ export const Icon = ({ ); }; -export * from "./Car"; -export * from "./Bag"; -export * from "./Gem"; -export * from "./Chat"; -export * from "./Home"; -export * from "./Link"; -export * from "./Event"; +export * from "./Alert"; +export * from "./Arrest"; export * from "./Arrow"; export * from "./ArrowEnclosed"; export * from "./ArrowInput"; -export * from "./Clock"; -export * from "./Sound"; -export * from "./Music"; -export * from "./Dots"; -export * from "./SendMessage"; -export * from "./Sparkles"; -export * from "./Trophy"; -export * from "./User"; -export * from "./Warning"; +export * from "./Bag"; +export * from "./Car"; export * from "./Cart"; -export * from "./Alert"; -export * from "./Pistol"; -export * from "./Arrest"; -export * from "./Roll"; +export * from "./Chat"; +export * from "./Clock"; export * from "./Close"; +export * from "./DollarBag"; +export * from "./Dots"; +export * from "./DynamicHeart"; +export * from "./Event"; export * from "./ExternalLink"; +export * from "./Fist"; +export * from "./Flipflop"; +export * from "./Gem"; export * from "./Heart"; -export * from "./DynamicHeart"; -export * from "./Skull"; +export * from "./Home"; +export * from "./Link"; +export * from "./Music"; +export * from "./Pistol"; +export * from "./Roll"; +export * from "./SendMessage"; export * from "./Siren"; +export * from "./Skull"; +export * from "./Sound"; +export * from "./Sparkles"; +export * from "./Trophy"; export * from "./Truck"; -export * from "./DollarBag"; export * from "./Twitter"; -export * from "./Fist"; -export * from "./Flipflop"; +export * from "./User"; +export * from "./Warning"; // Template for adding new icons. When copying svg from figma, viewBox is assumed diff --git a/web/src/dojo/context/DojoContext.tsx b/web/src/dojo/context/DojoContext.tsx index 1c224edca..0e8b1c819 100644 --- a/web/src/dojo/context/DojoContext.tsx +++ b/web/src/dojo/context/DojoContext.tsx @@ -1,3 +1,4 @@ +import { PlayerEntityStore, usePlayerEntityStore } from "@/hooks/player"; import { BurnerAccount, BurnerManager, @@ -5,12 +6,13 @@ import { } from "@dojoengine/create-burner"; import { ReactNode, createContext, useContext, useMemo } from "react"; import { Account, RpcProvider } from "starknet"; -import { SetupResult } from "./generated/setup"; -import { usePlayerEntityStore } from "@/hooks/player"; +import { SetupResult } from "../setup/setup"; interface DojoContextType extends SetupResult { masterAccount: Account; - account: BurnerAccount; + account: Account | null; + playerEntityStore: PlayerEntityStore; + burner:BurnerAccount; } export const DojoContext = createContext(null); diff --git a/web/src/dojo/generated/contractEvents.ts b/web/src/dojo/generated/contractEvents.ts index 48f09af49..17d6ca25b 100644 --- a/web/src/dojo/generated/contractEvents.ts +++ b/web/src/dojo/generated/contractEvents.ts @@ -1,302 +1,296 @@ /* Autogenerated file. Do not edit manually. */ -import {num, GetTransactionReceiptResponse, InvokeTransactionReceiptResponse, SuccessfulTransactionReceiptResponse, Contract } from "starknet"; +import { + num, + GetTransactionReceiptResponse, + InvokeTransactionReceiptResponse, + SuccessfulTransactionReceiptResponse, + Contract, +} from "starknet"; export enum WorldEvents { - Upgraded= "0x2db340e6c609371026731f47050d3976552c89b4fbb012941663841c59d1af3", -Decision= "0xc9315f646a66dd126a564fa76bfdc00bdb47abe0d8187e464f69215dbf432a", -Consequence= "0x1335a57b72e0bcb464f40bf1f140f691ec93e4147b91d0760640c19999b841d", -GameOver= "0x165460ded86991fa560a0d331810f83651da90c5df6d4b61357c3b3807ff41c", -GameCreated= "0x230f942bb2087887c3b1dd964c716614bb6df172214f22409fefb734d96a4d2", -PlayerJoined= "0x214916ce0265d355fd91110809ffba7b5e672b108a8beea3dd235818431264b", -BoughtItem= "0x96f1e086de05db8162b5bf8e95b3ff061eeb8a5a88750a793a297379dd74ea", -DroppedItem= "0x2abc912df1c0f1fee176c373767d13b5e7e1fcdd11f8e44714334335b1ed653", -Bought= "0x20cb8131637de1953a75938db3477cc6b648e5ed255f5b3fe3f0fb9299f0afc", -Sold= "0x123e760cef925d0b4f685db5e1ac87aadaf1ad9f8069122a5bb03353444c386", -Traveled= "0x2c4d9d5da873550ed167876bf0bc2ae300ce1db2eeff67927a85693680a2328", -AdverseEvent= "0x3605d6af5b08d01a1b42fa16a5f4dc202724f1664912948dcdbe99f5c93d0a0", -MarketEvent= "0x255825b8769ab99d6c1bd893b440a284a39d8db18c76b91e8e6a70ef5c7a8e0", -AtPawnshop= "0x32bd5f84a36928d15d6fee2bf7ac959c1443e069aac774e6e00e596dec31a65", -}; - - - export interface BaseEventData { - game_id: number; - event_type: WorldEvents; - event_name: string; - } - + Upgraded = "0x2db340e6c609371026731f47050d3976552c89b4fbb012941663841c59d1af3", + Decision = "0xc9315f646a66dd126a564fa76bfdc00bdb47abe0d8187e464f69215dbf432a", + Consequence = "0x1335a57b72e0bcb464f40bf1f140f691ec93e4147b91d0760640c19999b841d", + GameOver = "0x165460ded86991fa560a0d331810f83651da90c5df6d4b61357c3b3807ff41c", + GameCreated = "0x230f942bb2087887c3b1dd964c716614bb6df172214f22409fefb734d96a4d2", + PlayerJoined = "0x214916ce0265d355fd91110809ffba7b5e672b108a8beea3dd235818431264b", + BoughtItem = "0x96f1e086de05db8162b5bf8e95b3ff061eeb8a5a88750a793a297379dd74ea", + DroppedItem = "0x2abc912df1c0f1fee176c373767d13b5e7e1fcdd11f8e44714334335b1ed653", + Bought = "0x20cb8131637de1953a75938db3477cc6b648e5ed255f5b3fe3f0fb9299f0afc", + Sold = "0x123e760cef925d0b4f685db5e1ac87aadaf1ad9f8069122a5bb03353444c386", + Traveled = "0x2c4d9d5da873550ed167876bf0bc2ae300ce1db2eeff67927a85693680a2328", + AdverseEvent = "0x3605d6af5b08d01a1b42fa16a5f4dc202724f1664912948dcdbe99f5c93d0a0", + MarketEvent = "0x255825b8769ab99d6c1bd893b440a284a39d8db18c76b91e8e6a70ef5c7a8e0", + AtPawnshop = "0x32bd5f84a36928d15d6fee2bf7ac959c1443e069aac774e6e00e596dec31a65", +} + +export interface BaseEventData { + game_id: number; + event_type: WorldEvents; + event_name: string; +} export interface DecisionData extends BaseEventData { - game_id: number; -player_id: string; -action: String; - } + game_id: number; + player_id: string; + action: String; +} export interface ConsequenceData extends BaseEventData { - game_id: number; -player_id: string; -outcome: String; -health_loss: number; -drug_loss: number; -cash_loss: bigint; -dmg_dealt: number; -cash_earnt: bigint; - } + game_id: number; + player_id: string; + outcome: String; + health_loss: number; + drug_loss: number; + cash_loss: bigint; + dmg_dealt: number; + cash_earnt: bigint; +} export interface GameOverData extends BaseEventData { - game_id: number; -player_id: string; -player_name: string; -player_status: String; -turn: number; -cash: bigint; - } + game_id: number; + player_id: string; + player_name: string; + player_status: String; + turn: number; + cash: bigint; +} export interface GameCreatedData extends BaseEventData { - game_id: number; -game_mode: String; -creator: string; -start_time: number; - } + game_id: number; + game_mode: String; + creator: string; + start_time: number; +} export interface PlayerJoinedData extends BaseEventData { - game_id: number; -player_id: string; -player_name: string; - } + game_id: number; + player_id: string; + player_name: string; +} export interface BoughtItemData extends BaseEventData { - game_id: number; -player_id: string; -item_id: String; -level: number; -cost: number; - } + game_id: number; + player_id: string; + item_id: String; + level: number; + cost: number; +} export interface DroppedItemData extends BaseEventData { - game_id: number; -player_id: string; -item_id: String; - } + game_id: number; + player_id: string; + item_id: String; +} export interface BoughtData extends BaseEventData { - game_id: number; -player_id: string; -drug_id: String; -quantity: number; -cost: bigint; - } + game_id: number; + player_id: string; + drug_id: String; + quantity: number; + cost: bigint; +} export interface SoldData extends BaseEventData { - game_id: number; -player_id: string; -drug_id: String; -quantity: number; -payout: bigint; - } + game_id: number; + player_id: string; + drug_id: String; + quantity: number; + payout: bigint; +} export interface TraveledData extends BaseEventData { - game_id: number; -player_id: string; -turn: number; -from_location: String; -to_location: String; - } + game_id: number; + player_id: string; + turn: number; + from_location: String; + to_location: String; +} export interface AdverseEventData extends BaseEventData { - game_id: number; -player_id: string; -player_status: String; -health_loss: number; -demand_pct: number; - } + game_id: number; + player_id: string; + player_status: String; + health_loss: number; + demand_pct: number; +} export interface MarketEventData extends BaseEventData { - game_id: number; -location_id: String; -drug_id: String; -increase: boolean; - } + game_id: number; + location_id: String; + drug_id: String; + increase: boolean; +} export interface AtPawnshopData extends BaseEventData { - game_id: number; -player_id: string; - } - - - export const parseAllEvents = (receipt: GetTransactionReceiptResponse) => { - if (receipt.status === "REJECTED") { - throw new Error(`transaction REJECTED`); - } - if (receipt.status === "REVERTED") { - throw new Error(`transaction REVERTED`); - } - - const flatEvents = parseEvents(receipt as SuccessfulTransactionReceiptResponse) - return flatEvents - } - - export const parseEvents = (receipt: SuccessfulTransactionReceiptResponse) => { - const parsed = receipt.events.map(e => parseEvent(e)) - return parsed - } - - export type ParseEventResult = ReturnType; - - - - export const parseEvent = (raw: any) => { - switch (raw.keys[0]) { - -case WorldEvents.Decision: -return { -event_type: WorldEvents.Decision, -event_name: "Decision", -game_id: Number(raw.keys[1]), -player_id: num.toHexString(raw.keys[2]), -action: num.toHexString(raw.data[0]), -} as DecisionData; - -case WorldEvents.Consequence: -return { -event_type: WorldEvents.Consequence, -event_name: "Consequence", -game_id: Number(raw.keys[1]), -player_id: num.toHexString(raw.keys[2]), -outcome: num.toHexString(raw.data[0]), -health_loss: Number(raw.data[1]), -drug_loss: Number(raw.data[2]), -cash_loss: BigInt(raw.data[3]), -dmg_dealt: Number(raw.data[4]), -cash_earnt: BigInt(raw.data[5]), -} as ConsequenceData; - -case WorldEvents.GameOver: -return { -event_type: WorldEvents.GameOver, -event_name: "GameOver", -game_id: Number(raw.keys[1]), -player_id: num.toHexString(raw.keys[2]), -player_name: num.toHexString(raw.data[0]), -player_status: num.toHexString(raw.data[1]), -turn: Number(raw.data[2]), -cash: BigInt(raw.data[3]), -} as GameOverData; - -case WorldEvents.GameCreated: -return { -event_type: WorldEvents.GameCreated, -event_name: "GameCreated", -game_id: Number(raw.data[0]), -game_mode: num.toHexString(raw.data[1]), -creator: num.toHexString(raw.data[2]), -start_time: Number(raw.data[3]), -} as GameCreatedData; - -case WorldEvents.PlayerJoined: -return { -event_type: WorldEvents.PlayerJoined, -event_name: "PlayerJoined", -game_id: Number(raw.keys[1]), -player_id: num.toHexString(raw.keys[2]), -player_name: num.toHexString(raw.data[0]), -} as PlayerJoinedData; - -case WorldEvents.BoughtItem: -return { -event_type: WorldEvents.BoughtItem, -event_name: "BoughtItem", -game_id: Number(raw.keys[1]), -player_id: num.toHexString(raw.keys[2]), -item_id: num.toHexString(raw.data[0]), -level: Number(raw.data[1]), -cost: Number(raw.data[2]), -} as BoughtItemData; - -case WorldEvents.DroppedItem: -return { -event_type: WorldEvents.DroppedItem, -event_name: "DroppedItem", -game_id: Number(raw.keys[1]), -player_id: num.toHexString(raw.keys[2]), -item_id: num.toHexString(raw.data[0]), -} as DroppedItemData; - -case WorldEvents.Bought: -return { -event_type: WorldEvents.Bought, -event_name: "Bought", -game_id: Number(raw.keys[1]), -player_id: num.toHexString(raw.keys[2]), -drug_id: num.toHexString(raw.data[0]), -quantity: Number(raw.data[1]), -cost: BigInt(raw.data[2]), -} as BoughtData; - -case WorldEvents.Sold: -return { -event_type: WorldEvents.Sold, -event_name: "Sold", -game_id: Number(raw.keys[1]), -player_id: num.toHexString(raw.keys[2]), -drug_id: num.toHexString(raw.data[0]), -quantity: Number(raw.data[1]), -payout: BigInt(raw.data[2]), -} as SoldData; - -case WorldEvents.Traveled: -return { -event_type: WorldEvents.Traveled, -event_name: "Traveled", -game_id: Number(raw.keys[1]), -player_id: num.toHexString(raw.keys[2]), -turn: Number(raw.data[0]), -from_location: num.toHexString(raw.data[1]), -to_location: num.toHexString(raw.data[2]), -} as TraveledData; - -case WorldEvents.AdverseEvent: -return { -event_type: WorldEvents.AdverseEvent, -event_name: "AdverseEvent", -game_id: Number(raw.keys[1]), -player_id: num.toHexString(raw.keys[2]), -player_status: num.toHexString(raw.data[0]), -health_loss: Number(raw.data[1]), -demand_pct: Number(raw.data[2]), -} as AdverseEventData; - -case WorldEvents.MarketEvent: -return { -event_type: WorldEvents.MarketEvent, -event_name: "MarketEvent", -game_id: Number(raw.data[0]), -location_id: num.toHexString(raw.data[1]), -drug_id: num.toHexString(raw.data[2]), -increase: raw.data[3] === "0x0" ? false : true, -} as MarketEventData; - -case WorldEvents.AtPawnshop: -return { -event_type: WorldEvents.AtPawnshop, -event_name: "AtPawnshop", -game_id: Number(raw.keys[1]), -player_id: num.toHexString(raw.keys[2]), -} as AtPawnshopData; + game_id: number; + player_id: string; +} + +export const parseAllEvents = (receipt: GetTransactionReceiptResponse) => { + if (receipt.status === "REJECTED") { + throw new Error(`transaction REJECTED`); + } + if (receipt.status === "REVERTED") { + throw new Error(`transaction REVERTED`); + } + + const flatEvents = parseEvents(receipt as SuccessfulTransactionReceiptResponse); + return flatEvents; +}; + +export const parseEvents = (receipt: SuccessfulTransactionReceiptResponse) => { + const parsed = receipt.events.map((e) => parseEvent(e)); + return parsed; +}; +export type ParseEventResult = ReturnType; + +export const parseEvent = (raw: any) => { + switch (raw.keys[0]) { + case WorldEvents.Decision: + return { + event_type: WorldEvents.Decision, + event_name: "Decision", + game_id: Number(raw.keys[1]), + player_id: num.toHexString(raw.keys[2]), + action: num.toHexString(raw.data[0]), + } as DecisionData; + + case WorldEvents.Consequence: + return { + event_type: WorldEvents.Consequence, + event_name: "Consequence", + game_id: Number(raw.keys[1]), + player_id: num.toHexString(raw.keys[2]), + outcome: num.toHexString(raw.data[0]), + health_loss: Number(raw.data[1]), + drug_loss: Number(raw.data[2]), + cash_loss: BigInt(raw.data[3]), + dmg_dealt: Number(raw.data[4]), + cash_earnt: BigInt(raw.data[5]), + } as ConsequenceData; + + case WorldEvents.GameOver: + return { + event_type: WorldEvents.GameOver, + event_name: "GameOver", + game_id: Number(raw.keys[1]), + player_id: num.toHexString(raw.keys[2]), + player_name: num.toHexString(raw.data[0]), + player_status: num.toHexString(raw.data[1]), + turn: Number(raw.data[2]), + cash: BigInt(raw.data[3]), + } as GameOverData; + + case WorldEvents.GameCreated: + return { + event_type: WorldEvents.GameCreated, + event_name: "GameCreated", + game_id: Number(raw.data[0]), + game_mode: num.toHexString(raw.data[1]), + creator: num.toHexString(raw.data[2]), + start_time: Number(raw.data[3]), + } as GameCreatedData; + + case WorldEvents.PlayerJoined: + return { + event_type: WorldEvents.PlayerJoined, + event_name: "PlayerJoined", + game_id: Number(raw.keys[1]), + player_id: num.toHexString(raw.keys[2]), + player_name: num.toHexString(raw.data[0]), + } as PlayerJoinedData; + + case WorldEvents.BoughtItem: + return { + event_type: WorldEvents.BoughtItem, + event_name: "BoughtItem", + game_id: Number(raw.keys[1]), + player_id: num.toHexString(raw.keys[2]), + item_id: num.toHexString(raw.data[0]), + level: Number(raw.data[1]), + cost: Number(raw.data[2]), + } as BoughtItemData; + + case WorldEvents.DroppedItem: + return { + event_type: WorldEvents.DroppedItem, + event_name: "DroppedItem", + game_id: Number(raw.keys[1]), + player_id: num.toHexString(raw.keys[2]), + item_id: num.toHexString(raw.data[0]), + } as DroppedItemData; + + case WorldEvents.Bought: + return { + event_type: WorldEvents.Bought, + event_name: "Bought", + game_id: Number(raw.keys[1]), + player_id: num.toHexString(raw.keys[2]), + drug_id: num.toHexString(raw.data[0]), + quantity: Number(raw.data[1]), + cost: BigInt(raw.data[2]), + } as BoughtData; + + case WorldEvents.Sold: + return { + event_type: WorldEvents.Sold, + event_name: "Sold", + game_id: Number(raw.keys[1]), + player_id: num.toHexString(raw.keys[2]), + drug_id: num.toHexString(raw.data[0]), + quantity: Number(raw.data[1]), + payout: BigInt(raw.data[2]), + } as SoldData; + + case WorldEvents.Traveled: + return { + event_type: WorldEvents.Traveled, + event_name: "Traveled", + game_id: Number(raw.keys[1]), + player_id: num.toHexString(raw.keys[2]), + turn: Number(raw.data[0]), + from_location: num.toHexString(raw.data[1]), + to_location: num.toHexString(raw.data[2]), + } as TraveledData; + + case WorldEvents.AdverseEvent: + return { + event_type: WorldEvents.AdverseEvent, + event_name: "AdverseEvent", + game_id: Number(raw.keys[1]), + player_id: num.toHexString(raw.keys[2]), + player_status: num.toHexString(raw.data[0]), + health_loss: Number(raw.data[1]), + demand_pct: Number(raw.data[2]), + } as AdverseEventData; + + case WorldEvents.MarketEvent: + return { + event_type: WorldEvents.MarketEvent, + event_name: "MarketEvent", + game_id: Number(raw.data[0]), + location_id: num.toHexString(raw.data[1]), + drug_id: num.toHexString(raw.data[2]), + increase: raw.data[3] === "0x0" ? false : true, + } as MarketEventData; + + case WorldEvents.AtPawnshop: + return { + event_type: WorldEvents.AtPawnshop, + event_name: "AtPawnshop", + game_id: Number(raw.keys[1]), + player_id: num.toHexString(raw.keys[2]), + } as AtPawnshopData; default: return { gameId: undefined, event_type: raw.keys[0], event_name: raw.keys[0], - } - break; - - - } - } - - - \ No newline at end of file + }; + break; + } +}; diff --git a/web/src/dojo/hooks/useDevtools.ts b/web/src/dojo/hooks/useDevtools.ts index c946bef16..7c859504b 100644 --- a/web/src/dojo/hooks/useDevtools.ts +++ b/web/src/dojo/hooks/useDevtools.ts @@ -1,9 +1,6 @@ import { useCallback } from "react"; +import { BigNumberish, GetTransactionReceiptResponse } from "starknet"; import { useDojoContext } from "./useDojoContext"; -import { Action, GameMode, Location, ItemEnum } from "../types"; -import { shortString, GetTransactionReceiptResponse, BigNumberish } from "starknet"; -import { parseAllEvents } from "../events"; -import { WorldEvents } from "../generated/contractEvents"; import { SystemExecuteResult } from "./useSystems"; export interface SystemsInterface { @@ -18,12 +15,10 @@ export interface SystemsInterface { export const useDevtools = (): SystemsInterface => { const { - burner: { - masterAccount - }, - setup: { - network: { provider, execute, call }, - }, + masterAccount, + dojoProvider: { + execute + } } = useDojoContext(); const executeAndReceipt = useCallback( diff --git a/web/src/dojo/hooks/useDojoContext.ts b/web/src/dojo/hooks/useDojoContext.ts index 483d77a0c..541dc768f 100644 --- a/web/src/dojo/hooks/useDojoContext.ts +++ b/web/src/dojo/hooks/useDojoContext.ts @@ -1,6 +1,6 @@ -import { DojoContext } from "../context/DojoContext.tsx"; import { useContext } from "react"; +import { DojoContext } from "../context/DojoContext"; export const useDojoContext = () => { const value = useContext(DojoContext); diff --git a/web/src/dojo/setup/setup.ts b/web/src/dojo/setup/setup.ts index abd59e232..667925579 100644 --- a/web/src/dojo/setup/setup.ts +++ b/web/src/dojo/setup/setup.ts @@ -1,24 +1,12 @@ import { DojoProvider } from "@dojoengine/core"; -// import { createClient } from "@dojoengine/torii-client"; +import { QueryClient } from "react-query"; import { Config } from "./config"; -import { setupNetwork } from "./setupNetwork"; -import { QueryClient, QueryClientProvider } from "react-query"; - - export type SetupResult = Awaited>; export async function setup(config: Config) { - // // torii client issues with webpack 5 - // const toriiClient = await createClient([], { - // rpcUrl: config.rpcUrl, - // toriiUrl: config.toriiUrl, - // worldAddress: config.manifest.world.address || "", - // }); - - const dojoProvider = new DojoProvider(config.manifest, config.rpcUrl) const queryClient = new QueryClient({ @@ -29,9 +17,7 @@ export async function setup(config: Config) { }, }); - // Initialize the network configuration. - //const network = await setupNetwork(config); - + return { //network, config, diff --git a/web/src/dojo/setup/setupNetwork.ts b/web/src/dojo/setup/setupNetwork.ts deleted file mode 100644 index 8b538953c..000000000 --- a/web/src/dojo/setup/setupNetwork.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { RPCProvider, Query, } from "@dojoengine/core"; -import { Account, Contract, TypedContract, num, shortString } from "starknet"; -import { GraphQLClient } from 'graphql-request'; -import { Config } from "./config"; - -export type ManifestContract = { - name: string; - abi: any -}; - -export type SetupNetworkResult = Awaited>; - -export const getContractByName = (name: string, manifest: any) => { - let contract = manifest.contracts.find((contract: ManifestContract) => contract.name === name); - return contract -} - -export const getWorldAddress = (manifest: any) => { - return manifest.world.address -} - -export async function setupNetwork(config: Config) { - - // Create a new RPCProvider instance. - const provider = new RPCProvider(getWorldAddress(config.manifest), config.manifest, config.rpcUrl); - - // Return the setup object. - return { - manifest: config.manifest, - provider, - - // Execute function. - execute: async (signer: Account, contract_name: string, system: string, call_data: num.BigNumberish[]) => { - return provider.execute(signer, contract_name, system, call_data); - }, - - // Entity query function. - entity: async (component: string, query: Query) => { - return provider.entity(component, query); - }, - - // Entities query function. - entities: async (component: string, partition: number) => { - return provider.entities(component, partition); - }, - - // Call function. - call: async (signer: Account, contract_name: string, selector: string, call_data: num.BigNumberish[]) => { - const contract_infos = getContractByName(contract_name, manifest); - const contract = new Contract(contract_infos.abi, contract_infos.address, signer); - return contract.call(selector, call_data); - }, - }; -} \ No newline at end of file diff --git a/web/src/hooks/media.tsx b/web/src/hooks/media.tsx index 8e47e2384..271ac2963 100644 --- a/web/src/hooks/media.tsx +++ b/web/src/hooks/media.tsx @@ -1,4 +1,4 @@ -import { Howl, Howler } from "howler"; +import { Howl } from "howler"; import { create } from "zustand"; type MediaItem = { name: string; filename: string; sound?: Howl }; @@ -6,22 +6,22 @@ type MediaItem = { name: string; filename: string; sound?: Howl }; const mediaLibrary: MediaItem[] = [ { name: "NightDrive", filename: "1_NightDrive.mp3" }, { name: "TheChronic", filename: "2_TheChronic.mp3" }, - // { name: "KeyGenh", filename: "3_KeyGenh.mp3" }, - // { name: "Upbeat", filename: "4_Upbeat.mp3" }, - // { name: "MRYO G Funk", filename: "5_MRYO_G_Funk.mp3" }, - // { name: "Hacked Trap", filename: "6_Hacked_Trap.mp3" }, - // { name: "Dark Moody", filename: "7_Dark_Moody.mp3" }, - - // { name: "2 of Amerika's Most Wanted", filename: "C1_2 of Amerika_s Most Wanted.mp3" }, - // { name: "Ain't Nuthin But a G Thang", filename: "C2_Ain_t Nuthin But a G Thang.mp3" }, - // { name: "Big Poppa", filename: "C3_Big Poppa.mp3" }, - // { name: "Big Pimpin", filename: "C4_Big Pimpin_.mp3" }, - // { name: "C.R.E.A.M.", filename: "C5_C.R.E.A.M..mp3" }, - // { name: "Can't Knock The Hustle", filename: "C6_Can_t Knock The Hustle.mp3" }, - // { name: "Shook Ones Pt 2", filename: "C7_Shook Ones Pt 2.mp3" }, - // { name: "Gangsta's Paradise", filename: "C8_Gangsta_s Paradise.mp3" }, - // { name: "I Got 5 On It", filename: "C9_I Got 5 On It.mp3" }, - // { name: "Regulate", filename: "C10_Regulate.mp3" }, + { name: "KeyGenh", filename: "3_KeyGenh.mp3" }, + { name: "Upbeat", filename: "4_Upbeat.mp3" }, + { name: "MRYO G Funk", filename: "5_MRYO_G_Funk.mp3" }, + { name: "Hacked Trap", filename: "6_Hacked_Trap.mp3" }, + { name: "Dark Moody", filename: "7_Dark_Moody.mp3" }, + + { name: "2 of Amerika's Most Wanted", filename: "C1_2 of Amerika_s Most Wanted.mp3" }, + { name: "Ain't Nuthin But a G Thang", filename: "C2_Ain_t Nuthin But a G Thang.mp3" }, + { name: "Big Poppa", filename: "C3_Big Poppa.mp3" }, + { name: "Big Pimpin", filename: "C4_Big Pimpin_.mp3" }, + { name: "C.R.E.A.M.", filename: "C5_C.R.E.A.M..mp3" }, + { name: "Can't Knock The Hustle", filename: "C6_Can_t Knock The Hustle.mp3" }, + { name: "Shook Ones Pt 2", filename: "C7_Shook Ones Pt 2.mp3" }, + { name: "Gangsta's Paradise", filename: "C8_Gangsta_s Paradise.mp3" }, + { name: "I Got 5 On It", filename: "C9_I Got 5 On It.mp3" }, + { name: "Regulate", filename: "C10_Regulate.mp3" }, ]; diff --git a/web/src/theme/components/accordion.tsx b/web/src/theme/components/accordion.tsx index 6e7cfdcf0..dc4a35cf2 100644 --- a/web/src/theme/components/accordion.tsx +++ b/web/src/theme/components/accordion.tsx @@ -1,4 +1,4 @@ -import type { ComponentMultiStyleConfig } from "@chakra-ui/theme"; +import type { ComponentMultiStyleConfig } from "@chakra-ui/react"; export const Accordion: ComponentMultiStyleConfig = { parts: ["root", "container", "button", "panel", "icon"], diff --git a/web/src/theme/components/card.tsx b/web/src/theme/components/card.tsx index 0abb3642f..6c5191529 100644 --- a/web/src/theme/components/card.tsx +++ b/web/src/theme/components/card.tsx @@ -1,7 +1,5 @@ -import type { ComponentMultiStyleConfig } from "@chakra-ui/theme"; -import BorderImage from "@/components/icons/PressableBorderImage"; -import { cardStyle, cardPixelatedStyle } from "../styles"; -import colors from "../colors"; +import type { ComponentMultiStyleConfig } from "@chakra-ui/react"; +import { cardPixelatedStyle, cardStyle } from "../styles"; export const Card: ComponentMultiStyleConfig = { parts: ["container", "header", "body", "footer"], diff --git a/web/src/theme/components/container.tsx b/web/src/theme/components/container.tsx index 6810834d9..cac4f7dde 100644 --- a/web/src/theme/components/container.tsx +++ b/web/src/theme/components/container.tsx @@ -1,4 +1,4 @@ -import type { ComponentStyleConfig } from "@chakra-ui/theme"; +import type { ComponentStyleConfig } from "@chakra-ui/react"; export const Container: ComponentStyleConfig = { baseStyle: { diff --git a/web/src/theme/components/icon.tsx b/web/src/theme/components/icon.tsx index 6c440dbc3..b33df70c6 100644 --- a/web/src/theme/components/icon.tsx +++ b/web/src/theme/components/icon.tsx @@ -1,4 +1,4 @@ -import type { ComponentStyleConfig } from "@chakra-ui/theme"; +import type { ComponentStyleConfig } from "@chakra-ui/react"; export const Icon: ComponentStyleConfig = { baseStyle: { diff --git a/web/src/theme/components/input.tsx b/web/src/theme/components/input.tsx index ce816b860..a599de83d 100644 --- a/web/src/theme/components/input.tsx +++ b/web/src/theme/components/input.tsx @@ -1,5 +1,3 @@ -import type { ComponentStyleConfig } from "@chakra-ui/theme"; -import { StyleFunctionProps } from "@chakra-ui/theme-tools"; import { cardStyle } from "../styles"; import { inputAnatomy } from "@chakra-ui/anatomy"; diff --git a/web/src/theme/components/link.tsx b/web/src/theme/components/link.tsx index a92568bf7..cd009e6b7 100644 --- a/web/src/theme/components/link.tsx +++ b/web/src/theme/components/link.tsx @@ -1,4 +1,4 @@ -import type { ComponentStyleConfig } from "@chakra-ui/theme"; +import type { ComponentStyleConfig } from "@chakra-ui/react"; export const Link: ComponentStyleConfig = { baseStyle: { diff --git a/web/src/theme/components/list.tsx b/web/src/theme/components/list.tsx index 5129868d3..e7a5afff3 100644 --- a/web/src/theme/components/list.tsx +++ b/web/src/theme/components/list.tsx @@ -1,4 +1,4 @@ -import type { ComponentMultiStyleConfig } from "@chakra-ui/theme"; +import type { ComponentMultiStyleConfig } from "@chakra-ui/react"; export const List: ComponentMultiStyleConfig = { parts: ["container", "item", "icon"], diff --git a/web/src/theme/components/modal.tsx b/web/src/theme/components/modal.tsx index f34735e87..90adecb2a 100644 --- a/web/src/theme/components/modal.tsx +++ b/web/src/theme/components/modal.tsx @@ -1,5 +1,5 @@ -import type { ComponentMultiStyleConfig } from "@chakra-ui/theme"; -import { cardStyle, cardPixelatedStyle } from "../styles"; +import type { ComponentMultiStyleConfig } from "@chakra-ui/react"; +import { cardPixelatedStyle } from "../styles"; export const Modal: ComponentMultiStyleConfig = { parts: [