diff --git a/.changeset/yellow-garlics-judge.md b/.changeset/yellow-garlics-judge.md new file mode 100644 index 000000000..f9c94f683 --- /dev/null +++ b/.changeset/yellow-garlics-judge.md @@ -0,0 +1,5 @@ +--- +"@dojoengine/core": patch +--- + +feat(core): improve provider and internalize calldata compiler diff --git a/packages/core/src/_test_/DojoProvider.test.ts b/packages/core/src/_test_/DojoProvider.test.ts new file mode 100644 index 000000000..06403a05c --- /dev/null +++ b/packages/core/src/_test_/DojoProvider.test.ts @@ -0,0 +1,206 @@ +import { describe, expect, it, mock, beforeEach } from "bun:test"; +import * as starknet from "starknet"; + +mock.module("starknet", () => ({ + ...starknet, + RpcProvider: mock(() => ({ + callContract: mock(() => Promise.resolve(["0x1"])), + })), + Contract: mock(() => ({ + call: mock(() => Promise.resolve({ result: "0x1" })), + })), +})); + +import { DojoProvider } from "../provider/DojoProvider"; + +const createMockManifest = () => ({ + world: { + address: "0x123", + abi: [ + { + type: "interface", + name: "dojo::world::IWorld", + items: [], + }, + ], + }, + contracts: [ + { + address: "0x456", + tag: "pistols-game", + systems: ["commit_moves", "reveal_moves"], + abi: [ + { + type: "interface", + name: "pistols::systems::game::IGame", + items: [ + { + type: "function", + name: "commit_moves", + state_mutability: "external", + inputs: [ + { name: "duelist_id", type: "felt252" }, + { name: "duel_id", type: "felt252" }, + { name: "hashed", type: "felt252" }, + ], + outputs: [], + }, + { + type: "function", + name: "reveal_moves", + state_mutability: "external", + inputs: [{ name: "duel_id", type: "felt252" }], + outputs: [], + }, + ], + }, + ], + }, + { + address: "0x789", + tag: "pistols-bot_player", + systems: ["commit_moves", "reply_duel"], + abi: [ + { + type: "interface", + name: "pistols::systems::bot_player::IBotPlayerProtected", + items: [ + { + type: "function", + name: "commit_moves", + state_mutability: "external", + inputs: [{ name: "duel_id", type: "felt252" }], + outputs: [], + }, + { + type: "function", + name: "reply_duel", + state_mutability: "external", + inputs: [{ name: "duel_id", type: "felt252" }], + outputs: [], + }, + ], + }, + ], + }, + { + address: "0xabc", + tag: "pistols-admin", + systems: ["set_paused"], + abi: [ + { + type: "interface", + name: "pistols::systems::admin::IAdmin", + items: [ + { + type: "function", + name: "set_paused", + state_mutability: "external", + inputs: [{ name: "paused", type: "bool" }], + outputs: [], + }, + ], + }, + ], + }, + { + address: "0xdef", + tag: "pistols-viewer", + systems: ["get_status"], + abi: [ + { + type: "interface", + name: "pistols::systems::viewer::IViewer", + items: [ + { + type: "function", + name: "get_status", + state_mutability: "view", + inputs: [], + outputs: [{ type: "felt252" }], + }, + ], + }, + ], + }, + ], +}); + +describe("DojoProvider", () => { + let provider: DojoProvider; + + beforeEach(() => { + provider = new DojoProvider(createMockManifest()); + }); + + describe("initializeActionMethods", () => { + it("should create prefixed method names for duplicate functions", () => { + // commit_moves exists in both game and bot_player contracts + expect(provider).toHaveProperty("pistols_game_commit_moves"); + expect(provider).toHaveProperty("pistols_bot_player_commit_moves"); + + expect(typeof (provider as any).pistols_game_commit_moves).toBe( + "function" + ); + expect( + typeof (provider as any).pistols_bot_player_commit_moves + ).toBe("function"); + }); + + it("should keep simple names for unique functions", () => { + // set_paused only exists in admin contract + expect(provider).toHaveProperty("set_paused"); + expect(typeof (provider as any).set_paused).toBe("function"); + + // Should not have prefixed version + expect(provider).not.toHaveProperty("pistols_admin_set_paused"); + }); + + it("should not shadow duplicate function names", () => { + // Both prefixed versions should exist independently + const gameMethod = (provider as any).pistols_game_commit_moves; + const botMethod = (provider as any).pistols_bot_player_commit_moves; + + expect(gameMethod).toBeDefined(); + expect(botMethod).toBeDefined(); + expect(gameMethod).not.toBe(botMethod); + }); + + it("should not create unprefixed method when duplicates exist", () => { + // commit_moves is duplicated, so no unprefixed version should exist + expect(provider).not.toHaveProperty("commit_moves"); + }); + + it("should create methods for unique functions in each contract", () => { + expect(provider).toHaveProperty("reveal_moves"); + expect(provider).toHaveProperty("reply_duel"); + expect(provider).toHaveProperty("get_status"); + }); + }); + + describe("action method signatures", () => { + it("should throw error when account is missing for external methods", async () => { + const method = (provider as any).pistols_game_commit_moves; + + await expect(method()).rejects.toThrow( + 'Account is required for action "pistols_game_commit_moves"' + ); + }); + + it("should throw error when args are missing for methods with inputs", async () => { + const mockAccount = { execute: mock(() => {}) }; + const method = (provider as any).pistols_game_commit_moves; + + await expect(method(mockAccount)).rejects.toThrow( + 'Missing arguments for action "pistols_game_commit_moves"' + ); + }); + + it("should not require account for view methods", async () => { + const method = (provider as any).get_status; + + // Should not throw about account requirement + await expect(method()).resolves.toBeDefined(); + }); + }); +}); diff --git a/packages/core/src/_test_/compile.test.ts b/packages/core/src/_test_/compile.test.ts new file mode 100644 index 000000000..e4eeb270b --- /dev/null +++ b/packages/core/src/_test_/compile.test.ts @@ -0,0 +1,76 @@ +import { describe, expect, it } from "vitest"; +import { findFunctionAbiByNamespace } from "../utils/compile"; +import manifest from "./manifest_pistols_dev.json"; + +const abi = manifest.abis as any; + +describe("findFunctionAbiByNamespace", () => { + it("should find commit_moves in bot_player interface (1 input)", () => { + const func = findFunctionAbiByNamespace( + abi, + "pistols", + "bot_player", + "commit_moves" + ); + + expect(func).toBeDefined(); + expect(func?.name).toBe("commit_moves"); + expect(func?.inputs).toHaveLength(1); + expect(func?.inputs[0].name).toBe("duel_id"); + }); + + it("should find commit_moves in game interface (3 inputs)", () => { + const func = findFunctionAbiByNamespace( + abi, + "pistols", + "game", + "commit_moves" + ); + + expect(func).toBeDefined(); + expect(func?.name).toBe("commit_moves"); + expect(func?.inputs).toHaveLength(3); + expect(func?.inputs[0].name).toBe("duelist_id"); + expect(func?.inputs[1].name).toBe("duel_id"); + expect(func?.inputs[2].name).toBe("hashed"); + }); + + it("should find set_paused in admin interface", () => { + const func = findFunctionAbiByNamespace( + abi, + "pistols", + "admin", + "set_paused" + ); + + expect(func).toBeDefined(); + expect(func?.name).toBe("set_paused"); + expect(func?.inputs).toHaveLength(1); + expect(func?.inputs[0].name).toBe("paused"); + }); + + it("should fallback to dojo core interface for upgrade", () => { + const func = findFunctionAbiByNamespace( + abi, + "pistols", + "admin", + "upgrade" + ); + + expect(func).toBeDefined(); + expect(func?.name).toBe("upgrade"); + expect(func?.inputs).toHaveLength(1); + expect(func?.inputs[0].name).toBe("new_class_hash"); + }); + + it("should return undefined for nonexistent function", () => { + const func = findFunctionAbiByNamespace( + abi, + "pistols", + "admin", + "nonexistent_function" + ); + + expect(func).toBeUndefined(); + }); +}); diff --git a/packages/core/src/_test_/manifest_pistols_dev.json b/packages/core/src/_test_/manifest_pistols_dev.json new file mode 100644 index 000000000..f0551b4fc --- /dev/null +++ b/packages/core/src/_test_/manifest_pistols_dev.json @@ -0,0 +1,11441 @@ +{ + "world": { + "class_hash": "0x613551abceb2b37073b1149bb862ea70cf029981ce1ca47e9dd7c7ab97cb65d", + "address": "0xb8d2b85a77394f9980a502e1d9f86a4b9219c9065044bd044a59a8f84f1393", + "seed": "pistols", + "name": "Pistols at Dawn", + "entrypoints": [ + "uuid", + "set_metadata", + "register_namespace", + "register_event", + "register_model", + "register_contract", + "register_external_contract", + "register_library", + "init_contract", + "upgrade_event", + "upgrade_model", + "upgrade_contract", + "upgrade_external_contract", + "emit_event", + "emit_events", + "set_entity", + "set_entities", + "delete_entity", + "delete_entities", + "grant_owner", + "revoke_owner", + "grant_writer", + "revoke_writer", + "upgrade" + ] + }, + "contracts": [ + { + "address": "0x418de2fce09df8844b29014821c9cb10d0724071f5c81841078d667162a1519", + "class_hash": "0x26983ce30205654f987cd81e0688d6e56b426da491020a7c42004c7a36f5247", + "init_calldata": ["0x0", "0x0", "0x0"], + "tag": "pistols-admin", + "selector": "0x36fd20372b5d47c092e2fede52897075978efb732aeaeb155d19eb8147f6497", + "systems": [ + "dojo_init", + "set_paused", + "set_treasury", + "set_realms_address", + "set_is_team_member", + "set_is_blocked", + "disqualify_duelist", + "qualify_duelist", + "urgent_update", + "emit_past_season_leaderboard_event", + "upgrade" + ] + }, + { + "address": "0x5e86edcb0371b80f1545a29a7af5a8c1481ebcf0e0b9cbe27f4b773adad166d", + "class_hash": "0x4cbcd95b19ba6d04286e7ad9ac904374658b3d2f559656f77a89396b8dc7e60", + "init_calldata": [], + "tag": "pistols-bank", + "selector": "0x7a683ab68bc70300995da8de5781002e781f22ba246fe239ebeff02b2230375", + "systems": [ + "sponsor_duelists", + "sponsor_season", + "sponsor_tournament", + "collect_season", + "charge_lords_purchase", + "peg_minted_fame_to_lords", + "depeg_lords_from_fame_to_be_burned", + "transfer_lords", + "burn_fame", + "upgrade" + ] + }, + { + "address": "0x3bc25128f4c9ee8c17bcbeeadf6669a1e880dea5a91f77646bd6cb5c4ceadd8", + "class_hash": "0x30485edb4423c61c7012b279af7a4ac1b787a95d3e7720b19b7ed302032116d", + "init_calldata": [], + "tag": "pistols-bot_player", + "selector": "0x22366a4c25ee7406d1d3bd13fab733b310945461fda8a7c721412ac7c01de53", + "systems": [ + "reveal_moves", + "reply_duel", + "commit_moves", + "summon_bot_duelist", + "transfer_to_winner", + "upgrade" + ] + }, + { + "address": "0x57f460a66af0fdea6ed830402cc38d6bdadd033e1535cfdc57c4404573e71e0", + "class_hash": "0x7feb706b40dba82cc3dee3693ceec36f6372a9eae9b4ab60e975e61010a684", + "init_calldata": [], + "tag": "pistols-community", + "selector": "0x7348885054faf5239115b952a0812295ca08f3be01216dd6c03a9fcc22d1dba", + "systems": [ + "delegate_game_actions", + "clear_call_to_challenge", + "clear_player_social_link", + "emit_player_social_link", + "emit_player_setting", + "emit_player_bookmark", + "do_that_thing", + "set_current_quiz", + "create_quiz_party", + "edit_quiz_party", + "close_quiz_party", + "create_quiz_question", + "open_quiz_question", + "close_quiz_question", + "answer_quiz_question", + "upgrade" + ] + }, + { + "address": "0xd706eaffd0ab2ffbe7bd92be2df71de1aa8eb6521b472ede49183772372deb", + "class_hash": "0x2ef8134e8c74e3506188432a83bd8f62fb2973f4ed21904df07ea37351dc37e", + "init_calldata": ["sstr:https://assets.underware.gg", "0x0"], + "tag": "pistols-duel_token", + "selector": "0x670a5c673ac776e00e61c279cf7dc0efbe282787f4d719498e55643c5116063", + "systems": [ + "dojo_init", + "create_duel", + "reply_duel", + "create_match", + "start_match", + "transfer_to_winner", + "wipe_duel", + "upgrade", + "safe_transfer_from", + "transfer_from", + "approve", + "set_approval_for_all", + "safeTransferFrom", + "transferFrom", + "setApprovalForAll", + "update_contract_metadata", + "update_token_metadata", + "update_tokens_metadata" + ] + }, + { + "address": "0x7e538c2667e36b602bb50b4ac7fa966224907d8c63ee8df4c7880c8909bc48a", + "class_hash": "0x2c645f3cfe4224f3e3c2df4b5f14b05ddc1ce3a3011b0da92af021cc7568ae2", + "init_calldata": ["sstr:https://assets.underware.gg"], + "tag": "pistols-duelist_token", + "selector": "0x45c96d20393520c5dffeb2f2929fb599034d4fc6e9d423e6a641222fb60a25e", + "systems": [ + "dojo_init", + "sacrifice", + "memorialize", + "mint_duelists", + "get_validated_active_duelist_id", + "depeg_fame_to_season_pool", + "memorialize_duelists", + "transfer_rewards", + "upgrade", + "safe_transfer_from", + "transfer_from", + "approve", + "set_approval_for_all", + "safeTransferFrom", + "transferFrom", + "setApprovalForAll", + "update_contract_metadata", + "update_token_metadata", + "update_tokens_metadata" + ] + }, + { + "address": "0x2af2b22b59f9d23595b40ea87c84ad7c1b55b52a23f0c3c40272351bfee64e6", + "class_hash": "0x665c8ef65a3f486cbcf9f1582ea96f009983f70c6f08823cd55db340ab2033b", + "init_calldata": [], + "tag": "pistols-fame_coin", + "selector": "0x371b95cb7056eb2d21819662e973ed32c345c989aa9f6097e7811a5665a0b0a", + "systems": [ + "dojo_init", + "minted_duelist", + "reward_duelist_fame", + "burn", + "upgrade", + "transfer", + "transfer_from", + "approve", + "transferFrom", + "transfer_from_token", + "transfer_from_token_to_token", + "burn_from_token" + ] + }, + { + "address": "0xd3af90aa027ca87122cd4a59089093423715c35401c6ee165e4c2533f04d5a", + "class_hash": "0x100704ea06d803d31fb48aee85266359a37a2b9557d7d6f0815b9d04bd7a0a2", + "init_calldata": [], + "tag": "pistols-fools_coin", + "selector": "0x58070034702ab2b03c2911459d7299e63048e70e3d41f77e1d806b4cb8f2dcd", + "systems": [ + "dojo_init", + "reward_player_fools", + "upgrade", + "transfer", + "transfer_from", + "approve", + "transferFrom" + ] + }, + { + "address": "0x15696a0896178bba972ef27c8d1ed5299eea2493b2f6566f6421bba4f4d5aaa", + "class_hash": "0x5ad41e702147707834c1c3e9760a94c9304997b61f64f2ebc592e300f538366", + "init_calldata": [], + "tag": "pistols-game", + "selector": "0x32c102830cbffaddecbdce7ef85735e6f08da08ee762a2d7b09304b6533dd57", + "systems": [ + "dojo_init", + "commit_moves", + "reveal_moves", + "collect_duel", + "upgrade" + ] + }, + { + "address": "0x4d0faaf858ca3cf60c1cffbbe67caa1b96665400bdbf0767f0aa881fd4c9521", + "class_hash": "0x793a7520b8c7c7f5ef7008c4169b9850cf1c3ec668f84791feacd153e035372", + "init_calldata": [], + "tag": "pistols-game_loop", + "selector": "0x1bf3dd2b828d461e19dc794352723ae8d8a1760c61b936a916cf3b4de8d5b9f", + "systems": ["upgrade"] + }, + { + "address": "0x111c6000ea3c7687e0681b21014ee6b01379beaba4475636fdf07fd09ed3e34", + "class_hash": "0x662859db8dbb42c5358b7bec2fd8d63766de3d654a5a3f23138bd9d345b6490", + "init_calldata": ["0x0", "10000000000000000000000"], + "tag": "pistols-lords_mock", + "selector": "0x2b1156e63a09854c3d8dba0cad93b41e1fc4662466a0ffc2a9ec9e54b4bc788", + "systems": [ + "dojo_init", + "faucet", + "mint", + "upgrade", + "transfer", + "transfer_from", + "approve", + "transferFrom" + ] + }, + { + "address": "0x66601c6722fc5cb70cf0b6380165e92085baa4fea0a8018f18f03345da17f52", + "class_hash": "0x1c051f67c1b08789d339d7807b8f19ee17699df8f0397aba223770180bbfaf5", + "init_calldata": [], + "tag": "pistols-matchmaker", + "selector": "0x5b2844d155e3c1b34dbddfa9a4d321e431b76826510f51dab224efecc822072", + "systems": [ + "dojo_init", + "enlist_duelist", + "match_make_me", + "set_queue_size", + "set_queue_entry_token", + "close_season", + "clear_queue", + "clear_player_queue", + "upgrade" + ] + }, + { + "address": "0x1ce5b11cd6cd3ebd3939f10e99835563dfb23f1c19980a4453fb034c294b079", + "class_hash": "0x518f94c15d8367f0f4b2c50e4495fdb0e9f5bca0dfa5a764ad7c55cf82ae472", + "init_calldata": ["sstr:https://assets.underware.gg"], + "tag": "pistols-pack_token", + "selector": "0x3d74e76192285c5a19a63c54a6c2ba5b015a1a25818c2d8f9cf75d7fef2b5c1", + "systems": [ + "dojo_init", + "claim_starter_pack", + "claim_gift", + "purchase", + "purchase_random", + "open", + "mint_to", + "airdrop", + "mint_bot_duelist", + "upgrade", + "safe_transfer_from", + "transfer_from", + "approve", + "set_approval_for_all", + "safeTransferFrom", + "transferFrom", + "setApprovalForAll", + "update_contract_metadata", + "update_token_metadata", + "update_tokens_metadata" + ] + }, + { + "address": "0x7b300fd96bce5edf1c17b0b1b3d6c6d4cc0fee9153d0b834a25681d4b486a45", + "class_hash": "0x1686da7180b4d55ff5a5d60e2f81cfd6c534854d14b180f3adb9e1bfff721ba", + "init_calldata": ["sstr:https://assets.underware.gg"], + "tag": "pistols-ring_token", + "selector": "0x2fc4959e710a2d442c974fa22583221e95567dc973fc5bf618c9ceb283aa88b", + "systems": [ + "dojo_init", + "claim_season_ring", + "airdrop_ring", + "upgrade", + "safe_transfer_from", + "transfer_from", + "approve", + "set_approval_for_all", + "safeTransferFrom", + "transferFrom", + "setApprovalForAll", + "update_contract_metadata", + "update_token_metadata", + "update_tokens_metadata" + ] + }, + { + "address": "0x63589314beda94e52494e02b29cfbf4f7a95a8c4e1a0db6c6c26c0bea4ae368", + "class_hash": "0x4de8026056381d8911f066f1430f1319d790d6092f3545f998f6a70b61f2ff9", + "init_calldata": [], + "tag": "pistols-rng", + "selector": "0x13f1a6a9ae118440a997d6624230b59f43516220a1208526c3f66e202910504", + "systems": ["upgrade"] + }, + { + "address": "0x7a902422d658db5d7b496bbeb73f7c68571cd3636116b9ca92821fd7484a4f7", + "class_hash": "0x13b9b5da998a77ff56b07d139d37f7322bcdb87510e00547ffd92d45e5ea230", + "init_calldata": [], + "tag": "pistols-rng_mock", + "selector": "0xfbd28ccd9cffb9b1783a0bf7cdf42a9b88c49d4568116cd1f7ee70ba415705", + "systems": ["mock_values", "upgrade"] + }, + { + "address": "0x3802edc8df14e4e0fb81238107f4d8d9b55a1eea0cc79dcc46068d11fe636d8", + "class_hash": "0x20cb52e6d63e4bb3aa1ea045b2b2263c07a4af5a88b8561f674742c09d27565", + "init_calldata": [], + "tag": "pistols-tutorial", + "selector": "0x32f1e04dc2117bb6f46da72734a3910bcaca0e887025d5b1126fd804c256d24", + "systems": [ + "dojo_init", + "create_tutorial", + "commit_moves", + "reveal_moves", + "upgrade" + ] + }, + { + "address": "0x38ab85ae8d1f0deff5ac3e09bce28fd32e16ddd497fcf8353d1e2c0f2e58876", + "class_hash": "0x29a5eba0358fc4612bfb70aa9b3b8835a74ccd5151b4a644ee544ab602bd01d", + "init_calldata": [], + "tag": "pistols-vrf_mock", + "selector": "0x7d13bd4624d7bc31b13c78648f762d0b293e1ca94e19173659859209082629e", + "systems": ["consume_random", "upgrade"] + } + ], + "libraries": [], + "models": [ + { + "members": [ + { + "name": "duel_id", + "type": "core::integer::u128", + "key": true + }, + { + "name": "duel_type", + "type": "pistols::models::challenge::DuelType", + "key": false + }, + { + "name": "premise", + "type": "pistols::types::premise::Premise", + "key": false + }, + { + "name": "lives_staked", + "type": "core::integer::u8", + "key": false + }, + { + "name": "address_a", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + }, + { + "name": "address_b", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + }, + { + "name": "duelist_id_a", + "type": "core::integer::u128", + "key": false + }, + { + "name": "duelist_id_b", + "type": "core::integer::u128", + "key": false + }, + { + "name": "state", + "type": "pistols::types::challenge_state::ChallengeState", + "key": false + }, + { + "name": "season_id", + "type": "core::integer::u32", + "key": false + }, + { + "name": "winner", + "type": "core::integer::u8", + "key": false + }, + { + "name": "timestamps", + "type": "pistols::types::timestamp::Period", + "key": false + } + ], + "class_hash": "0x4aaaa538918046140ba60de6006f2947618d9ded2970741e38cb6ec9c781118", + "tag": "pistols-Challenge", + "selector": "0x673267b69d74c703ea86d97b041278944b49f62b52867345a95d3047b11378a" + }, + { + "members": [ + { + "name": "duel_id", + "type": "core::integer::u128", + "key": true + }, + { + "name": "message", + "type": "core::byte_array::ByteArray", + "key": false + } + ], + "class_hash": "0x1c32513e056fea55ee34172b8728ec1732e19fee0109bccbfd89833e8197521", + "tag": "pistols-ChallengeMessage", + "selector": "0x1718653e9a900d7f6a3c59a2c98b6704b9b8e580674c9395bf9b6c0be098e27" + }, + { + "members": [ + { + "name": "coin_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "minter_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + }, + { + "name": "faucet_amount", + "type": "core::integer::u128", + "key": false + } + ], + "class_hash": "0x6ecb5acc40a7f1f9bb8a0a9a88b47193fe011588fc0bc4861a65cd13af1a1b4", + "tag": "pistols-CoinConfig", + "selector": "0x26fad4dff063a4f2c3b3889723194b9bdbbbf833e44ff2d573af01741b966ac" + }, + { + "members": [ + { + "name": "key", + "type": "core::integer::u8", + "key": true + }, + { + "name": "treasury_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + }, + { + "name": "lords_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + }, + { + "name": "vrf_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + }, + { + "name": "current_season_id", + "type": "core::integer::u32", + "key": false + }, + { + "name": "is_paused", + "type": "core::bool", + "key": false + }, + { + "name": "realms_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + } + ], + "class_hash": "0x6b513472b5e33c2a33ebeae8cc9d3b2d0340bb01204d969ebaf7003fd4afc24", + "tag": "pistols-Config", + "selector": "0x60742fa7259b7ce3ebc0a2dde90b740d1234c770199a822fa2e7cf779dc0392" + }, + { + "members": [ + { + "name": "duelist_id", + "type": "core::integer::u128", + "key": true + }, + { + "name": "duelist_profile", + "type": "pistols::types::duelist_profile::DuelistProfile", + "key": false + }, + { + "name": "timestamps", + "type": "pistols::models::duelist::DuelistTimestamps", + "key": false + }, + { + "name": "totals", + "type": "pistols::models::duelist::Totals", + "key": false + }, + { + "name": "released_fame", + "type": "core::bool", + "key": false + } + ], + "class_hash": "0x2de8c795fd7a229ae70068af24fcbc63127f6461f6882ab9bc80b328db18e51", + "tag": "pistols-Duelist", + "selector": "0x1ec34ce9ccaa39b540179d85e0dd0d46c1c1ae712f4cb40a9cd7f8c21ebaa46" + }, + { + "members": [ + { + "name": "duelist_id", + "type": "core::integer::u128", + "key": true + }, + { + "name": "duel_id", + "type": "core::integer::u128", + "key": false + }, + { + "name": "pass_id", + "type": "core::integer::u64", + "key": false + }, + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId", + "key": false + }, + { + "name": "season_id", + "type": "core::integer::u32", + "key": false + } + ], + "class_hash": "0x7f5d63664f0d6a60cb0b1eda07a3f5dcc61bcfa2c93f60860f9c21ff3bcad67", + "tag": "pistols-DuelistAssignment", + "selector": "0x3f4e86c5f78bd99b4030bb44259374c178e3c03f664ce866d15e4ddcd7d4e52" + }, + { + "members": [ + { + "name": "duelist_id", + "type": "core::integer::u128", + "key": true + }, + { + "name": "cause_of_death", + "type": "pistols::models::duelist::CauseOfDeath", + "key": false + }, + { + "name": "killed_by", + "type": "core::integer::u128", + "key": false + }, + { + "name": "fame_before_death", + "type": "core::integer::u128", + "key": false + }, + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + }, + { + "name": "season_id", + "type": "core::integer::u32", + "key": false + } + ], + "class_hash": "0x4592788ab2e93516ad96e79854fff01dc3b38d90dc040447d336cb302a7ce4e", + "tag": "pistols-DuelistMemorial", + "selector": "0x399b9689c37bf440c4f0478f361f68bd59161d01a096160d3ceaeae53b67b71" + }, + { + "members": [ + { + "name": "season_id", + "type": "core::integer::u32", + "key": true + }, + { + "name": "positions", + "type": "core::integer::u8", + "key": false + }, + { + "name": "duelist_ids", + "type": "core::felt252", + "key": false + }, + { + "name": "scores", + "type": "core::felt252", + "key": false + } + ], + "class_hash": "0x4520d140cefa1c09340f20d5741cfa9ca091d2b9aff56beeab30b49bc0dce03", + "tag": "pistols-Leaderboard", + "selector": "0x39835217fd4998f6024a6ae92f98bd185d158168f92b4363a47f73e5e1073ae" + }, + { + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId", + "key": true + }, + { + "name": "queue_info", + "type": "pistols::models::match_queue::QueueInfo", + "key": false + }, + { + "name": "duelist_id", + "type": "core::integer::u128", + "key": false + }, + { + "name": "duel_id", + "type": "core::integer::u128", + "key": false + }, + { + "name": "next_duelists", + "type": "core::array::Array::", + "key": false + } + ], + "class_hash": "0x39cf9c51b283cbc2a5f84f771887c297c786adf3ebb0633d47db056a957f98c", + "tag": "pistols-MatchPlayer", + "selector": "0x36cbfae32f102062669ab4daf04b39bf84c9ae8e26e7f0813a9728fe3c11558" + }, + { + "members": [ + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId", + "key": true + }, + { + "name": "players", + "type": "core::array::Array::", + "key": false + }, + { + "name": "slot_size", + "type": "core::integer::u8", + "key": false + }, + { + "name": "entry_token_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + }, + { + "name": "entry_token_amount", + "type": "core::integer::u128", + "key": false + }, + { + "name": "enlisted_duelist_ids", + "type": "core::array::Array::", + "key": false + } + ], + "class_hash": "0x71600a864b1d4cb33bf8a9a2fd7d853ecb39f857df839a3aedc0a8b561b92da", + "tag": "pistols-MatchQueue", + "selector": "0x624ecb978d73d21798831974104ecd70c0013d09e9a440db4a7a8bd066cd7fc" + }, + { + "members": [ + { + "name": "salt", + "type": "core::felt252", + "key": true + }, + { + "name": "value", + "type": "core::felt252", + "key": false + }, + { + "name": "exists", + "type": "core::bool", + "key": false + } + ], + "class_hash": "0x4975ef72313f3186c199dd633eba5aef1448885e6367e6435d4872201f59584", + "tag": "pistols-MockedValue", + "selector": "0x8deb0b9e5cc0c6c2089ee6a4bfdd306444147a869b6179c4e22b283a5176dc" + }, + { + "members": [ + { + "name": "pack_id", + "type": "core::integer::u128", + "key": true + }, + { + "name": "pack_type", + "type": "pistols::models::pack::PackType", + "key": false + }, + { + "name": "seed", + "type": "core::felt252", + "key": false + }, + { + "name": "lords_amount", + "type": "core::integer::u128", + "key": false + }, + { + "name": "is_open", + "type": "core::bool", + "key": false + }, + { + "name": "duelist_profile", + "type": "core::option::Option::", + "key": false + }, + { + "name": "pegged_lords_amount", + "type": "core::integer::u128", + "key": false + } + ], + "class_hash": "0x72fc9c7048f9c410b7a0f28910f0ffeb07043c776e6a4ad62fff12fb251e804", + "tag": "pistols-Pack", + "selector": "0x64159b4947adcdc7a87b41f7889ba33495ac8e3a3a333305c7712806763fa2d" + }, + { + "members": [ + { + "name": "duel_type", + "type": "pistols::models::challenge::DuelType", + "key": true + }, + { + "name": "pair", + "type": "core::integer::u128", + "key": true + }, + { + "name": "duel_id", + "type": "core::integer::u128", + "key": false + }, + { + "name": "duel_count", + "type": "core::integer::u32", + "key": false + } + ], + "class_hash": "0x6b48caf131caff1cca2d3883fcd5772dcb6ed353dbde149e4dc27b98dec5a68", + "tag": "pistols-Pact", + "selector": "0x72a33a6586ae24471fdae1c6f3cc9da6629f3fd3dce300a48324617dd511617" + }, + { + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "timestamps", + "type": "pistols::models::player::PlayerTimestamps", + "key": false + }, + { + "name": "totals", + "type": "pistols::models::duelist::Totals", + "key": false + }, + { + "name": "alive_duelist_count", + "type": "core::integer::u16", + "key": false + }, + { + "name": "active_signet_ring", + "type": "pistols::models::ring::RingType", + "key": false + }, + { + "name": "referrer_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + } + ], + "class_hash": "0x3cd8d3c93211f68f276c6557a7d5d542ef9ea887e2bd789d1896d4165ca3119", + "tag": "pistols-Player", + "selector": "0x4fc7ed2304172cd24d40e2b967bf3642228eec13547b09e0ffdfb85469f6f86" + }, + { + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "delegatee_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "can_play_game", + "type": "core::bool", + "key": false + } + ], + "class_hash": "0x5de62830b2b6a7ec6effd0859a3c8a6feb0865a6b47e9cd7c93560840bd205a", + "tag": "pistols-PlayerDelegation", + "selector": "0x54aec2977788969f3222b10eb58bb6560e6b364483932a454b8f95b7bcb5f8e" + }, + { + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "duelist_profile", + "type": "pistols::types::duelist_profile::DuelistProfile", + "key": true + }, + { + "name": "active_duelist_id", + "type": "core::integer::u128", + "key": false + }, + { + "name": "level", + "type": "core::integer::u8", + "key": false + }, + { + "name": "stacked_ids", + "type": "core::array::Array::", + "key": false + } + ], + "class_hash": "0x2ffe4fa100579d1818675d963f651614f106c49536eccd8c34e5241cfeee68e", + "tag": "pistols-PlayerDuelistStack", + "selector": "0xb47a4ea3849ae004ed3d0ba58070c0eb3cdca2bed8c9a6ab6bfe01210effc6" + }, + { + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "is_blocked", + "type": "core::bool", + "key": false + } + ], + "class_hash": "0x5bbd1b778fc8b1806159688ab360e54900d72c57d4156efccc2641ddf60cf6d", + "tag": "pistols-PlayerFlags", + "selector": "0x14dddd7c3b64adcbff56d72f482cf837ee1c24c81f28fe6edc10654b0b2c6ac" + }, + { + "members": [ + { + "name": "identity", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "timestamp", + "type": "core::integer::u64", + "key": false + }, + { + "name": "available", + "type": "core::bool", + "key": false + } + ], + "class_hash": "0x59fab2756d45c978701274ed992fd287a757dc3c1fede8b5f9ad9d2d39d1699", + "tag": "pistols-PlayerOnline", + "selector": "0x6f3391bc3684ea92009be25543fc6cc734c1f756253523354efdf10e2a57dff" + }, + { + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "is_team_member", + "type": "core::bool", + "key": false + }, + { + "name": "is_admin", + "type": "core::bool", + "key": false + } + ], + "class_hash": "0x686440c25a15e4b7c6987593da20fffbed592509e16f9deec2aae6a3610ae24", + "tag": "pistols-PlayerTeamFlags", + "selector": "0x2489d18f02fac0971dd8e249bfa97f8b28d3d5527bc9db1517bb411abd07151" + }, + { + "members": [ + { + "name": "pool_id", + "type": "pistols::models::pool::PoolType", + "key": true + }, + { + "name": "balance_lords", + "type": "core::integer::u128", + "key": false + }, + { + "name": "balance_fame", + "type": "core::integer::u128", + "key": false + } + ], + "class_hash": "0x6d5257ce5d47f2f0b7154a9827df6a74c7c8bc85aeebcdda158e98b6112427d", + "tag": "pistols-Pool", + "selector": "0xb4328e5f120dfe361a8f367e6ea51e2be55dbc6b1c9f2c17a87b7d06ab8972" + }, + { + "members": [ + { + "name": "party_id", + "type": "core::integer::u32", + "key": true + }, + { + "name": "question_id", + "type": "core::integer::u32", + "key": true + }, + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "answer_number", + "type": "core::integer::u8", + "key": false + }, + { + "name": "timestamp", + "type": "core::integer::u64", + "key": false + } + ], + "class_hash": "0x1c45a5783214260cded360f17a414cd6cba9792cafca874c8dd6d3948a46947", + "tag": "pistols-QuizAnswer", + "selector": "0x34298bd13a175838ea39852125ebda8df8e1ae0defd164a280a4ebd271cd2ec" + }, + { + "members": [ + { + "name": "key", + "type": "core::integer::u8", + "key": true + }, + { + "name": "current_party_id", + "type": "core::integer::u32", + "key": false + }, + { + "name": "current_question_id", + "type": "core::integer::u32", + "key": false + }, + { + "name": "quiz_party_count", + "type": "core::integer::u32", + "key": false + } + ], + "class_hash": "0x4d64dc7eebc42610cf3f97cc83b77b202b939ef317b06e168e9fc17c8013b0a", + "tag": "pistols-QuizConfig", + "selector": "0x3ae0b12918a81099df3d3a82fcdfbe51a8b179c7075735e9f207e3ee2774e25" + }, + { + "members": [ + { + "name": "party_id", + "type": "core::integer::u32", + "key": true + }, + { + "name": "name", + "type": "core::byte_array::ByteArray", + "key": false + }, + { + "name": "description", + "type": "core::byte_array::ByteArray", + "key": false + }, + { + "name": "timestamps", + "type": "pistols::types::timestamp::Period", + "key": false + }, + { + "name": "quiz_question_count", + "type": "core::integer::u32", + "key": false + } + ], + "class_hash": "0x24f9a6ddb53b5b61ee610cae0bd8adcba8fca6c7348aa9e838c581c1abbc4c", + "tag": "pistols-QuizParty", + "selector": "0x4329facb3d0bde4b58b6403a2100dee581e5cf81c8368f64eb93fdf7c9d2236" + }, + { + "members": [ + { + "name": "party_id", + "type": "core::integer::u32", + "key": true + }, + { + "name": "question_id", + "type": "core::integer::u32", + "key": true + }, + { + "name": "question", + "type": "core::byte_array::ByteArray", + "key": false + }, + { + "name": "description", + "type": "core::byte_array::ByteArray", + "key": false + }, + { + "name": "options", + "type": "core::array::Array::", + "key": false + }, + { + "name": "timestamps", + "type": "pistols::types::timestamp::Period", + "key": false + }, + { + "name": "answer_number", + "type": "core::integer::u8", + "key": false + }, + { + "name": "vrf", + "type": "core::felt252", + "key": false + }, + { + "name": "hint", + "type": "core::byte_array::ByteArray", + "key": false + } + ], + "class_hash": "0x35319e279d0e9c95555b258436f070299dd112a88fd39a60a98ff85cb352d93", + "tag": "pistols-QuizQuestion", + "selector": "0x8bc324c97c68995ba6d970f9c4ee775a533f8c0f41b8676fb8850e20dc4ccb" + }, + { + "members": [ + { + "name": "ring_id", + "type": "core::integer::u128", + "key": true + }, + { + "name": "ring_type", + "type": "pistols::models::ring::RingType", + "key": false + }, + { + "name": "claimed_by", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + } + ], + "class_hash": "0x4b29c61f096a0811691d3e479fb663f83e2aa8ddedb8463810168d6ca90337d", + "tag": "pistols-Ring", + "selector": "0x34351c549b6e63b6b7342e3ea8e75c28c5ec360414805eab776b75a979bacc9" + }, + { + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "ring_type", + "type": "pistols::models::ring::RingType", + "key": true + }, + { + "name": "claimed", + "type": "core::bool", + "key": false + }, + { + "name": "balance", + "type": "core::integer::u128", + "key": false + } + ], + "class_hash": "0x2fed1d4dbbf1ab14bd6cd1577b87b7977e151960d12d0707954a31ea516e6ba", + "tag": "pistols-RingBalance", + "selector": "0x771214858afa98884b58a8a719e616f10c80ce915c4c5233f658e69245c126b" + }, + { + "members": [ + { + "name": "duel_id", + "type": "core::integer::u128", + "key": true + }, + { + "name": "moves_a", + "type": "pistols::models::challenge::Moves", + "key": false + }, + { + "name": "moves_b", + "type": "pistols::models::challenge::Moves", + "key": false + }, + { + "name": "state_a", + "type": "pistols::models::challenge::DuelistState", + "key": false + }, + { + "name": "state_b", + "type": "pistols::models::challenge::DuelistState", + "key": false + }, + { + "name": "state", + "type": "pistols::types::round_state::RoundState", + "key": false + }, + { + "name": "final_blow", + "type": "pistols::types::cards::hand::FinalBlow", + "key": false + } + ], + "class_hash": "0x643b30ea12c0702ce24a52cd5039fa32535de156b8567748f5f2cf2a7038b53", + "tag": "pistols-Round", + "selector": "0x617e0a3d97aa8cb3f83bbb5341ede98d3e3d825b6424bcab0676933fec52bc2" + }, + { + "members": [ + { + "name": "season_id", + "type": "core::integer::u32", + "key": true + }, + { + "name": "rules", + "type": "pistols::types::rules::Rules", + "key": false + }, + { + "name": "phase", + "type": "pistols::models::season::SeasonPhase", + "key": false + }, + { + "name": "period", + "type": "pistols::types::timestamp::Period", + "key": false + } + ], + "class_hash": "0x7c5844f7df5364357cbb97d4e1f996fc5414519dfc3e05037aba607a37568aa", + "tag": "pistols-SeasonConfig", + "selector": "0x407b92d935dd7193931243082059cb7180309a73de27eea948ffa0649f6ebf3" + }, + { + "members": [ + { + "name": "season_id", + "type": "core::integer::u32", + "key": true + }, + { + "name": "holder", + "type": "core::felt252", + "key": true + }, + { + "name": "points", + "type": "core::integer::u16", + "key": false + } + ], + "class_hash": "0x7bbe17ab3b54f58006f899dad3527bb43f981b1369da978676cd372d4238ae3", + "tag": "pistols-SeasonScoreboard", + "selector": "0x61ce6335075a988d622daba43a8b6893062e84f0deda10fa764ec399827faa9" + }, + { + "members": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + }, + { + "name": "token_id", + "type": "core::integer::u128", + "key": false + } + ], + "class_hash": "0x687a6fd84b039935d8a168bb957623271da098d35ee5c84e118ff168072f009", + "tag": "pistols-TokenBoundAddress", + "selector": "0x51e7eddb7555dc0cb6f6bdb0de4d85ac38457ede50d70e4f714a27c00047c8f" + }, + { + "members": [ + { + "name": "token_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "minter_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + }, + { + "name": "minted_count", + "type": "core::integer::u128", + "key": false + } + ], + "class_hash": "0x2401e740b403873f50e0309a17f658c0184637e7a670f64dc47c0491ea4a00f", + "tag": "pistols-TokenConfig", + "selector": "0x56ebd3387f45e8b292b472f3539e675031f12cf156c07c309c6403044f71fed" + } + ], + "events": [ + { + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "duel_id", + "type": "core::integer::u128", + "key": true + }, + { + "name": "action", + "type": "pistols::models::events::ChallengeAction", + "key": false + }, + { + "name": "timestamp", + "type": "core::integer::u64", + "key": false + } + ], + "class_hash": "0xd89fb4a4bb6aac1ec964b3002c82379e2b13f0811ccd9e96f71ed278e8873b", + "tag": "pistols-CallToChallengeEvent", + "selector": "0x1ba7f84f0de5fbe4d2d56640e9c17b2f0ec42dbdaaba69eb31fa4b6ad4fe63f" + }, + { + "members": [ + { + "name": "duel_id", + "type": "core::integer::u128", + "key": true + }, + { + "name": "duelist_id", + "type": "core::integer::u128", + "key": true + }, + { + "name": "rewards", + "type": "pistols::types::rules::RewardValues", + "key": false + } + ], + "class_hash": "0x7003e8a984267b71a3b93b3e6879eeb34610de9187f7691b1ff541ddc0b4280", + "tag": "pistols-ChallengeRewardsEvent", + "selector": "0x5d14202bbb6fb802276824aacd8f0256d17d49407a1909c2de53c66acebcfa8" + }, + { + "members": [ + { + "name": "season_id", + "type": "core::integer::u32", + "key": true + }, + { + "name": "source_pool_id", + "type": "pistols::models::pool::PoolType", + "key": false + }, + { + "name": "target_pool_id", + "type": "pistols::models::pool::PoolType", + "key": false + }, + { + "name": "lords_amount", + "type": "core::integer::u128", + "key": false + }, + { + "name": "fame_amount", + "type": "core::integer::u128", + "key": false + } + ], + "class_hash": "0x5bc3f81d0fb1a0e849655261dffd38f3851855c000422330755bdba8f41491f", + "tag": "pistols-FamePegEvent", + "selector": "0x285196789c564ebe4e7bfba2ac0ea1b65a3b853b9d187ea3a505ed8bfd7ff35" + }, + { + "members": [ + { + "name": "season_id", + "type": "core::integer::u32", + "key": true + }, + { + "name": "bill", + "type": "pistols::models::pool::LordsReleaseBill", + "key": false + }, + { + "name": "duel_id", + "type": "core::integer::u128", + "key": false + }, + { + "name": "timestamp", + "type": "core::integer::u64", + "key": false + } + ], + "class_hash": "0x384981a759ffc33701cc3445d284f272f92f1c5309f26c572a5927f0719ec92", + "tag": "pistols-LordsReleaseEvent", + "selector": "0x7121aa913fad664b07951ce2c9a3ee807c721c6fa15b015d5b6fc22f8daa7a1" + }, + { + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "timestamp", + "type": "core::integer::u64", + "key": false + }, + { + "name": "activity", + "type": "pistols::models::events::Activity", + "key": false + }, + { + "name": "identifier", + "type": "core::felt252", + "key": false + }, + { + "name": "is_public", + "type": "core::bool", + "key": false + } + ], + "class_hash": "0x219eb49a0f2d3aef058d282089d8dd5374e8e09119fe791dfedd46eafab9255", + "tag": "pistols-PlayerActivityEvent", + "selector": "0x46a192c105a4598953e7aeaf3809703964eb9e6d65403156d0458dcd2ee379b" + }, + { + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "target_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "target_id", + "type": "core::integer::u128", + "key": true + }, + { + "name": "enabled", + "type": "core::bool", + "key": false + } + ], + "class_hash": "0x682f456dde890c79424d935a349fabc3ff77a2bbaa0ebb9d6e138b4466f2707", + "tag": "pistols-PlayerBookmarkEvent", + "selector": "0x3075e796a774ce4fe1a6f34d9cf7915d5d76f0bcdec07acb8af65fbb3b23b4" + }, + { + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "setting", + "type": "pistols::models::events::PlayerSetting", + "key": true + }, + { + "name": "value", + "type": "pistols::models::events::PlayerSettingValue", + "key": false + } + ], + "class_hash": "0x4bf0a3940ecd238c380738811982ed889566bda17ae0c820ed1b6215e3851f2", + "tag": "pistols-PlayerSettingEvent", + "selector": "0x11eaf687b501164991ef978d89c94bd94698f102deafddda9b777e5cefd9a58" + }, + { + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": true + }, + { + "name": "social_platform", + "type": "pistols::models::events::SocialPlatform", + "key": true + }, + { + "name": "user_name", + "type": "core::byte_array::ByteArray", + "key": false + }, + { + "name": "user_id", + "type": "core::byte_array::ByteArray", + "key": false + }, + { + "name": "avatar", + "type": "core::byte_array::ByteArray", + "key": false + } + ], + "class_hash": "0x474acec11c1e3350f8a9eb1950dd0ea071414fc9a92969fe5442f0234f3181c", + "tag": "pistols-PlayerSocialLinkEvent", + "selector": "0x480838a3c770e19dee008a3d8f3668402af487acf0d2ecacc584ec65a22f845" + }, + { + "members": [ + { + "name": "season_id", + "type": "core::integer::u32", + "key": true + }, + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + }, + { + "name": "token_address", + "type": "core::starknet::contract_address::ContractAddress", + "key": false + }, + { + "name": "token_ids", + "type": "core::array::Array::", + "key": false + }, + { + "name": "lords_total", + "type": "core::integer::u128", + "key": false + }, + { + "name": "lords_underware", + "type": "core::integer::u128", + "key": false + }, + { + "name": "lords_realms", + "type": "core::integer::u128", + "key": false + }, + { + "name": "lords_fees", + "type": "core::integer::u128", + "key": false + }, + { + "name": "lords_season", + "type": "core::integer::u128", + "key": false + } + ], + "class_hash": "0x72312bb42969689b6699ee098ebc5055429ff75a52f417cac54c50b8ae1ad3a", + "tag": "pistols-PurchaseDistributionEvent", + "selector": "0x11b9cb4ac22f27d84c5a59023bc2a5ff64b6b60976f7e44cfa7b952d45d1a85" + }, + { + "members": [ + { + "name": "season_id", + "type": "core::integer::u32", + "key": true + }, + { + "name": "positions", + "type": "core::array::Array::", + "key": false + } + ], + "class_hash": "0x30b032e0f886c049e6fcd30346ae4152088bbffbb8c6f9374509b2a19ecb58f", + "tag": "pistols-SeasonLeaderboardEvent", + "selector": "0xb80c41cc2f87b6c1c9bf2e4cfff1ccb4b29ae3f82a1160441996f974d1cedd" + }, + { + "members": [ + { + "name": "id", + "type": "core::felt252", + "key": true + }, + { + "name": "hidden", + "type": "core::bool", + "key": false + }, + { + "name": "index", + "type": "core::integer::u8", + "key": false + }, + { + "name": "points", + "type": "core::integer::u16", + "key": false + }, + { + "name": "start", + "type": "core::integer::u64", + "key": false + }, + { + "name": "end", + "type": "core::integer::u64", + "key": false + }, + { + "name": "group", + "type": "core::felt252", + "key": false + }, + { + "name": "icon", + "type": "core::felt252", + "key": false + }, + { + "name": "title", + "type": "core::felt252", + "key": false + }, + { + "name": "description", + "type": "core::byte_array::ByteArray", + "key": false + }, + { + "name": "tasks", + "type": "core::array::Span::", + "key": false + }, + { + "name": "data", + "type": "core::byte_array::ByteArray", + "key": false + } + ], + "class_hash": "0x3c3d75546664437c554e7aff87944454f57b43d3baef047c645e6a771bf6261", + "tag": "pistols-TrophyCreation", + "selector": "0x193f7990b65fed69ab857fd2526961d796fc50b6a72287c5be68f32415ad80c" + }, + { + "members": [ + { + "name": "player_id", + "type": "core::felt252", + "key": true + }, + { + "name": "task_id", + "type": "core::felt252", + "key": true + }, + { + "name": "count", + "type": "core::integer::u128", + "key": false + }, + { + "name": "time", + "type": "core::integer::u64", + "key": false + } + ], + "class_hash": "0x313c566ceee5bdcaed4accfedc707b6b5a02feb96f9448a18bfa97bf43811e4", + "tag": "pistols-TrophyProgression", + "selector": "0x528aee6e1c2ad2e0f603b1bfe15e3aefc1ded821cd118e5eab5092b704c79b0" + } + ], + "external_contracts": [], + "abis": [ + { + "type": "event", + "name": "achievement::components::achievable::AchievableComponent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "struct", + "name": "achievement::events::index::TrophyCreation", + "members": [ + { + "name": "id", + "type": "core::felt252" + }, + { + "name": "hidden", + "type": "core::bool" + }, + { + "name": "index", + "type": "core::integer::u8" + }, + { + "name": "points", + "type": "core::integer::u16" + }, + { + "name": "start", + "type": "core::integer::u64" + }, + { + "name": "end", + "type": "core::integer::u64" + }, + { + "name": "group", + "type": "core::felt252" + }, + { + "name": "icon", + "type": "core::felt252" + }, + { + "name": "title", + "type": "core::felt252" + }, + { + "name": "description", + "type": "core::byte_array::ByteArray" + }, + { + "name": "tasks", + "type": "core::array::Span::" + }, + { + "name": "data", + "type": "core::byte_array::ByteArray" + } + ] + }, + { + "type": "struct", + "name": "achievement::events::index::TrophyCreationValue", + "members": [ + { + "name": "hidden", + "type": "core::bool" + }, + { + "name": "index", + "type": "core::integer::u8" + }, + { + "name": "points", + "type": "core::integer::u16" + }, + { + "name": "start", + "type": "core::integer::u64" + }, + { + "name": "end", + "type": "core::integer::u64" + }, + { + "name": "group", + "type": "core::felt252" + }, + { + "name": "icon", + "type": "core::felt252" + }, + { + "name": "title", + "type": "core::felt252" + }, + { + "name": "description", + "type": "core::byte_array::ByteArray" + }, + { + "name": "tasks", + "type": "core::array::Span::" + }, + { + "name": "data", + "type": "core::byte_array::ByteArray" + } + ] + }, + { + "type": "struct", + "name": "achievement::events::index::TrophyProgression", + "members": [ + { + "name": "player_id", + "type": "core::felt252" + }, + { + "name": "task_id", + "type": "core::felt252" + }, + { + "name": "count", + "type": "core::integer::u128" + }, + { + "name": "time", + "type": "core::integer::u64" + } + ] + }, + { + "type": "struct", + "name": "achievement::events::index::TrophyProgressionValue", + "members": [ + { + "name": "count", + "type": "core::integer::u128" + }, + { + "name": "time", + "type": "core::integer::u64" + } + ] + }, + { + "type": "event", + "name": "achievement::events::index::e_TrophyCreation::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "achievement::events::index::e_TrophyProgression::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "struct", + "name": "achievement::types::index::Task", + "members": [ + { + "name": "id", + "type": "core::felt252" + }, + { + "name": "total", + "type": "core::integer::u128" + }, + { + "name": "description", + "type": "core::byte_array::ByteArray" + } + ] + }, + { + "type": "constructor", + "name": "constructor", + "inputs": [] + }, + { + "type": "struct", + "name": "core::array::Span::<(core::felt252, dojo::meta::introspect::Ty)>", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::<(core::felt252, dojo::meta::introspect::Ty)>" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::>", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::>" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::>", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::>" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "core::array::Span::", + "members": [ + { + "name": "snapshot", + "type": "@core::array::Array::" + } + ] + }, + { + "type": "enum", + "name": "core::bool", + "variants": [ + { + "name": "False", + "type": "()" + }, + { + "name": "True", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "core::byte_array::ByteArray", + "members": [ + { + "name": "data", + "type": "core::array::Array::" + }, + { + "name": "pending_word", + "type": "core::felt252" + }, + { + "name": "pending_word_len", + "type": "core::internal::bounded_int::BoundedInt::<0, 30>" + } + ] + }, + { + "type": "struct", + "name": "core::integer::u256", + "members": [ + { + "name": "low", + "type": "core::integer::u128" + }, + { + "name": "high", + "type": "core::integer::u128" + } + ] + }, + { + "type": "enum", + "name": "core::option::Option::>", + "variants": [ + { + "name": "Some", + "type": "core::array::Span::" + }, + { + "name": "None", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "core::option::Option::", + "variants": [ + { + "name": "Some", + "type": "core::integer::u32" + }, + { + "name": "None", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "core::option::Option::", + "variants": [ + { + "name": "Some", + "type": "pistols::models::ring::RingType" + }, + { + "name": "None", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "core::option::Option::", + "variants": [ + { + "name": "Some", + "type": "pistols::types::duelist_profile::DuelistProfile" + }, + { + "name": "None", + "type": "()" + } + ] + }, + { + "type": "interface", + "name": "dojo::contract::components::upgradeable::IUpgradeable", + "items": [ + { + "type": "function", + "name": "upgrade", + "inputs": [ + { + "name": "new_class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "enum", + "variants": [ + { + "name": "Upgraded", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", + "kind": "nested" + } + ] + }, + { + "type": "event", + "name": "dojo::contract::components::upgradeable::upgradeable_cpt::Upgraded", + "kind": "struct", + "members": [ + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + } + ] + }, + { + "type": "interface", + "name": "dojo::contract::components::world_provider::IWorldProvider", + "items": [ + { + "type": "function", + "name": "world_dispatcher", + "inputs": [], + "outputs": [ + { + "type": "dojo::world::iworld::IWorldDispatcher" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "interface", + "name": "dojo::contract::interface::IContract", + "items": [] + }, + { + "type": "struct", + "name": "dojo::event::event::EventDef", + "members": [ + { + "name": "name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "layout", + "type": "dojo::meta::layout::Layout" + }, + { + "name": "schema", + "type": "dojo::meta::introspect::Struct" + } + ] + }, + { + "type": "interface", + "name": "dojo::event::interface::IEvent", + "items": [ + { + "type": "function", + "name": "definition", + "inputs": [], + "outputs": [ + { + "type": "dojo::event::event::EventDef" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "interface", + "name": "dojo::meta::interface::IDeployedResource", + "items": [ + { + "type": "function", + "name": "dojo_name", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "interface", + "name": "dojo::meta::interface::IStoredResource", + "items": [ + { + "type": "function", + "name": "layout", + "inputs": [], + "outputs": [ + { + "type": "dojo::meta::layout::Layout" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "schema", + "inputs": [], + "outputs": [ + { + "type": "dojo::meta::introspect::Struct" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "struct", + "name": "dojo::meta::introspect::Enum", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::<(core::felt252, dojo::meta::introspect::Ty)>" + } + ] + }, + { + "type": "struct", + "name": "dojo::meta::introspect::Member", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "ty", + "type": "dojo::meta::introspect::Ty" + } + ] + }, + { + "type": "struct", + "name": "dojo::meta::introspect::Struct", + "members": [ + { + "name": "name", + "type": "core::felt252" + }, + { + "name": "attrs", + "type": "core::array::Span::" + }, + { + "name": "children", + "type": "core::array::Span::" + } + ] + }, + { + "type": "enum", + "name": "dojo::meta::introspect::Ty", + "variants": [ + { + "name": "Primitive", + "type": "core::felt252" + }, + { + "name": "Struct", + "type": "dojo::meta::introspect::Struct" + }, + { + "name": "Enum", + "type": "dojo::meta::introspect::Enum" + }, + { + "name": "Tuple", + "type": "core::array::Span::" + }, + { + "name": "Array", + "type": "core::array::Span::" + }, + { + "name": "ByteArray", + "type": "()" + }, + { + "name": "FixedArray", + "type": "(core::array::Span::, core::integer::u32)" + } + ] + }, + { + "type": "struct", + "name": "dojo::meta::layout::FieldLayout", + "members": [ + { + "name": "selector", + "type": "core::felt252" + }, + { + "name": "layout", + "type": "dojo::meta::layout::Layout" + } + ] + }, + { + "type": "enum", + "name": "dojo::meta::layout::Layout", + "variants": [ + { + "name": "Fixed", + "type": "core::array::Span::" + }, + { + "name": "Struct", + "type": "core::array::Span::" + }, + { + "name": "Tuple", + "type": "core::array::Span::" + }, + { + "name": "Array", + "type": "core::array::Span::" + }, + { + "name": "ByteArray", + "type": "()" + }, + { + "name": "Enum", + "type": "core::array::Span::" + }, + { + "name": "FixedArray", + "type": "(core::array::Span::, core::integer::u32)" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::definition::ModelDef", + "members": [ + { + "name": "name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "layout", + "type": "dojo::meta::layout::Layout" + }, + { + "name": "schema", + "type": "dojo::meta::introspect::Struct" + }, + { + "name": "packed_size", + "type": "core::option::Option::" + }, + { + "name": "unpacked_size", + "type": "core::option::Option::" + } + ] + }, + { + "type": "enum", + "name": "dojo::model::definition::ModelIndex", + "variants": [ + { + "name": "Keys", + "type": "core::array::Span::" + }, + { + "name": "Id", + "type": "core::felt252" + }, + { + "name": "MemberId", + "type": "(core::felt252, core::felt252)" + } + ] + }, + { + "type": "interface", + "name": "dojo::model::interface::IModel", + "items": [ + { + "type": "function", + "name": "unpacked_size", + "inputs": [], + "outputs": [ + { + "type": "core::option::Option::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "packed_size", + "inputs": [], + "outputs": [ + { + "type": "core::option::Option::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "definition", + "inputs": [], + "outputs": [ + { + "type": "dojo::model::definition::ModelDef" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "use_legacy_storage", + "inputs": [], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "struct", + "name": "dojo::model::metadata::ResourceMetadata", + "members": [ + { + "name": "resource_id", + "type": "core::felt252" + }, + { + "name": "metadata_uri", + "type": "core::byte_array::ByteArray" + }, + { + "name": "metadata_hash", + "type": "core::felt252" + } + ] + }, + { + "type": "interface", + "name": "dojo::world::iworld::IUpgradeableWorld", + "items": [ + { + "type": "function", + "name": "upgrade", + "inputs": [ + { + "name": "new_class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "interface", + "name": "dojo::world::iworld::IWorld", + "items": [ + { + "type": "function", + "name": "resource", + "inputs": [ + { + "name": "selector", + "type": "core::felt252" + } + ], + "outputs": [ + { + "type": "dojo::world::resource::Resource" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "world_version", + "inputs": [], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "uuid", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "metadata", + "inputs": [ + { + "name": "resource_selector", + "type": "core::felt252" + } + ], + "outputs": [ + { + "type": "dojo::model::metadata::ResourceMetadata" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "set_metadata", + "inputs": [ + { + "name": "metadata", + "type": "dojo::model::metadata::ResourceMetadata" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "register_namespace", + "inputs": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "register_event", + "inputs": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "register_model", + "inputs": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "register_contract", + "inputs": [ + { + "name": "salt", + "type": "core::felt252" + }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [ + { + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "register_external_contract", + "inputs": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray" + }, + { + "name": "contract_name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "instance_name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "block_number", + "type": "core::integer::u64" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "register_library", + "inputs": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash" + }, + { + "name": "name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "version", + "type": "core::byte_array::ByteArray" + } + ], + "outputs": [ + { + "type": "core::starknet::class_hash::ClassHash" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "init_contract", + "inputs": [ + { + "name": "selector", + "type": "core::felt252" + }, + { + "name": "init_calldata", + "type": "core::array::Span::" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "upgrade_event", + "inputs": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "upgrade_model", + "inputs": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "upgrade_contract", + "inputs": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash" + } + ], + "outputs": [ + { + "type": "core::starknet::class_hash::ClassHash" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "upgrade_external_contract", + "inputs": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray" + }, + { + "name": "instance_name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "block_number", + "type": "core::integer::u64" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "emit_event", + "inputs": [ + { + "name": "event_selector", + "type": "core::felt252" + }, + { + "name": "keys", + "type": "core::array::Span::" + }, + { + "name": "values", + "type": "core::array::Span::" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "emit_events", + "inputs": [ + { + "name": "event_selector", + "type": "core::felt252" + }, + { + "name": "keys", + "type": "core::array::Span::>" + }, + { + "name": "values", + "type": "core::array::Span::>" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "entity", + "inputs": [ + { + "name": "model_selector", + "type": "core::felt252" + }, + { + "name": "index", + "type": "dojo::model::definition::ModelIndex" + }, + { + "name": "layout", + "type": "dojo::meta::layout::Layout" + } + ], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "entities", + "inputs": [ + { + "name": "model_selector", + "type": "core::felt252" + }, + { + "name": "indexes", + "type": "core::array::Span::" + }, + { + "name": "layout", + "type": "dojo::meta::layout::Layout" + } + ], + "outputs": [ + { + "type": "core::array::Span::>" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "set_entity", + "inputs": [ + { + "name": "model_selector", + "type": "core::felt252" + }, + { + "name": "index", + "type": "dojo::model::definition::ModelIndex" + }, + { + "name": "values", + "type": "core::array::Span::" + }, + { + "name": "layout", + "type": "dojo::meta::layout::Layout" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "set_entities", + "inputs": [ + { + "name": "model_selector", + "type": "core::felt252" + }, + { + "name": "indexes", + "type": "core::array::Span::" + }, + { + "name": "values", + "type": "core::array::Span::>" + }, + { + "name": "layout", + "type": "dojo::meta::layout::Layout" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "delete_entity", + "inputs": [ + { + "name": "model_selector", + "type": "core::felt252" + }, + { + "name": "index", + "type": "dojo::model::definition::ModelIndex" + }, + { + "name": "layout", + "type": "dojo::meta::layout::Layout" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "delete_entities", + "inputs": [ + { + "name": "model_selector", + "type": "core::felt252" + }, + { + "name": "indexes", + "type": "core::array::Span::" + }, + { + "name": "layout", + "type": "dojo::meta::layout::Layout" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "is_owner", + "inputs": [ + { + "name": "resource", + "type": "core::felt252" + }, + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "grant_owner", + "inputs": [ + { + "name": "resource", + "type": "core::felt252" + }, + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "revoke_owner", + "inputs": [ + { + "name": "resource", + "type": "core::felt252" + }, + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "owners_count", + "inputs": [ + { + "name": "resource", + "type": "core::felt252" + } + ], + "outputs": [ + { + "type": "core::integer::u64" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "is_writer", + "inputs": [ + { + "name": "resource", + "type": "core::felt252" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "grant_writer", + "inputs": [ + { + "name": "resource", + "type": "core::felt252" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "revoke_writer", + "inputs": [ + { + "name": "resource", + "type": "core::felt252" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "struct", + "name": "dojo::world::iworld::IWorldDispatcher", + "members": [ + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress" + } + ] + }, + { + "type": "enum", + "name": "dojo::world::resource::Resource", + "variants": [ + { + "name": "Model", + "type": "(core::starknet::contract_address::ContractAddress, core::felt252)" + }, + { + "name": "Event", + "type": "(core::starknet::contract_address::ContractAddress, core::felt252)" + }, + { + "name": "Contract", + "type": "(core::starknet::contract_address::ContractAddress, core::felt252)" + }, + { + "name": "Namespace", + "type": "core::byte_array::ByteArray" + }, + { + "name": "World", + "type": "()" + }, + { + "name": "Unregistered", + "type": "()" + }, + { + "name": "Library", + "type": "(core::starknet::class_hash::ClassHash, core::felt252)" + }, + { + "name": "ExternalContract", + "type": "(core::starknet::contract_address::ContractAddress, core::felt252)" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::ContractInitialized", + "kind": "struct", + "members": [ + { + "name": "selector", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "init_calldata", + "type": "core::array::Span::", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::ContractRegistered", + "kind": "struct", + "members": [ + { + "name": "name", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + }, + { + "name": "salt", + "type": "core::felt252", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::ContractUpgraded", + "kind": "struct", + "members": [ + { + "name": "selector", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::Event", + "kind": "enum", + "variants": [ + { + "name": "WorldSpawned", + "type": "dojo::world::world_contract::world::WorldSpawned", + "kind": "nested" + }, + { + "name": "WorldUpgraded", + "type": "dojo::world::world_contract::world::WorldUpgraded", + "kind": "nested" + }, + { + "name": "NamespaceRegistered", + "type": "dojo::world::world_contract::world::NamespaceRegistered", + "kind": "nested" + }, + { + "name": "ModelRegistered", + "type": "dojo::world::world_contract::world::ModelRegistered", + "kind": "nested" + }, + { + "name": "EventRegistered", + "type": "dojo::world::world_contract::world::EventRegistered", + "kind": "nested" + }, + { + "name": "ContractRegistered", + "type": "dojo::world::world_contract::world::ContractRegistered", + "kind": "nested" + }, + { + "name": "ExternalContractRegistered", + "type": "dojo::world::world_contract::world::ExternalContractRegistered", + "kind": "nested" + }, + { + "name": "ExternalContractUpgraded", + "type": "dojo::world::world_contract::world::ExternalContractUpgraded", + "kind": "nested" + }, + { + "name": "ModelUpgraded", + "type": "dojo::world::world_contract::world::ModelUpgraded", + "kind": "nested" + }, + { + "name": "EventUpgraded", + "type": "dojo::world::world_contract::world::EventUpgraded", + "kind": "nested" + }, + { + "name": "ContractUpgraded", + "type": "dojo::world::world_contract::world::ContractUpgraded", + "kind": "nested" + }, + { + "name": "ContractInitialized", + "type": "dojo::world::world_contract::world::ContractInitialized", + "kind": "nested" + }, + { + "name": "LibraryRegistered", + "type": "dojo::world::world_contract::world::LibraryRegistered", + "kind": "nested" + }, + { + "name": "EventEmitted", + "type": "dojo::world::world_contract::world::EventEmitted", + "kind": "nested" + }, + { + "name": "MetadataUpdate", + "type": "dojo::world::world_contract::world::MetadataUpdate", + "kind": "nested" + }, + { + "name": "StoreSetRecord", + "type": "dojo::world::world_contract::world::StoreSetRecord", + "kind": "nested" + }, + { + "name": "StoreUpdateRecord", + "type": "dojo::world::world_contract::world::StoreUpdateRecord", + "kind": "nested" + }, + { + "name": "StoreUpdateMember", + "type": "dojo::world::world_contract::world::StoreUpdateMember", + "kind": "nested" + }, + { + "name": "StoreDelRecord", + "type": "dojo::world::world_contract::world::StoreDelRecord", + "kind": "nested" + }, + { + "name": "WriterUpdated", + "type": "dojo::world::world_contract::world::WriterUpdated", + "kind": "nested" + }, + { + "name": "OwnerUpdated", + "type": "dojo::world::world_contract::world::OwnerUpdated", + "kind": "nested" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::EventEmitted", + "kind": "struct", + "members": [ + { + "name": "selector", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "system_address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "keys", + "type": "core::array::Span::", + "kind": "data" + }, + { + "name": "values", + "type": "core::array::Span::", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::EventRegistered", + "kind": "struct", + "members": [ + { + "name": "name", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + }, + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::EventUpgraded", + "kind": "struct", + "members": [ + { + "name": "selector", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + }, + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "prev_address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::ExternalContractRegistered", + "kind": "struct", + "members": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "contract_name", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "instance_name", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "contract_selector", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + }, + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "block_number", + "type": "core::integer::u64", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::ExternalContractUpgraded", + "kind": "struct", + "members": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "instance_name", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "contract_selector", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + }, + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "block_number", + "type": "core::integer::u64", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::LibraryRegistered", + "kind": "struct", + "members": [ + { + "name": "name", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::MetadataUpdate", + "kind": "struct", + "members": [ + { + "name": "resource", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "uri", + "type": "core::byte_array::ByteArray", + "kind": "data" + }, + { + "name": "hash", + "type": "core::felt252", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::ModelRegistered", + "kind": "struct", + "members": [ + { + "name": "name", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + }, + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::ModelUpgraded", + "kind": "struct", + "members": [ + { + "name": "selector", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + }, + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "prev_address", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::NamespaceRegistered", + "kind": "struct", + "members": [ + { + "name": "namespace", + "type": "core::byte_array::ByteArray", + "kind": "key" + }, + { + "name": "hash", + "type": "core::felt252", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::OwnerUpdated", + "kind": "struct", + "members": [ + { + "name": "resource", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "value", + "type": "core::bool", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::StoreDelRecord", + "kind": "struct", + "members": [ + { + "name": "selector", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "entity_id", + "type": "core::felt252", + "kind": "key" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::StoreSetRecord", + "kind": "struct", + "members": [ + { + "name": "selector", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "entity_id", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "keys", + "type": "core::array::Span::", + "kind": "data" + }, + { + "name": "values", + "type": "core::array::Span::", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::StoreUpdateMember", + "kind": "struct", + "members": [ + { + "name": "selector", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "entity_id", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "member_selector", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "values", + "type": "core::array::Span::", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::StoreUpdateRecord", + "kind": "struct", + "members": [ + { + "name": "selector", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "entity_id", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "values", + "type": "core::array::Span::", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::WorldSpawned", + "kind": "struct", + "members": [ + { + "name": "creator", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "data" + }, + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::WorldUpgraded", + "kind": "struct", + "members": [ + { + "name": "class_hash", + "type": "core::starknet::class_hash::ClassHash", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "dojo::world::world_contract::world::WriterUpdated", + "kind": "struct", + "members": [ + { + "name": "resource", + "type": "core::felt252", + "kind": "key" + }, + { + "name": "contract", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "value", + "type": "core::bool", + "kind": "data" + } + ] + }, + { + "type": "function", + "name": "dojo_init", + "inputs": [], + "outputs": [], + "state_mutability": "view" + }, + { + "type": "function", + "name": "ensure_abi", + "inputs": [ + { + "name": "event", + "type": "achievement::events::index::TrophyProgression" + } + ], + "outputs": [], + "state_mutability": "view" + }, + { + "type": "function", + "name": "ensure_unique", + "inputs": [], + "outputs": [], + "state_mutability": "view" + }, + { + "type": "function", + "name": "ensure_values", + "inputs": [ + { + "name": "value", + "type": "achievement::events::index::TrophyProgressionValue" + } + ], + "outputs": [], + "state_mutability": "view" + }, + { + "type": "event", + "name": "nft_combo::erc721::erc721_combo::ERC721ComboComponent::BatchMetadataUpdate", + "kind": "struct", + "members": [ + { + "name": "from_token_id", + "type": "core::integer::u256", + "kind": "key" + }, + { + "name": "to_token_id", + "type": "core::integer::u256", + "kind": "key" + } + ] + }, + { + "type": "event", + "name": "nft_combo::erc721::erc721_combo::ERC721ComboComponent::ContractURIUpdated", + "kind": "struct", + "members": [] + }, + { + "type": "event", + "name": "nft_combo::erc721::erc721_combo::ERC721ComboComponent::Event", + "kind": "enum", + "variants": [ + { + "name": "ContractURIUpdated", + "type": "nft_combo::erc721::erc721_combo::ERC721ComboComponent::ContractURIUpdated", + "kind": "nested" + }, + { + "name": "MetadataUpdate", + "type": "nft_combo::erc721::erc721_combo::ERC721ComboComponent::MetadataUpdate", + "kind": "nested" + }, + { + "name": "BatchMetadataUpdate", + "type": "nft_combo::erc721::erc721_combo::ERC721ComboComponent::BatchMetadataUpdate", + "kind": "nested" + } + ] + }, + { + "type": "event", + "name": "nft_combo::erc721::erc721_combo::ERC721ComboComponent::MetadataUpdate", + "kind": "struct", + "members": [ + { + "name": "token_id", + "type": "core::integer::u256", + "kind": "key" + } + ] + }, + { + "type": "interface", + "name": "nft_combo::erc721::interface::IERC721ComboABI", + "items": [ + { + "type": "function", + "name": "supports_interface", + "inputs": [ + { + "name": "interface_id", + "type": "core::felt252" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "balance_of", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "owner_of", + "inputs": [ + { + "name": "token_id", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "safe_transfer_from", + "inputs": [ + { + "name": "from", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "to", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_id", + "type": "core::integer::u256" + }, + { + "name": "data", + "type": "core::array::Span::" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "transfer_from", + "inputs": [ + { + "name": "from", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "to", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_id", + "type": "core::integer::u256" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "to", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_id", + "type": "core::integer::u256" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "set_approval_for_all", + "inputs": [ + { + "name": "operator", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "approved", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "get_approved", + "inputs": [ + { + "name": "token_id", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "is_approved_for_all", + "inputs": [ + { + "name": "owner", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "operator", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "ownerOf", + "inputs": [ + { + "name": "tokenId", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "safeTransferFrom", + "inputs": [ + { + "name": "from", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "to", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "tokenId", + "type": "core::integer::u256" + }, + { + "name": "data", + "type": "core::array::Span::" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "from", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "to", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "tokenId", + "type": "core::integer::u256" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "setApprovalForAll", + "inputs": [ + { + "name": "operator", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "approved", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "getApproved", + "inputs": [ + { + "name": "tokenId", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "isApprovedForAll", + "inputs": [ + { + "name": "owner", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "operator", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "token_uri", + "inputs": [ + { + "name": "token_id", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tokenURI", + "inputs": [ + { + "name": "tokenId", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "max_supply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "reserved_supply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "available_supply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "minted_supply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "total_supply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "last_token_id", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "is_minting_paused", + "inputs": [], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "is_minted_out", + "inputs": [], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "is_owner_of", + "inputs": [ + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_id", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "token_exists", + "inputs": [ + { + "name": "token_id", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "maxSupply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "reservedSupply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "availableSupply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "mintedSupply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "contract_uri", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "contractURI", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "royalty_info", + "inputs": [ + { + "name": "token_id", + "type": "core::integer::u256" + }, + { + "name": "sale_price", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "default_royalty", + "inputs": [], + "outputs": [ + { + "type": "(core::starknet::contract_address::ContractAddress, core::integer::u128, core::integer::u128)" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "token_royalty", + "inputs": [ + { + "name": "token_id", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "(core::starknet::contract_address::ContractAddress, core::integer::u128, core::integer::u128)" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "royaltyInfo", + "inputs": [ + { + "name": "token_id", + "type": "core::integer::u256" + }, + { + "name": "sale_price", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "(core::starknet::contract_address::ContractAddress, core::integer::u256)" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "defaultRoyalty", + "inputs": [], + "outputs": [ + { + "type": "(core::starknet::contract_address::ContractAddress, core::integer::u128, core::integer::u128)" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "tokenRoyalty", + "inputs": [ + { + "name": "token_id", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "(core::starknet::contract_address::ContractAddress, core::integer::u128, core::integer::u128)" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "openzeppelin_introspection::src5::SRC5Component::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "openzeppelin_token::erc20::erc20::ERC20Component::Approval", + "kind": "struct", + "members": [ + { + "name": "owner", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "spender", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "value", + "type": "core::integer::u256", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "openzeppelin_token::erc20::erc20::ERC20Component::Event", + "kind": "enum", + "variants": [ + { + "name": "Transfer", + "type": "openzeppelin_token::erc20::erc20::ERC20Component::Transfer", + "kind": "nested" + }, + { + "name": "Approval", + "type": "openzeppelin_token::erc20::erc20::ERC20Component::Approval", + "kind": "nested" + } + ] + }, + { + "type": "event", + "name": "openzeppelin_token::erc20::erc20::ERC20Component::Transfer", + "kind": "struct", + "members": [ + { + "name": "from", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "to", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "value", + "type": "core::integer::u256", + "kind": "data" + } + ] + }, + { + "type": "interface", + "name": "openzeppelin_token::erc20::interface::IERC20Mixin", + "items": [ + { + "type": "function", + "name": "total_supply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "balance_of", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "allowance", + "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" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "transfer_from", + "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" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "name", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "symbol", + "inputs": [], + "outputs": [ + { + "type": "core::byte_array::ByteArray" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "decimals", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u8" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "transferFrom", + "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" + } + ] + }, + { + "type": "event", + "name": "openzeppelin_token::erc721::erc721::ERC721Component::Approval", + "kind": "struct", + "members": [ + { + "name": "owner", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "approved", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "token_id", + "type": "core::integer::u256", + "kind": "key" + } + ] + }, + { + "type": "event", + "name": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll", + "kind": "struct", + "members": [ + { + "name": "owner", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "operator", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "approved", + "type": "core::bool", + "kind": "data" + } + ] + }, + { + "type": "event", + "name": "openzeppelin_token::erc721::erc721::ERC721Component::Event", + "kind": "enum", + "variants": [ + { + "name": "Transfer", + "type": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer", + "kind": "nested" + }, + { + "name": "Approval", + "type": "openzeppelin_token::erc721::erc721::ERC721Component::Approval", + "kind": "nested" + }, + { + "name": "ApprovalForAll", + "type": "openzeppelin_token::erc721::erc721::ERC721Component::ApprovalForAll", + "kind": "nested" + } + ] + }, + { + "type": "event", + "name": "openzeppelin_token::erc721::erc721::ERC721Component::Transfer", + "kind": "struct", + "members": [ + { + "name": "from", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "to", + "type": "core::starknet::contract_address::ContractAddress", + "kind": "key" + }, + { + "name": "token_id", + "type": "core::integer::u256", + "kind": "key" + } + ] + }, + { + "type": "interface", + "name": "pistols::interfaces::vrf::IVrfProvider", + "items": [ + { + "type": "function", + "name": "request_random", + "inputs": [ + { + "name": "caller", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "source", + "type": "pistols::interfaces::vrf::Source" + } + ], + "outputs": [], + "state_mutability": "view" + }, + { + "type": "function", + "name": "consume_random", + "inputs": [ + { + "name": "source", + "type": "pistols::interfaces::vrf::Source" + } + ], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "external" + } + ] + }, + { + "type": "enum", + "name": "pistols::interfaces::vrf::Source", + "variants": [ + { + "name": "Nonce", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "Salt", + "type": "core::felt252" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::challenge::Challenge", + "members": [ + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "duel_type", + "type": "pistols::models::challenge::DuelType" + }, + { + "name": "premise", + "type": "pistols::types::premise::Premise" + }, + { + "name": "lives_staked", + "type": "core::integer::u8" + }, + { + "name": "address_a", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "address_b", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "duelist_id_a", + "type": "core::integer::u128" + }, + { + "name": "duelist_id_b", + "type": "core::integer::u128" + }, + { + "name": "state", + "type": "pistols::types::challenge_state::ChallengeState" + }, + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "winner", + "type": "core::integer::u8" + }, + { + "name": "timestamps", + "type": "pistols::types::timestamp::Period" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::challenge::ChallengeMessage", + "members": [ + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "message", + "type": "core::byte_array::ByteArray" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::challenge::ChallengeMessageValue", + "members": [ + { + "name": "message", + "type": "core::byte_array::ByteArray" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::challenge::ChallengeValue", + "members": [ + { + "name": "duel_type", + "type": "pistols::models::challenge::DuelType" + }, + { + "name": "premise", + "type": "pistols::types::premise::Premise" + }, + { + "name": "lives_staked", + "type": "core::integer::u8" + }, + { + "name": "address_a", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "address_b", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "duelist_id_a", + "type": "core::integer::u128" + }, + { + "name": "duelist_id_b", + "type": "core::integer::u128" + }, + { + "name": "state", + "type": "pistols::types::challenge_state::ChallengeState" + }, + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "winner", + "type": "core::integer::u8" + }, + { + "name": "timestamps", + "type": "pistols::types::timestamp::Period" + } + ] + }, + { + "type": "enum", + "name": "pistols::models::challenge::DuelType", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "Seasonal", + "type": "()" + }, + { + "name": "Tournament", + "type": "()" + }, + { + "name": "Tutorial", + "type": "()" + }, + { + "name": "Practice", + "type": "()" + }, + { + "name": "BotPlayer", + "type": "()" + }, + { + "name": "Ranked", + "type": "()" + }, + { + "name": "Unranked", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::challenge::DuelistState", + "members": [ + { + "name": "chances", + "type": "core::integer::u8" + }, + { + "name": "damage", + "type": "core::integer::u8" + }, + { + "name": "health", + "type": "core::integer::u8" + }, + { + "name": "dice_fire", + "type": "core::integer::u8" + }, + { + "name": "honour", + "type": "core::integer::u8" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::challenge::Moves", + "members": [ + { + "name": "salt", + "type": "core::felt252" + }, + { + "name": "hashed", + "type": "core::integer::u128" + }, + { + "name": "timeout", + "type": "core::integer::u64" + }, + { + "name": "card_1", + "type": "core::integer::u8" + }, + { + "name": "card_2", + "type": "core::integer::u8" + }, + { + "name": "card_3", + "type": "core::integer::u8" + }, + { + "name": "card_4", + "type": "core::integer::u8" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::challenge::Round", + "members": [ + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "moves_a", + "type": "pistols::models::challenge::Moves" + }, + { + "name": "moves_b", + "type": "pistols::models::challenge::Moves" + }, + { + "name": "state_a", + "type": "pistols::models::challenge::DuelistState" + }, + { + "name": "state_b", + "type": "pistols::models::challenge::DuelistState" + }, + { + "name": "state", + "type": "pistols::types::round_state::RoundState" + }, + { + "name": "final_blow", + "type": "pistols::types::cards::hand::FinalBlow" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::challenge::RoundValue", + "members": [ + { + "name": "moves_a", + "type": "pistols::models::challenge::Moves" + }, + { + "name": "moves_b", + "type": "pistols::models::challenge::Moves" + }, + { + "name": "state_a", + "type": "pistols::models::challenge::DuelistState" + }, + { + "name": "state_b", + "type": "pistols::models::challenge::DuelistState" + }, + { + "name": "state", + "type": "pistols::types::round_state::RoundState" + }, + { + "name": "final_blow", + "type": "pistols::types::cards::hand::FinalBlow" + } + ] + }, + { + "type": "event", + "name": "pistols::models::challenge::m_Challenge::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::challenge::m_ChallengeMessage::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::challenge::m_Round::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "struct", + "name": "pistols::models::config::CoinConfig", + "members": [ + { + "name": "coin_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "minter_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "faucet_amount", + "type": "core::integer::u128" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::config::CoinConfigValue", + "members": [ + { + "name": "minter_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "faucet_amount", + "type": "core::integer::u128" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::config::Config", + "members": [ + { + "name": "key", + "type": "core::integer::u8" + }, + { + "name": "treasury_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "lords_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "vrf_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "current_season_id", + "type": "core::integer::u32" + }, + { + "name": "is_paused", + "type": "core::bool" + }, + { + "name": "realms_address", + "type": "core::starknet::contract_address::ContractAddress" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::config::ConfigValue", + "members": [ + { + "name": "treasury_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "lords_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "vrf_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "current_season_id", + "type": "core::integer::u32" + }, + { + "name": "is_paused", + "type": "core::bool" + }, + { + "name": "realms_address", + "type": "core::starknet::contract_address::ContractAddress" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::config::TokenConfig", + "members": [ + { + "name": "token_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "minter_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "minted_count", + "type": "core::integer::u128" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::config::TokenConfigValue", + "members": [ + { + "name": "minter_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "minted_count", + "type": "core::integer::u128" + } + ] + }, + { + "type": "event", + "name": "pistols::models::config::m_CoinConfig::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::config::m_Config::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::config::m_TokenConfig::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "enum", + "name": "pistols::models::duelist::CauseOfDeath", + "variants": [ + { + "name": "None", + "type": "()" + }, + { + "name": "Duelling", + "type": "()" + }, + { + "name": "Memorize", + "type": "()" + }, + { + "name": "Sacrifice", + "type": "()" + }, + { + "name": "Forsaken", + "type": "()" + }, + { + "name": "Ranked", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::duelist::Duelist", + "members": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "duelist_profile", + "type": "pistols::types::duelist_profile::DuelistProfile" + }, + { + "name": "timestamps", + "type": "pistols::models::duelist::DuelistTimestamps" + }, + { + "name": "totals", + "type": "pistols::models::duelist::Totals" + }, + { + "name": "released_fame", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::duelist::DuelistAssignment", + "members": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "pass_id", + "type": "core::integer::u64" + }, + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + }, + { + "name": "season_id", + "type": "core::integer::u32" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::duelist::DuelistAssignmentValue", + "members": [ + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "pass_id", + "type": "core::integer::u64" + }, + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + }, + { + "name": "season_id", + "type": "core::integer::u32" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::duelist::DuelistMemorial", + "members": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "cause_of_death", + "type": "pistols::models::duelist::CauseOfDeath" + }, + { + "name": "killed_by", + "type": "core::integer::u128" + }, + { + "name": "fame_before_death", + "type": "core::integer::u128" + }, + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "season_id", + "type": "core::integer::u32" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::duelist::DuelistMemorialValue", + "members": [ + { + "name": "cause_of_death", + "type": "pistols::models::duelist::CauseOfDeath" + }, + { + "name": "killed_by", + "type": "core::integer::u128" + }, + { + "name": "fame_before_death", + "type": "core::integer::u128" + }, + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "season_id", + "type": "core::integer::u32" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::duelist::DuelistTimestamps", + "members": [ + { + "name": "registered", + "type": "core::integer::u64" + }, + { + "name": "active", + "type": "core::integer::u64" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::duelist::DuelistValue", + "members": [ + { + "name": "duelist_profile", + "type": "pistols::types::duelist_profile::DuelistProfile" + }, + { + "name": "timestamps", + "type": "pistols::models::duelist::DuelistTimestamps" + }, + { + "name": "totals", + "type": "pistols::models::duelist::Totals" + }, + { + "name": "released_fame", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::duelist::Totals", + "members": [ + { + "name": "total_duels", + "type": "core::integer::u16" + }, + { + "name": "total_wins", + "type": "core::integer::u16" + }, + { + "name": "total_losses", + "type": "core::integer::u16" + }, + { + "name": "total_draws", + "type": "core::integer::u16" + }, + { + "name": "honour", + "type": "core::integer::u8" + }, + { + "name": "honour_log", + "type": "core::integer::u64" + } + ] + }, + { + "type": "event", + "name": "pistols::models::duelist::m_Duelist::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::duelist::m_DuelistAssignment::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::duelist::m_DuelistMemorial::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "enum", + "name": "pistols::models::events::Activity", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "TutorialFinished", + "type": "()" + }, + { + "name": "PackStarter", + "type": "()" + }, + { + "name": "PackPurchased", + "type": "()" + }, + { + "name": "PackOpened", + "type": "()" + }, + { + "name": "DuelistSpawned", + "type": "()" + }, + { + "name": "DuelistDied", + "type": "()" + }, + { + "name": "ChallengeCreated", + "type": "()" + }, + { + "name": "ChallengeCanceled", + "type": "()" + }, + { + "name": "ChallengeReplied", + "type": "()" + }, + { + "name": "MovesCommitted", + "type": "()" + }, + { + "name": "MovesRevealed", + "type": "()" + }, + { + "name": "PlayerTimedOut", + "type": "()" + }, + { + "name": "ChallengeResolved", + "type": "()" + }, + { + "name": "ChallengeDraw", + "type": "()" + }, + { + "name": "ClaimedGift", + "type": "()" + }, + { + "name": "AirdroppedPack", + "type": "()" + }, + { + "name": "ClaimedRing", + "type": "()" + }, + { + "name": "EnlistedRankedDuelist", + "type": "()" + }, + { + "name": "DuelistMatchingRanked", + "type": "()" + }, + { + "name": "DuelistMatchingUnranked", + "type": "()" + }, + { + "name": "DuelistMemorialized", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::CallToChallengeEvent", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "action", + "type": "pistols::models::events::ChallengeAction" + }, + { + "name": "timestamp", + "type": "core::integer::u64" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::CallToChallengeEventValue", + "members": [ + { + "name": "action", + "type": "pistols::models::events::ChallengeAction" + }, + { + "name": "timestamp", + "type": "core::integer::u64" + } + ] + }, + { + "type": "enum", + "name": "pistols::models::events::ChallengeAction", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "Reply", + "type": "()" + }, + { + "name": "Commit", + "type": "()" + }, + { + "name": "Reveal", + "type": "()" + }, + { + "name": "Waiting", + "type": "()" + }, + { + "name": "Results", + "type": "()" + }, + { + "name": "Finished", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::ChallengeRewardsEvent", + "members": [ + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "rewards", + "type": "pistols::types::rules::RewardValues" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::ChallengeRewardsEventValue", + "members": [ + { + "name": "rewards", + "type": "pistols::types::rules::RewardValues" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::FamePegEvent", + "members": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "source_pool_id", + "type": "pistols::models::pool::PoolType" + }, + { + "name": "target_pool_id", + "type": "pistols::models::pool::PoolType" + }, + { + "name": "lords_amount", + "type": "core::integer::u128" + }, + { + "name": "fame_amount", + "type": "core::integer::u128" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::FamePegEventValue", + "members": [ + { + "name": "source_pool_id", + "type": "pistols::models::pool::PoolType" + }, + { + "name": "target_pool_id", + "type": "pistols::models::pool::PoolType" + }, + { + "name": "lords_amount", + "type": "core::integer::u128" + }, + { + "name": "fame_amount", + "type": "core::integer::u128" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::LordsReleaseEvent", + "members": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "bill", + "type": "pistols::models::pool::LordsReleaseBill" + }, + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "timestamp", + "type": "core::integer::u64" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::LordsReleaseEventValue", + "members": [ + { + "name": "bill", + "type": "pistols::models::pool::LordsReleaseBill" + }, + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "timestamp", + "type": "core::integer::u64" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::PlayerActivityEvent", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "timestamp", + "type": "core::integer::u64" + }, + { + "name": "activity", + "type": "pistols::models::events::Activity" + }, + { + "name": "identifier", + "type": "core::felt252" + }, + { + "name": "is_public", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::PlayerActivityEventValue", + "members": [ + { + "name": "timestamp", + "type": "core::integer::u64" + }, + { + "name": "activity", + "type": "pistols::models::events::Activity" + }, + { + "name": "identifier", + "type": "core::felt252" + }, + { + "name": "is_public", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::PlayerBookmarkEvent", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "target_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "target_id", + "type": "core::integer::u128" + }, + { + "name": "enabled", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::PlayerBookmarkEventValue", + "members": [ + { + "name": "enabled", + "type": "core::bool" + } + ] + }, + { + "type": "enum", + "name": "pistols::models::events::PlayerSetting", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "OptOutNotifications", + "type": "pistols::models::events::SocialPlatform" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::PlayerSettingEvent", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "setting", + "type": "pistols::models::events::PlayerSetting" + }, + { + "name": "value", + "type": "pistols::models::events::PlayerSettingValue" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::PlayerSettingEventValue", + "members": [ + { + "name": "value", + "type": "pistols::models::events::PlayerSettingValue" + } + ] + }, + { + "type": "enum", + "name": "pistols::models::events::PlayerSettingValue", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "Boolean", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::PlayerSocialLinkEvent", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "social_platform", + "type": "pistols::models::events::SocialPlatform" + }, + { + "name": "user_name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "user_id", + "type": "core::byte_array::ByteArray" + }, + { + "name": "avatar", + "type": "core::byte_array::ByteArray" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::PlayerSocialLinkEventValue", + "members": [ + { + "name": "user_name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "user_id", + "type": "core::byte_array::ByteArray" + }, + { + "name": "avatar", + "type": "core::byte_array::ByteArray" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::PurchaseDistributionEvent", + "members": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_ids", + "type": "core::array::Array::" + }, + { + "name": "lords_total", + "type": "core::integer::u128" + }, + { + "name": "lords_underware", + "type": "core::integer::u128" + }, + { + "name": "lords_realms", + "type": "core::integer::u128" + }, + { + "name": "lords_fees", + "type": "core::integer::u128" + }, + { + "name": "lords_season", + "type": "core::integer::u128" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::PurchaseDistributionEventValue", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_ids", + "type": "core::array::Array::" + }, + { + "name": "lords_total", + "type": "core::integer::u128" + }, + { + "name": "lords_underware", + "type": "core::integer::u128" + }, + { + "name": "lords_realms", + "type": "core::integer::u128" + }, + { + "name": "lords_fees", + "type": "core::integer::u128" + }, + { + "name": "lords_season", + "type": "core::integer::u128" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::SeasonLeaderboardEvent", + "members": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "positions", + "type": "core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::SeasonLeaderboardEventValue", + "members": [ + { + "name": "positions", + "type": "core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::events::SeasonLeaderboardPosition", + "members": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "points", + "type": "core::integer::u16" + }, + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "lords_amount", + "type": "core::integer::u128" + } + ] + }, + { + "type": "enum", + "name": "pistols::models::events::SocialPlatform", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "Discord", + "type": "()" + }, + { + "name": "Telegram", + "type": "()" + }, + { + "name": "X", + "type": "()" + } + ] + }, + { + "type": "event", + "name": "pistols::models::events::e_CallToChallengeEvent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::events::e_ChallengeRewardsEvent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::events::e_FamePegEvent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::events::e_LordsReleaseEvent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::events::e_PlayerActivityEvent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::events::e_PlayerBookmarkEvent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::events::e_PlayerSettingEvent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::events::e_PlayerSocialLinkEvent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::events::e_PurchaseDistributionEvent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::events::e_SeasonLeaderboardEvent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "struct", + "name": "pistols::models::leaderboard::Leaderboard", + "members": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "positions", + "type": "core::integer::u8" + }, + { + "name": "duelist_ids", + "type": "core::felt252" + }, + { + "name": "scores", + "type": "core::felt252" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::leaderboard::LeaderboardPosition", + "members": [ + { + "name": "position", + "type": "core::integer::u8" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "points", + "type": "core::integer::u16" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::leaderboard::LeaderboardValue", + "members": [ + { + "name": "positions", + "type": "core::integer::u8" + }, + { + "name": "duelist_ids", + "type": "core::felt252" + }, + { + "name": "scores", + "type": "core::felt252" + } + ] + }, + { + "type": "event", + "name": "pistols::models::leaderboard::m_Leaderboard::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "struct", + "name": "pistols::models::match_queue::MatchPlayer", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + }, + { + "name": "queue_info", + "type": "pistols::models::match_queue::QueueInfo" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "next_duelists", + "type": "core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::match_queue::MatchPlayerValue", + "members": [ + { + "name": "queue_info", + "type": "pistols::models::match_queue::QueueInfo" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "next_duelists", + "type": "core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::match_queue::MatchQueue", + "members": [ + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + }, + { + "name": "players", + "type": "core::array::Array::" + }, + { + "name": "slot_size", + "type": "core::integer::u8" + }, + { + "name": "entry_token_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "entry_token_amount", + "type": "core::integer::u128" + }, + { + "name": "enlisted_duelist_ids", + "type": "core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::match_queue::MatchQueueValue", + "members": [ + { + "name": "players", + "type": "core::array::Array::" + }, + { + "name": "slot_size", + "type": "core::integer::u8" + }, + { + "name": "entry_token_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "entry_token_amount", + "type": "core::integer::u128" + }, + { + "name": "enlisted_duelist_ids", + "type": "core::array::Array::" + } + ] + }, + { + "type": "enum", + "name": "pistols::models::match_queue::QueueId", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "Unranked", + "type": "()" + }, + { + "name": "Ranked", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::match_queue::QueueInfo", + "members": [ + { + "name": "queue_mode", + "type": "pistols::models::match_queue::QueueMode" + }, + { + "name": "slot", + "type": "core::integer::u8" + }, + { + "name": "timestamp_enter", + "type": "core::integer::u64" + }, + { + "name": "timestamp_ping", + "type": "core::integer::u64" + }, + { + "name": "expired", + "type": "core::bool" + }, + { + "name": "has_minted_duel", + "type": "core::bool" + } + ] + }, + { + "type": "enum", + "name": "pistols::models::match_queue::QueueMode", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "Fast", + "type": "()" + }, + { + "name": "Slow", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::match_queue::QueueNextDuelist", + "members": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "slot", + "type": "core::integer::u8" + } + ] + }, + { + "type": "event", + "name": "pistols::models::match_queue::m_MatchPlayer::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::match_queue::m_MatchQueue::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "struct", + "name": "pistols::models::pack::Pack", + "members": [ + { + "name": "pack_id", + "type": "core::integer::u128" + }, + { + "name": "pack_type", + "type": "pistols::models::pack::PackType" + }, + { + "name": "seed", + "type": "core::felt252" + }, + { + "name": "lords_amount", + "type": "core::integer::u128" + }, + { + "name": "is_open", + "type": "core::bool" + }, + { + "name": "duelist_profile", + "type": "core::option::Option::" + }, + { + "name": "pegged_lords_amount", + "type": "core::integer::u128" + } + ] + }, + { + "type": "enum", + "name": "pistols::models::pack::PackType", + "variants": [ + { + "name": "Unknown", + "type": "()" + }, + { + "name": "StarterPack", + "type": "()" + }, + { + "name": "GenesisDuelists5x", + "type": "()" + }, + { + "name": "FreeDuelist", + "type": "()" + }, + { + "name": "SingleDuelist", + "type": "()" + }, + { + "name": "BotDuelist", + "type": "()" + }, + { + "name": "FreeGenesis5x", + "type": "()" + }, + { + "name": "PiratesDuelists5x", + "type": "()" + }, + { + "name": "FreePirates5x", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::pack::PackValue", + "members": [ + { + "name": "pack_type", + "type": "pistols::models::pack::PackType" + }, + { + "name": "seed", + "type": "core::felt252" + }, + { + "name": "lords_amount", + "type": "core::integer::u128" + }, + { + "name": "is_open", + "type": "core::bool" + }, + { + "name": "duelist_profile", + "type": "core::option::Option::" + }, + { + "name": "pegged_lords_amount", + "type": "core::integer::u128" + } + ] + }, + { + "type": "event", + "name": "pistols::models::pack::m_Pack::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "struct", + "name": "pistols::models::pact::Pact", + "members": [ + { + "name": "duel_type", + "type": "pistols::models::challenge::DuelType" + }, + { + "name": "pair", + "type": "core::integer::u128" + }, + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "duel_count", + "type": "core::integer::u32" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::pact::PactValue", + "members": [ + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "duel_count", + "type": "core::integer::u32" + } + ] + }, + { + "type": "event", + "name": "pistols::models::pact::m_Pact::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "struct", + "name": "pistols::models::player::Player", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "timestamps", + "type": "pistols::models::player::PlayerTimestamps" + }, + { + "name": "totals", + "type": "pistols::models::duelist::Totals" + }, + { + "name": "alive_duelist_count", + "type": "core::integer::u16" + }, + { + "name": "active_signet_ring", + "type": "pistols::models::ring::RingType" + }, + { + "name": "referrer_address", + "type": "core::starknet::contract_address::ContractAddress" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::player::PlayerDelegation", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "delegatee_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "can_play_game", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::player::PlayerDelegationValue", + "members": [ + { + "name": "can_play_game", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::player::PlayerDuelistStack", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "duelist_profile", + "type": "pistols::types::duelist_profile::DuelistProfile" + }, + { + "name": "active_duelist_id", + "type": "core::integer::u128" + }, + { + "name": "level", + "type": "core::integer::u8" + }, + { + "name": "stacked_ids", + "type": "core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::player::PlayerDuelistStackValue", + "members": [ + { + "name": "active_duelist_id", + "type": "core::integer::u128" + }, + { + "name": "level", + "type": "core::integer::u8" + }, + { + "name": "stacked_ids", + "type": "core::array::Array::" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::player::PlayerFlags", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "is_blocked", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::player::PlayerFlagsValue", + "members": [ + { + "name": "is_blocked", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::player::PlayerOnline", + "members": [ + { + "name": "identity", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "timestamp", + "type": "core::integer::u64" + }, + { + "name": "available", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::player::PlayerOnlineValue", + "members": [ + { + "name": "timestamp", + "type": "core::integer::u64" + }, + { + "name": "available", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::player::PlayerTeamFlags", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "is_team_member", + "type": "core::bool" + }, + { + "name": "is_admin", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::player::PlayerTeamFlagsValue", + "members": [ + { + "name": "is_team_member", + "type": "core::bool" + }, + { + "name": "is_admin", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::player::PlayerTimestamps", + "members": [ + { + "name": "registered", + "type": "core::integer::u64" + }, + { + "name": "claimed_gift", + "type": "core::integer::u64" + }, + { + "name": "claimed_starter_pack", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::player::PlayerValue", + "members": [ + { + "name": "timestamps", + "type": "pistols::models::player::PlayerTimestamps" + }, + { + "name": "totals", + "type": "pistols::models::duelist::Totals" + }, + { + "name": "alive_duelist_count", + "type": "core::integer::u16" + }, + { + "name": "active_signet_ring", + "type": "pistols::models::ring::RingType" + }, + { + "name": "referrer_address", + "type": "core::starknet::contract_address::ContractAddress" + } + ] + }, + { + "type": "event", + "name": "pistols::models::player::m_Player::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::player::m_PlayerDelegation::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::player::m_PlayerDuelistStack::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::player::m_PlayerFlags::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::player::m_PlayerOnline::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::player::m_PlayerTeamFlags::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "struct", + "name": "pistols::models::pool::LordsReleaseBill", + "members": [ + { + "name": "reason", + "type": "pistols::models::pool::ReleaseReason" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "pegged_fame", + "type": "core::integer::u128" + }, + { + "name": "pegged_lords", + "type": "core::integer::u128" + }, + { + "name": "sponsored_lords", + "type": "core::integer::u128" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::pool::Pool", + "members": [ + { + "name": "pool_id", + "type": "pistols::models::pool::PoolType" + }, + { + "name": "balance_lords", + "type": "core::integer::u128" + }, + { + "name": "balance_fame", + "type": "core::integer::u128" + } + ] + }, + { + "type": "enum", + "name": "pistols::models::pool::PoolType", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "Purchases", + "type": "()" + }, + { + "name": "FamePeg", + "type": "()" + }, + { + "name": "Season", + "type": "core::integer::u32" + }, + { + "name": "Tournament", + "type": "core::integer::u64" + }, + { + "name": "Sacrifice", + "type": "()" + }, + { + "name": "Claimable", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::pool::PoolValue", + "members": [ + { + "name": "balance_lords", + "type": "core::integer::u128" + }, + { + "name": "balance_fame", + "type": "core::integer::u128" + } + ] + }, + { + "type": "enum", + "name": "pistols::models::pool::ReleaseReason", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "FameLostToCreator", + "type": "()" + }, + { + "name": "FameLostToDeveloper", + "type": "()" + }, + { + "name": "SacrificedToDeveloper", + "type": "()" + }, + { + "name": "LeaderboardPrize", + "type": "core::integer::u8" + } + ] + }, + { + "type": "event", + "name": "pistols::models::pool::m_Pool::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "struct", + "name": "pistols::models::quiz::QuizAnswer", + "members": [ + { + "name": "party_id", + "type": "core::integer::u32" + }, + { + "name": "question_id", + "type": "core::integer::u32" + }, + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "answer_number", + "type": "core::integer::u8" + }, + { + "name": "timestamp", + "type": "core::integer::u64" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::quiz::QuizAnswerValue", + "members": [ + { + "name": "answer_number", + "type": "core::integer::u8" + }, + { + "name": "timestamp", + "type": "core::integer::u64" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::quiz::QuizConfig", + "members": [ + { + "name": "key", + "type": "core::integer::u8" + }, + { + "name": "current_party_id", + "type": "core::integer::u32" + }, + { + "name": "current_question_id", + "type": "core::integer::u32" + }, + { + "name": "quiz_party_count", + "type": "core::integer::u32" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::quiz::QuizConfigValue", + "members": [ + { + "name": "current_party_id", + "type": "core::integer::u32" + }, + { + "name": "current_question_id", + "type": "core::integer::u32" + }, + { + "name": "quiz_party_count", + "type": "core::integer::u32" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::quiz::QuizParty", + "members": [ + { + "name": "party_id", + "type": "core::integer::u32" + }, + { + "name": "name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "description", + "type": "core::byte_array::ByteArray" + }, + { + "name": "timestamps", + "type": "pistols::types::timestamp::Period" + }, + { + "name": "quiz_question_count", + "type": "core::integer::u32" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::quiz::QuizPartyValue", + "members": [ + { + "name": "name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "description", + "type": "core::byte_array::ByteArray" + }, + { + "name": "timestamps", + "type": "pistols::types::timestamp::Period" + }, + { + "name": "quiz_question_count", + "type": "core::integer::u32" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::quiz::QuizQuestion", + "members": [ + { + "name": "party_id", + "type": "core::integer::u32" + }, + { + "name": "question_id", + "type": "core::integer::u32" + }, + { + "name": "question", + "type": "core::byte_array::ByteArray" + }, + { + "name": "description", + "type": "core::byte_array::ByteArray" + }, + { + "name": "options", + "type": "core::array::Array::" + }, + { + "name": "timestamps", + "type": "pistols::types::timestamp::Period" + }, + { + "name": "answer_number", + "type": "core::integer::u8" + }, + { + "name": "vrf", + "type": "core::felt252" + }, + { + "name": "hint", + "type": "core::byte_array::ByteArray" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::quiz::QuizQuestionValue", + "members": [ + { + "name": "question", + "type": "core::byte_array::ByteArray" + }, + { + "name": "description", + "type": "core::byte_array::ByteArray" + }, + { + "name": "options", + "type": "core::array::Array::" + }, + { + "name": "timestamps", + "type": "pistols::types::timestamp::Period" + }, + { + "name": "answer_number", + "type": "core::integer::u8" + }, + { + "name": "vrf", + "type": "core::felt252" + }, + { + "name": "hint", + "type": "core::byte_array::ByteArray" + } + ] + }, + { + "type": "event", + "name": "pistols::models::quiz::m_QuizAnswer::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::quiz::m_QuizConfig::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::quiz::m_QuizParty::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::quiz::m_QuizQuestion::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "struct", + "name": "pistols::models::ring::Ring", + "members": [ + { + "name": "ring_id", + "type": "core::integer::u128" + }, + { + "name": "ring_type", + "type": "pistols::models::ring::RingType" + }, + { + "name": "claimed_by", + "type": "core::starknet::contract_address::ContractAddress" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::ring::RingBalance", + "members": [ + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "ring_type", + "type": "pistols::models::ring::RingType" + }, + { + "name": "claimed", + "type": "core::bool" + }, + { + "name": "balance", + "type": "core::integer::u128" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::ring::RingBalanceValue", + "members": [ + { + "name": "claimed", + "type": "core::bool" + }, + { + "name": "balance", + "type": "core::integer::u128" + } + ] + }, + { + "type": "enum", + "name": "pistols::models::ring::RingType", + "variants": [ + { + "name": "Unknown", + "type": "()" + }, + { + "name": "GoldSignetRing", + "type": "()" + }, + { + "name": "SilverSignetRing", + "type": "()" + }, + { + "name": "LeadSignetRing", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::ring::RingValue", + "members": [ + { + "name": "ring_type", + "type": "pistols::models::ring::RingType" + }, + { + "name": "claimed_by", + "type": "core::starknet::contract_address::ContractAddress" + } + ] + }, + { + "type": "event", + "name": "pistols::models::ring::m_Ring::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::ring::m_RingBalance::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "struct", + "name": "pistols::models::season::SeasonConfig", + "members": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "rules", + "type": "pistols::types::rules::Rules" + }, + { + "name": "phase", + "type": "pistols::models::season::SeasonPhase" + }, + { + "name": "period", + "type": "pistols::types::timestamp::Period" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::season::SeasonConfigValue", + "members": [ + { + "name": "rules", + "type": "pistols::types::rules::Rules" + }, + { + "name": "phase", + "type": "pistols::models::season::SeasonPhase" + }, + { + "name": "period", + "type": "pistols::types::timestamp::Period" + } + ] + }, + { + "type": "enum", + "name": "pistols::models::season::SeasonPhase", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "InProgress", + "type": "()" + }, + { + "name": "Ended", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::season::SeasonScoreboard", + "members": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "holder", + "type": "core::felt252" + }, + { + "name": "points", + "type": "core::integer::u16" + } + ] + }, + { + "type": "struct", + "name": "pistols::models::season::SeasonScoreboardValue", + "members": [ + { + "name": "points", + "type": "core::integer::u16" + } + ] + }, + { + "type": "event", + "name": "pistols::models::season::m_SeasonConfig::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::models::season::m_SeasonScoreboard::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "interface", + "name": "pistols::systems::admin::IAdmin", + "items": [ + { + "type": "function", + "name": "set_paused", + "inputs": [ + { + "name": "paused", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "set_treasury", + "inputs": [ + { + "name": "treasury_address", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "set_realms_address", + "inputs": [ + { + "name": "realms_address", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "set_is_team_member", + "inputs": [ + { + "name": "account_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "is_team_member", + "type": "core::bool" + }, + { + "name": "is_admin", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "set_is_blocked", + "inputs": [ + { + "name": "account_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "is_blocked", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "disqualify_duelist", + "inputs": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "block_owner", + "type": "core::bool" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "qualify_duelist", + "inputs": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::integer::u8" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "am_i_admin", + "inputs": [ + { + "name": "account_address", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "get_timestamp", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u64" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "urgent_update", + "inputs": [], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "emit_past_season_leaderboard_event", + "inputs": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "duelist_ids", + "type": "core::array::Array::" + }, + { + "name": "points", + "type": "core::array::Array::" + }, + { + "name": "player_addresses", + "type": "core::array::Array::" + }, + { + "name": "lords_amount", + "type": "core::array::Array::" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::admin::admin::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::bank::IBankProtected", + "items": [ + { + "type": "function", + "name": "charge_lords_purchase", + "inputs": [ + { + "name": "token_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_ids", + "type": "core::array::Array::" + }, + { + "name": "payer", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "lords_amount", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "peg_minted_fame_to_lords", + "inputs": [ + { + "name": "payer", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "fame_amount", + "type": "core::integer::u128" + }, + { + "name": "lords_amount", + "type": "core::integer::u128" + }, + { + "name": "source_pool_type", + "type": "pistols::models::pool::PoolType" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "depeg_lords_from_fame_to_be_burned", + "inputs": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "fame_amount", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "transfer_lords", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "burn_fame", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::bank::IBankPublic", + "items": [ + { + "type": "function", + "name": "sponsor_duelists", + "inputs": [ + { + "name": "payer", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "lords_amount", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "sponsor_season", + "inputs": [ + { + "name": "payer", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "lords_amount", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "sponsor_tournament", + "inputs": [ + { + "name": "payer", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "lords_amount", + "type": "core::integer::u128" + }, + { + "name": "tournament_id", + "type": "core::integer::u64" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "calc_season_reward", + "inputs": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "lives_staked", + "type": "core::integer::u8" + } + ], + "outputs": [ + { + "type": "pistols::types::rules::RewardValues" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "can_collect_season", + "inputs": [], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "collect_season", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u32" + } + ], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::bank::bank::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::bot_player::IBotPlayer", + "items": [ + { + "type": "function", + "name": "make_salt", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "reveal_moves", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::bot_player::IBotPlayerProtected", + "items": [ + { + "type": "function", + "name": "reply_duel", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "commit_moves", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "summon_bot_duelist", + "inputs": [ + { + "name": "duelist_profile", + "type": "pistols::types::duelist_profile::DuelistProfile" + }, + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "transfer_to_winner", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::bot_player::bot_player::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::community::ICommunity", + "items": [ + { + "type": "function", + "name": "delegate_game_actions", + "inputs": [ + { + "name": "delegatee_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "enabled", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "get_duelist_leaderboard_position", + "inputs": [ + { + "name": "season_id", + "type": "core::integer::u32" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "pistols::models::leaderboard::LeaderboardPosition" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "get_leaderboard", + "inputs": [ + { + "name": "season_id", + "type": "core::integer::u32" + } + ], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "clear_call_to_challenge", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "clear_player_social_link", + "inputs": [ + { + "name": "social_platform", + "type": "pistols::models::events::SocialPlatform" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "emit_player_social_link", + "inputs": [ + { + "name": "social_platform", + "type": "pistols::models::events::SocialPlatform" + }, + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "user_name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "user_id", + "type": "core::byte_array::ByteArray" + }, + { + "name": "avatar", + "type": "core::byte_array::ByteArray" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "emit_player_setting", + "inputs": [ + { + "name": "setting", + "type": "pistols::models::events::PlayerSetting" + }, + { + "name": "value", + "type": "pistols::models::events::PlayerSettingValue" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "emit_player_bookmark", + "inputs": [ + { + "name": "target_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "target_id", + "type": "core::integer::u128" + }, + { + "name": "enabled", + "type": "core::bool" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "do_that_thing", + "inputs": [], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "set_current_quiz", + "inputs": [ + { + "name": "party_id", + "type": "core::integer::u32" + }, + { + "name": "question_id", + "type": "core::integer::u32" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "create_quiz_party", + "inputs": [ + { + "name": "name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "description", + "type": "core::byte_array::ByteArray" + }, + { + "name": "start", + "type": "core::integer::u64" + } + ], + "outputs": [ + { + "type": "pistols::models::quiz::QuizParty" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "edit_quiz_party", + "inputs": [ + { + "name": "party_id", + "type": "core::integer::u32" + }, + { + "name": "name", + "type": "core::byte_array::ByteArray" + }, + { + "name": "description", + "type": "core::byte_array::ByteArray" + }, + { + "name": "start", + "type": "core::integer::u64" + } + ], + "outputs": [ + { + "type": "pistols::models::quiz::QuizParty" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "close_quiz_party", + "inputs": [ + { + "name": "party_id", + "type": "core::integer::u32" + } + ], + "outputs": [ + { + "type": "pistols::models::quiz::QuizParty" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "create_quiz_question", + "inputs": [ + { + "name": "party_id", + "type": "core::integer::u32" + } + ], + "outputs": [ + { + "type": "pistols::models::quiz::QuizQuestion" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "open_quiz_question", + "inputs": [ + { + "name": "party_id", + "type": "core::integer::u32" + }, + { + "name": "question_id", + "type": "core::integer::u32" + }, + { + "name": "question", + "type": "core::byte_array::ByteArray" + }, + { + "name": "description", + "type": "core::byte_array::ByteArray" + }, + { + "name": "hint", + "type": "core::byte_array::ByteArray" + }, + { + "name": "options", + "type": "core::array::Array::" + } + ], + "outputs": [ + { + "type": "pistols::models::quiz::QuizQuestion" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "close_quiz_question", + "inputs": [ + { + "name": "party_id", + "type": "core::integer::u32" + }, + { + "name": "question_id", + "type": "core::integer::u32" + }, + { + "name": "answer_number", + "type": "core::integer::u8" + } + ], + "outputs": [ + { + "type": "pistols::models::quiz::QuizQuestion" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "answer_quiz_question", + "inputs": [ + { + "name": "party_id", + "type": "core::integer::u32" + }, + { + "name": "question_id", + "type": "core::integer::u32" + }, + { + "name": "answer_number", + "type": "core::integer::u8" + } + ], + "outputs": [ + { + "type": "pistols::models::quiz::QuizAnswer" + } + ], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::community::community::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + }, + { + "name": "AchievableEvent", + "type": "achievement::components::achievable::AchievableComponent::Event", + "kind": "flat" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::components::coin_component::CoinComponent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "interface", + "name": "pistols::systems::components::token_bound::ITokenBoundPublic", + "items": [ + { + "type": "function", + "name": "address_of_token", + "inputs": [ + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "token_of_address", + "inputs": [ + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "(core::starknet::contract_address::ContractAddress, core::integer::u128)" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "balance_of_token", + "inputs": [ + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "transfer_from_token", + "inputs": [ + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "sender_token_id", + "type": "core::integer::u128" + }, + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "transfer_from_token_to_token", + "inputs": [ + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "sender_token_id", + "type": "core::integer::u128" + }, + { + "name": "recipient_token_id", + "type": "core::integer::u128" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "burn_from_token", + "inputs": [ + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_id", + "type": "core::integer::u128" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "struct", + "name": "pistols::systems::components::token_bound::TokenBoundAddress", + "members": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_id", + "type": "core::integer::u128" + } + ] + }, + { + "type": "struct", + "name": "pistols::systems::components::token_bound::TokenBoundAddressValue", + "members": [ + { + "name": "contract_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "token_id", + "type": "core::integer::u128" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::components::token_bound::TokenBoundComponent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::systems::components::token_bound::m_TokenBoundAddress::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "interface", + "name": "pistols::systems::components::token_component::ITokenComponentPublic", + "items": [ + { + "type": "function", + "name": "can_mint", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "update_contract_metadata", + "inputs": [], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "update_token_metadata", + "inputs": [ + { + "name": "token_id", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "update_tokens_metadata", + "inputs": [ + { + "name": "from_token_id", + "type": "core::integer::u128" + }, + { + "name": "to_token_id", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::components::token_component::TokenComponent::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "interface", + "name": "pistols::systems::game::IGame", + "items": [ + { + "type": "function", + "name": "commit_moves", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "hashed", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "reveal_moves", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "salt", + "type": "core::felt252" + }, + { + "name": "moves", + "type": "core::array::Span::" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "collect_duel", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::integer::u8" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "get_duel_deck", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::array::Span::>" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "get_duel_progress", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "pistols::types::duel_progress::DuelProgress" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "can_collect_duel", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::game::game::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + }, + { + "name": "AchievableEvent", + "type": "achievement::components::achievable::AchievableComponent::Event", + "kind": "flat" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::game_loop::IGameLoop", + "items": [ + { + "type": "function", + "name": "execute_game_loop", + "inputs": [ + { + "name": "wrapped", + "type": "pistols::systems::rng_mock::RngWrap" + }, + { + "name": "deck", + "type": "pistols::types::cards::deck::Deck" + }, + { + "name": "round", + "type": "pistols::models::challenge::Round" + } + ], + "outputs": [ + { + "type": "(pistols::types::duel_progress::DuelProgress, pistols::models::challenge::Round)" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::game_loop::game_loop::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::matchmaker::IMatchMakerProtected", + "items": [ + { + "type": "function", + "name": "set_queue_size", + "inputs": [ + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + }, + { + "name": "size", + "type": "core::integer::u8" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "set_queue_entry_token", + "inputs": [ + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + }, + { + "name": "entry_token_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "entry_token_amount", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "close_season", + "inputs": [ + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "clear_queue", + "inputs": [ + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "clear_player_queue", + "inputs": [ + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + }, + { + "name": "player_address", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::matchmaker::IMatchMakerPublic", + "items": [ + { + "type": "function", + "name": "enlist_duelist", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "match_make_me", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + }, + { + "name": "queue_mode", + "type": "pistols::models::match_queue::QueueMode" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "get_entry_fee", + "inputs": [ + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + } + ], + "outputs": [ + { + "type": "(core::starknet::contract_address::ContractAddress, core::integer::u128)" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::matchmaker::matchmaker::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::rng::IRng", + "items": [ + { + "type": "function", + "name": "reseed", + "inputs": [ + { + "name": "seed", + "type": "core::felt252" + }, + { + "name": "salt", + "type": "core::felt252" + }, + { + "name": "mocked", + "type": "core::array::Span::" + } + ], + "outputs": [ + { + "type": "core::felt252" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "is_mocked", + "inputs": [ + { + "name": "salt", + "type": "core::felt252" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::rng::rng::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::rng_mock::IMocker", + "items": [ + { + "type": "function", + "name": "mock_values", + "inputs": [ + { + "name": "mocked", + "type": "core::array::Span::" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "struct", + "name": "pistols::systems::rng_mock::MockedValue", + "members": [ + { + "name": "salt", + "type": "core::felt252" + }, + { + "name": "value", + "type": "core::felt252" + }, + { + "name": "exists", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::systems::rng_mock::MockedValueValue", + "members": [ + { + "name": "value", + "type": "core::felt252" + }, + { + "name": "exists", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::systems::rng_mock::RngWrap", + "members": [ + { + "name": "rng_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "mocked", + "type": "core::option::Option::>" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::rng_mock::m_MockedValue::Event", + "kind": "enum", + "variants": [] + }, + { + "type": "event", + "name": "pistols::systems::rng_mock::rng_mock::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::tokens::duel_token::IDuelTokenProtected", + "items": [ + { + "type": "function", + "name": "create_match", + "inputs": [ + { + "name": "address_a", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "duelist_id_a", + "type": "core::integer::u128" + }, + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "start_match", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "address_b", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "duelist_id_b", + "type": "core::integer::u128" + }, + { + "name": "queue_id", + "type": "pistols::models::match_queue::QueueId" + }, + { + "name": "queue_mode", + "type": "pistols::models::match_queue::QueueMode" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "transfer_to_winner", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "wipe_duel", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::tokens::duel_token::IDuelTokenPublic", + "items": [ + { + "type": "function", + "name": "get_pact", + "inputs": [ + { + "name": "duel_type", + "type": "pistols::models::challenge::DuelType" + }, + { + "name": "address_a", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "address_b", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "has_pact", + "inputs": [ + { + "name": "duel_type", + "type": "pistols::models::challenge::DuelType" + }, + { + "name": "address_a", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "address_b", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "create_duel", + "inputs": [ + { + "name": "duel_type", + "type": "pistols::models::challenge::DuelType" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "challenged_address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "lives_staked", + "type": "core::integer::u8" + }, + { + "name": "expire_minutes", + "type": "core::integer::u64" + }, + { + "name": "premise", + "type": "pistols::types::premise::Premise" + }, + { + "name": "message", + "type": "core::byte_array::ByteArray" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "reply_duel", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "accepted", + "type": "core::bool" + } + ], + "outputs": [ + { + "type": "pistols::types::challenge_state::ChallengeState" + } + ], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::tokens::duel_token::duel_token::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + }, + { + "name": "SRC5Event", + "type": "openzeppelin_introspection::src5::SRC5Component::Event", + "kind": "flat" + }, + { + "name": "ERC721Event", + "type": "openzeppelin_token::erc721::erc721::ERC721Component::Event", + "kind": "flat" + }, + { + "name": "ERC721ComboEvent", + "type": "nft_combo::erc721::erc721_combo::ERC721ComboComponent::Event", + "kind": "flat" + }, + { + "name": "TokenEvent", + "type": "pistols::systems::components::token_component::TokenComponent::Event", + "kind": "flat" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::tokens::duelist_token::IDuelistTokenProtected", + "items": [ + { + "type": "function", + "name": "mint_duelists", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "quantity", + "type": "core::integer::u32" + }, + { + "name": "profile_type", + "type": "pistols::types::duelist_profile::DuelistProfile" + }, + { + "name": "seed", + "type": "core::felt252" + }, + { + "name": "pool_type", + "type": "pistols::models::pool::PoolType" + }, + { + "name": "lords_amount_to_peg_to_fame", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "get_validated_active_duelist_id", + "inputs": [ + { + "name": "address", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "lives_staked", + "type": "core::integer::u8" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "depeg_fame_to_season_pool", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "memorialize_duelists", + "inputs": [ + { + "name": "duelist_ids", + "type": "core::array::Array::" + }, + { + "name": "cause_of_death", + "type": "pistols::models::duelist::CauseOfDeath" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "transfer_rewards", + "inputs": [ + { + "name": "challenge", + "type": "pistols::models::challenge::Challenge" + }, + { + "name": "bonus", + "type": "pistols::types::rules::DuelBonus" + } + ], + "outputs": [ + { + "type": "(pistols::types::rules::RewardValues, pistols::types::rules::RewardValues)" + } + ], + "state_mutability": "external" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::tokens::duelist_token::IDuelistTokenPublic", + "items": [ + { + "type": "function", + "name": "fame_balance", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "life_count", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::integer::u8" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "is_alive", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "is_inactive", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "inactive_timestamp", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::integer::u64" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "sacrifice", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "memorialize", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::tokens::duelist_token::duelist_token::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + }, + { + "name": "SRC5Event", + "type": "openzeppelin_introspection::src5::SRC5Component::Event", + "kind": "flat" + }, + { + "name": "ERC721Event", + "type": "openzeppelin_token::erc721::erc721::ERC721Component::Event", + "kind": "flat" + }, + { + "name": "ERC721ComboEvent", + "type": "nft_combo::erc721::erc721_combo::ERC721ComboComponent::Event", + "kind": "flat" + }, + { + "name": "TokenEvent", + "type": "pistols::systems::components::token_component::TokenComponent::Event", + "kind": "flat" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::tokens::fame_coin::IFameCoinProtected", + "items": [ + { + "type": "function", + "name": "minted_duelist", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "reward_duelist_fame", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "amount", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "burn", + "inputs": [ + { + "name": "amount", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::tokens::fame_coin::fame_coin::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + }, + { + "name": "ERC20Event", + "type": "openzeppelin_token::erc20::erc20::ERC20Component::Event", + "kind": "flat" + }, + { + "name": "CoinEvent", + "type": "pistols::systems::components::coin_component::CoinComponent::Event", + "kind": "flat" + }, + { + "name": "TokenBoundEvent", + "type": "pistols::systems::components::token_bound::TokenBoundComponent::Event", + "kind": "flat" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::tokens::fools_coin::IFoolsCoinProtected", + "items": [ + { + "type": "function", + "name": "reward_player_fools", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::tokens::fools_coin::fools_coin::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + }, + { + "name": "ERC20Event", + "type": "openzeppelin_token::erc20::erc20::ERC20Component::Event", + "kind": "flat" + }, + { + "name": "CoinEvent", + "type": "pistols::systems::components::coin_component::CoinComponent::Event", + "kind": "flat" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::tokens::lords_mock::ILordsMockPublic", + "items": [ + { + "type": "function", + "name": "faucet", + "inputs": [], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "amount", + "type": "core::integer::u256" + } + ], + "outputs": [], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::tokens::lords_mock::lords_mock::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + }, + { + "name": "ERC20Event", + "type": "openzeppelin_token::erc20::erc20::ERC20Component::Event", + "kind": "flat" + }, + { + "name": "CoinEvent", + "type": "pistols::systems::components::coin_component::CoinComponent::Event", + "kind": "flat" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::tokens::pack_token::IPackTokenProtected", + "items": [ + { + "type": "function", + "name": "mint_bot_duelist", + "inputs": [ + { + "name": "duelist_profile", + "type": "pistols::types::duelist_profile::DuelistProfile" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::tokens::pack_token::IPackTokenPublic", + "items": [ + { + "type": "function", + "name": "can_claim_starter_pack", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "can_claim_gift", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "can_purchase", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "pack_type", + "type": "pistols::models::pack::PackType" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "calc_mint_fee", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "pack_type", + "type": "pistols::models::pack::PackType" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "claim_starter_pack", + "inputs": [ + { + "name": "referrer_address", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "claim_gift", + "inputs": [], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "purchase", + "inputs": [ + { + "name": "pack_type", + "type": "pistols::models::pack::PackType" + }, + { + "name": "quantity", + "type": "core::integer::u32" + } + ], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "purchase_random", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "open", + "inputs": [ + { + "name": "pack_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "mint_to", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "airdrop", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "pack_type", + "type": "pistols::models::pack::PackType" + }, + { + "name": "duelist_profile", + "type": "core::option::Option::" + }, + { + "name": "quantity", + "type": "core::integer::u32" + } + ], + "outputs": [ + { + "type": "core::array::Span::" + } + ], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::tokens::pack_token::pack_token::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + }, + { + "name": "SRC5Event", + "type": "openzeppelin_introspection::src5::SRC5Component::Event", + "kind": "flat" + }, + { + "name": "ERC721Event", + "type": "openzeppelin_token::erc721::erc721::ERC721Component::Event", + "kind": "flat" + }, + { + "name": "ERC721ComboEvent", + "type": "nft_combo::erc721::erc721_combo::ERC721ComboComponent::Event", + "kind": "flat" + }, + { + "name": "TokenEvent", + "type": "pistols::systems::components::token_component::TokenComponent::Event", + "kind": "flat" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::tokens::ring_token::IRingTokenPublic", + "items": [ + { + "type": "function", + "name": "has_claimed", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "ring_type", + "type": "pistols::models::ring::RingType" + } + ], + "outputs": [ + { + "type": "core::bool" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "get_claimable_season_ring_type", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::option::Option::" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "balance_of_ring", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "ring_type", + "type": "pistols::models::ring::RingType" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "claim_season_ring", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "ring_type", + "type": "pistols::models::ring::RingType" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "airdrop_ring", + "inputs": [ + { + "name": "recipient", + "type": "core::starknet::contract_address::ContractAddress" + }, + { + "name": "ring_type", + "type": "pistols::models::ring::RingType" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::tokens::ring_token::ring_token::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + }, + { + "name": "SRC5Event", + "type": "openzeppelin_introspection::src5::SRC5Component::Event", + "kind": "flat" + }, + { + "name": "ERC721Event", + "type": "openzeppelin_token::erc721::erc721::ERC721Component::Event", + "kind": "flat" + }, + { + "name": "ERC721ComboEvent", + "type": "nft_combo::erc721::erc721_combo::ERC721ComboComponent::Event", + "kind": "flat" + }, + { + "name": "TokenEvent", + "type": "pistols::systems::components::token_component::TokenComponent::Event", + "kind": "flat" + } + ] + }, + { + "type": "interface", + "name": "pistols::systems::tutorial::ITutorial", + "items": [ + { + "type": "function", + "name": "create_tutorial", + "inputs": [ + { + "name": "player_id", + "type": "core::integer::u128" + }, + { + "name": "tutorial_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "external" + }, + { + "type": "function", + "name": "commit_moves", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "hashed", + "type": "core::integer::u128" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "reveal_moves", + "inputs": [ + { + "name": "duelist_id", + "type": "core::integer::u128" + }, + { + "name": "duel_id", + "type": "core::integer::u128" + }, + { + "name": "salt", + "type": "core::felt252" + }, + { + "name": "moves", + "type": "core::array::Span::" + } + ], + "outputs": [], + "state_mutability": "external" + }, + { + "type": "function", + "name": "calc_duel_id", + "inputs": [ + { + "name": "player_id", + "type": "core::integer::u128" + }, + { + "name": "tutorial_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "view" + }, + { + "type": "function", + "name": "get_duel_progress", + "inputs": [ + { + "name": "duel_id", + "type": "core::integer::u128" + } + ], + "outputs": [ + { + "type": "pistols::types::duel_progress::DuelProgress" + } + ], + "state_mutability": "view" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::tutorial::tutorial::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + } + ] + }, + { + "type": "event", + "name": "pistols::systems::vrf_mock::vrf_mock::Event", + "kind": "enum", + "variants": [ + { + "name": "UpgradeableEvent", + "type": "dojo::contract::components::upgradeable::upgradeable_cpt::Event", + "kind": "nested" + }, + { + "name": "WorldProviderEvent", + "type": "dojo::contract::components::world_provider::world_provider_cpt::Event", + "kind": "nested" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::cards::blades::BladesCard", + "variants": [ + { + "name": "None", + "type": "()" + }, + { + "name": "Seppuku", + "type": "()" + }, + { + "name": "PocketPistol", + "type": "()" + }, + { + "name": "Behead", + "type": "()" + }, + { + "name": "Grapple", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::types::cards::deck::Deck", + "members": [ + { + "name": "fire_cards", + "type": "core::array::Span::" + }, + { + "name": "dodge_cards", + "type": "core::array::Span::" + }, + { + "name": "tactics_cards", + "type": "core::array::Span::" + }, + { + "name": "blades_cards", + "type": "core::array::Span::" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::cards::env::EnvCard", + "variants": [ + { + "name": "None", + "type": "()" + }, + { + "name": "DamageUp", + "type": "()" + }, + { + "name": "DamageDown", + "type": "()" + }, + { + "name": "ChancesUp", + "type": "()" + }, + { + "name": "ChancesDown", + "type": "()" + }, + { + "name": "DoubleDamageUp", + "type": "()" + }, + { + "name": "DoubleChancesUp", + "type": "()" + }, + { + "name": "SpecialAllShotsHit", + "type": "()" + }, + { + "name": "SpecialAllShotsMiss", + "type": "()" + }, + { + "name": "SpecialDoubleTactics", + "type": "()" + }, + { + "name": "SpecialNoTactics", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::types::cards::hand::DuelistHand", + "members": [ + { + "name": "card_fire", + "type": "pistols::types::cards::paces::PacesCard" + }, + { + "name": "card_dodge", + "type": "pistols::types::cards::paces::PacesCard" + }, + { + "name": "card_tactics", + "type": "pistols::types::cards::tactics::TacticsCard" + }, + { + "name": "card_blades", + "type": "pistols::types::cards::blades::BladesCard" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::cards::hand::FinalBlow", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "Paces", + "type": "pistols::types::cards::paces::PacesCard" + }, + { + "name": "Blades", + "type": "pistols::types::cards::blades::BladesCard" + }, + { + "name": "Forsaken", + "type": "()" + }, + { + "name": "Unpaired", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::cards::paces::PacesCard", + "variants": [ + { + "name": "None", + "type": "()" + }, + { + "name": "Paces1", + "type": "()" + }, + { + "name": "Paces2", + "type": "()" + }, + { + "name": "Paces3", + "type": "()" + }, + { + "name": "Paces4", + "type": "()" + }, + { + "name": "Paces5", + "type": "()" + }, + { + "name": "Paces6", + "type": "()" + }, + { + "name": "Paces7", + "type": "()" + }, + { + "name": "Paces8", + "type": "()" + }, + { + "name": "Paces9", + "type": "()" + }, + { + "name": "Paces10", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::cards::tactics::TacticsCard", + "variants": [ + { + "name": "None", + "type": "()" + }, + { + "name": "Insult", + "type": "()" + }, + { + "name": "CoinToss", + "type": "()" + }, + { + "name": "Vengeful", + "type": "()" + }, + { + "name": "ThickCoat", + "type": "()" + }, + { + "name": "Reversal", + "type": "()" + }, + { + "name": "Bananas", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::challenge_state::ChallengeState", + "variants": [ + { + "name": "Null", + "type": "()" + }, + { + "name": "Awaiting", + "type": "()" + }, + { + "name": "Withdrawn", + "type": "()" + }, + { + "name": "Refused", + "type": "()" + }, + { + "name": "Expired", + "type": "()" + }, + { + "name": "InProgress", + "type": "()" + }, + { + "name": "Resolved", + "type": "()" + }, + { + "name": "Draw", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::types::duel_progress::DuelProgress", + "members": [ + { + "name": "steps", + "type": "core::array::Span::" + }, + { + "name": "winner", + "type": "core::integer::u8" + }, + { + "name": "hand_a", + "type": "pistols::types::cards::hand::DuelistHand" + }, + { + "name": "hand_b", + "type": "pistols::types::cards::hand::DuelistHand" + } + ] + }, + { + "type": "struct", + "name": "pistols::types::duel_progress::DuelStep", + "members": [ + { + "name": "pace", + "type": "pistols::types::cards::paces::PacesCard" + }, + { + "name": "card_env", + "type": "pistols::types::cards::env::EnvCard" + }, + { + "name": "dice_env", + "type": "core::integer::u8" + }, + { + "name": "specials_a", + "type": "pistols::types::duel_progress::SpecialsDrawn" + }, + { + "name": "specials_b", + "type": "pistols::types::duel_progress::SpecialsDrawn" + }, + { + "name": "card_a", + "type": "pistols::types::duel_progress::DuelistDrawnCard" + }, + { + "name": "card_b", + "type": "pistols::types::duel_progress::DuelistDrawnCard" + }, + { + "name": "state_a", + "type": "pistols::models::challenge::DuelistState" + }, + { + "name": "state_b", + "type": "pistols::models::challenge::DuelistState" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::duel_progress::DuelistDrawnCard", + "variants": [ + { + "name": "None", + "type": "()" + }, + { + "name": "Fire", + "type": "pistols::types::cards::paces::PacesCard" + }, + { + "name": "Dodge", + "type": "pistols::types::cards::paces::PacesCard" + }, + { + "name": "Blades", + "type": "pistols::types::cards::blades::BladesCard" + } + ] + }, + { + "type": "struct", + "name": "pistols::types::duel_progress::SpecialsDrawn", + "members": [ + { + "name": "tactics", + "type": "pistols::types::cards::tactics::TacticsCard" + }, + { + "name": "coin_toss", + "type": "core::bool" + }, + { + "name": "reversal", + "type": "core::bool" + }, + { + "name": "shots_modifier", + "type": "pistols::types::cards::env::EnvCard" + }, + { + "name": "tactics_modifier", + "type": "pistols::types::cards::env::EnvCard" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::duelist_profile::BotKey", + "variants": [ + { + "name": "Unknown", + "type": "()" + }, + { + "name": "TinMan", + "type": "()" + }, + { + "name": "Scarecrow", + "type": "()" + }, + { + "name": "Leon", + "type": "()" + }, + { + "name": "Pro", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::duelist_profile::CharacterKey", + "variants": [ + { + "name": "Unknown", + "type": "()" + }, + { + "name": "Bartender", + "type": "()" + }, + { + "name": "Drunkard", + "type": "()" + }, + { + "name": "Devil", + "type": "()" + }, + { + "name": "Player", + "type": "()" + }, + { + "name": "ImpMaster", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::duelist_profile::DuelistProfile", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "Character", + "type": "pistols::types::duelist_profile::CharacterKey" + }, + { + "name": "Bot", + "type": "pistols::types::duelist_profile::BotKey" + }, + { + "name": "Genesis", + "type": "pistols::types::duelist_profile::GenesisKey" + }, + { + "name": "Legends", + "type": "pistols::types::duelist_profile::LegendsKey" + }, + { + "name": "Pirates", + "type": "pistols::types::duelist_profile::PiratesKey" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::duelist_profile::GenesisKey", + "variants": [ + { + "name": "Unknown", + "type": "()" + }, + { + "name": "SerWalker", + "type": "()" + }, + { + "name": "LadyVengeance", + "type": "()" + }, + { + "name": "Duke", + "type": "()" + }, + { + "name": "Duella", + "type": "()" + }, + { + "name": "Jameson", + "type": "()" + }, + { + "name": "Misty", + "type": "()" + }, + { + "name": "Karaku", + "type": "()" + }, + { + "name": "Kenzu", + "type": "()" + }, + { + "name": "Pilgrim", + "type": "()" + }, + { + "name": "Jack", + "type": "()" + }, + { + "name": "Pops", + "type": "()" + }, + { + "name": "NynJah", + "type": "()" + }, + { + "name": "Thrak", + "type": "()" + }, + { + "name": "Bloberto", + "type": "()" + }, + { + "name": "Squiddo", + "type": "()" + }, + { + "name": "SlenderDuck", + "type": "()" + }, + { + "name": "Breadman", + "type": "()" + }, + { + "name": "Groggus", + "type": "()" + }, + { + "name": "Pistolopher", + "type": "()" + }, + { + "name": "Secreto", + "type": "()" + }, + { + "name": "ShadowMare", + "type": "()" + }, + { + "name": "Fjolnir", + "type": "()" + }, + { + "name": "ChimpDylan", + "type": "()" + }, + { + "name": "Hinata", + "type": "()" + }, + { + "name": "HelixVex", + "type": "()" + }, + { + "name": "BuccaneerJames", + "type": "()" + }, + { + "name": "TheSensei", + "type": "()" + }, + { + "name": "SenseiTarrence", + "type": "()" + }, + { + "name": "ThePainter", + "type": "()" + }, + { + "name": "Ashe", + "type": "()" + }, + { + "name": "SerGogi", + "type": "()" + }, + { + "name": "TheSurvivor", + "type": "()" + }, + { + "name": "TheFrenchman", + "type": "()" + }, + { + "name": "SerFocger", + "type": "()" + }, + { + "name": "SillySosij", + "type": "()" + }, + { + "name": "BloodBeard", + "type": "()" + }, + { + "name": "Fredison", + "type": "()" + }, + { + "name": "TheBard", + "type": "()" + }, + { + "name": "Ponzimancer", + "type": "()" + }, + { + "name": "DealerTani", + "type": "()" + }, + { + "name": "SerRichard", + "type": "()" + }, + { + "name": "Recipromancer", + "type": "()" + }, + { + "name": "Mataleone", + "type": "()" + }, + { + "name": "FortunaRegem", + "type": "()" + }, + { + "name": "Amaro", + "type": "()" + }, + { + "name": "Mononoke", + "type": "()" + }, + { + "name": "Parsa", + "type": "()" + }, + { + "name": "Jubilee", + "type": "()" + }, + { + "name": "LadyOfCrows", + "type": "()" + }, + { + "name": "BananaDuke", + "type": "()" + }, + { + "name": "LordGladstone", + "type": "()" + }, + { + "name": "LadyStrokes", + "type": "()" + }, + { + "name": "Bliss", + "type": "()" + }, + { + "name": "StormMirror", + "type": "()" + }, + { + "name": "Aldreda", + "type": "()" + }, + { + "name": "Petronella", + "type": "()" + }, + { + "name": "SeraphinaRose", + "type": "()" + }, + { + "name": "LucienDeSombrel", + "type": "()" + }, + { + "name": "FyernVirelock", + "type": "()" + }, + { + "name": "Noir", + "type": "()" + }, + { + "name": "QueenAce", + "type": "()" + }, + { + "name": "JoshPeel", + "type": "()" + }, + { + "name": "IronHandRogan", + "type": "()" + }, + { + "name": "GoodPupStarky", + "type": "()" + }, + { + "name": "ImyaSuspect", + "type": "()" + }, + { + "name": "TheAlchemist", + "type": "()" + }, + { + "name": "PonziusPilate", + "type": "()" + }, + { + "name": "MistressNoodle", + "type": "()" + }, + { + "name": "MasterOfSecrets", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::duelist_profile::LegendsKey", + "variants": [ + { + "name": "Unknown", + "type": "()" + }, + { + "name": "TGC1", + "type": "()" + }, + { + "name": "TGC2", + "type": "()" + }, + { + "name": "Cumberlord", + "type": "()" + }, + { + "name": "JulianTryhard", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::duelist_profile::PiratesKey", + "variants": [ + { + "name": "Unknown", + "type": "()" + }, + { + "name": "ArdineTideborn", + "type": "()" + }, + { + "name": "CaptainEtienne", + "type": "()" + }, + { + "name": "CaptainGarran", + "type": "()" + }, + { + "name": "CorsairKojo", + "type": "()" + }, + { + "name": "Diego", + "type": "()" + }, + { + "name": "Mirella", + "type": "()" + }, + { + "name": "GunnerFinnan", + "type": "()" + }, + { + "name": "Ingrid", + "type": "()" + }, + { + "name": "RaiderBjorn", + "type": "()" + }, + { + "name": "Reika", + "type": "()" + }, + { + "name": "SableTideborn", + "type": "()" + }, + { + "name": "AbyssalAdmiral", + "type": "()" + }, + { + "name": "SeaWitch", + "type": "()" + }, + { + "name": "Asha", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::premise::Premise", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "Matter", + "type": "()" + }, + { + "name": "Debt", + "type": "()" + }, + { + "name": "Dispute", + "type": "()" + }, + { + "name": "Honour", + "type": "()" + }, + { + "name": "Hatred", + "type": "()" + }, + { + "name": "Blood", + "type": "()" + }, + { + "name": "Nothing", + "type": "()" + }, + { + "name": "Tournament", + "type": "()" + }, + { + "name": "Treaty", + "type": "()" + }, + { + "name": "Lesson", + "type": "()" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::round_state::RoundState", + "variants": [ + { + "name": "Null", + "type": "()" + }, + { + "name": "Commit", + "type": "()" + }, + { + "name": "Reveal", + "type": "()" + }, + { + "name": "Finished", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::types::rules::DuelBonus", + "members": [ + { + "name": "duelist_a", + "type": "pistols::types::rules::DuelistBonus" + }, + { + "name": "duelist_b", + "type": "pistols::types::rules::DuelistBonus" + } + ] + }, + { + "type": "struct", + "name": "pistols::types::rules::DuelistBonus", + "members": [ + { + "name": "kill_pace", + "type": "core::integer::u8" + }, + { + "name": "hit", + "type": "core::bool" + }, + { + "name": "dodge", + "type": "core::bool" + } + ] + }, + { + "type": "struct", + "name": "pistols::types::rules::RewardValues", + "members": [ + { + "name": "fame_lost", + "type": "core::integer::u128" + }, + { + "name": "fame_gained", + "type": "core::integer::u128" + }, + { + "name": "fools_gained", + "type": "core::integer::u128" + }, + { + "name": "points_scored", + "type": "core::integer::u16" + }, + { + "name": "position", + "type": "core::integer::u8" + }, + { + "name": "fame_burned", + "type": "core::integer::u128" + }, + { + "name": "lords_unlocked", + "type": "core::integer::u128" + }, + { + "name": "survived", + "type": "core::bool" + } + ] + }, + { + "type": "enum", + "name": "pistols::types::rules::Rules", + "variants": [ + { + "name": "Undefined", + "type": "()" + }, + { + "name": "Season", + "type": "()" + }, + { + "name": "Unranked", + "type": "()" + } + ] + }, + { + "type": "struct", + "name": "pistols::types::timestamp::Period", + "members": [ + { + "name": "start", + "type": "core::integer::u64" + }, + { + "name": "end", + "type": "core::integer::u64" + } + ] + } + ] +} diff --git a/packages/core/src/provider/DojoProvider.ts b/packages/core/src/provider/DojoProvider.ts index 2e2ede2ea..0525e1879 100644 --- a/packages/core/src/provider/DojoProvider.ts +++ b/packages/core/src/provider/DojoProvider.ts @@ -16,6 +16,7 @@ import { import { LOCAL_KATANA } from "../constants"; import { ConsoleLogger, type LogLevel } from "../logger/logger"; import { type DojoCall, WorldEntryPoints } from "../types"; +import { compileDojoCalldata } from "../utils/compile"; import { getContractByName, parseDojoCall } from "../utils"; import { Provider } from "./provider"; @@ -296,10 +297,14 @@ class DojoProviderBase extends Provider { address: contractInfos.address, providerOrAccount: this.provider, }); - return await contract.call( + const compiledCalldata = compileDojoCalldata( + contractInfos.abi, + nameSpace, + call.contractName, call.entrypoint, - call.calldata as ArgsOrCalldata + call.calldata ); + return await contract.call(call.entrypoint, compiledCalldata); } catch (error) { this.logger.error( `Failed to callContract ${call.contractName}: ${error}` @@ -350,6 +355,18 @@ class DojoProviderBase extends Provider { string, ActionMethodImplementation >; + + const functionCounts = new Map(); + for (const contract of this.manifest.contracts as Array) { + if (!contract?.systems?.length) continue; + for (const systemName of contract.systems as Array) { + functionCounts.set( + systemName, + (functionCounts.get(systemName) || 0) + 1 + ); + } + } + const isAccountLike = ( value: unknown ): value is Account | AccountInterface => @@ -373,7 +390,12 @@ class DojoProviderBase extends Provider { const abiItems = Array.isArray(contract.abi) ? contract.abi : []; for (const systemName of contract.systems as Array) { - if (systemName in host) { + const isDuplicate = (functionCounts.get(systemName) || 0) > 1; + const methodName = isDuplicate + ? `${names.namespace}_${names.contractName}_${systemName}` + : systemName; + + if (methodName in host) { continue; } @@ -405,7 +427,7 @@ class DojoProviderBase extends Provider { : "external"; if (stateMutability === "view") { - host[systemName] = async ( + host[methodName] = async ( ...parameters: Array ) => { const [maybeAccountOrArgs, maybeArgs] = parameters; @@ -417,7 +439,7 @@ class DojoProviderBase extends Provider { if (expectsArgs && args === undefined) { throw new Error( - `Missing arguments for action "${systemName}"` + `Missing arguments for action "${methodName}"` ); } @@ -431,12 +453,12 @@ class DojoProviderBase extends Provider { continue; } - host[systemName] = async (...parameters: Array) => { + host[methodName] = async (...parameters: Array) => { const [maybeAccount, maybeArgs] = parameters; if (!isAccountLike(maybeAccount)) { throw new Error( - `Account is required for action "${systemName}"` + `Account is required for action "${methodName}"` ); } @@ -446,7 +468,7 @@ class DojoProviderBase extends Provider { if (expectsArgs && args === undefined) { throw new Error( - `Missing arguments for action "${systemName}"` + `Missing arguments for action "${methodName}"` ); } diff --git a/packages/core/src/utils/compile.ts b/packages/core/src/utils/compile.ts new file mode 100644 index 000000000..0a0b58b25 --- /dev/null +++ b/packages/core/src/utils/compile.ts @@ -0,0 +1,165 @@ +import { + type Abi, + type AbiEntry, + type Calldata, + type FunctionAbi, + type InterfaceAbi, + type RawArgs, + CallData, + createAbiParser, + parseCalldataField, + isNoConstructorValid, +} from "starknet"; + +function isLen(name: string): boolean { + return /_len$/.test(name); +} + +function isCairo1Type(type: string): boolean { + return type.includes("::"); +} + +export function findFunctionAbiByNamespace( + abi: Abi, + namespace: string, + contractName: string, + functionName: string +): FunctionAbi | undefined { + const contractPattern = `::${contractName}::`; + + const exactMatch = abi.find((item): item is InterfaceAbi => { + if (item?.type !== "interface") return false; + const name = item.name || ""; + if (!name.startsWith(`${namespace}::`)) return false; + if (!name.includes(contractPattern)) return false; + return ( + Array.isArray(item.items) && + item.items.some( + (fn: any) => + fn?.type === "function" && fn?.name === functionName + ) + ); + }); + + if (exactMatch) { + return exactMatch.items.find( + (fn: any) => fn?.type === "function" && fn?.name === functionName + ) as FunctionAbi | undefined; + } + + const namespaceMatch = abi.find((item): item is InterfaceAbi => { + if (item?.type !== "interface") return false; + const name = item.name || ""; + if (!name.startsWith(`${namespace}::`)) return false; + return ( + Array.isArray(item.items) && + item.items.some( + (fn: any) => + fn?.type === "function" && fn?.name === functionName + ) + ); + }); + + if (namespaceMatch) { + return namespaceMatch.items.find( + (fn: any) => fn?.type === "function" && fn?.name === functionName + ) as FunctionAbi | undefined; + } + + for (const item of abi) { + if (item?.type === "interface" && Array.isArray(item.items)) { + const func = item.items.find( + (fn: any) => + fn?.type === "function" && fn?.name === functionName + ); + if (func) return func as FunctionAbi; + } + } + + return abi.find( + (item) => item?.type === "function" && item?.name === functionName + ) as FunctionAbi | undefined; +} + +export function compileDojoCalldata( + abi: Abi, + namespace: string, + contractName: string, + method: string, + argsCalldata: RawArgs +): Calldata { + const structs = CallData.getAbiStruct(abi); + const enums = CallData.getAbiEnum(abi); + const parser = createAbiParser(abi); + + const abiMethod = findFunctionAbiByNamespace( + abi, + namespace, + contractName, + method + ); + + if (isNoConstructorValid(method, argsCalldata, abiMethod)) { + return []; + } + + if (!abiMethod) { + throw new Error( + `Method "${method}" not found in ABI for namespace "${namespace}", contract "${contractName}"` + ); + } + + let args: any[]; + if (Array.isArray(argsCalldata)) { + const expectedCount = abiMethod.inputs.filter( + (input) => !isLen(input.name) + ).length; + if (argsCalldata.length !== expectedCount) { + throw new Error( + `Expected ${expectedCount} arguments for method "${method}", got ${argsCalldata.length}` + ); + } + args = argsCalldata; + } else { + args = abiMethod.inputs + .filter((input) => !isLen(input.name)) + .map((input) => { + const value = (argsCalldata as Record)[ + input.name + ]; + if (value === undefined) { + throw new Error( + `Missing argument "${input.name}" for method "${method}"` + ); + } + return value; + }); + } + + const argsIterator = args[Symbol.iterator](); + const callArray: string[] = abiMethod.inputs.reduce( + (acc: string[], input: AbiEntry) => { + if (isLen(input.name) && !isCairo1Type(input.type)) { + return acc; + } + return acc.concat( + parseCalldataField({ + argsIterator, + input, + structs, + enums, + parser, + }) + ); + }, + [] + ); + + Object.defineProperty(callArray, "__compiled__", { + enumerable: false, + writable: false, + value: true, + }); + + return callArray as Calldata; +} diff --git a/packages/core/src/utils/index.ts b/packages/core/src/utils/index.ts index 5ec339745..619ebb87c 100644 --- a/packages/core/src/utils/index.ts +++ b/packages/core/src/utils/index.ts @@ -1,6 +1,7 @@ -import { Call, CallData, TypedData } from "starknet"; +import { Call, TypedData } from "starknet"; import { DojoCall } from "../types"; +import { compileDojoCalldata } from "./compile"; /** * Gets a contract from a manifest by name. @@ -40,9 +41,18 @@ export const parseDojoCall = ( call.contractName ); + if (!contract) { + throw new Error( + `Contract "${call.contractName}" not found in namespace "${nameSpace}"` + ); + } + return { contractAddress: contract.address, - calldata: new CallData(contract.abi).compile( + calldata: compileDojoCalldata( + contract.abi, + nameSpace, + call.contractName, call.entrypoint, call.calldata ),