diff --git a/ui/src/app/abi/Adventurer.json b/ui/src/app/abi/Adventurer.json
deleted file mode 100644
index 4c920ad80..000000000
--- a/ui/src/app/abi/Adventurer.json
+++ /dev/null
@@ -1,1025 +0,0 @@
-[
- {
- "members": [
- {
- "name": "low",
- "offset": 0,
- "type": "felt"
- },
- {
- "name": "high",
- "offset": 1,
- "type": "felt"
- }
- ],
- "name": "Uint256",
- "size": 2,
- "type": "struct"
- },
- {
- "members": [
- {
- "name": "Race",
- "offset": 0,
- "type": "felt"
- },
- {
- "name": "HomeRealm",
- "offset": 1,
- "type": "felt"
- },
- {
- "name": "Birthdate",
- "offset": 2,
- "type": "felt"
- },
- {
- "name": "Name",
- "offset": 3,
- "type": "felt"
- },
- {
- "name": "Order",
- "offset": 4,
- "type": "felt"
- },
- {
- "name": "ImageHash1",
- "offset": 5,
- "type": "felt"
- },
- {
- "name": "ImageHash2",
- "offset": 6,
- "type": "felt"
- },
- {
- "name": "Health",
- "offset": 7,
- "type": "felt"
- },
- {
- "name": "Level",
- "offset": 8,
- "type": "felt"
- },
- {
- "name": "Strength",
- "offset": 9,
- "type": "felt"
- },
- {
- "name": "Dexterity",
- "offset": 10,
- "type": "felt"
- },
- {
- "name": "Vitality",
- "offset": 11,
- "type": "felt"
- },
- {
- "name": "Intelligence",
- "offset": 12,
- "type": "felt"
- },
- {
- "name": "Wisdom",
- "offset": 13,
- "type": "felt"
- },
- {
- "name": "Charisma",
- "offset": 14,
- "type": "felt"
- },
- {
- "name": "Luck",
- "offset": 15,
- "type": "felt"
- },
- {
- "name": "XP",
- "offset": 16,
- "type": "felt"
- },
- {
- "name": "WeaponId",
- "offset": 17,
- "type": "felt"
- },
- {
- "name": "ChestId",
- "offset": 18,
- "type": "felt"
- },
- {
- "name": "HeadId",
- "offset": 19,
- "type": "felt"
- },
- {
- "name": "WaistId",
- "offset": 20,
- "type": "felt"
- },
- {
- "name": "FeetId",
- "offset": 21,
- "type": "felt"
- },
- {
- "name": "HandsId",
- "offset": 22,
- "type": "felt"
- },
- {
- "name": "NeckId",
- "offset": 23,
- "type": "felt"
- },
- {
- "name": "RingId",
- "offset": 24,
- "type": "felt"
- },
- {
- "name": "Status",
- "offset": 25,
- "type": "felt"
- },
- {
- "name": "Beast",
- "offset": 26,
- "type": "felt"
- },
- {
- "name": "Upgrading",
- "offset": 27,
- "type": "felt"
- }
- ],
- "name": "AdventurerState",
- "size": 28,
- "type": "struct"
- },
- {
- "members": [
- {
- "name": "AdventurerId",
- "offset": 0,
- "type": "Uint256"
- },
- {
- "name": "StartTime",
- "offset": 2,
- "type": "felt"
- },
- {
- "name": "Gold",
- "offset": 3,
- "type": "felt"
- }
- ],
- "name": "ThiefState",
- "size": 4,
- "type": "struct"
- },
- {
- "data": [
- {
- "name": "previousOwner",
- "type": "felt"
- },
- {
- "name": "newOwner",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "OwnershipTransferred",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "from_",
- "type": "felt"
- },
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "Transfer",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "approved",
- "type": "felt"
- },
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "Approval",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "operator",
- "type": "felt"
- },
- {
- "name": "approved",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "ApprovalForAll",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "implementation",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "Upgraded",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "previousAdmin",
- "type": "felt"
- },
- {
- "name": "newAdmin",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "AdminChanged",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "adventurer_id",
- "type": "Uint256"
- },
- {
- "name": "owner",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "MintAdventurer",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "adventurer_id",
- "type": "Uint256"
- },
- {
- "name": "adventurer_state",
- "type": "AdventurerState"
- }
- ],
- "keys": [],
- "name": "UpdateAdventurerState",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "adventurer_id",
- "type": "Uint256"
- },
- {
- "name": "level",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "AdventurerLeveledUp",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "adventurer_id",
- "type": "Uint256"
- },
- {
- "name": "discovery_type",
- "type": "felt"
- },
- {
- "name": "sub_discovery_type",
- "type": "felt"
- },
- {
- "name": "entity_id",
- "type": "Uint256"
- },
- {
- "name": "output_amount",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "Discovery",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "thief_state",
- "type": "ThiefState"
- }
- ],
- "keys": [],
- "name": "UpdateThiefState",
- "type": "event"
- },
- {
- "inputs": [
- {
- "name": "name",
- "type": "felt"
- },
- {
- "name": "symbol",
- "type": "felt"
- },
- {
- "name": "address_of_controller",
- "type": "felt"
- },
- {
- "name": "proxy_admin",
- "type": "felt"
- }
- ],
- "name": "initializer",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "new_implementation",
- "type": "felt"
- }
- ],
- "name": "upgrade",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "race",
- "type": "felt"
- },
- {
- "name": "home_realm",
- "type": "felt"
- },
- {
- "name": "name",
- "type": "felt"
- },
- {
- "name": "order",
- "type": "felt"
- },
- {
- "name": "image_hash_1",
- "type": "felt"
- },
- {
- "name": "image_hash_2",
- "type": "felt"
- },
- {
- "name": "interface_address",
- "type": "felt"
- }
- ],
- "name": "mint",
- "outputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "race",
- "type": "felt"
- },
- {
- "name": "home_realm",
- "type": "felt"
- },
- {
- "name": "name",
- "type": "felt"
- },
- {
- "name": "order",
- "type": "felt"
- },
- {
- "name": "image_hash_1",
- "type": "felt"
- },
- {
- "name": "image_hash_2",
- "type": "felt"
- },
- {
- "name": "weapon_id",
- "type": "felt"
- },
- {
- "name": "interface_address",
- "type": "felt"
- }
- ],
- "name": "mint_with_starting_weapon",
- "outputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "item_token_id",
- "type": "Uint256"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "item_token_id",
- "type": "Uint256"
- }
- ],
- "name": "equip_item",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "item_token_id",
- "type": "Uint256"
- }
- ],
- "name": "unequip_item",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "status",
- "type": "felt"
- }
- ],
- "name": "update_status",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "value",
- "type": "felt"
- }
- ],
- "name": "assign_beast",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "amount",
- "type": "felt"
- }
- ],
- "name": "deduct_health",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "amount",
- "type": "felt"
- }
- ],
- "name": "add_health",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "amount",
- "type": "felt"
- }
- ],
- "name": "increase_xp",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "stat",
- "type": "felt"
- }
- ],
- "name": "upgrade_stat",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "number",
- "type": "felt"
- }
- ],
- "name": "purchase_health",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "token_id",
- "type": "Uint256"
- }
- ],
- "name": "explore",
- "outputs": [
- {
- "name": "type",
- "type": "felt"
- },
- {
- "name": "id",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "rob_king",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "kill_thief",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [],
- "name": "claim_king_loot",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "get_adventurer_by_id",
- "outputs": [
- {
- "name": "adventurer",
- "type": "AdventurerState"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "get_thief",
- "outputs": [
- {
- "name": "thief_state",
- "type": "ThiefState"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "totalSupply",
- "outputs": [
- {
- "name": "totalSupply",
- "type": "Uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "index",
- "type": "Uint256"
- }
- ],
- "name": "tokenByIndex",
- "outputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "index",
- "type": "Uint256"
- }
- ],
- "name": "token_of_owner_by_index",
- "outputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "interfaceId",
- "type": "felt"
- }
- ],
- "name": "supportsInterface",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "name",
- "outputs": [
- {
- "name": "name",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "symbol",
- "outputs": [
- {
- "name": "symbol",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "owner",
- "type": "felt"
- }
- ],
- "name": "balance_of",
- "outputs": [
- {
- "name": "balance",
- "type": "Uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "owner_of",
- "outputs": [
- {
- "name": "owner",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "getApproved",
- "outputs": [
- {
- "name": "approved",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "operator",
- "type": "felt"
- }
- ],
- "name": "isApprovedForAll",
- "outputs": [
- {
- "name": "isApproved",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "name": "tokenURI",
- "outputs": [
- {
- "name": "tokenURI_len",
- "type": "felt"
- },
- {
- "name": "tokenURI",
- "type": "felt*"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "name": "owner",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "approve",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "operator",
- "type": "felt"
- },
- {
- "name": "approved",
- "type": "felt"
- }
- ],
- "name": "setApprovalForAll",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "burn",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "newOwner",
- "type": "felt"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [],
- "name": "renounceOwnership",
- "outputs": [],
- "type": "function"
- }
-]
diff --git a/ui/src/app/abi/Beast.json b/ui/src/app/abi/Beast.json
deleted file mode 100644
index 84097cde3..000000000
--- a/ui/src/app/abi/Beast.json
+++ /dev/null
@@ -1,733 +0,0 @@
-[
- {
- "members": [
- {
- "name": "low",
- "offset": 0,
- "type": "felt"
- },
- {
- "name": "high",
- "offset": 1,
- "type": "felt"
- }
- ],
- "name": "Uint256",
- "size": 2,
- "type": "struct"
- },
- {
- "members": [
- {
- "name": "Id",
- "offset": 0,
- "type": "felt"
- },
- {
- "name": "AttackType",
- "offset": 1,
- "type": "felt"
- },
- {
- "name": "ArmorType",
- "offset": 2,
- "type": "felt"
- },
- {
- "name": "Rank",
- "offset": 3,
- "type": "felt"
- },
- {
- "name": "Prefix_1",
- "offset": 4,
- "type": "felt"
- },
- {
- "name": "Prefix_2",
- "offset": 5,
- "type": "felt"
- },
- {
- "name": "Health",
- "offset": 6,
- "type": "felt"
- },
- {
- "name": "Adventurer",
- "offset": 7,
- "type": "felt"
- },
- {
- "name": "XP",
- "offset": 8,
- "type": "felt"
- },
- {
- "name": "Level",
- "offset": 9,
- "type": "felt"
- },
- {
- "name": "SlainOnDate",
- "offset": 10,
- "type": "felt"
- }
- ],
- "name": "Beast",
- "size": 11,
- "type": "struct"
- },
- {
- "members": [
- {
- "name": "Health",
- "offset": 0,
- "type": "felt"
- },
- {
- "name": "Adventurer",
- "offset": 1,
- "type": "felt"
- },
- {
- "name": "XP",
- "offset": 2,
- "type": "felt"
- },
- {
- "name": "Level",
- "offset": 3,
- "type": "felt"
- },
- {
- "name": "SlainOnDate",
- "offset": 4,
- "type": "felt"
- }
- ],
- "name": "BeastDynamic",
- "size": 5,
- "type": "struct"
- },
- {
- "members": [
- {
- "name": "Race",
- "offset": 0,
- "type": "felt"
- },
- {
- "name": "HomeRealm",
- "offset": 1,
- "type": "felt"
- },
- {
- "name": "Birthdate",
- "offset": 2,
- "type": "felt"
- },
- {
- "name": "Name",
- "offset": 3,
- "type": "felt"
- },
- {
- "name": "Order",
- "offset": 4,
- "type": "felt"
- },
- {
- "name": "ImageHash1",
- "offset": 5,
- "type": "felt"
- },
- {
- "name": "ImageHash2",
- "offset": 6,
- "type": "felt"
- },
- {
- "name": "Health",
- "offset": 7,
- "type": "felt"
- },
- {
- "name": "Level",
- "offset": 8,
- "type": "felt"
- },
- {
- "name": "Strength",
- "offset": 9,
- "type": "felt"
- },
- {
- "name": "Dexterity",
- "offset": 10,
- "type": "felt"
- },
- {
- "name": "Vitality",
- "offset": 11,
- "type": "felt"
- },
- {
- "name": "Intelligence",
- "offset": 12,
- "type": "felt"
- },
- {
- "name": "Wisdom",
- "offset": 13,
- "type": "felt"
- },
- {
- "name": "Charisma",
- "offset": 14,
- "type": "felt"
- },
- {
- "name": "Luck",
- "offset": 15,
- "type": "felt"
- },
- {
- "name": "XP",
- "offset": 16,
- "type": "felt"
- },
- {
- "name": "WeaponId",
- "offset": 17,
- "type": "felt"
- },
- {
- "name": "ChestId",
- "offset": 18,
- "type": "felt"
- },
- {
- "name": "HeadId",
- "offset": 19,
- "type": "felt"
- },
- {
- "name": "WaistId",
- "offset": 20,
- "type": "felt"
- },
- {
- "name": "FeetId",
- "offset": 21,
- "type": "felt"
- },
- {
- "name": "HandsId",
- "offset": 22,
- "type": "felt"
- },
- {
- "name": "NeckId",
- "offset": 23,
- "type": "felt"
- },
- {
- "name": "RingId",
- "offset": 24,
- "type": "felt"
- },
- {
- "name": "Status",
- "offset": 25,
- "type": "felt"
- },
- {
- "name": "Beast",
- "offset": 26,
- "type": "felt"
- },
- {
- "name": "Upgrading",
- "offset": 27,
- "type": "felt"
- }
- ],
- "name": "AdventurerState",
- "size": 28,
- "type": "struct"
- },
- {
- "data": [
- {
- "name": "implementation",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "Upgraded",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "previousAdmin",
- "type": "felt"
- },
- {
- "name": "newAdmin",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "AdminChanged",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "from_",
- "type": "felt"
- },
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "Transfer",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "approved",
- "type": "felt"
- },
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "Approval",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "operator",
- "type": "felt"
- },
- {
- "name": "approved",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "ApprovalForAll",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- },
- {
- "name": "beast_state",
- "type": "Beast"
- }
- ],
- "keys": [],
- "name": "CreateBeast",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- },
- {
- "name": "beast_state",
- "type": "Beast"
- }
- ],
- "keys": [],
- "name": "UpdateBeastState",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- },
- {
- "name": "beast_level",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "BeastLevelUp",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- },
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "damage",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "BeastAttacked",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- },
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "damage",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "AdventurerAttacked",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- },
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "FledBeast",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- },
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "damage",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "AdventurerAmbushed",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "balance",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "UpdateGoldBalance",
- "type": "event"
- },
- {
- "inputs": [
- {
- "name": "address_of_controller",
- "type": "felt"
- },
- {
- "name": "proxy_admin",
- "type": "felt"
- }
- ],
- "name": "initializer",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "new_implementation",
- "type": "felt"
- }
- ],
- "name": "upgrade",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_id",
- "type": "Uint256"
- }
- ],
- "name": "create",
- "outputs": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_id",
- "type": "Uint256"
- },
- {
- "name": "beast_id",
- "type": "felt"
- }
- ],
- "name": "create_starting_beast",
- "outputs": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- }
- ],
- "name": "attack",
- "outputs": [
- {
- "name": "damage_to_beast",
- "type": "felt"
- },
- {
- "name": "damage_from_beast",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- }
- ],
- "name": "counter_attack",
- "outputs": [
- {
- "name": "damage",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- }
- ],
- "name": "flee",
- "outputs": [
- {
- "name": "fled",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "token_id",
- "type": "Uint256"
- },
- {
- "name": "beast",
- "type": "Beast"
- }
- ],
- "name": "set_beast_by_id",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- },
- {
- "name": "beast_dynamic_",
- "type": "BeastDynamic"
- },
- {
- "name": "amount",
- "type": "felt"
- }
- ],
- "name": "increase_xp",
- "outputs": [
- {
- "name": "returned_beast_dynamic",
- "type": "BeastDynamic"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- }
- ],
- "name": "get_beast_by_id",
- "outputs": [
- {
- "name": "beast",
- "type": "Beast"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "beast_token_id",
- "type": "Uint256"
- }
- ],
- "name": "get_adventurer_from_beast",
- "outputs": [
- {
- "name": "adventurerState",
- "type": "AdventurerState"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "get_total_supply",
- "outputs": [
- {
- "name": "total_supply",
- "type": "Uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "addition",
- "type": "felt"
- }
- ],
- "name": "add_to_balance",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "subtraction",
- "type": "felt"
- }
- ],
- "name": "subtract_from_balance",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "balance_of",
- "outputs": [
- {
- "name": "balance",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "get_world_supply",
- "outputs": [
- {
- "name": "balance",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- }
-]
diff --git a/ui/src/app/abi/Game.json b/ui/src/app/abi/Game.json
new file mode 100644
index 000000000..42370ee48
--- /dev/null
+++ b/ui/src/app/abi/Game.json
@@ -0,0 +1,2404 @@
+[
+ {
+ "name": "Game",
+ "type": "impl",
+ "interface_name": "game::game::interfaces::IGame"
+ },
+ {
+ "name": "survivor::adventurer_meta::AdventurerMetadata",
+ "type": "struct",
+ "members": [
+ {
+ "name": "name",
+ "type": "core::integer::u128"
+ },
+ {
+ "name": "home_realm",
+ "type": "core::integer::u16"
+ },
+ {
+ "name": "class",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "entropy",
+ "type": "core::integer::u128"
+ }
+ ]
+ },
+ {
+ "name": "core::integer::u256",
+ "type": "struct",
+ "members": [
+ {
+ "name": "low",
+ "type": "core::integer::u128"
+ },
+ {
+ "name": "high",
+ "type": "core::integer::u128"
+ }
+ ]
+ },
+ {
+ "name": "core::bool",
+ "type": "enum",
+ "variants": [
+ {
+ "name": "False",
+ "type": "()"
+ },
+ {
+ "name": "True",
+ "type": "()"
+ }
+ ]
+ },
+ {
+ "name": "survivor::adventurer_stats::Stats",
+ "type": "struct",
+ "members": [
+ {
+ "name": "strength",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "dexterity",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "vitality",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "intelligence",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "wisdom",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "charisma",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "luck",
+ "type": "core::integer::u8"
+ }
+ ]
+ },
+ {
+ "name": "market::market::ItemPurchase",
+ "type": "struct",
+ "members": [
+ {
+ "name": "item_id",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "equip",
+ "type": "core::bool"
+ }
+ ]
+ },
+ {
+ "name": "survivor::item_primitive::ItemPrimitive",
+ "type": "struct",
+ "members": [
+ {
+ "name": "id",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "xp",
+ "type": "core::integer::u16"
+ },
+ {
+ "name": "metadata",
+ "type": "core::integer::u8"
+ }
+ ]
+ },
+ {
+ "name": "survivor::adventurer::Adventurer",
+ "type": "struct",
+ "members": [
+ {
+ "name": "last_action",
+ "type": "core::integer::u16"
+ },
+ {
+ "name": "health",
+ "type": "core::integer::u16"
+ },
+ {
+ "name": "xp",
+ "type": "core::integer::u16"
+ },
+ {
+ "name": "stats",
+ "type": "survivor::adventurer_stats::Stats"
+ },
+ {
+ "name": "gold",
+ "type": "core::integer::u16"
+ },
+ {
+ "name": "weapon",
+ "type": "survivor::item_primitive::ItemPrimitive"
+ },
+ {
+ "name": "chest",
+ "type": "survivor::item_primitive::ItemPrimitive"
+ },
+ {
+ "name": "head",
+ "type": "survivor::item_primitive::ItemPrimitive"
+ },
+ {
+ "name": "waist",
+ "type": "survivor::item_primitive::ItemPrimitive"
+ },
+ {
+ "name": "foot",
+ "type": "survivor::item_primitive::ItemPrimitive"
+ },
+ {
+ "name": "hand",
+ "type": "survivor::item_primitive::ItemPrimitive"
+ },
+ {
+ "name": "neck",
+ "type": "survivor::item_primitive::ItemPrimitive"
+ },
+ {
+ "name": "ring",
+ "type": "survivor::item_primitive::ItemPrimitive"
+ },
+ {
+ "name": "beast_health",
+ "type": "core::integer::u16"
+ },
+ {
+ "name": "stat_points_available",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "mutated",
+ "type": "core::bool"
+ }
+ ]
+ },
+ {
+ "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": "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": "survivor::item_meta::ItemSpecialsStorage",
+ "type": "struct",
+ "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": "item_10",
+ "type": "survivor::item_meta::ItemSpecials"
+ },
+ {
+ "name": "mutated",
+ "type": "core::bool"
+ }
+ ]
+ },
+ {
+ "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"
+ }
+ ]
+ },
+ {
+ "name": "combat::combat::CombatSpec",
+ "type": "struct",
+ "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"
+ }
+ ]
+ },
+ {
+ "name": "beasts::beast::Beast",
+ "type": "struct",
+ "members": [
+ {
+ "name": "id",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "starting_health",
+ "type": "core::integer::u16"
+ },
+ {
+ "name": "combat_spec",
+ "type": "combat::combat::CombatSpec"
+ }
+ ]
+ },
+ {
+ "name": "game::game::interfaces::IGame",
+ "type": "interface",
+ "items": [
+ {
+ "name": "start",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "client_reward_address",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "starting_weapon",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "adventurer_meta",
+ "type": "survivor::adventurer_meta::AdventurerMetadata"
+ }
+ ],
+ "outputs": [],
+ "state_mutability": "external"
+ },
+ {
+ "name": "explore",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "till_beast",
+ "type": "core::bool"
+ }
+ ],
+ "outputs": [],
+ "state_mutability": "external"
+ },
+ {
+ "name": "attack",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "to_the_death",
+ "type": "core::bool"
+ }
+ ],
+ "outputs": [],
+ "state_mutability": "external"
+ },
+ {
+ "name": "flee",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "to_the_death",
+ "type": "core::bool"
+ }
+ ],
+ "outputs": [],
+ "state_mutability": "external"
+ },
+ {
+ "name": "equip",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "items",
+ "type": "core::array::Array::"
+ }
+ ],
+ "outputs": [],
+ "state_mutability": "external"
+ },
+ {
+ "name": "drop_items",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "items",
+ "type": "core::array::Array::"
+ }
+ ],
+ "outputs": [],
+ "state_mutability": "external"
+ },
+ {
+ "name": "upgrade_adventurer",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "potions",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "stat_upgrades",
+ "type": "survivor::adventurer_stats::Stats"
+ },
+ {
+ "name": "items",
+ "type": "core::array::Array::"
+ }
+ ],
+ "outputs": [],
+ "state_mutability": "external"
+ },
+ {
+ "name": "slay_idle_adventurers",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_ids",
+ "type": "core::array::Array::"
+ }
+ ],
+ "outputs": [],
+ "state_mutability": "external"
+ },
+ {
+ "name": "rotate_global_entropy",
+ "type": "function",
+ "inputs": [],
+ "outputs": [],
+ "state_mutability": "external"
+ },
+ {
+ "name": "get_adventurer",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::adventurer::Adventurer"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_adventurer_no_boosts",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::adventurer::Adventurer"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_adventurer_meta",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::adventurer_meta::AdventurerMetadata"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_health",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u16"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_xp",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u16"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_level",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_gold",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u16"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_stat_upgrades_available",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_last_action",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u16"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_stats",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::adventurer_stats::Stats"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_strength",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_dexterity",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_vitality",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_intelligence",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_wisdom",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_charisma",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_weapon_greatness",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_chest_greatness",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_head_greatness",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_waist_greatness",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_foot_greatness",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_hand_greatness",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_necklace_greatness",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_ring_greatness",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_bag",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::bag::Bag"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_special_storage",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "storage_index",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::item_meta::ItemSpecialsStorage"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_weapon_specials",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::item_meta::ItemSpecials"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_chest_specials",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::item_meta::ItemSpecials"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_head_specials",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::item_meta::ItemSpecials"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_waist_specials",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::item_meta::ItemSpecials"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_foot_specials",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::item_meta::ItemSpecials"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_hand_specials",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::item_meta::ItemSpecials"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_necklace_specials",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::item_meta::ItemSpecials"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_ring_specials",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::item_meta::ItemSpecials"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_items_on_market",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::array::Array::"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_items_on_market_by_slot",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "slot",
+ "type": "core::integer::u8"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::array::Array::"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_items_on_market_by_tier",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "tier",
+ "type": "core::integer::u8"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::array::Array::"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_potion_price",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u16"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_item_price",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "item_id",
+ "type": "core::integer::u8"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u16"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_base_stats",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "survivor::adventurer_stats::Stats"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_base_strength",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_base_dexterity",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_base_vitality",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_base_intelligence",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_base_wisdom",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_base_charisma",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_attacking_beast",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "beasts::beast::Beast"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_beast_health",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u16"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_beast_type",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "beast_id",
+ "type": "core::integer::u8"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_beast_tier",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "beast_id",
+ "type": "core::integer::u8"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "next_global_entropy_rotation",
+ "type": "function",
+ "inputs": [],
+ "outputs": [
+ {
+ "type": "core::felt252"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_dao_address",
+ "type": "function",
+ "inputs": [],
+ "outputs": [
+ {
+ "type": "core::starknet::contract_address::ContractAddress"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_lords_address",
+ "type": "function",
+ "inputs": [],
+ "outputs": [
+ {
+ "type": "core::starknet::contract_address::ContractAddress"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "get_entropy",
+ "type": "function",
+ "inputs": [],
+ "outputs": [
+ {
+ "type": "core::integer::u64"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "owner_of",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::starknet::contract_address::ContractAddress"
+ }
+ ],
+ "state_mutability": "view"
+ }
+ ]
+ },
+ {
+ "name": "constructor",
+ "type": "constructor",
+ "inputs": [
+ {
+ "name": "lords",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "dao",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "collectible_beasts",
+ "type": "core::starknet::contract_address::ContractAddress"
+ }
+ ]
+ },
+ {
+ "name": "game::Game::AdventurerState",
+ "type": "struct",
+ "members": [
+ {
+ "name": "owner",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "adventurer",
+ "type": "survivor::adventurer::Adventurer"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::StartGame",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "adventurer_meta",
+ "type": "survivor::adventurer_meta::AdventurerMetadata"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::UpgradesAvailable",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "items",
+ "type": "core::array::Array::"
+ }
+ ]
+ },
+ {
+ "name": "game::Game::Discovery",
+ "type": "struct",
+ "members": [
+ {
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "name": "amount",
+ "type": "core::integer::u16"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::DiscoveredHealth",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "discovery",
+ "type": "game::Game::Discovery"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::DiscoveredGold",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "discovery",
+ "type": "game::Game::Discovery"
+ }
+ ]
+ },
+ {
+ "name": "game::Game::ObstacleDetails",
+ "type": "struct",
+ "members": [
+ {
+ "name": "id",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "level",
+ "type": "core::integer::u16"
+ },
+ {
+ "name": "damage_taken",
+ "type": "core::integer::u16"
+ },
+ {
+ "name": "damage_location",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "critical_hit",
+ "type": "core::bool"
+ },
+ {
+ "name": "adventurer_xp_reward",
+ "type": "core::integer::u16"
+ },
+ {
+ "name": "item_xp_reward",
+ "type": "core::integer::u16"
+ }
+ ]
+ },
+ {
+ "name": "game::Game::ObstacleEvent",
+ "type": "struct",
+ "members": [
+ {
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "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": "game::Game::BattleDetails",
+ "type": "struct",
+ "members": [
+ {
+ "name": "seed",
+ "type": "core::integer::u128"
+ },
+ {
+ "name": "id",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "beast_specs",
+ "type": "combat::combat::CombatSpec"
+ },
+ {
+ "name": "damage",
+ "type": "core::integer::u16"
+ },
+ {
+ "name": "critical_hit",
+ "type": "core::bool"
+ },
+ {
+ "name": "location",
+ "type": "core::integer::u8"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::AmbushedByBeast",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "beast_battle_details",
+ "type": "game::Game::BattleDetails"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::DiscoveredBeast",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "seed",
+ "type": "core::integer::u128"
+ },
+ {
+ "kind": "data",
+ "name": "id",
+ "type": "core::integer::u8"
+ },
+ {
+ "kind": "data",
+ "name": "beast_specs",
+ "type": "combat::combat::CombatSpec"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::AttackedBeast",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "beast_battle_details",
+ "type": "game::Game::BattleDetails"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::AttackedByBeast",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "beast_battle_details",
+ "type": "game::Game::BattleDetails"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::SlayedBeast",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "seed",
+ "type": "core::integer::u128"
+ },
+ {
+ "kind": "data",
+ "name": "id",
+ "type": "core::integer::u8"
+ },
+ {
+ "kind": "data",
+ "name": "beast_specs",
+ "type": "combat::combat::CombatSpec"
+ },
+ {
+ "kind": "data",
+ "name": "damage_dealt",
+ "type": "core::integer::u16"
+ },
+ {
+ "kind": "data",
+ "name": "critical_hit",
+ "type": "core::bool"
+ },
+ {
+ "kind": "data",
+ "name": "xp_earned_adventurer",
+ "type": "core::integer::u16"
+ },
+ {
+ "kind": "data",
+ "name": "xp_earned_items",
+ "type": "core::integer::u16"
+ },
+ {
+ "kind": "data",
+ "name": "gold_earned",
+ "type": "core::integer::u16"
+ }
+ ]
+ },
+ {
+ "name": "game::Game::FleeEvent",
+ "type": "struct",
+ "members": [
+ {
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "name": "seed",
+ "type": "core::integer::u128"
+ },
+ {
+ "name": "id",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "beast_specs",
+ "type": "combat::combat::CombatSpec"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::FleeFailed",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "flee_event",
+ "type": "game::Game::FleeEvent"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::FleeSucceeded",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "flee_event",
+ "type": "game::Game::FleeEvent"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::AdventurerLeveledUp",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "previous_level",
+ "type": "core::integer::u8"
+ },
+ {
+ "kind": "data",
+ "name": "new_level",
+ "type": "core::integer::u8"
+ }
+ ]
+ },
+ {
+ "name": "game::Game::AdventurerStateWithBag",
+ "type": "struct",
+ "members": [
+ {
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "name": "bag",
+ "type": "survivor::bag::Bag"
+ }
+ ]
+ },
+ {
+ "name": "combat::constants::CombatEnums::Slot",
+ "type": "enum",
+ "variants": [
+ {
+ "name": "None",
+ "type": "()"
+ },
+ {
+ "name": "Weapon",
+ "type": "()"
+ },
+ {
+ "name": "Chest",
+ "type": "()"
+ },
+ {
+ "name": "Head",
+ "type": "()"
+ },
+ {
+ "name": "Waist",
+ "type": "()"
+ },
+ {
+ "name": "Foot",
+ "type": "()"
+ },
+ {
+ "name": "Hand",
+ "type": "()"
+ },
+ {
+ "name": "Neck",
+ "type": "()"
+ },
+ {
+ "name": "Ring",
+ "type": "()"
+ }
+ ]
+ },
+ {
+ "name": "lootitems::loot::Loot",
+ "type": "struct",
+ "members": [
+ {
+ "name": "id",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "tier",
+ "type": "combat::constants::CombatEnums::Tier"
+ },
+ {
+ "name": "item_type",
+ "type": "combat::constants::CombatEnums::Type"
+ },
+ {
+ "name": "slot",
+ "type": "combat::constants::CombatEnums::Slot"
+ }
+ ]
+ },
+ {
+ "name": "market::market::LootWithPrice",
+ "type": "struct",
+ "members": [
+ {
+ "name": "item",
+ "type": "lootitems::loot::Loot"
+ },
+ {
+ "name": "price",
+ "type": "core::integer::u16"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::PurchasedItems",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state_with_bag",
+ "type": "game::Game::AdventurerStateWithBag"
+ },
+ {
+ "kind": "data",
+ "name": "purchases",
+ "type": "core::array::Array::"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::PurchasedPotions",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "quantity",
+ "type": "core::integer::u8"
+ },
+ {
+ "kind": "data",
+ "name": "cost",
+ "type": "core::integer::u16"
+ },
+ {
+ "kind": "data",
+ "name": "health",
+ "type": "core::integer::u16"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::AdventurerUpgraded",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state_with_bag",
+ "type": "game::Game::AdventurerStateWithBag"
+ },
+ {
+ "kind": "data",
+ "name": "strength_increase",
+ "type": "core::integer::u8"
+ },
+ {
+ "kind": "data",
+ "name": "dexterity_increase",
+ "type": "core::integer::u8"
+ },
+ {
+ "kind": "data",
+ "name": "vitality_increase",
+ "type": "core::integer::u8"
+ },
+ {
+ "kind": "data",
+ "name": "intelligence_increase",
+ "type": "core::integer::u8"
+ },
+ {
+ "kind": "data",
+ "name": "wisdom_increase",
+ "type": "core::integer::u8"
+ },
+ {
+ "kind": "data",
+ "name": "charisma_increase",
+ "type": "core::integer::u8"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::EquippedItems",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state_with_bag",
+ "type": "game::Game::AdventurerStateWithBag"
+ },
+ {
+ "kind": "data",
+ "name": "equipped_items",
+ "type": "core::array::Array::"
+ },
+ {
+ "kind": "data",
+ "name": "unequipped_items",
+ "type": "core::array::Array::"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::DroppedItems",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state_with_bag",
+ "type": "game::Game::AdventurerStateWithBag"
+ },
+ {
+ "kind": "data",
+ "name": "item_ids",
+ "type": "core::array::Array::"
+ }
+ ]
+ },
+ {
+ "name": "game::Game::ItemLeveledUp",
+ "type": "struct",
+ "members": [
+ {
+ "name": "item_id",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "previous_level",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "new_level",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "suffix_unlocked",
+ "type": "core::bool"
+ },
+ {
+ "name": "prefixes_unlocked",
+ "type": "core::bool"
+ },
+ {
+ "name": "specials",
+ "type": "survivor::item_meta::ItemSpecials"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::ItemsLeveledUp",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "items",
+ "type": "core::array::Array::"
+ }
+ ]
+ },
+ {
+ "name": "game::Game::DeathDetails",
+ "type": "struct",
+ "members": [
+ {
+ "name": "killed_by_beast",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "killed_by_obstacle",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "caller_address",
+ "type": "core::starknet::contract_address::ContractAddress"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::AdventurerDied",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "death_details",
+ "type": "game::Game::DeathDetails"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::NewHighScore",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "rank",
+ "type": "core::integer::u8"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::IdleDeathPenalty",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "adventurer_state",
+ "type": "game::Game::AdventurerState"
+ },
+ {
+ "kind": "data",
+ "name": "idle_blocks",
+ "type": "core::integer::u16"
+ },
+ {
+ "kind": "data",
+ "name": "penalty_threshold",
+ "type": "core::integer::u16"
+ },
+ {
+ "kind": "data",
+ "name": "caller",
+ "type": "core::starknet::contract_address::ContractAddress"
+ }
+ ]
+ },
+ {
+ "name": "game::Game::PlayerReward",
+ "type": "struct",
+ "members": [
+ {
+ "name": "adventurer_id",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "rank",
+ "type": "core::integer::u8"
+ },
+ {
+ "name": "amount",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "address",
+ "type": "core::starknet::contract_address::ContractAddress"
+ }
+ ]
+ },
+ {
+ "name": "game::Game::ClientReward",
+ "type": "struct",
+ "members": [
+ {
+ "name": "amount",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "address",
+ "type": "core::starknet::contract_address::ContractAddress"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "game::Game::RewardDistribution",
+ "type": "event",
+ "members": [
+ {
+ "kind": "data",
+ "name": "first_place",
+ "type": "game::Game::PlayerReward"
+ },
+ {
+ "kind": "data",
+ "name": "second_place",
+ "type": "game::Game::PlayerReward"
+ },
+ {
+ "kind": "data",
+ "name": "third_place",
+ "type": "game::Game::PlayerReward"
+ },
+ {
+ "kind": "data",
+ "name": "client",
+ "type": "game::Game::ClientReward"
+ },
+ {
+ "kind": "data",
+ "name": "dao",
+ "type": "core::integer::u256"
+ }
+ ]
+ },
+ {
+ "kind": "enum",
+ "name": "game::Game::Event",
+ "type": "event",
+ "variants": [
+ {
+ "kind": "nested",
+ "name": "StartGame",
+ "type": "game::Game::StartGame"
+ },
+ {
+ "kind": "nested",
+ "name": "UpgradesAvailable",
+ "type": "game::Game::UpgradesAvailable"
+ },
+ {
+ "kind": "nested",
+ "name": "DiscoveredHealth",
+ "type": "game::Game::DiscoveredHealth"
+ },
+ {
+ "kind": "nested",
+ "name": "DiscoveredGold",
+ "type": "game::Game::DiscoveredGold"
+ },
+ {
+ "kind": "nested",
+ "name": "DodgedObstacle",
+ "type": "game::Game::DodgedObstacle"
+ },
+ {
+ "kind": "nested",
+ "name": "HitByObstacle",
+ "type": "game::Game::HitByObstacle"
+ },
+ {
+ "kind": "nested",
+ "name": "AmbushedByBeast",
+ "type": "game::Game::AmbushedByBeast"
+ },
+ {
+ "kind": "nested",
+ "name": "DiscoveredBeast",
+ "type": "game::Game::DiscoveredBeast"
+ },
+ {
+ "kind": "nested",
+ "name": "AttackedBeast",
+ "type": "game::Game::AttackedBeast"
+ },
+ {
+ "kind": "nested",
+ "name": "AttackedByBeast",
+ "type": "game::Game::AttackedByBeast"
+ },
+ {
+ "kind": "nested",
+ "name": "SlayedBeast",
+ "type": "game::Game::SlayedBeast"
+ },
+ {
+ "kind": "nested",
+ "name": "FleeFailed",
+ "type": "game::Game::FleeFailed"
+ },
+ {
+ "kind": "nested",
+ "name": "FleeSucceeded",
+ "type": "game::Game::FleeSucceeded"
+ },
+ {
+ "kind": "nested",
+ "name": "AdventurerLeveledUp",
+ "type": "game::Game::AdventurerLeveledUp"
+ },
+ {
+ "kind": "nested",
+ "name": "PurchasedItems",
+ "type": "game::Game::PurchasedItems"
+ },
+ {
+ "kind": "nested",
+ "name": "PurchasedPotions",
+ "type": "game::Game::PurchasedPotions"
+ },
+ {
+ "kind": "nested",
+ "name": "AdventurerUpgraded",
+ "type": "game::Game::AdventurerUpgraded"
+ },
+ {
+ "kind": "nested",
+ "name": "EquippedItems",
+ "type": "game::Game::EquippedItems"
+ },
+ {
+ "kind": "nested",
+ "name": "DroppedItems",
+ "type": "game::Game::DroppedItems"
+ },
+ {
+ "kind": "nested",
+ "name": "ItemsLeveledUp",
+ "type": "game::Game::ItemsLeveledUp"
+ },
+ {
+ "kind": "nested",
+ "name": "AdventurerDied",
+ "type": "game::Game::AdventurerDied"
+ },
+ {
+ "kind": "nested",
+ "name": "NewHighScore",
+ "type": "game::Game::NewHighScore"
+ },
+ {
+ "kind": "nested",
+ "name": "IdleDeathPenalty",
+ "type": "game::Game::IdleDeathPenalty"
+ },
+ {
+ "kind": "nested",
+ "name": "RewardDistribution",
+ "type": "game::Game::RewardDistribution"
+ }
+ ]
+ }
+]
diff --git a/ui/src/app/abi/LootMarketArcade.json b/ui/src/app/abi/LootMarketArcade.json
deleted file mode 100644
index aca57fe7f..000000000
--- a/ui/src/app/abi/LootMarketArcade.json
+++ /dev/null
@@ -1,1157 +0,0 @@
-[
- {
- "members": [
- {
- "name": "low",
- "offset": 0,
- "type": "felt"
- },
- {
- "name": "high",
- "offset": 1,
- "type": "felt"
- }
- ],
- "name": "Uint256",
- "size": 2,
- "type": "struct"
- },
- {
- "members": [
- {
- "name": "Id",
- "offset": 0,
- "type": "felt"
- },
- {
- "name": "Slot",
- "offset": 1,
- "type": "felt"
- },
- {
- "name": "Type",
- "offset": 2,
- "type": "felt"
- },
- {
- "name": "Material",
- "offset": 3,
- "type": "felt"
- },
- {
- "name": "Rank",
- "offset": 4,
- "type": "felt"
- },
- {
- "name": "Prefix_1",
- "offset": 5,
- "type": "felt"
- },
- {
- "name": "Prefix_2",
- "offset": 6,
- "type": "felt"
- },
- {
- "name": "Suffix",
- "offset": 7,
- "type": "felt"
- },
- {
- "name": "Greatness",
- "offset": 8,
- "type": "felt"
- },
- {
- "name": "CreatedBlock",
- "offset": 9,
- "type": "felt"
- },
- {
- "name": "XP",
- "offset": 10,
- "type": "felt"
- },
- {
- "name": "Adventurer",
- "offset": 11,
- "type": "felt"
- },
- {
- "name": "Bag",
- "offset": 12,
- "type": "felt"
- }
- ],
- "name": "Item",
- "size": 13,
- "type": "struct"
- },
- {
- "members": [
- {
- "name": "Race",
- "offset": 0,
- "type": "felt"
- },
- {
- "name": "HomeRealm",
- "offset": 1,
- "type": "felt"
- },
- {
- "name": "Birthdate",
- "offset": 2,
- "type": "felt"
- },
- {
- "name": "Name",
- "offset": 3,
- "type": "felt"
- },
- {
- "name": "Order",
- "offset": 4,
- "type": "felt"
- },
- {
- "name": "ImageHash1",
- "offset": 5,
- "type": "felt"
- },
- {
- "name": "ImageHash2",
- "offset": 6,
- "type": "felt"
- },
- {
- "name": "Health",
- "offset": 7,
- "type": "felt"
- },
- {
- "name": "Level",
- "offset": 8,
- "type": "felt"
- },
- {
- "name": "Strength",
- "offset": 9,
- "type": "felt"
- },
- {
- "name": "Dexterity",
- "offset": 10,
- "type": "felt"
- },
- {
- "name": "Vitality",
- "offset": 11,
- "type": "felt"
- },
- {
- "name": "Intelligence",
- "offset": 12,
- "type": "felt"
- },
- {
- "name": "Wisdom",
- "offset": 13,
- "type": "felt"
- },
- {
- "name": "Charisma",
- "offset": 14,
- "type": "felt"
- },
- {
- "name": "Luck",
- "offset": 15,
- "type": "felt"
- },
- {
- "name": "XP",
- "offset": 16,
- "type": "felt"
- },
- {
- "name": "WeaponId",
- "offset": 17,
- "type": "felt"
- },
- {
- "name": "ChestId",
- "offset": 18,
- "type": "felt"
- },
- {
- "name": "HeadId",
- "offset": 19,
- "type": "felt"
- },
- {
- "name": "WaistId",
- "offset": 20,
- "type": "felt"
- },
- {
- "name": "FeetId",
- "offset": 21,
- "type": "felt"
- },
- {
- "name": "HandsId",
- "offset": 22,
- "type": "felt"
- },
- {
- "name": "NeckId",
- "offset": 23,
- "type": "felt"
- },
- {
- "name": "RingId",
- "offset": 24,
- "type": "felt"
- },
- {
- "name": "Status",
- "offset": 25,
- "type": "felt"
- },
- {
- "name": "Beast",
- "offset": 26,
- "type": "felt"
- },
- {
- "name": "Upgrading",
- "offset": 27,
- "type": "felt"
- }
- ],
- "name": "AdventurerState",
- "size": 28,
- "type": "struct"
- },
- {
- "members": [
- {
- "name": "price",
- "offset": 0,
- "type": "felt"
- },
- {
- "name": "expiry",
- "offset": 1,
- "type": "felt"
- },
- {
- "name": "bidder",
- "offset": 2,
- "type": "felt"
- },
- {
- "name": "status",
- "offset": 3,
- "type": "felt"
- },
- {
- "name": "item_id",
- "offset": 4,
- "type": "felt"
- }
- ],
- "name": "Bid",
- "size": 5,
- "type": "struct"
- },
- {
- "data": [
- {
- "name": "previousOwner",
- "type": "felt"
- },
- {
- "name": "newOwner",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "OwnershipTransferred",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "from_",
- "type": "felt"
- },
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "Transfer",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "approved",
- "type": "felt"
- },
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "Approval",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "operator",
- "type": "felt"
- },
- {
- "name": "approved",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "ApprovalForAll",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "implementation",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "Upgraded",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "previousAdmin",
- "type": "felt"
- },
- {
- "name": "newAdmin",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "AdminChanged",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "item_token_id",
- "type": "Uint256"
- },
- {
- "name": "item",
- "type": "Item"
- }
- ],
- "keys": [],
- "name": "UpdateItemState",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "item_token_id",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "ItemXPIncrease",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "item_token_id",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "ItemGreatnessIncrease",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "item_token_id",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "ItemNamePrefixesAssigned",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "item_token_id",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "ItemNameSuffixAssigned",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "market_token_id",
- "type": "Uint256"
- },
- {
- "name": "item_token_id",
- "type": "Uint256"
- },
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "owner",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "ClaimItem",
- "type": "event"
- },
- {
- "inputs": [
- {
- "name": "name",
- "type": "felt"
- },
- {
- "name": "symbol",
- "type": "felt"
- },
- {
- "name": "address_of_controller",
- "type": "felt"
- },
- {
- "name": "proxy_admin",
- "type": "felt"
- }
- ],
- "name": "initializer",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "new_implementation",
- "type": "felt"
- }
- ],
- "name": "upgrade",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [],
- "name": "totalSupply",
- "outputs": [
- {
- "name": "totalSupply",
- "type": "Uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "index",
- "type": "Uint256"
- }
- ],
- "name": "tokenByIndex",
- "outputs": [
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "index",
- "type": "Uint256"
- }
- ],
- "name": "tokenOfOwnerByIndex",
- "outputs": [
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "interfaceId",
- "type": "felt"
- }
- ],
- "name": "supportsInterface",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "name",
- "outputs": [
- {
- "name": "name",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "symbol",
- "outputs": [
- {
- "name": "symbol",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "owner",
- "type": "felt"
- }
- ],
- "name": "balanceOf",
- "outputs": [
- {
- "name": "balance",
- "type": "Uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "name": "ownerOf",
- "outputs": [
- {
- "name": "owner",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "name": "getApproved",
- "outputs": [
- {
- "name": "approved",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "operator",
- "type": "felt"
- }
- ],
- "name": "isApprovedForAll",
- "outputs": [
- {
- "name": "isApproved",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "name": "tokenURI",
- "outputs": [
- {
- "name": "tokenURI_len",
- "type": "felt"
- },
- {
- "name": "tokenURI",
- "type": "felt*"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "name": "owner",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "name": "approve",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "operator",
- "type": "felt"
- },
- {
- "name": "approved",
- "type": "felt"
- }
- ],
- "name": "setApprovalForAll",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "from_",
- "type": "felt"
- },
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "from_",
- "type": "felt"
- },
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "tokenId",
- "type": "Uint256"
- },
- {
- "name": "data_len",
- "type": "felt"
- },
- {
- "name": "data",
- "type": "felt*"
- }
- ],
- "name": "safeTransferFrom",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "name": "burn",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "newOwner",
- "type": "felt"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [],
- "name": "renounceOwnership",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "mint",
- "outputs": [
- {
- "name": "id",
- "type": "Uint256"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "item_id",
- "type": "felt"
- },
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "mint_from_mart",
- "outputs": [
- {
- "name": "id",
- "type": "Uint256"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "weapon_id",
- "type": "felt"
- },
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "mint_starter_weapon",
- "outputs": [
- {
- "name": "item_token_id",
- "type": "Uint256"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "tokenId",
- "type": "Uint256"
- },
- {
- "name": "adventurerId",
- "type": "felt"
- }
- ],
- "name": "update_adventurer",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "tokenId",
- "type": "Uint256"
- },
- {
- "name": "xp",
- "type": "felt"
- }
- ],
- "name": "update_xp",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "tokenId",
- "type": "Uint256"
- },
- {
- "name": "item_id",
- "type": "felt"
- },
- {
- "name": "greatness",
- "type": "felt"
- },
- {
- "name": "xp",
- "type": "felt"
- },
- {
- "name": "adventurer",
- "type": "felt"
- },
- {
- "name": "bag_id",
- "type": "felt"
- }
- ],
- "name": "set_item_by_id",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "item_token_id",
- "type": "Uint256"
- },
- {
- "name": "amount",
- "type": "felt"
- }
- ],
- "name": "increase_xp",
- "outputs": [
- {
- "name": "updated_item",
- "type": "Item"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "adventurer",
- "type": "AdventurerState"
- },
- {
- "name": "amount",
- "type": "felt"
- }
- ],
- "name": "allocate_xp_to_items",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [],
- "name": "get_random_number",
- "outputs": [
- {
- "name": "dice_roll",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "tokenId",
- "type": "Uint256"
- }
- ],
- "name": "get_item_by_token_id",
- "outputs": [
- {
- "name": "item",
- "type": "Item"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "data": [
- {
- "name": "item",
- "type": "Item"
- },
- {
- "name": "market_item_id",
- "type": "felt"
- },
- {
- "name": "bid",
- "type": "Bid"
- }
- ],
- "keys": [],
- "name": "ItemMerchantUpdate",
- "type": "event"
- },
- {
- "inputs": [
- {
- "name": "tokenId",
- "type": "Uint256"
- },
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "item_owner",
- "outputs": [
- {
- "name": "owner",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "get_mint_index",
- "outputs": [
- {
- "name": "number",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "get_new_items",
- "outputs": [
- {
- "name": "number",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "mint_daily_items",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "market_item_id",
- "type": "felt"
- }
- ],
- "name": "get_random_item_from_seed",
- "outputs": [
- {
- "name": "item",
- "type": "Item"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "market_item_id",
- "type": "felt"
- },
- {
- "name": "daily_seed",
- "type": "felt"
- }
- ],
- "name": "random_item_id",
- "outputs": [
- {
- "name": "item",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "market_item_id",
- "type": "Uint256"
- }
- ],
- "name": "view_bid",
- "outputs": [
- {
- "name": "bid",
- "type": "Bid"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "market_item_id",
- "type": "Uint256"
- }
- ],
- "name": "view_unminted_item",
- "outputs": [
- {
- "name": "item",
- "type": "Item"
- },
- {
- "name": "bid",
- "type": "Bid"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "market_item_id",
- "type": "Uint256"
- },
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- },
- {
- "name": "price",
- "type": "felt"
- }
- ],
- "name": "bid_on_item",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "market_item_id",
- "type": "Uint256"
- },
- {
- "name": "adventurer_token_id",
- "type": "Uint256"
- }
- ],
- "name": "claim_item",
- "outputs": [],
- "type": "function"
- }
-]
diff --git a/ui/src/app/abi/Lords.json b/ui/src/app/abi/Lords.json
new file mode 100644
index 000000000..c2f2ef3e1
--- /dev/null
+++ b/ui/src/app/abi/Lords.json
@@ -0,0 +1,415 @@
+[
+ {
+ "name": "ERC20Impl",
+ "type": "impl",
+ "interface_name": "openzeppelin::token::erc20::interface::IERC20"
+ },
+ {
+ "name": "core::integer::u256",
+ "type": "struct",
+ "members": [
+ {
+ "name": "low",
+ "type": "core::integer::u128"
+ },
+ {
+ "name": "high",
+ "type": "core::integer::u128"
+ }
+ ]
+ },
+ {
+ "name": "core::bool",
+ "type": "enum",
+ "variants": [
+ {
+ "name": "False",
+ "type": "()"
+ },
+ {
+ "name": "True",
+ "type": "()"
+ }
+ ]
+ },
+ {
+ "name": "openzeppelin::token::erc20::interface::IERC20",
+ "type": "interface",
+ "items": [
+ {
+ "name": "name",
+ "type": "function",
+ "inputs": [],
+ "outputs": [
+ {
+ "type": "core::felt252"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "symbol",
+ "type": "function",
+ "inputs": [],
+ "outputs": [
+ {
+ "type": "core::felt252"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "decimals",
+ "type": "function",
+ "inputs": [],
+ "outputs": [
+ {
+ "type": "core::integer::u8"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "total_supply",
+ "type": "function",
+ "inputs": [],
+ "outputs": [
+ {
+ "type": "core::integer::u256"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "balance_of",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "account",
+ "type": "core::starknet::contract_address::ContractAddress"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u256"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "allowance",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "owner",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "spender",
+ "type": "core::starknet::contract_address::ContractAddress"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u256"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "transfer",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "recipient",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "amount",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::bool"
+ }
+ ],
+ "state_mutability": "external"
+ },
+ {
+ "name": "transfer_from",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "sender",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "recipient",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "amount",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::bool"
+ }
+ ],
+ "state_mutability": "external"
+ },
+ {
+ "name": "approve",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "spender",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "amount",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::bool"
+ }
+ ],
+ "state_mutability": "external"
+ }
+ ]
+ },
+ {
+ "name": "totalSupply",
+ "type": "function",
+ "inputs": [],
+ "outputs": [
+ {
+ "type": "core::integer::u256"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "balanceOf",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "account",
+ "type": "core::starknet::contract_address::ContractAddress"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::integer::u256"
+ }
+ ],
+ "state_mutability": "view"
+ },
+ {
+ "name": "transferFrom",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "sender",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "recipient",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "amount",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::bool"
+ }
+ ],
+ "state_mutability": "external"
+ },
+ {
+ "name": "constructor",
+ "type": "constructor",
+ "inputs": [
+ {
+ "name": "name",
+ "type": "core::felt252"
+ },
+ {
+ "name": "symbol",
+ "type": "core::felt252"
+ },
+ {
+ "name": "initial_supply",
+ "type": "core::integer::u256"
+ },
+ {
+ "name": "recipient",
+ "type": "core::starknet::contract_address::ContractAddress"
+ }
+ ]
+ },
+ {
+ "name": "increase_allowance",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "spender",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "added_value",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::bool"
+ }
+ ],
+ "state_mutability": "external"
+ },
+ {
+ "name": "decrease_allowance",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "spender",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "subtracted_value",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::bool"
+ }
+ ],
+ "state_mutability": "external"
+ },
+ {
+ "name": "mint",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "recipient",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "amount",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [],
+ "state_mutability": "external"
+ },
+ {
+ "name": "increaseAllowance",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "spender",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "addedValue",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::bool"
+ }
+ ],
+ "state_mutability": "external"
+ },
+ {
+ "name": "decreaseAllowance",
+ "type": "function",
+ "inputs": [
+ {
+ "name": "spender",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "name": "subtractedValue",
+ "type": "core::integer::u256"
+ }
+ ],
+ "outputs": [
+ {
+ "type": "core::bool"
+ }
+ ],
+ "state_mutability": "external"
+ },
+ {
+ "kind": "struct",
+ "name": "lords::ERC20::Transfer",
+ "type": "event",
+ "members": [
+ {
+ "kind": "key",
+ "name": "from",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "kind": "key",
+ "name": "to",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "kind": "data",
+ "name": "value",
+ "type": "core::integer::u256"
+ }
+ ]
+ },
+ {
+ "kind": "struct",
+ "name": "lords::ERC20::Approval",
+ "type": "event",
+ "members": [
+ {
+ "kind": "key",
+ "name": "owner",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "kind": "key",
+ "name": "spender",
+ "type": "core::starknet::contract_address::ContractAddress"
+ },
+ {
+ "kind": "data",
+ "name": "value",
+ "type": "core::integer::u256"
+ }
+ ]
+ },
+ {
+ "kind": "enum",
+ "name": "lords::ERC20::Event",
+ "type": "event",
+ "variants": [
+ {
+ "kind": "nested",
+ "name": "Transfer",
+ "type": "lords::ERC20::Transfer"
+ },
+ {
+ "kind": "nested",
+ "name": "Approval",
+ "type": "lords::ERC20::Approval"
+ }
+ ]
+ }
+]
diff --git a/ui/src/app/abi/Lords_ERC20_Mintable.json b/ui/src/app/abi/Lords_ERC20_Mintable.json
deleted file mode 100644
index 9a7010a27..000000000
--- a/ui/src/app/abi/Lords_ERC20_Mintable.json
+++ /dev/null
@@ -1,423 +0,0 @@
-[
- {
- "members": [
- {
- "name": "low",
- "offset": 0,
- "type": "felt"
- },
- {
- "name": "high",
- "offset": 1,
- "type": "felt"
- }
- ],
- "name": "Uint256",
- "size": 2,
- "type": "struct"
- },
- {
- "data": [
- {
- "name": "role",
- "type": "felt"
- },
- {
- "name": "account",
- "type": "felt"
- },
- {
- "name": "sender",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "RoleGranted",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "role",
- "type": "felt"
- },
- {
- "name": "account",
- "type": "felt"
- },
- {
- "name": "sender",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "RoleRevoked",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "role",
- "type": "felt"
- },
- {
- "name": "previousAdminRole",
- "type": "felt"
- },
- {
- "name": "newAdminRole",
- "type": "felt"
- }
- ],
- "keys": [],
- "name": "RoleAdminChanged",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "from_",
- "type": "felt"
- },
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "value",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "Transfer",
- "type": "event"
- },
- {
- "data": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "spender",
- "type": "felt"
- },
- {
- "name": "value",
- "type": "Uint256"
- }
- ],
- "keys": [],
- "name": "Approval",
- "type": "event"
- },
- {
- "inputs": [
- {
- "name": "name",
- "type": "felt"
- },
- {
- "name": "symbol",
- "type": "felt"
- },
- {
- "name": "decimals",
- "type": "felt"
- },
- {
- "name": "admin",
- "type": "felt"
- }
- ],
- "name": "constructor",
- "outputs": [],
- "type": "constructor"
- },
- {
- "inputs": [],
- "name": "name",
- "outputs": [
- {
- "name": "name",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "symbol",
- "outputs": [
- {
- "name": "symbol",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "totalSupply",
- "outputs": [
- {
- "name": "totalSupply",
- "type": "Uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "decimals",
- "outputs": [
- {
- "name": "decimals",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "account",
- "type": "felt"
- }
- ],
- "name": "balanceOf",
- "outputs": [
- {
- "name": "balance",
- "type": "Uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "spender",
- "type": "felt"
- }
- ],
- "name": "allowance",
- "outputs": [
- {
- "name": "remaining",
- "type": "Uint256"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "recipient",
- "type": "felt"
- },
- {
- "name": "amount",
- "type": "Uint256"
- }
- ],
- "name": "transfer",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "sender",
- "type": "felt"
- },
- {
- "name": "recipient",
- "type": "felt"
- },
- {
- "name": "amount",
- "type": "Uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "spender",
- "type": "felt"
- },
- {
- "name": "amount",
- "type": "Uint256"
- }
- ],
- "name": "approve",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "spender",
- "type": "felt"
- },
- {
- "name": "added_value",
- "type": "Uint256"
- }
- ],
- "name": "increaseAllowance",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "spender",
- "type": "felt"
- },
- {
- "name": "subtracted_value",
- "type": "Uint256"
- }
- ],
- "name": "decreaseAllowance",
- "outputs": [
- {
- "name": "success",
- "type": "felt"
- }
- ],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "to",
- "type": "felt"
- },
- {
- "name": "amount",
- "type": "Uint256"
- }
- ],
- "name": "mint",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "owner",
- "type": "felt"
- },
- {
- "name": "amount",
- "type": "Uint256"
- }
- ],
- "name": "burn_away",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "role",
- "type": "felt"
- },
- {
- "name": "address",
- "type": "felt"
- }
- ],
- "name": "has_role",
- "outputs": [
- {
- "name": "has_role",
- "type": "felt"
- }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "role",
- "type": "felt"
- },
- {
- "name": "address",
- "type": "felt"
- }
- ],
- "name": "grant_role",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "role",
- "type": "felt"
- },
- {
- "name": "address",
- "type": "felt"
- }
- ],
- "name": "revoke_role",
- "outputs": [],
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "role",
- "type": "felt"
- },
- {
- "name": "address",
- "type": "felt"
- }
- ],
- "name": "renounce_role",
- "outputs": [],
- "type": "function"
- }
-]
diff --git a/ui/src/app/components/intro/ArcadeIntro.tsx b/ui/src/app/components/intro/ArcadeIntro.tsx
index 41981f5dc..1cd07222e 100644
--- a/ui/src/app/components/intro/ArcadeIntro.tsx
+++ b/ui/src/app/components/intro/ArcadeIntro.tsx
@@ -1,18 +1,68 @@
import { useState } from "react";
-import { useAccount, useConnectors } from "@starknet-react/core";
+import {
+ useAccount,
+ useConnectors,
+ useContractWrite,
+ useBalance,
+} from "@starknet-react/core";
import { useBurner } from "@/app/lib/burner";
import { Button } from "../buttons/Button";
import useUIStore from "@/app/hooks/useUIStore";
import PixelatedImage from "../animations/PixelatedImage";
import { getWalletConnectors } from "@/app/lib/connectors";
+import Lords from "../../../../public/icons/lords.svg";
+import { useContracts } from "@/app/hooks/useContracts";
+import useTransactionCartStore from "@/app/hooks/useTransactionCartStore";
+import { Call } from "@/app/types";
export const ArcadeIntro = () => {
- const { address } = useAccount();
+ const { account, address } = useAccount();
const { connect, available } = useConnectors();
const isWrongNetwork = useUIStore((state) => state.isWrongNetwork);
const { getMasterAccount, create, isDeploying, isSettingPermissions } =
useBurner();
const walletConnectors = getWalletConnectors(available);
+ const { lordsContract } = useContracts();
+ const calls = useTransactionCartStore((state) => state.calls);
+ const addToCalls = useTransactionCartStore((state) => state.addToCalls);
+ const handleSubmitCalls = useTransactionCartStore(
+ (state) => state.handleSubmitCalls
+ );
+ const { writeAsync } = useContractWrite({ calls });
+ const { data: lordsBalance, refetch: refetchLordsBalance } = useBalance({
+ token: lordsContract?.address,
+ address,
+ });
+ const lords = parseInt(lordsBalance?.formatted ?? "0");
+ const [isMintingLords, setIsMintingLords] = useState(false);
+
+ const mintLords = async () => {
+ try {
+ setIsMintingLords(true);
+ // Mint 250 LORDS
+ const mintLords: Call = {
+ contractAddress: lordsContract?.address ?? "",
+ entrypoint: "mint",
+ calldata: [address ?? "0x0", (250 * 10 ** 18).toString(), "0"],
+ };
+ addToCalls(mintLords);
+ const tx = await handleSubmitCalls(writeAsync);
+ const result = await account?.waitForTransaction(tx?.transaction_hash, {
+ retryInterval: 2000,
+ });
+
+ if (!result) {
+ throw new Error("Lords Mint did not complete successfully.");
+ }
+
+ setIsMintingLords(false);
+ refetchLordsBalance();
+ } catch (e) {
+ setIsMintingLords(false);
+ console.log(e);
+ }
+ };
+
return (
<>
@@ -25,13 +75,14 @@ export const ArcadeIntro = () => {
unleashing a 10x surge in your gameplay speed.
- Fear not, for they're guarded by a labyrinth of security features,
- fit for even the wiliest of adventurers!
+ Stored in the browser but fear not, for they're guarded by a
+ labyrinth of security features, fit for even the wiliest of
+ adventurers!
-
+
Connect using a wallet provider.
-
+
{walletConnectors.map((connector, index) => (
{
))}
-
- Create Arcade Account (Fund, deploy & initiate security permissions)
+
Mint Some Lords
+
mintLords()}
+ disabled={isWrongNetwork || isMintingLords || lords !== 0}
+ className="flex flex-row w-1/4"
+ >
+ {" "}
+ {isMintingLords ? (
+ Minting Lords
+ ) : (
+ "Mint"
+ )}
+
+
+ Create Arcade Account (Fund ETH + LORDS, deploy, set permissions and
+ approvals)
create()}
- disabled={isWrongNetwork}
+ disabled={isWrongNetwork || lords === 0}
className="w-1/4"
>
CREATE
diff --git a/ui/src/app/hooks/useContracts.tsx b/ui/src/app/hooks/useContracts.tsx
index b96265d74..96cf80cdc 100644
--- a/ui/src/app/hooks/useContracts.tsx
+++ b/ui/src/app/hooks/useContracts.tsx
@@ -1,6 +1,6 @@
import { useContract, useAccount } from "@starknet-react/core";
-import Adventurer from "../abi/Adventurer.json";
-import Lords_ERC20_Mintable from "../abi/Lords_ERC20_Mintable.json";
+import Game from "../abi/Game.json";
+import Lords from "../abi/Lords.json";
import { contracts, mainnet_addr } from "../lib/constants";
const ethBalanceABIFragment = [
@@ -73,15 +73,15 @@ export const useContracts = () => {
(account as any)?.baseUrl == mainnet_addr
? contracts.mainnet.game
: contracts.goerli.game,
- abi: Adventurer,
+ abi: Game,
});
const { contract: lordsContract } = useContract({
address:
(account as any)?.provider?.baseUrl == mainnet_addr ||
(account as any)?.baseUrl == mainnet_addr
- ? contracts.mainnet.lords_erc20_mintable
- : contracts.goerli.lords_erc20_mintable,
- abi: Lords_ERC20_Mintable,
+ ? contracts.mainnet.lords
+ : contracts.goerli.lords,
+ abi: Lords,
});
const { contract: ethContract } = useContract({
diff --git a/ui/src/app/lib/burner.tsx b/ui/src/app/lib/burner.tsx
index 9b791b8f6..456d24977 100644
--- a/ui/src/app/lib/burner.tsx
+++ b/ui/src/app/lib/burner.tsx
@@ -17,7 +17,8 @@ import { ArcadeConnector } from "./arcade";
import { useContracts } from "../hooks/useContracts";
import { BurnerStorage } from "../types";
-export const PREFUND_AMOUNT = "0x38D7EA4C68000"; // 0.001ETH
+export const ETH_PREFUND_AMOUNT = "0x38D7EA4C68000"; // 0.001ETH
+export const LORDS_PREFUND_AMOUNT = "0x0d8d726b7177a80000"; // 250LORDS
const provider = new Provider({
sequencer: {
@@ -124,6 +125,40 @@ export const useBurner = () => {
[walletAccount]
);
+ const prefundAccount = async (address: string, account: AccountInterface) => {
+ try {
+ const transferEthTx = {
+ contractAddress: process.env.NEXT_PUBLIC_ETH_CONTRACT_ADDRESS!,
+ entrypoint: "transfer",
+ calldata: CallData.compile([address, ETH_PREFUND_AMOUNT, "0x0"]),
+ };
+
+ const transferLordsTx = {
+ contractAddress: lordsContract?.address ?? "0x0",
+ entrypoint: "transfer",
+ calldata: CallData.compile([address, LORDS_PREFUND_AMOUNT, "0x0"]),
+ };
+
+ const { transaction_hash } = await account.execute([
+ transferEthTx,
+ transferLordsTx,
+ ]);
+
+ const result = await account.waitForTransaction(transaction_hash, {
+ retryInterval: 2000,
+ });
+
+ if (!result) {
+ throw new Error("Transaction did not complete successfully.");
+ }
+
+ return result;
+ } catch (error) {
+ console.error(error);
+ throw error;
+ }
+ };
+
const create = useCallback(async () => {
setIsDeploying(true);
const privateKey = stark.randomAddress();
@@ -168,12 +203,12 @@ export const useBurner = () => {
setIsSettingPermissions(true);
- const setPermissionsTx = await setPermissions(
+ const setPermissionsAndApprovalTx = await setPermissionsAndApproval(
accountAAFinalAdress,
walletAccount
);
- await provider.waitForTransaction(setPermissionsTx);
+ await provider.waitForTransaction(setPermissionsAndApprovalTx);
// save burner
let storage = Storage.get("burners") || {};
@@ -185,7 +220,7 @@ export const useBurner = () => {
privateKey,
publicKey,
deployTx,
- setPermissionsTx,
+ setPermissionsAndApprovalTx,
masterAccount: walletAccount.address,
gameContract: gameContract?.address,
active: true,
@@ -200,7 +235,7 @@ export const useBurner = () => {
return burner;
}, [walletAccount]);
- const setPermissions = useCallback(
+ const setPermissionsAndApproval = useCallback(
async (accountAAFinalAdress: any, walletAccount: any) => {
const permissions: Call[] = [
{
@@ -226,9 +261,16 @@ export const useBurner = () => {
},
];
- const { transaction_hash: permissionsTx } = await walletAccount.execute(
- permissions
- );
+ // Approve 250 LORDS
+ const approveLordsSpendingTx = {
+ contractAddress: lordsContract?.address ?? "",
+ entrypoint: "approve",
+ calldata: [gameContract?.address ?? "", LORDS_PREFUND_AMOUNT, "0"],
+ };
+ const { transaction_hash: permissionsTx } = await walletAccount.execute([
+ ...permissions,
+ approveLordsSpendingTx,
+ ]);
return permissionsTx;
},
@@ -241,12 +283,11 @@ export const useBurner = () => {
const { transaction_hash } = await account.execute({
contractAddress: process.env.NEXT_PUBLIC_ETH_CONTRACT_ADDRESS!,
entrypoint: "transfer",
- calldata: CallData.compile([address, PREFUND_AMOUNT, "0x0"]),
+ calldata: CallData.compile([address, ETH_PREFUND_AMOUNT, "0x0"]),
});
const result = await account.waitForTransaction(transaction_hash, {
- retryInterval: 1000,
- successStates: [TransactionFinalityStatus.ACCEPTED_ON_L2],
+ retryInterval: 2000,
});
if (!result) {
@@ -308,8 +349,7 @@ export const useBurner = () => {
});
const result = await account.waitForTransaction(transaction_hash, {
- retryInterval: 1000,
- successStates: [TransactionFinalityStatus.ACCEPTED_ON_L2],
+ retryInterval: 2000,
});
if (!result) {
@@ -409,27 +449,3 @@ export const useBurner = () => {
listConnectors,
};
};
-
-const prefundAccount = async (address: string, account: AccountInterface) => {
- try {
- const { transaction_hash } = await account.execute({
- contractAddress: process.env.NEXT_PUBLIC_ETH_CONTRACT_ADDRESS!,
- entrypoint: "transfer",
- calldata: CallData.compile([address, PREFUND_AMOUNT, "0x0"]),
- });
-
- const result = await account.waitForTransaction(transaction_hash, {
- retryInterval: 1000,
- successStates: [TransactionFinalityStatus.ACCEPTED_ON_L2],
- });
-
- if (!result) {
- throw new Error("Transaction did not complete successfully.");
- }
-
- return result;
- } catch (error) {
- console.error(error);
- throw error;
- }
-};
diff --git a/ui/src/app/lib/constants.ts b/ui/src/app/lib/constants.ts
index a1eccd568..59ca538f7 100644
--- a/ui/src/app/lib/constants.ts
+++ b/ui/src/app/lib/constants.ts
@@ -27,13 +27,11 @@ export function getGraphQLUrl() {
export const contracts = {
mainnet: {
game: "0x0",
- lords_erc20_mintable:
- "0x067e87cea28bfd9314a1d3c41fb26a58ca1346ff0ea2452e59b9eeb2828692dc",
+ lords: "0x067e87cea28bfd9314a1d3c41fb26a58ca1346ff0ea2452e59b9eeb2828692dc",
},
goerli: {
game: "0x01263ecbc05e28d1e99f531894838db10b90cfcdd39d020642da1747a733a37a",
- lords_erc20_mintable:
- "0x059dac5df32cbce17b081399e97d90be5fba726f97f00638f838613d088e5a47",
+ lords: "0x02a4174abc7c953030401679bde67e560b9e2724d5d71ffbaa488965dd36137a",
},
};