diff --git a/indexer/env-sepolia b/indexer/env-sepolia index 06a889b6a..9a2f23753 100644 --- a/indexer/env-sepolia +++ b/indexer/env-sepolia @@ -1,5 +1,5 @@ -GAME="0x0713063bab72fb1ff6aa279f53962f3adf0154305b194da42e8d20562f61c5fd" -START=24000 +GAME="0x02b66531874c952844913b8cbc573878c794112b546cbf39409013e33d4777fe" +START=60000 MONGO_CONNECTION_STRING="mongodb://mongo:mongo@mongo:27017" MONGO_DB="mongo" STREAM_URL='https://sepolia.starknet.a5a.ch' \ No newline at end of file diff --git a/ui/.env.sepolia b/ui/.env.sepolia index 8fea43f17..9f24bc390 100644 --- a/ui/.env.sepolia +++ b/ui/.env.sepolia @@ -4,11 +4,11 @@ NEXT_PUBLIC_RPC_API_KEY=efb20d63-c5e0-4f5d-ab72-ef7add92779f NEXT_PUBLIC_LS_GQL_URL=https://survivor-sepolia-indexer.realms.world/graphql NEXT_PUBLIC_TOKENS_GQL_URL=https://testnet.realms.world/api/graphql NEXT_PUBLIC_ETH_ADDRESS=0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7 -NEXT_PUBLIC_GAME_ADDRESS=0x0713063bab72fb1ff6aa279f53962f3adf0154305b194da42e8d20562f61c5fd +NEXT_PUBLIC_GAME_ADDRESS=0x02b66531874c952844913b8cbc573878c794112b546cbf39409013e33d4777fe NEXT_PUBLIC_OLD_GAME_ADDRESS=0x0 -NEXT_PUBLIC_LORDS_ADDRESS=0x044e6bcc627e6201ce09f781d1aae44ea4c21c2fdef299e34fce55bef2d02210 -NEXT_PUBLIC_BEASTS_ADDRESS=0x03065c1db93be057c40fe92c9cba7f898de8d3622693d128e4e97fdc957808a3 -NEXT_PUBLIC_GOLDEN_TOKEN_ADDRESS=0x024f21982680442892d2f7ac4cee98c7d62708b04fdf9f8a0453415baca4b16f +NEXT_PUBLIC_LORDS_ADDRESS=0x019c92fa87f4d5e3be25c3dd6a284f30282a07e87cd782f5fd387b82c8142017 +NEXT_PUBLIC_BEASTS_ADDRESS=0x020c7c02c973ffa3a48fb78e9472b679c72c11b59512f524154ade0a39f54136 +NEXT_PUBLIC_GOLDEN_TOKEN_ADDRESS=0x07626660faba349aad9ad2aaa0ff8645c079fa8e043a168d640d92472806eeac NEXT_PUBLIC_ARCADE_ACCOUNT_CLASS_HASH=0x0251830adc3d8b4d818c2c309d71f1958308e8c745212480c26e01120c69ee49 NEXT_PUBLIC_DAO_ADDRESS=0x0314924118945405ac0bcd6181457712795c0effc29d8dd3be86d3f3ec62adc1 NEXT_PUBLIC_APP_URL=https://sepolia-survivor.realms.world/ diff --git a/ui/package.json b/ui/package.json index 45cb9739b..c7ba1d0fc 100644 --- a/ui/package.json +++ b/ui/package.json @@ -37,8 +37,8 @@ "react-responsive": "^9.0.2", "react-transition-group": "^4.4.5", "react-type-animation": "^3.0.1", - "starknet": "^6.4.3", - "starknetkit": "^1.0.22", + "starknet": "6.7.0", + "starknetkit": "^1.1.9", "tailwind-merge": "^1.10.0", "tailwindcss": "^3.3.0", "typescript": "5.0.2", diff --git a/ui/src/app/abi/Game.json b/ui/src/app/abi/Game.json index 4b6c161d0..0da7aea16 100644 --- a/ui/src/app/abi/Game.json +++ b/ui/src/app/abi/Game.json @@ -1,12 +1,12 @@ [ { - "type": "impl", "name": "Game", + "type": "impl", "interface_name": "game::game::interfaces::IGame" }, { - "type": "struct", "name": "core::integer::u256", + "type": "struct", "members": [ { "name": "low", @@ -19,8 +19,8 @@ ] }, { - "type": "enum", "name": "core::bool", + "type": "enum", "variants": [ { "name": "False", @@ -33,8 +33,8 @@ ] }, { - "type": "struct", "name": "survivor::stats::Stats", + "type": "struct", "members": [ { "name": "strength", @@ -67,8 +67,8 @@ ] }, { - "type": "struct", "name": "market::market::ItemPurchase", + "type": "struct", "members": [ { "name": "item_id", @@ -81,8 +81,8 @@ ] }, { - "type": "struct", "name": "survivor::item_primitive::ItemPrimitive", + "type": "struct", "members": [ { "name": "id", @@ -99,8 +99,8 @@ ] }, { - "type": "struct", "name": "survivor::adventurer::Adventurer", + "type": "struct", "members": [ { "name": "last_action_block", @@ -173,1754 +173,279 @@ ] }, { + "name": "game_entropy::game_entropy::GameEntropy", "type": "struct", - "name": "survivor::adventurer_meta::AdventurerMetadata", "members": [ { - "name": "start_block", - "type": "core::integer::u64" + "name": "hash", + "type": "core::felt252" }, { - "name": "starting_stats", - "type": "survivor::stats::Stats" + "name": "last_updated_block", + "type": "core::integer::u64" }, { - "name": "name", - "type": "core::integer::u128" + "name": "last_updated_time", + "type": "core::integer::u64" }, { - "name": "interface_camel", - "type": "core::bool" + "name": "next_update_block", + "type": "core::integer::u64" } ] }, { + "name": "survivor::leaderboard::Score", "type": "struct", - "name": "survivor::bag::Bag", "members": [ { - "name": "item_1", - "type": "survivor::item_primitive::ItemPrimitive" - }, - { - "name": "item_2", - "type": "survivor::item_primitive::ItemPrimitive" - }, - { - "name": "item_3", - "type": "survivor::item_primitive::ItemPrimitive" - }, - { - "name": "item_4", - "type": "survivor::item_primitive::ItemPrimitive" - }, - { - "name": "item_5", - "type": "survivor::item_primitive::ItemPrimitive" - }, - { - "name": "item_6", - "type": "survivor::item_primitive::ItemPrimitive" - }, - { - "name": "item_7", - "type": "survivor::item_primitive::ItemPrimitive" - }, - { - "name": "item_8", - "type": "survivor::item_primitive::ItemPrimitive" - }, - { - "name": "item_9", - "type": "survivor::item_primitive::ItemPrimitive" - }, - { - "name": "item_10", - "type": "survivor::item_primitive::ItemPrimitive" + "name": "adventurer_id", + "type": "core::integer::u64" }, { - "name": "item_11", - "type": "survivor::item_primitive::ItemPrimitive" + "name": "xp", + "type": "core::integer::u16" }, { - "name": "mutated", - "type": "core::bool" + "name": "gold", + "type": "core::integer::u16" } ] }, { + "name": "survivor::leaderboard::Leaderboard", "type": "struct", - "name": "survivor::item_meta::ItemSpecials", "members": [ { - "name": "special1", - "type": "core::integer::u8" + "name": "first", + "type": "survivor::leaderboard::Score" }, { - "name": "special2", - "type": "core::integer::u8" + "name": "second", + "type": "survivor::leaderboard::Score" }, { - "name": "special3", - "type": "core::integer::u8" + "name": "third", + "type": "survivor::leaderboard::Score" } ] }, { - "type": "struct", - "name": "survivor::item_meta::ItemSpecialsStorage", - "members": [ - { - "name": "item_1", - "type": "survivor::item_meta::ItemSpecials" - }, - { - "name": "item_2", - "type": "survivor::item_meta::ItemSpecials" - }, - { - "name": "item_3", - "type": "survivor::item_meta::ItemSpecials" - }, - { - "name": "item_4", - "type": "survivor::item_meta::ItemSpecials" - }, - { - "name": "item_5", - "type": "survivor::item_meta::ItemSpecials" - }, - { - "name": "item_6", - "type": "survivor::item_meta::ItemSpecials" - }, - { - "name": "item_7", - "type": "survivor::item_meta::ItemSpecials" - }, - { - "name": "item_8", - "type": "survivor::item_meta::ItemSpecials" - }, - { - "name": "item_9", - "type": "survivor::item_meta::ItemSpecials" - }, + "name": "game::game::interfaces::IGame", + "type": "interface", + "items": [ { - "name": "item_10", - "type": "survivor::item_meta::ItemSpecials" + "name": "new_game", + "type": "function", + "inputs": [ + { + "name": "client_reward_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "weapon", + "type": "core::integer::u8" + }, + { + "name": "name", + "type": "core::integer::u128" + }, + { + "name": "golden_token_id", + "type": "core::integer::u256" + }, + { + "name": "interface_camel", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" }, { - "name": "mutated", - "type": "core::bool" - } - ] - }, - { - "type": "enum", - "name": "combat::constants::CombatEnums::Tier", - "variants": [ - { - "name": "None", - "type": "()" + "name": "set_starting_entropy", + "type": "function", + "inputs": [ + { + "name": "adventurer_id", + "type": "core::felt252" + }, + { + "name": "block_hash", + "type": "core::felt252" + } + ], + "outputs": [], + "state_mutability": "external" }, { - "name": "T1", - "type": "()" + "name": "explore", + "type": "function", + "inputs": [ + { + "name": "adventurer_id", + "type": "core::felt252" + }, + { + "name": "till_beast", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" }, { - "name": "T2", - "type": "()" + "name": "attack", + "type": "function", + "inputs": [ + { + "name": "adventurer_id", + "type": "core::felt252" + }, + { + "name": "to_the_death", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" }, { - "name": "T3", - "type": "()" + "name": "flee", + "type": "function", + "inputs": [ + { + "name": "adventurer_id", + "type": "core::felt252" + }, + { + "name": "to_the_death", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" }, { - "name": "T4", - "type": "()" - }, - { - "name": "T5", - "type": "()" - } - ] - }, - { - "type": "enum", - "name": "combat::constants::CombatEnums::Type", - "variants": [ - { - "name": "None", - "type": "()" - }, - { - "name": "Magic_or_Cloth", - "type": "()" - }, - { - "name": "Blade_or_Hide", - "type": "()" - }, - { - "name": "Bludgeon_or_Metal", - "type": "()" - }, - { - "name": "Necklace", - "type": "()" - }, - { - "name": "Ring", - "type": "()" - } - ] - }, - { - "type": "struct", - "name": "combat::combat::SpecialPowers", - "members": [ - { - "name": "special1", - "type": "core::integer::u8" - }, - { - "name": "special2", - "type": "core::integer::u8" - }, - { - "name": "special3", - "type": "core::integer::u8" - } - ] - }, - { - "type": "struct", - "name": "combat::combat::CombatSpec", - "members": [ - { - "name": "tier", - "type": "combat::constants::CombatEnums::Tier" - }, - { - "name": "item_type", - "type": "combat::constants::CombatEnums::Type" - }, - { - "name": "level", - "type": "core::integer::u16" - }, - { - "name": "specials", - "type": "combat::combat::SpecialPowers" - } - ] - }, - { - "type": "struct", - "name": "beasts::beast::Beast", - "members": [ - { - "name": "id", - "type": "core::integer::u8" - }, - { - "name": "starting_health", - "type": "core::integer::u16" - }, - { - "name": "combat_spec", - "type": "combat::combat::CombatSpec" - } - ] - }, - { - "type": "struct", - "name": "game_entropy::game_entropy::GameEntropy", - "members": [ - { - "name": "hash", - "type": "core::felt252" - }, - { - "name": "last_updated_block", - "type": "core::integer::u64" - }, - { - "name": "last_updated_time", - "type": "core::integer::u64" - }, - { - "name": "next_update_block", - "type": "core::integer::u64" - } - ] - }, - { - "type": "struct", - "name": "survivor::leaderboard::Score", - "members": [ - { - "name": "adventurer_id", - "type": "core::integer::u64" - }, - { - "name": "xp", - "type": "core::integer::u16" - }, - { - "name": "gold", - "type": "core::integer::u16" - } - ] - }, - { - "type": "struct", - "name": "survivor::leaderboard::Leaderboard", - "members": [ - { - "name": "first", - "type": "survivor::leaderboard::Score" - }, - { - "name": "second", - "type": "survivor::leaderboard::Score" - }, - { - "name": "third", - "type": "survivor::leaderboard::Score" - } - ] - }, - { - "type": "struct", - "name": "game_snapshot::GamesPlayedSnapshot", - "members": [ - { - "name": "timestamp", - "type": "core::integer::u64" - }, - { - "name": "game_count", - "type": "core::integer::u64" - }, - { - "name": "locked", - "type": "core::integer::u8" - } - ] - }, - { - "type": "interface", - "name": "game::game::interfaces::IGame", - "items": [ - { - "type": "function", - "name": "new_game", - "inputs": [ - { - "name": "client_reward_address", - "type": "core::starknet::contract_address::ContractAddress" - }, - { - "name": "weapon", - "type": "core::integer::u8" - }, - { - "name": "name", - "type": "core::integer::u128" - }, - { - "name": "golden_token_id", - "type": "core::integer::u256" - }, - { - "name": "interface_camel", - "type": "core::bool" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "explore", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - }, - { - "name": "till_beast", - "type": "core::bool" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "attack", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - }, - { - "name": "to_the_death", - "type": "core::bool" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "flee", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - }, - { - "name": "to_the_death", - "type": "core::bool" - } - ], - "outputs": [], - "state_mutability": "external" + "name": "equip", + "type": "function", + "inputs": [ + { + "name": "adventurer_id", + "type": "core::felt252" + }, + { + "name": "items", + "type": "core::array::Array::" + } + ], + "outputs": [], + "state_mutability": "external" }, { + "name": "drop", "type": "function", - "name": "equip", "inputs": [ { "name": "adventurer_id", "type": "core::felt252" }, { - "name": "items", - "type": "core::array::Array::" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "drop", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - }, - { - "name": "items", - "type": "core::array::Array::" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "upgrade", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - }, - { - "name": "potions", - "type": "core::integer::u8" - }, - { - "name": "stat_upgrades", - "type": "survivor::stats::Stats" - }, - { - "name": "items", - "type": "core::array::Array::" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "slay_idle_adventurers", - "inputs": [ - { - "name": "adventurer_ids", - "type": "core::array::Array::" - } - ], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "rotate_game_entropy", - "inputs": [], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "update_cost_to_play", - "inputs": [], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "initiate_price_change", - "inputs": [], - "outputs": [], - "state_mutability": "external" - }, - { - "type": "function", - "name": "get_adventurer", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::adventurer::Adventurer" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_adventurer_no_boosts", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::adventurer::Adventurer" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_adventurer_meta", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::adventurer_meta::AdventurerMetadata" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_health", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_xp", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_level", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_gold", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_stat_upgrades_available", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_last_action_block", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_actions_per_block", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_reveal_block", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u64" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "is_idle", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "(core::bool, core::integer::u16)" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_stats", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::stats::Stats" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_strength", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_dexterity", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_vitality", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_intelligence", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_wisdom", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_charisma", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_equipped_items", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::array::Array::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_equipped_weapon", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_primitive::ItemPrimitive" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_equipped_chest", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_primitive::ItemPrimitive" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_equipped_head", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_primitive::ItemPrimitive" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_equipped_waist", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_primitive::ItemPrimitive" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_equipped_foot", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_primitive::ItemPrimitive" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_equipped_hand", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_primitive::ItemPrimitive" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_equipped_necklace", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_primitive::ItemPrimitive" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_equipped_ring", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_primitive::ItemPrimitive" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_weapon_greatness", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_chest_greatness", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_head_greatness", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_waist_greatness", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_foot_greatness", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_hand_greatness", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_necklace_greatness", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_ring_greatness", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_bag", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::bag::Bag" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_special_storage", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - }, - { - "name": "storage_index", - "type": "core::integer::u8" - } - ], - "outputs": [ - { - "type": "survivor::item_meta::ItemSpecialsStorage" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_weapon_specials", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_meta::ItemSpecials" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_chest_specials", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_meta::ItemSpecials" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_head_specials", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_meta::ItemSpecials" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_waist_specials", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_meta::ItemSpecials" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_foot_specials", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_meta::ItemSpecials" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_hand_specials", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_meta::ItemSpecials" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_necklace_specials", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_meta::ItemSpecials" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_ring_specials", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::item_meta::ItemSpecials" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_items_on_market", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::array::Array::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_items_on_market_by_slot", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - }, - { - "name": "slot", - "type": "core::integer::u8" - } - ], - "outputs": [ - { - "type": "core::array::Array::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_items_on_market_by_tier", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - }, - { - "name": "tier", - "type": "core::integer::u8" - } - ], - "outputs": [ - { - "type": "core::array::Array::" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_potion_price", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_item_price", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - }, - { - "name": "item_id", - "type": "core::integer::u8" - } - ], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_base_stats", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "survivor::stats::Stats" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_base_strength", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_base_dexterity", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_base_vitality", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_base_intelligence", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_base_wisdom", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_base_charisma", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_attacking_beast", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "beasts::beast::Beast" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_beast_health", - "inputs": [ - { - "name": "adventurer_id", - "type": "core::felt252" - } - ], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_beast_type", - "inputs": [ - { - "name": "beast_id", - "type": "core::integer::u8" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "get_beast_tier", - "inputs": [ - { - "name": "beast_id", - "type": "core::integer::u8" - } - ], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "next_game_entropy_rotation", - "inputs": [], - "outputs": [ - { - "type": "core::felt252" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "game_rate_limit", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u64" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "starting_gold", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "starting_health", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "base_potion_price", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "potion_health_amount", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "minimum_potion_price", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "charisma_potion_discount", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "items_per_stat_upgrade", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "item_tier_price_multiplier", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "charisma_item_discount", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "minimum_item_price", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "minimum_damage_to_beasts", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" - } - ], - "state_mutability": "view" - }, - { - "type": "function", - "name": "minimum_damage_from_beasts", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u8" + "name": "items", + "type": "core::array::Array::" } ], - "state_mutability": "view" + "outputs": [], + "state_mutability": "external" }, { + "name": "upgrade", "type": "function", - "name": "minimum_damage_from_obstacles", - "inputs": [], - "outputs": [ + "inputs": [ + { + "name": "adventurer_id", + "type": "core::felt252" + }, { + "name": "potions", "type": "core::integer::u8" + }, + { + "name": "stat_upgrades", + "type": "survivor::stats::Stats" + }, + { + "name": "items", + "type": "core::array::Array::" } ], - "state_mutability": "view" + "outputs": [], + "state_mutability": "external" }, { + "name": "slay_idle_adventurers", "type": "function", - "name": "obstacle_critical_hit_chance", - "inputs": [], - "outputs": [ + "inputs": [ { - "type": "core::integer::u8" + "name": "adventurer_ids", + "type": "core::array::Array::" } ], - "state_mutability": "view" + "outputs": [], + "state_mutability": "external" }, { + "name": "slay_invalid_adventurers", "type": "function", - "name": "stat_upgrades_per_level", - "inputs": [], - "outputs": [ + "inputs": [ { - "type": "core::integer::u8" + "name": "adventurer_ids", + "type": "core::array::Array::" } ], - "state_mutability": "view" + "outputs": [], + "state_mutability": "external" }, { + "name": "rotate_game_entropy", "type": "function", - "name": "beast_special_name_unlock_level", "inputs": [], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" + "outputs": [], + "state_mutability": "external" }, { + "name": "update_cost_to_play", "type": "function", - "name": "item_xp_multiplier_beasts", "inputs": [], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" + "outputs": [], + "state_mutability": "external" }, { + "name": "initiate_price_change", "type": "function", - "name": "item_xp_multiplier_obstacles", "inputs": [], - "outputs": [ - { - "type": "core::integer::u16" - } - ], - "state_mutability": "view" + "outputs": [], + "state_mutability": "external" }, { + "name": "get_adventurer", "type": "function", - "name": "strength_bonus_damage", - "inputs": [], + "inputs": [ + { + "name": "adventurer_id", + "type": "core::felt252" + } + ], "outputs": [ { - "type": "core::integer::u8" + "type": "survivor::adventurer::Adventurer" } ], "state_mutability": "view" }, { + "name": "get_base_stats", "type": "function", - "name": "owner_of", "inputs": [ { "name": "adventurer_id", @@ -1929,36 +454,36 @@ ], "outputs": [ { - "type": "core::starknet::contract_address::ContractAddress" + "type": "survivor::stats::Stats" } ], "state_mutability": "view" }, { + "name": "next_game_entropy_rotation", "type": "function", - "name": "get_dao_address", "inputs": [], "outputs": [ { - "type": "core::starknet::contract_address::ContractAddress" + "type": "core::felt252" } ], "state_mutability": "view" }, { + "name": "game_rate_limit", "type": "function", - "name": "get_lords_address", "inputs": [], "outputs": [ { - "type": "core::starknet::contract_address::ContractAddress" + "type": "core::integer::u64" } ], "state_mutability": "view" }, { - "type": "function", "name": "get_game_entropy", + "type": "function", "inputs": [], "outputs": [ { @@ -1968,8 +493,8 @@ "state_mutability": "view" }, { - "type": "function", "name": "get_idle_penalty_blocks", + "type": "function", "inputs": [], "outputs": [ { @@ -1979,8 +504,8 @@ "state_mutability": "view" }, { - "type": "function", "name": "get_leaderboard", + "type": "function", "inputs": [], "outputs": [ { @@ -1990,30 +515,19 @@ "state_mutability": "view" }, { - "type": "function", "name": "get_cost_to_play", - "inputs": [], - "outputs": [ - { - "type": "core::integer::u128" - } - ], - "state_mutability": "view" - }, - { "type": "function", - "name": "get_games_played_snapshot", "inputs": [], "outputs": [ { - "type": "game_snapshot::GamesPlayedSnapshot" + "type": "core::integer::u128" } ], "state_mutability": "view" }, { - "type": "function", "name": "can_play", + "type": "function", "inputs": [ { "name": "golden_token_id", @@ -2030,8 +544,8 @@ ] }, { - "type": "constructor", "name": "constructor", + "type": "constructor", "inputs": [ { "name": "lords", @@ -2056,8 +570,8 @@ ] }, { - "type": "struct", "name": "game::Game::AdventurerState", + "type": "struct", "members": [ { "name": "owner", @@ -2074,47 +588,69 @@ ] }, { - "type": "event", - "name": "game::Game::StartGame", + "name": "survivor::adventurer_meta::AdventurerMetadata", + "type": "struct", + "members": [ + { + "name": "start_block", + "type": "core::integer::u64" + }, + { + "name": "starting_stats", + "type": "survivor::stats::Stats" + }, + { + "name": "name", + "type": "core::integer::u128" + }, + { + "name": "interface_camel", + "type": "core::bool" + } + ] + }, + { "kind": "struct", + "name": "game::Game::StartGame", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "adventurer_meta", - "type": "survivor::adventurer_meta::AdventurerMetadata", - "kind": "data" + "type": "survivor::adventurer_meta::AdventurerMetadata" }, { + "kind": "data", "name": "reveal_block", - "type": "core::integer::u64", - "kind": "data" + "type": "core::integer::u64" } ] }, { - "type": "event", - "name": "game::Game::UpgradesAvailable", "kind": "struct", + "name": "game::Game::UpgradesAvailable", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "items", - "type": "core::array::Array::", - "kind": "data" + "type": "core::array::Array::" } ] }, { - "type": "struct", "name": "game::Game::Discovery", + "type": "struct", "members": [ { "name": "adventurer_state", @@ -2127,32 +663,32 @@ ] }, { - "type": "event", - "name": "game::Game::DiscoveredHealth", "kind": "struct", + "name": "game::Game::DiscoveredHealth", + "type": "event", "members": [ { + "kind": "data", "name": "discovery", - "type": "game::Game::Discovery", - "kind": "data" + "type": "game::Game::Discovery" } ] }, { - "type": "event", - "name": "game::Game::DiscoveredGold", "kind": "struct", + "name": "game::Game::DiscoveredGold", + "type": "event", "members": [ { + "kind": "data", "name": "discovery", - "type": "game::Game::Discovery", - "kind": "data" + "type": "game::Game::Discovery" } ] }, { - "type": "struct", "name": "game::Game::ObstacleDetails", + "type": "struct", "members": [ { "name": "id", @@ -2185,46 +721,146 @@ ] }, { - "type": "struct", "name": "game::Game::ObstacleEvent", + "type": "struct", "members": [ { "name": "adventurer_state", "type": "game::Game::AdventurerState" }, { - "name": "obstacle_details", - "type": "game::Game::ObstacleDetails" + "name": "obstacle_details", + "type": "game::Game::ObstacleDetails" + } + ] + }, + { + "kind": "struct", + "name": "game::Game::DodgedObstacle", + "type": "event", + "members": [ + { + "kind": "data", + "name": "obstacle_event", + "type": "game::Game::ObstacleEvent" + } + ] + }, + { + "kind": "struct", + "name": "game::Game::HitByObstacle", + "type": "event", + "members": [ + { + "kind": "data", + "name": "obstacle_event", + "type": "game::Game::ObstacleEvent" + } + ] + }, + { + "name": "combat::constants::CombatEnums::Tier", + "type": "enum", + "variants": [ + { + "name": "None", + "type": "()" + }, + { + "name": "T1", + "type": "()" + }, + { + "name": "T2", + "type": "()" + }, + { + "name": "T3", + "type": "()" + }, + { + "name": "T4", + "type": "()" + }, + { + "name": "T5", + "type": "()" + } + ] + }, + { + "name": "combat::constants::CombatEnums::Type", + "type": "enum", + "variants": [ + { + "name": "None", + "type": "()" + }, + { + "name": "Magic_or_Cloth", + "type": "()" + }, + { + "name": "Blade_or_Hide", + "type": "()" + }, + { + "name": "Bludgeon_or_Metal", + "type": "()" + }, + { + "name": "Necklace", + "type": "()" + }, + { + "name": "Ring", + "type": "()" + } + ] + }, + { + "name": "combat::combat::SpecialPowers", + "type": "struct", + "members": [ + { + "name": "special1", + "type": "core::integer::u8" + }, + { + "name": "special2", + "type": "core::integer::u8" + }, + { + "name": "special3", + "type": "core::integer::u8" } ] }, { - "type": "event", - "name": "game::Game::DodgedObstacle", - "kind": "struct", + "name": "combat::combat::CombatSpec", + "type": "struct", "members": [ { - "name": "obstacle_event", - "type": "game::Game::ObstacleEvent", - "kind": "data" - } - ] - }, - { - "type": "event", - "name": "game::Game::HitByObstacle", - "kind": "struct", - "members": [ + "name": "tier", + "type": "combat::constants::CombatEnums::Tier" + }, { - "name": "obstacle_event", - "type": "game::Game::ObstacleEvent", - "kind": "data" + "name": "item_type", + "type": "combat::constants::CombatEnums::Type" + }, + { + "name": "level", + "type": "core::integer::u16" + }, + { + "name": "specials", + "type": "combat::combat::SpecialPowers" } ] }, { - "type": "struct", "name": "game::Game::BattleDetails", + "type": "struct", "members": [ { "name": "seed", @@ -2253,138 +889,138 @@ ] }, { - "type": "event", - "name": "game::Game::AmbushedByBeast", "kind": "struct", + "name": "game::Game::AmbushedByBeast", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "beast_battle_details", - "type": "game::Game::BattleDetails", - "kind": "data" + "type": "game::Game::BattleDetails" } ] }, { - "type": "event", - "name": "game::Game::DiscoveredBeast", "kind": "struct", + "name": "game::Game::DiscoveredBeast", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "seed", - "type": "core::integer::u128", - "kind": "data" + "type": "core::integer::u128" }, { + "kind": "data", "name": "id", - "type": "core::integer::u8", - "kind": "data" + "type": "core::integer::u8" }, { + "kind": "data", "name": "beast_specs", - "type": "combat::combat::CombatSpec", - "kind": "data" + "type": "combat::combat::CombatSpec" } ] }, { - "type": "event", - "name": "game::Game::AttackedBeast", "kind": "struct", + "name": "game::Game::AttackedBeast", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "beast_battle_details", - "type": "game::Game::BattleDetails", - "kind": "data" + "type": "game::Game::BattleDetails" } ] }, { - "type": "event", - "name": "game::Game::AttackedByBeast", "kind": "struct", + "name": "game::Game::AttackedByBeast", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "beast_battle_details", - "type": "game::Game::BattleDetails", - "kind": "data" + "type": "game::Game::BattleDetails" } ] }, { - "type": "event", - "name": "game::Game::SlayedBeast", "kind": "struct", + "name": "game::Game::SlayedBeast", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "seed", - "type": "core::integer::u128", - "kind": "data" + "type": "core::integer::u128" }, { + "kind": "data", "name": "id", - "type": "core::integer::u8", - "kind": "data" + "type": "core::integer::u8" }, { + "kind": "data", "name": "beast_specs", - "type": "combat::combat::CombatSpec", - "kind": "data" + "type": "combat::combat::CombatSpec" }, { + "kind": "data", "name": "damage_dealt", - "type": "core::integer::u16", - "kind": "data" + "type": "core::integer::u16" }, { + "kind": "data", "name": "critical_hit", - "type": "core::bool", - "kind": "data" + "type": "core::bool" }, { + "kind": "data", "name": "xp_earned_adventurer", - "type": "core::integer::u16", - "kind": "data" + "type": "core::integer::u16" }, { + "kind": "data", "name": "xp_earned_items", - "type": "core::integer::u16", - "kind": "data" + "type": "core::integer::u16" }, { + "kind": "data", "name": "gold_earned", - "type": "core::integer::u16", - "kind": "data" + "type": "core::integer::u16" } ] }, { - "type": "struct", "name": "game::Game::FleeEvent", + "type": "struct", "members": [ { "name": "adventurer_state", @@ -2405,54 +1041,108 @@ ] }, { - "type": "event", - "name": "game::Game::FleeFailed", "kind": "struct", + "name": "game::Game::FleeFailed", + "type": "event", "members": [ { + "kind": "data", "name": "flee_event", - "type": "game::Game::FleeEvent", - "kind": "data" + "type": "game::Game::FleeEvent" } ] }, { - "type": "event", - "name": "game::Game::FleeSucceeded", "kind": "struct", + "name": "game::Game::FleeSucceeded", + "type": "event", "members": [ { + "kind": "data", "name": "flee_event", - "type": "game::Game::FleeEvent", - "kind": "data" + "type": "game::Game::FleeEvent" } ] }, { - "type": "event", - "name": "game::Game::AdventurerLeveledUp", "kind": "struct", + "name": "game::Game::AdventurerLeveledUp", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "previous_level", - "type": "core::integer::u8", - "kind": "data" + "type": "core::integer::u8" }, { + "kind": "data", "name": "new_level", - "type": "core::integer::u8", - "kind": "data" + "type": "core::integer::u8" } ] }, { + "name": "survivor::bag::Bag", "type": "struct", + "members": [ + { + "name": "item_1", + "type": "survivor::item_primitive::ItemPrimitive" + }, + { + "name": "item_2", + "type": "survivor::item_primitive::ItemPrimitive" + }, + { + "name": "item_3", + "type": "survivor::item_primitive::ItemPrimitive" + }, + { + "name": "item_4", + "type": "survivor::item_primitive::ItemPrimitive" + }, + { + "name": "item_5", + "type": "survivor::item_primitive::ItemPrimitive" + }, + { + "name": "item_6", + "type": "survivor::item_primitive::ItemPrimitive" + }, + { + "name": "item_7", + "type": "survivor::item_primitive::ItemPrimitive" + }, + { + "name": "item_8", + "type": "survivor::item_primitive::ItemPrimitive" + }, + { + "name": "item_9", + "type": "survivor::item_primitive::ItemPrimitive" + }, + { + "name": "item_10", + "type": "survivor::item_primitive::ItemPrimitive" + }, + { + "name": "item_11", + "type": "survivor::item_primitive::ItemPrimitive" + }, + { + "name": "mutated", + "type": "core::bool" + } + ] + }, + { "name": "game::Game::AdventurerStateWithBag", + "type": "struct", "members": [ { "name": "adventurer_state", @@ -2465,8 +1155,8 @@ ] }, { - "type": "enum", "name": "combat::constants::CombatEnums::Slot", + "type": "enum", "variants": [ { "name": "None", @@ -2507,8 +1197,8 @@ ] }, { - "type": "struct", "name": "lootitems::loot::Loot", + "type": "struct", "members": [ { "name": "id", @@ -2529,8 +1219,8 @@ ] }, { - "type": "struct", "name": "market::market::LootWithPrice", + "type": "struct", "members": [ { "name": "item", @@ -2543,133 +1233,151 @@ ] }, { - "type": "event", - "name": "game::Game::PurchasedItems", "kind": "struct", + "name": "game::Game::PurchasedItems", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state_with_bag", - "type": "game::Game::AdventurerStateWithBag", - "kind": "data" + "type": "game::Game::AdventurerStateWithBag" }, { + "kind": "data", "name": "purchases", - "type": "core::array::Array::", - "kind": "data" + "type": "core::array::Array::" } ] }, { - "type": "event", - "name": "game::Game::PurchasedPotions", "kind": "struct", + "name": "game::Game::PurchasedPotions", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "quantity", - "type": "core::integer::u8", - "kind": "data" + "type": "core::integer::u8" }, { + "kind": "data", "name": "cost", - "type": "core::integer::u16", - "kind": "data" + "type": "core::integer::u16" }, { + "kind": "data", "name": "health", - "type": "core::integer::u16", - "kind": "data" + "type": "core::integer::u16" } ] }, { - "type": "event", - "name": "game::Game::AdventurerUpgraded", "kind": "struct", + "name": "game::Game::AdventurerUpgraded", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state_with_bag", - "type": "game::Game::AdventurerStateWithBag", - "kind": "data" + "type": "game::Game::AdventurerStateWithBag" }, { + "kind": "data", "name": "strength_increase", - "type": "core::integer::u8", - "kind": "data" + "type": "core::integer::u8" }, { + "kind": "data", "name": "dexterity_increase", - "type": "core::integer::u8", - "kind": "data" + "type": "core::integer::u8" }, { + "kind": "data", "name": "vitality_increase", - "type": "core::integer::u8", - "kind": "data" + "type": "core::integer::u8" }, { + "kind": "data", "name": "intelligence_increase", - "type": "core::integer::u8", - "kind": "data" + "type": "core::integer::u8" }, { + "kind": "data", "name": "wisdom_increase", - "type": "core::integer::u8", - "kind": "data" + "type": "core::integer::u8" }, { + "kind": "data", "name": "charisma_increase", - "type": "core::integer::u8", - "kind": "data" + "type": "core::integer::u8" } ] }, { - "type": "event", - "name": "game::Game::EquippedItems", "kind": "struct", + "name": "game::Game::EquippedItems", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state_with_bag", - "type": "game::Game::AdventurerStateWithBag", - "kind": "data" + "type": "game::Game::AdventurerStateWithBag" }, { + "kind": "data", "name": "equipped_items", - "type": "core::array::Array::", - "kind": "data" + "type": "core::array::Array::" }, { + "kind": "data", "name": "unequipped_items", - "type": "core::array::Array::", - "kind": "data" + "type": "core::array::Array::" } ] }, { - "type": "event", - "name": "game::Game::DroppedItems", "kind": "struct", + "name": "game::Game::DroppedItems", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state_with_bag", - "type": "game::Game::AdventurerStateWithBag", - "kind": "data" + "type": "game::Game::AdventurerStateWithBag" }, { + "kind": "data", "name": "item_ids", - "type": "core::array::Array::", - "kind": "data" + "type": "core::array::Array::" } ] }, { + "name": "survivor::item_meta::ItemSpecials", "type": "struct", + "members": [ + { + "name": "special1", + "type": "core::integer::u8" + }, + { + "name": "special2", + "type": "core::integer::u8" + }, + { + "name": "special3", + "type": "core::integer::u8" + } + ] + }, + { "name": "game::Game::ItemLeveledUp", + "type": "struct", "members": [ { "name": "item_id", @@ -2698,25 +1406,25 @@ ] }, { - "type": "event", - "name": "game::Game::ItemsLeveledUp", "kind": "struct", + "name": "game::Game::ItemsLeveledUp", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "items", - "type": "core::array::Array::", - "kind": "data" + "type": "core::array::Array::" } ] }, { - "type": "struct", "name": "game::Game::DeathDetails", + "type": "struct", "members": [ { "name": "killed_by_beast", @@ -2733,69 +1441,69 @@ ] }, { - "type": "event", - "name": "game::Game::AdventurerDied", "kind": "struct", + "name": "game::Game::AdventurerDied", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "death_details", - "type": "game::Game::DeathDetails", - "kind": "data" + "type": "game::Game::DeathDetails" } ] }, { - "type": "event", - "name": "game::Game::NewHighScore", "kind": "struct", + "name": "game::Game::NewHighScore", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "rank", - "type": "core::integer::u8", - "kind": "data" + "type": "core::integer::u8" } ] }, { - "type": "event", - "name": "game::Game::IdleDeathPenalty", "kind": "struct", + "name": "game::Game::IdleDeathPenalty", + "type": "event", "members": [ { + "kind": "data", "name": "adventurer_state", - "type": "game::Game::AdventurerState", - "kind": "data" + "type": "game::Game::AdventurerState" }, { + "kind": "data", "name": "idle_blocks", - "type": "core::integer::u16", - "kind": "data" + "type": "core::integer::u16" }, { + "kind": "data", "name": "penalty_threshold", - "type": "core::integer::u64", - "kind": "data" + "type": "core::integer::u64" }, { + "kind": "data", "name": "caller", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" + "type": "core::starknet::contract_address::ContractAddress" } ] }, { - "type": "struct", "name": "game::Game::PlayerReward", + "type": "struct", "members": [ { "name": "adventurer_id", @@ -2816,8 +1524,8 @@ ] }, { - "type": "struct", "name": "game::Game::ClientReward", + "type": "struct", "members": [ { "name": "amount", @@ -2830,255 +1538,255 @@ ] }, { - "type": "event", - "name": "game::Game::RewardDistribution", "kind": "struct", + "name": "game::Game::RewardDistribution", + "type": "event", "members": [ { + "kind": "data", "name": "first_place", - "type": "game::Game::PlayerReward", - "kind": "data" + "type": "game::Game::PlayerReward" }, { + "kind": "data", "name": "second_place", - "type": "game::Game::PlayerReward", - "kind": "data" + "type": "game::Game::PlayerReward" }, { + "kind": "data", "name": "third_place", - "type": "game::Game::PlayerReward", - "kind": "data" + "type": "game::Game::PlayerReward" }, { + "kind": "data", "name": "client", - "type": "game::Game::ClientReward", - "kind": "data" + "type": "game::Game::ClientReward" }, { + "kind": "data", "name": "dao", - "type": "core::integer::u256", - "kind": "data" + "type": "core::integer::u256" } ] }, { - "type": "event", - "name": "game::Game::GameEntropyRotatedEvent", "kind": "struct", + "name": "game::Game::GameEntropyRotatedEvent", + "type": "event", "members": [ { + "kind": "data", "name": "prev_hash", - "type": "core::felt252", - "kind": "data" + "type": "core::felt252" }, { + "kind": "data", "name": "prev_block_number", - "type": "core::integer::u64", - "kind": "data" + "type": "core::integer::u64" }, { + "kind": "data", "name": "prev_block_timestamp", - "type": "core::integer::u64", - "kind": "data" + "type": "core::integer::u64" }, { + "kind": "data", "name": "prev_next_rotation_block", - "type": "core::integer::u64", - "kind": "data" + "type": "core::integer::u64" }, { + "kind": "data", "name": "new_hash", - "type": "core::felt252", - "kind": "data" + "type": "core::felt252" }, { + "kind": "data", "name": "new_block_number", - "type": "core::integer::u64", - "kind": "data" + "type": "core::integer::u64" }, { + "kind": "data", "name": "new_block_timestamp", - "type": "core::integer::u64", - "kind": "data" + "type": "core::integer::u64" }, { + "kind": "data", "name": "new_next_rotation_block", - "type": "core::integer::u64", - "kind": "data" + "type": "core::integer::u64" }, { + "kind": "data", "name": "blocks_per_hour", - "type": "core::integer::u64", - "kind": "data" + "type": "core::integer::u64" } ] }, { - "type": "event", - "name": "game::Game::PriceChangeEvent", "kind": "struct", + "name": "game::Game::PriceChangeEvent", + "type": "event", "members": [ { + "kind": "data", "name": "previous_cost_to_play", - "type": "core::integer::u128", - "kind": "data" + "type": "core::integer::u128" }, { + "kind": "data", "name": "new_cost_to_play", - "type": "core::integer::u128", - "kind": "data" + "type": "core::integer::u128" }, { + "kind": "data", "name": "global_games_per_day", - "type": "core::integer::u64", - "kind": "data" + "type": "core::integer::u64" }, { + "kind": "data", "name": "snapshot_games_per_day", - "type": "core::integer::u64", - "kind": "data" + "type": "core::integer::u64" }, { + "kind": "data", "name": "changer", - "type": "core::starknet::contract_address::ContractAddress", - "kind": "data" + "type": "core::starknet::contract_address::ContractAddress" } ] }, { - "type": "event", - "name": "game::Game::Event", "kind": "enum", + "name": "game::Game::Event", + "type": "event", "variants": [ { + "kind": "nested", "name": "StartGame", - "type": "game::Game::StartGame", - "kind": "nested" + "type": "game::Game::StartGame" }, { + "kind": "nested", "name": "UpgradesAvailable", - "type": "game::Game::UpgradesAvailable", - "kind": "nested" + "type": "game::Game::UpgradesAvailable" }, { + "kind": "nested", "name": "DiscoveredHealth", - "type": "game::Game::DiscoveredHealth", - "kind": "nested" + "type": "game::Game::DiscoveredHealth" }, { + "kind": "nested", "name": "DiscoveredGold", - "type": "game::Game::DiscoveredGold", - "kind": "nested" + "type": "game::Game::DiscoveredGold" }, { + "kind": "nested", "name": "DodgedObstacle", - "type": "game::Game::DodgedObstacle", - "kind": "nested" + "type": "game::Game::DodgedObstacle" }, { + "kind": "nested", "name": "HitByObstacle", - "type": "game::Game::HitByObstacle", - "kind": "nested" + "type": "game::Game::HitByObstacle" }, { + "kind": "nested", "name": "AmbushedByBeast", - "type": "game::Game::AmbushedByBeast", - "kind": "nested" + "type": "game::Game::AmbushedByBeast" }, { + "kind": "nested", "name": "DiscoveredBeast", - "type": "game::Game::DiscoveredBeast", - "kind": "nested" + "type": "game::Game::DiscoveredBeast" }, { + "kind": "nested", "name": "AttackedBeast", - "type": "game::Game::AttackedBeast", - "kind": "nested" + "type": "game::Game::AttackedBeast" }, { + "kind": "nested", "name": "AttackedByBeast", - "type": "game::Game::AttackedByBeast", - "kind": "nested" + "type": "game::Game::AttackedByBeast" }, { + "kind": "nested", "name": "SlayedBeast", - "type": "game::Game::SlayedBeast", - "kind": "nested" + "type": "game::Game::SlayedBeast" }, { + "kind": "nested", "name": "FleeFailed", - "type": "game::Game::FleeFailed", - "kind": "nested" + "type": "game::Game::FleeFailed" }, { + "kind": "nested", "name": "FleeSucceeded", - "type": "game::Game::FleeSucceeded", - "kind": "nested" + "type": "game::Game::FleeSucceeded" }, { + "kind": "nested", "name": "AdventurerLeveledUp", - "type": "game::Game::AdventurerLeveledUp", - "kind": "nested" + "type": "game::Game::AdventurerLeveledUp" }, { + "kind": "nested", "name": "PurchasedItems", - "type": "game::Game::PurchasedItems", - "kind": "nested" + "type": "game::Game::PurchasedItems" }, { + "kind": "nested", "name": "PurchasedPotions", - "type": "game::Game::PurchasedPotions", - "kind": "nested" + "type": "game::Game::PurchasedPotions" }, { + "kind": "nested", "name": "AdventurerUpgraded", - "type": "game::Game::AdventurerUpgraded", - "kind": "nested" + "type": "game::Game::AdventurerUpgraded" }, { + "kind": "nested", "name": "EquippedItems", - "type": "game::Game::EquippedItems", - "kind": "nested" + "type": "game::Game::EquippedItems" }, { + "kind": "nested", "name": "DroppedItems", - "type": "game::Game::DroppedItems", - "kind": "nested" + "type": "game::Game::DroppedItems" }, { + "kind": "nested", "name": "ItemsLeveledUp", - "type": "game::Game::ItemsLeveledUp", - "kind": "nested" + "type": "game::Game::ItemsLeveledUp" }, { + "kind": "nested", "name": "AdventurerDied", - "type": "game::Game::AdventurerDied", - "kind": "nested" + "type": "game::Game::AdventurerDied" }, { + "kind": "nested", "name": "NewHighScore", - "type": "game::Game::NewHighScore", - "kind": "nested" + "type": "game::Game::NewHighScore" }, { + "kind": "nested", "name": "IdleDeathPenalty", - "type": "game::Game::IdleDeathPenalty", - "kind": "nested" + "type": "game::Game::IdleDeathPenalty" }, { + "kind": "nested", "name": "RewardDistribution", - "type": "game::Game::RewardDistribution", - "kind": "nested" + "type": "game::Game::RewardDistribution" }, { + "kind": "nested", "name": "GameEntropyRotatedEvent", - "type": "game::Game::GameEntropyRotatedEvent", - "kind": "nested" + "type": "game::Game::GameEntropyRotatedEvent" }, { + "kind": "nested", "name": "PriceChangeEvent", - "type": "game::Game::PriceChangeEvent", - "kind": "nested" + "type": "game::Game::PriceChangeEvent" } ] } diff --git a/ui/src/app/components/marketplace/MarketplaceRow.tsx b/ui/src/app/components/marketplace/MarketplaceRow.tsx index d7e47cdf5..a901644e6 100644 --- a/ui/src/app/components/marketplace/MarketplaceRow.tsx +++ b/ui/src/app/components/marketplace/MarketplaceRow.tsx @@ -3,18 +3,10 @@ import { Button } from "@/app/components/buttons/Button"; import { getItemData, getItemPrice, getKeyFromValue } from "@/app/lib/utils"; import useAdventurerStore from "@/app/hooks/useAdventurerStore"; import LootIcon from "@/app/components/icons/LootIcon"; -import { useWaitForTransaction } from "@starknet-react/core"; -import { - Metadata, - Item, - ItemPurchase, - UpgradeStats, - NullAdventurer, -} from "@/app/types"; +import { Item, ItemPurchase, UpgradeStats, NullAdventurer } from "@/app/types"; import { CoinIcon } from "@/app/components/icons/Icons"; import EfficacyDisplay from "@/app/components/icons/EfficacyIcon"; import { GameData } from "@/app/lib/data/GameData"; -import useTransactionManager from "@/app/hooks/useTransactionManager"; interface MarketplaceRowProps { item: Item; @@ -49,13 +41,6 @@ const MarketplaceRow = ({ }: MarketplaceRowProps) => { const [selectedButton, setSelectedButton] = useState(0); const adventurer = useAdventurerStore((state) => state.adventurer); - const { hashes, transactions } = useTransactionManager(); - const { data: txData } = useWaitForTransaction({ - hash: hashes ? hashes[0] : "0x0", - }); - - const transactingMarketIds = (transactions[0]?.metadata as Metadata)?.items; - const gameData = new GameData(); const singlePurchaseExists = (item: string) => { @@ -68,14 +53,6 @@ const MarketplaceRow = ({ const itemPrice = getItemPrice(tier, totalCharisma); const enoughGold = calculatedNewGold >= itemPrice; - const checkTransacting = (item: string) => { - if (txData?.finality_status !== undefined) { - return transactingMarketIds?.includes(item); - } else { - return false; - } - }; - const checkOwned = (item: string) => { return ownedItems.some((ownedItem) => ownedItem.item == item); }; @@ -237,7 +214,6 @@ const MarketplaceRow = ({ disabled={ itemPrice > (adventurer?.gold ?? 0) || !enoughGold || - checkTransacting(item.item ?? "") || singlePurchaseExists(item.item ?? "") || item.owner || checkOwned(item.item ?? "") || @@ -245,12 +221,10 @@ const MarketplaceRow = ({ (equipFull && bagFull) || (bagFull && !emptySlot) } - className={checkTransacting(item.item ?? "") ? "bg-white" : ""} > {!enoughGold || itemPrice > (adventurer?.gold ?? 0) ? "Not Enough Gold" - : checkTransacting(item.item ?? "") || - singlePurchaseExists(item.item ?? "") || + : singlePurchaseExists(item.item ?? "") || checkPurchased(item.item ?? "") ? "In Cart" : checkOwned(item.item ?? "") diff --git a/ui/src/app/components/navigation/Header.tsx b/ui/src/app/components/navigation/Header.tsx index 2115ac7fa..f0246d3e0 100644 --- a/ui/src/app/components/navigation/Header.tsx +++ b/ui/src/app/components/navigation/Header.tsx @@ -27,6 +27,7 @@ import { getApibaraStatus } from "@/app/api/api"; import ApibaraStatus from "@/app/components/navigation/ApibaraStatus"; import TokenLoader from "@/app/components/animations/TokenLoader"; import { checkArcadeConnector } from "@/app/lib/connectors"; +import { SkullIcon } from "@/app/components/icons/Icons"; export interface HeaderProps { multicall: ( @@ -34,6 +35,7 @@ export interface HeaderProps { notification: string[] ) => Promise; mintLords: (lordsAmount: number) => Promise; + suicide: () => Promise; lordsBalance: bigint; gameContract: Contract; costToPlay: bigint; @@ -42,6 +44,7 @@ export interface HeaderProps { export default function Header({ multicall, mintLords, + suicide, lordsBalance, gameContract, costToPlay, @@ -112,6 +115,14 @@ export default function Header({
+ {adventurer?.id && ( + + )} {adventurer?.id && ( = BigInt(15); + (nonBoostedStat ?? BigInt(0)) + BigInt(amount) >= + (name === "Strength" || name === "Vitality" ? BigInt(31) : BigInt(15)); useEffect(() => { if (buttonClicked) { diff --git a/ui/src/app/containers/BeastScreen.tsx b/ui/src/app/containers/BeastScreen.tsx index f51d073d9..7912210ff 100644 --- a/ui/src/app/containers/BeastScreen.tsx +++ b/ui/src/app/containers/BeastScreen.tsx @@ -12,9 +12,14 @@ import { Button } from "@/app/components/buttons/Button"; import useUIStore from "@/app/hooks/useUIStore"; import InterludeScreen from "@/app/containers/InterludeScreen"; import ActionMenu from "@/app/components/menu/ActionMenu"; +import { getBlock } from "@/app/api/api"; interface BeastScreenProps { - attack: (tillDeath: boolean, beastData: Beast) => Promise; + attack: ( + tillDeath: boolean, + beastData: Beast, + blockHash?: string + ) => Promise; flee: (tillDeath: boolean, beastData: Beast) => Promise; beastsContract: Contract; } @@ -70,7 +75,12 @@ export default function BeastScreen({ label: "ONCE", action: async () => { resetNotification(); - await attack(false, beastData); + if (adventurer?.level === 1) { + const entropyBlockData = await getBlock(adventurer?.startBlock! + 1); + await attack(false, beastData, entropyBlockData?.block_hash ?? 0); + } else { + await attack(false, beastData); + } }, disabled: adventurer?.beastHealth == undefined || diff --git a/ui/src/app/containers/InterludeScreen.tsx b/ui/src/app/containers/InterludeScreen.tsx index 9540eafd6..7e562e797 100644 --- a/ui/src/app/containers/InterludeScreen.tsx +++ b/ui/src/app/containers/InterludeScreen.tsx @@ -21,7 +21,7 @@ export default function InterludeScreen({ const nextBlockHashBlock = adventurer?.revealBlock!; const adventurerStartBlock = adventurer?.startBlock!; const blockDifference = nextBlockHashBlock - adventurerStartBlock; - const secondsUntilNextEntropy = (blockDifference + 1) * averageBlockTime; // add one for closer estimate + const secondsUntilNextEntropy = (blockDifference + 2) * averageBlockTime; // add one for closer estimate const adventurerCreatedTime = new Date(adventurer?.createdTime!).getTime(); const nextEntropyTime = adventurerCreatedTime + secondsUntilNextEntropy * 1000; diff --git a/ui/src/app/containers/InventoryScreen.tsx b/ui/src/app/containers/InventoryScreen.tsx index b1a489735..df24398a1 100644 --- a/ui/src/app/containers/InventoryScreen.tsx +++ b/ui/src/app/containers/InventoryScreen.tsx @@ -1,6 +1,6 @@ import { useState, useEffect, useCallback } from "react"; import { Contract } from "starknet"; -import { useAccount, useWaitForTransaction } from "@starknet-react/core"; +import { useAccount } from "@starknet-react/core"; import { getKeyFromValue, groupBySlot } from "@/app/lib/utils"; import { InventoryRow } from "@/app/components/inventory/InventoryRow"; import Info from "@/app/components/adventurer/Info"; @@ -10,10 +10,9 @@ import useTransactionCartStore from "@/app/hooks/useTransactionCartStore"; import { useQueriesStore } from "@/app/hooks/useQueryStore"; import LootIcon from "@/app/components/icons/LootIcon"; import { InfoIcon, ProfileIcon } from "@/app/components/icons/Icons"; -import { Item, Metadata } from "@/app/types"; +import { Item } from "@/app/types"; import { GameData } from "@/app/lib/data/GameData"; import useUIStore from "@/app/hooks/useUIStore"; -import useTransactionManager from "@/app/hooks/useTransactionManager"; interface InventoryScreenProps { gameContract: Contract; @@ -38,11 +37,6 @@ export default function InventoryScreen({ const setInventorySelected = useUIStore( (state) => state.setInventorySelected ); - const { hashes, transactions } = useTransactionManager(); - const { data: txData } = useWaitForTransaction({ - hash: hashes ? hashes[0] : "0x0", - }); - const transactingItemIds = (transactions[0]?.metadata as Metadata)?.items; const equipItems = useUIStore((state) => state.equipItems); const setEquipItems = useUIStore((state) => state.setEquipItems); const dropItems = useUIStore((state) => state.dropItems); @@ -100,14 +94,6 @@ export default function InventoryScreen({ const gameData = new GameData(); - const checkTransacting = (item: string) => { - if (txData?.finality_status !== undefined) { - return transactingItemIds?.includes(item); - } else { - return false; - } - }; - const handleKeyDown = useCallback( (event: KeyboardEvent) => { switch (event.key) { @@ -337,11 +323,7 @@ export default function InventoryScreen({ handleEquipItems(item.item ?? ""); }} equipped={item.equipped} - disabled={ - item.equipped || - checkTransacting(item.item ?? "") || - equipItems.includes(itemId) - } + disabled={item.equipped || equipItems.includes(itemId)} handleDrop={handleDropItems} gameContract={gameContract} key={index} diff --git a/ui/src/app/lib/data/GameData.tsx b/ui/src/app/lib/data/GameData.tsx index e3bf235ff..1a7e06fc3 100644 --- a/ui/src/app/lib/data/GameData.tsx +++ b/ui/src/app/lib/data/GameData.tsx @@ -1099,6 +1099,7 @@ export class GameData { HitByBeast: "damage", IdleDamagePenalty: "damage", IdleDamagePenaltyDead: "die", + Suicide: "die", }; this.ADVENTURER_SOUNDS = { diff --git a/ui/src/app/lib/utils/syscalls.ts b/ui/src/app/lib/utils/syscalls.ts index f48aac3dd..997b68a4f 100644 --- a/ui/src/app/lib/utils/syscalls.ts +++ b/ui/src/app/lib/utils/syscalls.ts @@ -3,7 +3,7 @@ import { InvokeTransactionReceiptResponse, Contract, AccountInterface, - GetTransactionReceiptResponse, + RevertedTransactionReceiptResponse, Provider, } from "starknet"; import { GameData } from "@/app/lib/data/GameData"; @@ -347,11 +347,11 @@ export function syscalls({ }); // Handle if the tx was reverted if ( - (receipt as GetTransactionReceiptResponse).execution_status === + (receipt as RevertedTransactionReceiptResponse).execution_status === "REVERTED" ) { throw new Error( - (receipt as GetTransactionReceiptResponse).revert_reason + (receipt as RevertedTransactionReceiptResponse).revert_reason ); } // Here we need to process the StartGame event first and use the output for AmbushedByBeast event @@ -462,11 +462,11 @@ export function syscalls({ }); // Handle if the tx was reverted if ( - (receipt as GetTransactionReceiptResponse).execution_status === + (receipt as RevertedTransactionReceiptResponse).execution_status === "REVERTED" ) { throw new Error( - (receipt as GetTransactionReceiptResponse).revert_reason + (receipt as RevertedTransactionReceiptResponse).revert_reason ); } const events = await parseEvents( @@ -700,13 +700,27 @@ export function syscalls({ } }; - const attack = async (tillDeath: boolean, beastData: Beast) => { + const attack = async ( + tillDeath: boolean, + beastData: Beast, + blockHash?: string + ) => { resetData("latestMarketItemsQuery"); - const attackTx = { + // First we send the current block hash to the contract + const setBlockHashTx: Call = { + contractAddress: gameContract?.address ?? "", + entrypoint: "set_starting_entropy", + calldata: [adventurer?.id?.toString() ?? "", blockHash!], + }; + const attackTx: Call = { contractAddress: gameContract?.address ?? "", entrypoint: "attack", calldata: [adventurer?.id?.toString() ?? "", tillDeath ? "1" : "0"], }; + const attackCalls = + process.env.NEXT_PUBLIC_NETWORK === "mainnet" + ? [setBlockHashTx, attackTx] + : [attackTx]; addToCalls(attackTx); const isArcade = checkArcadeConnector(connector!); @@ -714,7 +728,7 @@ export function syscalls({ try { const tx = await handleSubmitCalls( account, - [...calls, attackTx], + [...calls, ...attackCalls], isArcade, Number(ethBalance), showTopUpDialog, @@ -732,11 +746,11 @@ export function syscalls({ }); // Handle if the tx was reverted if ( - (receipt as GetTransactionReceiptResponse).execution_status === + (receipt as RevertedTransactionReceiptResponse).execution_status === "REVERTED" ) { throw new Error( - (receipt as GetTransactionReceiptResponse).revert_reason + (receipt as RevertedTransactionReceiptResponse).revert_reason ); } // reset battles by tx hash @@ -1000,11 +1014,11 @@ export function syscalls({ }); // Handle if the tx was reverted if ( - (receipt as GetTransactionReceiptResponse).execution_status === + (receipt as RevertedTransactionReceiptResponse).execution_status === "REVERTED" ) { throw new Error( - (receipt as GetTransactionReceiptResponse).revert_reason + (receipt as RevertedTransactionReceiptResponse).revert_reason ); } // Add optimistic data @@ -1206,11 +1220,11 @@ export function syscalls({ }); // Handle if the tx was reverted if ( - (receipt as GetTransactionReceiptResponse).execution_status === + (receipt as RevertedTransactionReceiptResponse).execution_status === "REVERTED" ) { throw new Error( - (receipt as GetTransactionReceiptResponse).revert_reason + (receipt as RevertedTransactionReceiptResponse).revert_reason ); } // Add optimistic data @@ -1358,11 +1372,11 @@ export function syscalls({ }); // Handle if the tx was reverted if ( - (receipt as GetTransactionReceiptResponse).execution_status === + (receipt as RevertedTransactionReceiptResponse).execution_status === "REVERTED" ) { throw new Error( - (receipt as GetTransactionReceiptResponse).revert_reason + (receipt as RevertedTransactionReceiptResponse).revert_reason ); } const events = await parseEvents( @@ -1443,11 +1457,11 @@ export function syscalls({ }); // Handle if the tx was reverted if ( - (receipt as GetTransactionReceiptResponse).execution_status === + (receipt as RevertedTransactionReceiptResponse).execution_status === "REVERTED" ) { throw new Error( - (receipt as GetTransactionReceiptResponse).revert_reason + (receipt as RevertedTransactionReceiptResponse).revert_reason ); } const events = await parseEvents( @@ -1616,11 +1630,11 @@ export function syscalls({ } }; - const mintLords = async (lordsAmount: number) => { + const mintLords = async () => { const mintLords: Call = { contractAddress: lordsContract?.address ?? "", - entrypoint: "mint", - calldata: [account?.address ?? "0x0", lordsAmount.toString(), "0"], + entrypoint: "mint_lords", + calldata: [], }; const isArcade = checkArcadeConnector(connector!); try { @@ -1649,6 +1663,45 @@ export function syscalls({ } }; + const suicide = async () => { + const suicideTx: Call = { + contractAddress: lordsContract?.address ?? "", + entrypoint: "suicide", + calldata: [adventurer.id!], + }; + + const isArcade = checkArcadeConnector(connector!); + startLoading( + "Suicide", + "Committing Suicide", + "adventurerByIdQuery", + adventurer?.id + ); + try { + const tx = await handleSubmitCalls( + account!, + [...calls, suicideTx], + isArcade, + Number(ethBalance), + showTopUpDialog, + setTopUpAccount + ); + const result = await provider?.waitForTransaction(tx?.transaction_hash, { + retryInterval: TRANSACTION_WAIT_RETRY_INTERVAL, + }); + + if (!result) { + throw new Error("Lords Mint did not complete successfully."); + } + + stopLoading(`${adventurer.name} committed suicide!`); + getBalances(); + } catch (e) { + console.log(e); + stopLoading(e, true); + } + }; + return { spawn, explore, @@ -1658,5 +1711,6 @@ export function syscalls({ slayIdles, multicall, mintLords, + suicide, }; } diff --git a/ui/src/app/page.tsx b/ui/src/app/page.tsx index bafb09a0e..fd39254cf 100644 --- a/ui/src/app/page.tsx +++ b/ui/src/app/page.tsx @@ -238,6 +238,7 @@ function Home({ updateConnectors }: HomeProps) { slayIdles, multicall, mintLords, + suicide, } = syscalls({ gameContract: gameContract!, lordsContract: lordsContract!, @@ -578,6 +579,7 @@ function Home({ updateConnectors }: HomeProps) {
= 2.1.2 < 3.0.0": @@ -5130,6 +5161,11 @@ signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +signal-exit@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + slash@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" @@ -5142,7 +5178,7 @@ slash@^4.0.0: sonic-boom@^2.2.1: version "2.8.0" - resolved "https://registry.npmjs.org/sonic-boom/-/sonic-boom-2.8.0.tgz" + resolved "https://registry.yarnpkg.com/sonic-boom/-/sonic-boom-2.8.0.tgz#c1def62a77425090e6ad7516aad8eb402e047611" integrity sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg== dependencies: atomic-sleep "^1.0.0" @@ -5159,13 +5195,30 @@ split-on-first@^1.0.0: split2@^4.0.0: version "4.2.0" - resolved "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz" + resolved "https://registry.yarnpkg.com/split2/-/split2-4.2.0.tgz#c9c5920904d148bab0b9f67145f245a86aadbfa4" integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== -standard-as-callback@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/standard-as-callback/-/standard-as-callback-2.1.0.tgz" - integrity sha512-qoRRSyROncaz1z0mvYqIE4lCd9p2R90i6GxW3uZv5ucSu8tU7B5HXUP1gG8pVZsYNVaXjk8ClXHPttLyxAL48A== +starknet-types@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/starknet-types/-/starknet-types-0.0.4.tgz#1f92cdde4b2989e1da743c24827960b50057914b" + integrity sha512-PklqFeSp9gMqbzW5IbO8l1s3xsNZYkNG/x/gsytgYCIl6H/cqiwCZolVTneyTibvrdHOQ8kP3PXwfdsypudYqw== + +starknet@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/starknet/-/starknet-6.7.0.tgz#004111004d93efd4a5a9da79bd8a97f8d7d50409" + integrity sha512-8NMedKBfkg/oZUgTYNw9lKeNoNYakL/Roah2HwKzrVyvDxBs0arrNrR8No8+tTq0wQg0HGu1w+JIObynjHAK3w== + dependencies: + "@noble/curves" "~1.4.0" + "@scure/base" "~1.1.3" + "@scure/starknet" "~1.0.0" + abi-wan-kanabi "^2.2.2" + fetch-cookie "^3.0.0" + isomorphic-fetch "^3.0.0" + lossless-json "^4.0.1" + pako "^2.0.4" + starknet-types "^0.0.4" + ts-mixer "^6.0.3" + url-join "^4.0.1" starknet@^4.17.1: version "4.22.0" @@ -5184,26 +5237,10 @@ starknet@^4.17.1: ts-custom-error "^3.3.1" url-join "^4.0.1" -starknet@^6.4.3: - version "6.5.0" - resolved "https://registry.yarnpkg.com/starknet/-/starknet-6.5.0.tgz#1b984dcf6e4f1960a64d83a84391e98b9926b345" - integrity sha512-3W7cpMPE6u1TAjZoT1gfqAtTpSTkAFXwwVbt9IG3oyk8gxBwzpadcMXZ5JRBOv9p06qfnivRkWl2Q1B4tIrSAg== - dependencies: - "@noble/curves" "~1.3.0" - "@scure/base" "~1.1.3" - "@scure/starknet" "~1.0.0" - abi-wan-kanabi "^2.2.1" - fetch-cookie "^3.0.0" - isomorphic-fetch "^3.0.0" - lossless-json "^4.0.1" - pako "^2.0.4" - ts-mixer "^6.0.3" - url-join "^4.0.1" - -starknetkit@^1.0.22: - version "1.0.22" - resolved "https://registry.npmjs.org/starknetkit/-/starknetkit-1.0.22.tgz" - integrity sha512-UnUKXKhmjpDIR2DvTyAuaoAftpL7/LNCJ/p1LL3eXtXQSxsOqI7i5zkiB//wW3EdM+lziA5ZPWbKYkMndq0yuA== +starknetkit@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/starknetkit/-/starknetkit-1.1.9.tgz#92ff7536b2bdc36017e4b16067f4c5ba264b4981" + integrity sha512-KarnNS9sJoImTdpTKizyNzDlQSAOutbzuZ6CzHQpJHWzaf8ION9aIf+d87sY7hSlbmD7cqGRUG28Hpke24arCg== dependencies: "@trpc/client" "^10.38.1" "@trpc/server" "^10.38.1" @@ -5217,10 +5254,10 @@ starknetkit@^1.0.22: svelte-forms "^2.3.1" trpc-browser "^1.3.2" -std-env@^3.4.3: - version "3.6.0" - resolved "https://registry.npmjs.org/std-env/-/std-env-3.6.0.tgz" - integrity sha512-aFZ19IgVmhdB2uX599ve2kE6BIE3YMnQ6Gp6BURhW/oIzpXGKr878TQfAQZn1+i0Flcc/UKUy1gOlcfaUBCryg== +std-env@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" + integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== stop-iteration-iterator@^1.0.0: version "1.0.0" @@ -5229,10 +5266,10 @@ stop-iteration-iterator@^1.0.0: dependencies: internal-slot "^1.0.4" -stream-shift@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz" - integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== +stream-shift@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b" + integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ== strict-uri-encode@^2.0.0: version "2.0.0" @@ -5291,7 +5328,7 @@ string.prototype.trimstart@^1.0.6: string_decoder@^1.1.1: version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== dependencies: safe-buffer "~5.2.0" @@ -5364,7 +5401,7 @@ supports-preserve-symlinks-flag@^1.0.0: svelte-forms@^2.3.1: version "2.3.1" - resolved "https://registry.npmjs.org/svelte-forms/-/svelte-forms-2.3.1.tgz" + resolved "https://registry.yarnpkg.com/svelte-forms/-/svelte-forms-2.3.1.tgz#be1ddd096700a7dca6e457983086801d23a918f9" integrity sha512-ExX9PM0JgvdOWlHl2ztD7XzLNPOPt9U5hBKV8sUAisMfcYWpPRnyz+6EFmh35BOBGJJmuhTDBGm5/7seLjOTIA== dependencies: is-promise "^4.0.0" @@ -5399,6 +5436,11 @@ synckit@^0.8.5: "@pkgr/utils" "^2.3.1" tslib "^2.5.0" +system-architecture@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/system-architecture/-/system-architecture-0.1.0.tgz#71012b3ac141427d97c67c56bc7921af6bff122d" + integrity sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA== + tailwind-merge@^1.10.0: version "1.12.0" resolved "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-1.12.0.tgz" @@ -5459,7 +5501,7 @@ thenify-all@^1.0.0: thread-stream@^0.15.1: version "0.15.2" - resolved "https://registry.npmjs.org/thread-stream/-/thread-stream-0.15.2.tgz" + resolved "https://registry.yarnpkg.com/thread-stream/-/thread-stream-0.15.2.tgz#fb95ad87d2f1e28f07116eb23d85aba3bc0425f4" integrity sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA== dependencies: real-require "^0.1.0" @@ -5498,7 +5540,7 @@ tr46@~0.0.3: trpc-browser@^1.3.2: version "1.3.7" - resolved "https://registry.npmjs.org/trpc-browser/-/trpc-browser-1.3.7.tgz" + resolved "https://registry.yarnpkg.com/trpc-browser/-/trpc-browser-1.3.7.tgz#e4868d24fe4d1e71c77268a89e2ab09018c3f679" integrity sha512-I0oMaqBQLLm8YywvvlRlDRKXeYLlFf1PbMfWvbI4refGpjXJMESztwUaJfrGhDqY4n+AzHs/b9t6Mt5n+pg+qA== ts-custom-error@^3.3.1: @@ -5576,14 +5618,14 @@ typescript@5.0.2: resolved "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz" integrity sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw== -ufo@^1.3.0, ufo@^1.3.1, ufo@^1.3.2: - version "1.3.2" - resolved "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz" - integrity sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA== +ufo@^1.3.2, ufo@^1.4.0, ufo@^1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.5.3.tgz#3325bd3c977b6c6cd3160bf4ff52989adc9d3344" + integrity sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw== uint8arrays@^3.0.0, uint8arrays@^3.1.0: version "3.1.1" - resolved "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.1.tgz" + resolved "https://registry.yarnpkg.com/uint8arrays/-/uint8arrays-3.1.1.tgz#2d8762acce159ccd9936057572dade9459f65ae0" integrity sha512-+QJa8QRnbdXVpHYjLoTpJIdCTiw9Ir62nocClWuXIq2JIh4Uta0cQsTSpFL678p2CN8B+XSApwcU+pQEqVpKWg== dependencies: multiformats "^9.4.2" @@ -5600,20 +5642,25 @@ unbox-primitive@^1.0.2: uncrypto@^0.1.3: version "0.1.3" - resolved "https://registry.npmjs.org/uncrypto/-/uncrypto-0.1.3.tgz" + resolved "https://registry.yarnpkg.com/uncrypto/-/uncrypto-0.1.3.tgz#e1288d609226f2d02d8d69ee861fa20d8348ef2b" integrity sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q== -unenv@^1.7.4: - version "1.8.0" - resolved "https://registry.npmjs.org/unenv/-/unenv-1.8.0.tgz" - integrity sha512-uIGbdCWZfhRRmyKj1UioCepQ0jpq638j/Cf0xFTn4zD1nGJ2lSdzYHLzfdXN791oo/0juUiSWW1fBklXMTsuqg== +unenv@^1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/unenv/-/unenv-1.9.0.tgz#469502ae85be1bd3a6aa60f810972b1a904ca312" + integrity sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g== dependencies: consola "^3.2.3" defu "^6.1.3" mime "^3.0.0" - node-fetch-native "^1.4.1" + node-fetch-native "^1.6.1" pathe "^1.1.1" +unfetch@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" + integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz" @@ -5648,30 +5695,29 @@ universalify@^2.0.0: integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw== unstorage@^1.9.0: - version "1.10.1" - resolved "https://registry.npmjs.org/unstorage/-/unstorage-1.10.1.tgz" - integrity sha512-rWQvLRfZNBpF+x8D3/gda5nUCQL2PgXy2jNG4U7/Rc9BGEv9+CAJd0YyGCROUBKs9v49Hg8huw3aih5Bf5TAVw== + version "1.10.2" + resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.10.2.tgz#fb7590ada8b30e83be9318f85100158b02a76dae" + integrity sha512-cULBcwDqrS8UhlIysUJs2Dk0Mmt8h7B0E6mtR+relW9nZvsf/u4SkAYyNliPiPW7XtFNb5u3IUMkxGxFTTRTgQ== dependencies: anymatch "^3.1.3" - chokidar "^3.5.3" - destr "^2.0.2" - h3 "^1.8.2" - ioredis "^5.3.2" - listhen "^1.5.5" - lru-cache "^10.0.2" + chokidar "^3.6.0" + destr "^2.0.3" + h3 "^1.11.1" + listhen "^1.7.2" + lru-cache "^10.2.0" mri "^1.2.0" - node-fetch-native "^1.4.1" + node-fetch-native "^1.6.2" ofetch "^1.3.3" - ufo "^1.3.1" + ufo "^1.4.0" untildify@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz" integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== -untun@^0.1.2: +untun@^0.1.3: version "0.1.3" - resolved "https://registry.npmjs.org/untun/-/untun-0.1.3.tgz" + resolved "https://registry.yarnpkg.com/untun/-/untun-0.1.3.tgz#5d10dee37a3a5737ff03d158be877dae0a0e58a6" integrity sha512-4luGP9LMYszMRZwsvyUd9MrxgEGZdZuZgpVQHEEX0lCYFESasVRvZd0EYpCkOIbJKHMuv0LskpXc/8Un+MJzEQ== dependencies: citty "^0.1.5" @@ -5688,7 +5734,7 @@ update-browserslist-db@^1.0.10: uqr@^0.1.2: version "0.1.2" - resolved "https://registry.npmjs.org/uqr/-/uqr-0.1.2.tgz" + resolved "https://registry.yarnpkg.com/uqr/-/uqr-0.1.2.tgz#5c6cd5dcff9581f9bb35b982cb89e2c483a41d7d" integrity sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA== uri-js@^4.2.2: @@ -5819,7 +5865,7 @@ wrappy@1: ws@^7.5.1: version "7.5.9" - resolved "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== y18n@^5.0.5: