Untitled
unknown
plain_text
7 months ago
50 kB
6
Indexable
Never
{ "version": "0.1.0", "name": "battleboosters", "instructions": [ { "name": "initialize", "accounts": [ { "name": "creator", "isMut": true, "isSigner": true }, { "name": "program", "isMut": true, "isSigner": false }, { "name": "bank", "isMut": true, "isSigner": false }, { "name": "mintAuthority", "isMut": true, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "authorityBump", "type": "u8" }, { "name": "bankBump", "type": "u8" }, { "name": "adminPubkey", "type": "publicKey" }, { "name": "nftFighterPackPrice", "type": "u64" }, { "name": "boosterPrice", "type": "u64" }, { "name": "fighterPackAmount", "type": "u8" } ] }, { "name": "initializeRarity", "accounts": [ { "name": "creator", "isMut": true, "isSigner": true }, { "name": "rarity", "isMut": true, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "fighter", "type": { "vec": { "defined": "RarityFighter" } } }, { "name": "energyBooster", "type": { "vec": { "defined": "RarityBooster" } } }, { "name": "shieldBooster", "type": { "vec": { "defined": "RarityBooster" } } }, { "name": "pointsBooster", "type": { "vec": { "defined": "RarityBooster" } } }, { "name": "fighterProbabilities", "type": "bytes" }, { "name": "boosterProbabilities", "type": "bytes" } ] }, { "name": "initializePlayer", "accounts": [ { "name": "creator", "isMut": true, "isSigner": true }, { "name": "playerAccount", "isMut": true, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "playerPubkey", "type": "publicKey" } ] }, { "name": "createNftCollection", "accounts": [ { "name": "creator", "isMut": true, "isSigner": true }, { "name": "program", "isMut": true, "isSigner": false }, { "name": "mintAuthority", "isMut": true, "isSigner": false }, { "name": "minter", "isMut": true, "isSigner": false }, { "name": "metadata", "isMut": true, "isSigner": false }, { "name": "masterEdition", "isMut": true, "isSigner": false }, { "name": "tokenAccount", "isMut": true, "isSigner": false }, { "name": "tokenRecord", "isMut": true, "isSigner": false }, { "name": "associatedTokenProgram", "isMut": false, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false }, { "name": "rent", "isMut": false, "isSigner": false }, { "name": "sysvarInstructions", "isMut": false, "isSigner": false }, { "name": "tokenProgram", "isMut": false, "isSigner": false }, { "name": "metadataProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "collectionId", "type": { "defined": "CollectionType" } }, { "name": "collectionName", "type": "string" }, { "name": "symbol", "type": "string" }, { "name": "uri", "type": "string" }, { "name": "fees", "type": "u16" } ] }, { "name": "purchaseNfts", "accounts": [ { "name": "signer", "isMut": true, "isSigner": true }, { "name": "recipient", "isMut": true, "isSigner": false }, { "name": "program", "isMut": true, "isSigner": false }, { "name": "playerAccount", "isMut": true, "isSigner": false }, { "name": "collectorPack", "isMut": true, "isSigner": false }, { "name": "bank", "isMut": true, "isSigner": false }, { "name": "bankEscrow", "isMut": true, "isSigner": false }, { "name": "priceFeed", "isMut": false, "isSigner": false }, { "name": "randomnessService", "isMut": false, "isSigner": false, "docs": [ "The Solana Randomness Service program." ] }, { "name": "randomnessRequest", "isMut": true, "isSigner": true, "docs": [ "The account that will be created on-chain to hold the randomness request.", "Used by the off-chain oracle to pickup the request and fulfill it." ] }, { "name": "randomnessEscrow", "isMut": true, "isSigner": false, "docs": [ "The TokenAccount that will store the funds for the randomness request." ] }, { "name": "randomnessState", "isMut": false, "isSigner": false, "docs": [ "The randomness service's state account. Responsible for storing the", "reward escrow and the cost per random byte." ] }, { "name": "randomnessMint", "isMut": false, "isSigner": false, "docs": [ "The token mint to use for paying for randomness requests." ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ "The Solana System program. Used to allocate space on-chain for the randomness_request account." ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ "The Solana Token program. Used to transfer funds to the randomness escrow." ] }, { "name": "associatedTokenProgram", "isMut": false, "isSigner": false, "docs": [ "The Solana Associated Token program. Used to create the TokenAccount for the randomness escrow." ] } ], "args": [ { "name": "bankEscrowBump", "type": "u8" }, { "name": "requests", "type": { "vec": { "defined": "PurchaseRequest" } } } ] }, { "name": "consumeRandomness", "accounts": [ { "name": "randomnessState", "isMut": false, "isSigner": true, "docs": [ "We need to make sure the randomness service signed this requests so it can only be invoked by a PDA and not a user." ] }, { "name": "request", "isMut": false, "isSigner": false }, { "name": "recipient", "isMut": false, "isSigner": false }, { "name": "collectorPack", "isMut": true, "isSigner": false } ], "args": [ { "name": "orderNonce", "type": "u64" }, { "name": "recipientPubkey", "type": "publicKey" }, { "name": "bankEscrowBump", "type": "u8" }, { "name": "totalLamports", "type": "u64" }, { "name": "result", "type": "bytes" } ] }, { "name": "adminAirdropCollectorPack", "docs": [ "ONLY FOR TEST PURPOSE" ], "accounts": [ { "name": "signer", "isMut": true, "isSigner": true }, { "name": "recipient", "isMut": true, "isSigner": false }, { "name": "program", "isMut": true, "isSigner": false }, { "name": "playerAccount", "isMut": true, "isSigner": false }, { "name": "collectorPack", "isMut": true, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ "The Solana System program. Used to allocate space on-chain for the randomness_request account." ] } ], "args": [ { "name": "boosterMintAlowance", "type": "u64" }, { "name": "fighterMintAllowance", "type": "u64" }, { "name": "championsPassMintAllowance", "type": "u64" } ] }, { "name": "generateMintableGameAsset", "accounts": [ { "name": "signer", "isMut": true, "isSigner": true }, { "name": "program", "isMut": true, "isSigner": false }, { "name": "playerAccount", "isMut": true, "isSigner": false }, { "name": "collectorPack", "isMut": true, "isSigner": false }, { "name": "rarity", "isMut": true, "isSigner": false, "isOptional": true }, { "name": "mintableGameAsset", "isMut": true, "isSigner": false }, { "name": "playerGameAssetLink", "isMut": true, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "playerGameAssetLinkNonce", "type": "u64" }, { "name": "request", "type": { "defined": "OpenRequest" } } ] }, { "name": "mintCollectorPack", "accounts": [ { "name": "creator", "isMut": true, "isSigner": true }, { "name": "program", "isMut": true, "isSigner": false }, { "name": "mintAuthority", "isMut": true, "isSigner": false }, { "name": "energyMinter", "isMut": true, "isSigner": false }, { "name": "energyMetadata", "isMut": true, "isSigner": false }, { "name": "energyMasterEdition", "isMut": true, "isSigner": false }, { "name": "minter", "isMut": true, "isSigner": false }, { "name": "metadata", "isMut": true, "isSigner": false }, { "name": "masterEdition", "isMut": true, "isSigner": false }, { "name": "tokenAccount", "isMut": true, "isSigner": false }, { "name": "tokenRecord", "isMut": true, "isSigner": false }, { "name": "associatedTokenProgram", "isMut": false, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false }, { "name": "sysvarInstructions", "isMut": false, "isSigner": false }, { "name": "tokenProgram", "isMut": false, "isSigner": false }, { "name": "metadataProgram", "isMut": false, "isSigner": false } ], "args": [] }, { "name": "createNewEvent", "accounts": [ { "name": "creator", "isMut": true, "isSigner": true }, { "name": "program", "isMut": true, "isSigner": false }, { "name": "event", "isMut": true, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "startDate", "type": "i64" }, { "name": "endDate", "type": "i64" }, { "name": "tournamentType", "type": { "defined": "TournamentType" } } ] }, { "name": "updateEvent", "accounts": [ { "name": "creator", "isMut": true, "isSigner": true }, { "name": "program", "isMut": true, "isSigner": false }, { "name": "event", "isMut": true, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "eventNonce", "type": "u64" }, { "name": "startDate", "type": "i64" }, { "name": "endDate", "type": "i64" }, { "name": "tournamentType", "type": { "defined": "TournamentType" } } ] }, { "name": "createNewFightCard", "accounts": [ { "name": "creator", "isMut": true, "isSigner": true }, { "name": "program", "isMut": true, "isSigner": false }, { "name": "event", "isMut": true, "isSigner": false }, { "name": "fightCard", "isMut": true, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "eventNonce", "type": "u64" }, { "name": "params", "type": { "defined": "FightCardData" } } ] }, { "name": "updateFightCard", "accounts": [ { "name": "creator", "isMut": true, "isSigner": true }, { "name": "program", "isMut": true, "isSigner": false }, { "name": "event", "isMut": true, "isSigner": false }, { "name": "fightCard", "isMut": true, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "eventNonce", "type": "u64" }, { "name": "fightCardId", "type": "u8" }, { "name": "params", "type": { "defined": "FightCardData" } } ] }, { "name": "joinFightCard", "accounts": [ { "name": "signer", "isMut": true, "isSigner": true }, { "name": "program", "isMut": true, "isSigner": false }, { "name": "event", "isMut": true, "isSigner": false }, { "name": "fighterAsset", "isMut": true, "isSigner": false }, { "name": "energyBoosterAsset", "isMut": true, "isSigner": false, "isOptional": true }, { "name": "shieldBoosterAsset", "isMut": true, "isSigner": false, "isOptional": true }, { "name": "pointsBoosterAsset", "isMut": true, "isSigner": false, "isOptional": true }, { "name": "championsPassAsset", "isMut": true, "isSigner": false, "isOptional": true }, { "name": "fighterLink", "isMut": true, "isSigner": false }, { "name": "energyBoosterLink", "isMut": true, "isSigner": false, "isOptional": true }, { "name": "shieldBoosterLink", "isMut": true, "isSigner": false, "isOptional": true }, { "name": "pointsBoosterLink", "isMut": true, "isSigner": false, "isOptional": true }, { "name": "championsPassLink", "isMut": true, "isSigner": false, "isOptional": true }, { "name": "fightCard", "isMut": true, "isSigner": false }, { "name": "fightCardLink", "isMut": true, "isSigner": false }, { "name": "eventLink", "isMut": true, "isSigner": false }, { "name": "systemProgram", "isMut": false, "isSigner": false } ], "args": [ { "name": "eventNonce", "type": "u64" }, { "name": "fightCardNonce", "type": "u8" }, { "name": "fighterAssetNonce", "type": "u64" }, { "name": "energyBoosterAssetNonce", "type": { "option": "u64" } }, { "name": "shieldBoosterAssetNonce", "type": { "option": "u64" } }, { "name": "pointsBoosterAssetNonce", "type": { "option": "u64" } }, { "name": "championsPassAssetNonce", "type": { "option": "u64" } }, { "name": "fighterLinkNonce", "type": "u64" }, { "name": "energyBoosterLinkNonce", "type": { "option": "u64" } }, { "name": "shieldBoosterLinkNonce", "type": { "option": "u64" } }, { "name": "pointsBoosterLinkNonce", "type": { "option": "u64" } }, { "name": "championsPassLinkNonce", "type": { "option": "u64" } }, { "name": "fighterColorSide", "type": { "defined": "FighterColorSide" } } ] } ], "accounts": [ { "name": "CollectorPack", "type": { "kind": "struct", "fields": [ { "name": "fighterMintAllowance", "type": "u64" }, { "name": "boosterMintAllowance", "type": "u64" }, { "name": "championsPassMintAllowance", "type": "u64" }, { "name": "randomness", "type": { "option": "bytes" } } ] } }, { "name": "EventData", "type": { "kind": "struct", "fields": [ { "name": "fightCardNonce", "docs": [ "Represent the current amount of created fight card", "On average, a UFC event typically features around 12 to 15 fights", "We set it as `u8` because there will be never more than `255` per events in an MMA fight week" ], "type": "u8" }, { "name": "tournamentType", "docs": [ "The type of tournament MainCard, Prelims or Early Prelims" ], "type": { "defined": "TournamentType" } }, { "name": "startDate", "docs": [ "Start date in seconds" ], "type": "i64" }, { "name": "endDate", "docs": [ "End date in seconds" ], "type": "i64" } ] } }, { "name": "FightCardData", "type": { "kind": "struct", "fields": [ { "name": "eventPubkey", "docs": [ "Public key of the event account this fight card is part of" ], "type": "publicKey" }, { "name": "eventNonceTracker", "docs": [ "Nonce of the event PDA this fight card is part of" ], "type": "u64" }, { "name": "titleFight", "docs": [ "Indicates whether this fight is a title fight" ], "type": "bool" }, { "name": "fighterBlue", "docs": [ "Final fight data about the fighter left position", "This is None if the fight have not yet finished" ], "type": { "option": { "defined": "SharedStrength" } } }, { "name": "fighterRed", "docs": [ "Final fight data about the fighter right position", "This is None if the fight have not yet finished" ], "type": { "option": { "defined": "SharedStrength" } } }, { "name": "fightDuration", "docs": [ "Fight duration in seconds" ], "type": { "option": "i64" } }, { "name": "result", "docs": [ "Result of the fight" ], "type": { "option": { "defined": "FightCardResult" } } }, { "name": "winner", "docs": [ "Winner of the fight", "This is None in case of a draw when fight is finished" ], "type": { "option": { "defined": "FighterColorSide" } } } ] } }, { "name": "PlayerData", "type": { "kind": "struct", "fields": [ { "name": "orderNonce", "docs": [ "Represent the nonce of the current amount orders the player have created" ], "type": "u64" }, { "name": "playerGameAssetLinkNonce", "docs": [ "Represent the nonce of the current player game asset link the player have created" ], "type": "u64" }, { "name": "isInitialized", "docs": [ "Prevent accidental multiple initializations of a PDA" ], "type": "bool" } ] } }, { "name": "EventLinkData", "type": { "kind": "struct", "fields": [ { "name": "creator", "docs": [ "Signer of the tx" ], "type": "publicKey" }, { "name": "eventPubkey", "docs": [ "`Event` PDA public key for direct ref" ], "type": "publicKey" }, { "name": "eventNonceTracker", "docs": [ "Tracker to link the `EventLink` PDA to the `Event` PDA" ], "type": "u64" }, { "name": "championsPassPubkey", "docs": [ "Ensure a champions pass have been used for `MainCard` access", "`champions_pass_asset` PDA public key for direct ref" ], "type": { "option": "publicKey" } }, { "name": "championsPassNonceTracker", "docs": [ "Tracker to link the `champions_pass` PDA" ], "type": { "option": "u64" } }, { "name": "isInitialized", "docs": [ "Prevent accidental multiple initializations of a PDA" ], "type": "bool" } ] } }, { "name": "FightCardLinkData", "type": { "kind": "struct", "fields": [ { "name": "creator", "docs": [ "Signer of the tx" ], "type": "publicKey" }, { "name": "fightCardPubkey", "docs": [ "`fight_card` PDA public key for direct ref" ], "type": "publicKey" }, { "name": "fightCardNonceTracker", "docs": [ "Tracker to link the `FightCardLink` PDA to the `FightCard` PDA" ], "type": "u8" }, { "name": "fighterUsed", "docs": [ "The `Pubkey` of the booster used" ], "type": { "option": "publicKey" } }, { "name": "fighterNonceTracker", "docs": [ "Tracker to link the `Fighter` PDA to the `FightCardLink` PDA" ], "type": { "option": "u64" } }, { "name": "energyBoosterUsed", "docs": [ "The `Pubkey` of the booster used" ], "type": { "option": "publicKey" } }, { "name": "energyBoosterNonceTracker", "docs": [ "Tracker to link the `Booster` PDA to the `FightCardLink` PDA" ], "type": { "option": "u64" } }, { "name": "shieldBoosterUsed", "docs": [ "The `Pubkey` of the booster used" ], "type": { "option": "publicKey" } }, { "name": "shieldBoosterNonceTracker", "docs": [ "Tracker to link the `Booster` PDA to the `FightCardLink` PDA" ], "type": { "option": "u64" } }, { "name": "pointsBoosterUsed", "docs": [ "The `Pubkey` of the booster used" ], "type": { "option": "publicKey" } }, { "name": "pointsBoosterNonceTracker", "docs": [ "Tracker to link the `Booster` PDA to the `FightCardLink` PDA" ], "type": { "option": "u64" } }, { "name": "fighterColorSide", "docs": [ "The fighter side chosen by the player `Red Gloves` or `Blue Gloves`" ], "type": { "defined": "FighterColorSide" } }, { "name": "isConsumed", "docs": [ "Prevents the calculation of points for the same fightCard multiple times", "If this occurs, it should close and refund the creator of the fighCardLink PDA" ], "type": "bool" }, { "name": "isInitialized", "docs": [ "Prevent accidental multiple initializations of a PDA" ], "type": "bool" } ] } }, { "name": "PlayerGameAssetLinkData", "type": { "kind": "struct", "fields": [ { "name": "mintableGameAssetPubkey", "docs": [ "`Pubkey` of the mintable_game_asset" ], "type": "publicKey" }, { "name": "mintableGameAssetNonceTracker", "docs": [ "this is the link to the address of the pda" ], "type": "u64" }, { "name": "isFree", "docs": [ "Checks if a PDA is eligible to update its `mintable_game_asset_nonce`.", "The PDA becomes eligible upon minting and withdrawing a `mintable_game_asset`,", "which break the link with the last `mintable_game_asset_nonce`." ], "type": "bool" } ] } }, { "name": "MintableGameAssetData", "type": { "kind": "struct", "fields": [ { "name": "isLocked", "docs": [ "is Locked will mean the PDA is in use and cannot be minted or re used" ], "type": "bool" }, { "name": "isBurned", "docs": [ "is Burned will mean the PDA have been used and cannot be minted or re used" ], "type": "bool" }, { "name": "isMinted", "docs": [ "is Minted mean the PDA have been minted" ], "type": "bool" }, { "name": "owner", "docs": [ "owner of the PDA can use it in-game,", "on mint the owner is set to None which mean it is not available in the game until re-deposited" ], "type": { "option": "publicKey" } }, { "name": "metadata", "docs": [ "The metadata on-chain, which allow dynamic use on our game" ], "type": { "defined": "NftMetadata" } } ] } }, { "name": "ProgramData", "type": { "kind": "struct", "fields": [ { "name": "eventNonce", "docs": [ "Represent the current amount of created event" ], "type": "u64" }, { "name": "mintableGameAssetNonce", "docs": [ "Represent the current amount of mintable game asset pack" ], "type": "u64" }, { "name": "adminPubkey", "docs": [ "The authority which are allowed to administrate the contract" ], "type": "publicKey" }, { "name": "fighterPackPrice", "docs": [ "The price in USD of each NFT fighter pack" ], "type": "u64" }, { "name": "boosterPrice", "docs": [ "The price in USD of each NFT booster" ], "type": "u64" }, { "name": "fighterPackAmount", "docs": [ "The amount of fighters contained on each NFT fighter pack" ], "type": "u8" }, { "name": "isInitialized", "docs": [ "This data prevent re-initialization" ], "type": "bool" }, { "name": "authorityBump", "docs": [ "Authority bump" ], "type": "u8" }, { "name": "bankBump", "docs": [ "Bank bump" ], "type": "u8" } ] } }, { "name": "RarityData", "type": { "kind": "struct", "fields": [ { "name": "fighter", "docs": [ "Rarity tiers for NFTs fighter with associated stats" ], "type": { "vec": { "defined": "RarityFighter" } } }, { "name": "energyBooster", "docs": [ "Rarity tiers for NFTs booster with associated stats" ], "type": { "vec": { "defined": "RarityBooster" } } }, { "name": "shieldBooster", "docs": [ "Rarity tiers for NFTs booster with associated stats" ], "type": { "vec": { "defined": "RarityBooster" } } }, { "name": "pointsBooster", "docs": [ "Rarity tiers for NFTs booster with associated stats" ], "type": { "vec": { "defined": "RarityBooster" } } }, { "name": "fighterProbabilities", "docs": [ "Drop probabilities for each NFTs fighter rarity tier, represented as percentage" ], "type": "bytes" }, { "name": "boosterProbabilities", "docs": [ "Drop probabilities for each NFTs booster rarity tier, represented as percentage" ], "type": "bytes" }, { "name": "isInitialized", "docs": [ "This data prevent re-initialization" ], "type": "bool" } ] } } ], "types": [ { "name": "SharedStrength", "type": { "kind": "struct", "fields": [ { "name": "takedownsAttempted", "type": "u8" }, { "name": "takedownsLanded", "type": "u8" }, { "name": "strikingStrength", "type": { "defined": "StrikingStrength" } }, { "name": "grapplingStrength", "type": { "defined": "GrapplingStrength" } } ] } }, { "name": "StrikingStrength", "type": { "kind": "struct", "fields": [ { "name": "example", "type": "u8" } ] } }, { "name": "GrapplingStrength", "type": { "kind": "struct", "fields": [ { "name": "example", "type": "u8" } ] } }, { "name": "NftMetadata", "docs": [ "Metatada Standards copy on-chain" ], "type": { "kind": "struct", "fields": [ { "name": "name", "type": "string" }, { "name": "description", "type": "string" }, { "name": "image", "type": "string" }, { "name": "animationUrl", "type": { "option": "string" } }, { "name": "externalUrl", "type": { "option": "string" } }, { "name": "attributes", "type": { "vec": { "defined": "Attribute" } } } ] } }, { "name": "Attribute", "type": { "kind": "struct", "fields": [ { "name": "traitType", "type": "string" }, { "name": "value", "type": "string" } ] } }, { "name": "Stats", "type": { "kind": "struct", "fields": [ { "name": "min", "type": "u32" }, { "name": "max", "type": "u32" } ] } }, { "name": "PurchaseRequest", "type": { "kind": "struct", "fields": [ { "name": "nftType", "type": { "defined": "NftType" } }, { "name": "quantity", "type": "u64" } ] } }, { "name": "OpenRequest", "type": { "kind": "struct", "fields": [ { "name": "nftType", "type": { "defined": "NftType" } } ] } }, { "name": "FightCardResult", "type": { "kind": "enum", "variants": [ { "name": "KoTko" }, { "name": "Decision" }, { "name": "Submission" }, { "name": "Disqualification" }, { "name": "NoContest" }, { "name": "Draw" }, { "name": "InternalCancellation" } ] } }, { "name": "RarityFighter", "type": { "kind": "enum", "variants": [ { "name": "Common", "fields": [ { "name": "energy", "type": { "defined": "Stats" } }, { "name": "power", "type": { "defined": "Stats" } }, { "name": "lifespan", "type": { "defined": "Stats" } } ] }, { "name": "Uncommon", "fields": [ { "name": "energy", "type": { "defined": "Stats" } }, { "name": "power", "type": { "defined": "Stats" } }, { "name": "lifespan", "type": { "defined": "Stats" } } ] }, { "name": "Rare", "fields": [ { "name": "energy", "type": { "defined": "Stats" } }, { "name": "power", "type": { "defined": "Stats" } }, { "name": "lifespan", "type": { "defined": "Stats" } } ] }, { "name": "Epic", "fields": [ { "name": "energy", "type": { "defined": "Stats" } }, { "name": "power", "type": { "defined": "Stats" } }, { "name": "lifespan", "type": { "defined": "Stats" } } ] }, { "name": "Legendary", "fields": [ { "name": "energy", "type": { "defined": "Stats" } }, { "name": "power", "type": { "defined": "Stats" } }, { "name": "lifespan", "type": { "defined": "Stats" } } ] } ] } }, { "name": "RarityBooster", "type": { "kind": "enum", "variants": [ { "name": "Common", "fields": [ { "name": "value", "type": { "defined": "Stats" } } ] }, { "name": "Uncommon", "fields": [ { "name": "value", "type": { "defined": "Stats" } } ] }, { "name": "Rare", "fields": [ { "name": "value", "type": { "defined": "Stats" } } ] }, { "name": "Epic", "fields": [ { "name": "value", "type": { "defined": "Stats" } } ] }, { "name": "Legendary", "fields": [ { "name": "value", "type": { "defined": "Stats" } } ] } ] } }, { "name": "CollectionType", "type": { "kind": "enum", "variants": [ { "name": "Energy" }, { "name": "Shield" }, { "name": "Points" }, { "name": "Fighter" }, { "name": "ChampionsPass" } ] } }, { "name": "NftType", "type": { "kind": "enum", "variants": [ { "name": "Booster" }, { "name": "Fighter" }, { "name": "ChampionsPass" } ] } }, { "name": "BoosterType", "type": { "kind": "enum", "variants": [ { "name": "Points" }, { "name": "Shield" }, { "name": "Energy" } ] } }, { "name": "FighterCategory", "type": { "kind": "enum", "variants": [ { "name": "Striker" }, { "name": "Grappler" } ] } }, { "name": "FighterType", "type": { "kind": "enum", "variants": [ { "name": "Boxer" }, { "name": "MuayThai" }, { "name": "Taekwondo" }, { "name": "Karate" }, { "name": "Judo" }, { "name": "Wrestling" }, { "name": "BrazilianJiuJitsu" }, { "name": "Sambo" } ] } }, { "name": "FighterColorSide", "type": { "kind": "enum", "variants": [ { "name": "FighterBlue" }, { "name": "FighterRed" } ] } }, { "name": "TournamentType", "type": { "kind": "enum", "variants": [ { "name": "MainCard" }, { "name": "Prelims" }, { "name": "EarlyPrelims" } ] } } ], "events": [ { "name": "EventCreated", "fields": [ { "name": "eventId", "type": "u64", "index": false } ] }, { "name": "EventUpdated", "fields": [ { "name": "eventId", "type": "u64", "index": false } ] }, { "name": "FightCardCreated", "fields": [ { "name": "fightCardId", "type": "u64", "index": false } ] }, { "name": "FightCardUpdated", "fields": [ { "name": "fightCardId", "type": "u64", "index": false } ] } ], "errors": [ { "code": 6000, "name": "InvalidOperation", "msg": "Custom error message for an invalid operation" }, { "code": 6001, "name": "Unauthorized", "msg": "Unauthorized access attempt" }, { "code": 6002, "name": "GameAssetLinkNotLinkedToAssetPDA", "msg": "The mintable game asset link is not properly linked to the specified mintable game asset PDA" }, { "code": 6003, "name": "AlreadyInitialized", "msg": "Already initialized" }, { "code": 6004, "name": "UnsupportedNftType", "msg": "The provided NFT type is not supported for this operation" }, { "code": 6005, "name": "InvalidPriceFeed", "msg": "Invalid Price Feed" }, { "code": 6006, "name": "StaleFeed", "msg": "Feed has not been updated in 5 minutes" }, { "code": 6007, "name": "InsufficientFunds", "msg": "Insufficient funds" }, { "code": 6008, "name": "InsufficientAmount", "msg": "Insufficient amount in purchase request" }, { "code": 6009, "name": "RandomnessUnavailable", "msg": "Randomness unavailable for now" }, { "code": 6010, "name": "NoMatchingRarityFound", "msg": "No matching rarity found" }, { "code": 6011, "name": "WrongPlayerGameAssetLinkNonce", "msg": "The nonce must not exceed the last known nonce in the player's state" }, { "code": 6012, "name": "NotFreePDA", "msg": "This player game asset pda is not free" }, { "code": 6013, "name": "NotEnoughAllowance", "msg": "Not enough allowance to generate mintable game asset" }, { "code": 6014, "name": "EventAlreadyStarted", "msg": "The event has already started" }, { "code": 6015, "name": "RarityAccountRequired", "msg": "Attach rarity account to this transaction" }, { "code": 6016, "name": "FightCardLinkedToGameAsset", "msg": "Fight card link already has a game asset, or game asset nonce is missing" }, { "code": 6017, "name": "EventLinkedToGameAsset", "msg": "Event card link already has a game asset, or game asset nonce is missing" }, { "code": 6018, "name": "BoosterTypeNotFound", "msg": "Booster type not found" }, { "code": 6019, "name": "NonMainCardEvent", "msg": "Champion's pass not required for non-main card events" }, { "code": 6020, "name": "MintableAssetHasNoOwner", "msg": "This mintable game asset has no owner" }, { "code": 6021, "name": "MintableAssetBurned", "msg": "This mintable game asset is burnt" }, { "code": 6022, "name": "MintableAssetLocked", "msg": "This mintable game asset is locked" }, { "code": 6023, "name": "MintableAssetMintedAndUnavailable", "msg": "This mintable game asset has been minted as an NFT and is no longer available for in-game use" }, { "code": 6024, "name": "MintableAssetLinkRequired", "msg": "This mintable game asset link is missing" } ], "metadata": { "address": "6tLQ5Q4zme915tdeXmSJWV7S6xB1fh96vBUWWeHas6tk" } }
Leave a Comment