use phf::phf_map;
pub static METADATA_ERROR: phf::Map<&'static str, &'static str> = phf_map! {
"0" => "InstructionUnpackError: Failed to unpack instruction data",
"1" => "InstructionPackError: Failed to pack instruction data",
"2" => "NotRentExempt: Lamport balance below rent-exempt threshold",
"3" => "AlreadyInitialized: Already initialized",
"4" => "Uninitialized: Uninitialized",
"5" => "InvalidMetadataKey: Metadata's key must match seed of ['metadata', program id, mint] provided",
"6" => "InvalidEditionKey: Edition's key must match seed of ['metadata', program id, name, 'edition'] provided",
"7" => "UpdateAuthorityIncorrect: Update Authority given does not match",
"8" => "UpdateAuthorityIsNotSigner: Update Authority needs to be signer to update metadata",
"9" => "NotMintAuthority: You must be the mint authority and signer on this transaction",
"A" => "InvalidMintAuthority: Mint authority provided does not match the authority on the mint",
"B" => "NameTooLong: Name too long",
"C" => "SymbolTooLong: Symbol too long",
"D" => "UriTooLong: URI too long",
"E" => "UpdateAuthorityMustBeEqualToMetadataAuthorityAndSigner: Update authority must be equivalent to the metadata's authority and also signer of this transaction",
"F" => "MintMismatch: Mint given does not match mint on Metadata",
"10" => "EditionsMustHaveExactlyOneToken: Editions must have exactly one token",
"11" => "MaxEditionsMintedAlready: Maximum editions printed already",
"12" => "TokenMintToFailed: Token mint to failed",
"13" => "MasterRecordMismatch: The master edition record passed must match the master record on the edition given",
"14" => "DestinationMintMismatch: The destination account does not have the right mint",
"15" => "EditionAlreadyMinted: An edition can only mint one of its kind!",
"16" => "PrintingMintDecimalsShouldBeZero: Printing mint decimals should be zero",
"17" => "OneTimePrintingAuthorizationMintDecimalsShouldBeZero: OneTimePrintingAuthorization mint decimals should be zero",
"18" => "EditionMintDecimalsShouldBeZero: EditionMintDecimalsShouldBeZero",
"19" => "TokenBurnFailed: Token burn failed",
"1A" => "TokenAccountOneTimeAuthMintMismatch: The One Time authorization mint does not match that on the token account!",
"1B" => "DerivedKeyInvalid: Derived key invalid",
"1C" => "PrintingMintMismatch: The Printing mint does not match that on the master edition!",
"1D" => "OneTimePrintingAuthMintMismatch: The One Time Printing Auth mint does not match that on the master edition!",
"1E" => "TokenAccountMintMismatch: The mint of the token account does not match the Printing mint!",
"1F" => "TokenAccountMintMismatchV2: The mint of the token account does not match the master metadata mint!",
"20" => "NotEnoughTokens: Not enough tokens to mint a limited edition",
"21" => "PrintingMintAuthorizationAccountMismatch",
"22" => "AuthorizationTokenAccountOwnerMismatch: The authorization token account has a different owner than the update authority for the master edition!",
"23" => "Disabled: This feature is currently disabled.",
"24" => "CreatorsTooLong: Creators list too long",
"25" => "CreatorsMustBeAtleastOne: Creators must be at least one if set",
"26" => "MustBeOneOfCreators: If using a creators array, you must be one of the creators listed",
"27" => "NoCreatorsPresentOnMetadata: This metadata does not have creators",
"28" => "CreatorNotFound: This creator address was not found",
"29" => "InvalidBasisPoints: Basis points cannot be more than 10000",
"2A" => "PrimarySaleCanOnlyBeFlippedToTrue: Primary sale can only be flipped to true and is immutable",
"2B" => "OwnerMismatch: Owner does not match that on the account given",
"2C" => "NoBalanceInAccountForAuthorization: This account has no tokens to be used for authorization",
"2D" => "ShareTotalMustBe100: Share total must equal 100 for creator array",
"2E" => "ReservationExists: This reservation list already exists!",
"2F" => "ReservationDoesNotExist: This reservation list does not exist!",
"30" => "ReservationNotSet: This reservation list exists but was never set with reservations",
"31" => "ReservationAlreadyMade: This reservation list has already been set!",
"32" => "BeyondMaxAddressSize: Provided more addresses than max allowed in single reservation",
"33" => "NumericalOverflowError: NumericalOverflowError",
"34" => "ReservationBreachesMaximumSupply: This reservation would go beyond the maximum supply of the master edition!",
"35" => "AddressNotInReservation: Address not in reservation!",
"36" => "CannotVerifyAnotherCreator: You cannot unilaterally verify another creator, they must sign",
"37" => "CannotUnverifyAnotherCreator: You cannot unilaterally unverify another creator",
"38" => "SpotMismatch: In initial reservation setting, spots remaining should equal total spots",
"39" => "IncorrectOwner: Incorrect account owner",
"3A" => "PrintingWouldBreachMaximumSupply: printing these tokens would breach the maximum supply limit of the master edition",
"3B" => "DataIsImmutable: Data is immutable",
"3C" => "DuplicateCreatorAddress: No duplicate creator addresses",
"3D" => "ReservationSpotsRemainingShouldMatchTotalSpotsAtStart: Reservation spots remaining should match total spots when first being created",
"3E" => "InvalidTokenProgram: Invalid token program",
"3F" => "DataTypeMismatch: Data type mismatch",
"40" => "BeyondAlottedAddressSize: Beyond alotted address size in reservation!",
"41" => "ReservationNotComplete: The reservation has only been partially alotted",
"42" => "TriedToReplaceAnExistingReservation: You cannot splice over an existing reservation!",
"43" => "InvalidOperation: Invalid operation",
"44" => "InvalidOwner: Invalid Owner",
"45" => "PrintingMintSupplyMustBeZeroForConversion: Printing mint supply must be zero for conversion",
"46" => "OneTimeAuthMintSupplyMustBeZeroForConversion: One Time Auth mint supply must be zero for conversion",
"47" => "InvalidEditionIndex: You tried to insert one edition too many into an edition mark pda",
"48" => "ReservationArrayShouldBeSizeOne: In the legacy system the reservation needs to be of size one for cpu limit reasons",
"49" => "IsMutableCanOnlyBeFlippedToFalse: Is Mutable can only be flipped to false",
"4A" => "CollectionCannotBeVerifiedInThisInstruction: Cannont Verify Collection in this Instruction",
"4B" => "Removed: This instruction was deprecated in a previous release and is now removed",
"4C" => "MustBeBurned: This token use method is burn and there are no remaining uses, it must be burned",
"4D" => "InvalidUseMethod: This use method is invalid",
"4E" => "CannotChangeUseMethodAfterFirstUse: Cannot Change Use Method after the first use",
"4F" => "CannotChangeUsesAfterFirstUse: Cannot Change Remaining or Available uses after the first use",
"50" => "CollectionNotFound: Collection Not Found on Metadata",
"51" => "InvalidCollectionUpdateAuthority: Collection Update Authority is invalid",
"52" => "CollectionMustBeAUniqueMasterEdition: Collection Must Be a Unique Master Edition v2",
"53" => "UseAuthorityRecordAlreadyExists: The Use Authority Record Already Exists, to modify it Revoke, then Approve",
"54" => "UseAuthorityRecordAlreadyRevoked: The Use Authority Record is empty or already revoked",
"55" => "Unusable: This token has no uses",
"56" => "NotEnoughUses: There are not enough Uses left on this token.",
"57" => "CollectionAuthorityRecordAlreadyExists: This Collection Authority Record Already Exists.",
"58" => "CollectionAuthorityDoesNotExist: This Collection Authority Record Does Not Exist.",
"59" => "InvalidUseAuthorityRecord: This Use Authority Record is invalid.",
"5A" => "InvalidCollectionAuthorityRecord: This Collection Authority Record is invalid.",
"5B" => "InvalidFreezeAuthority: Metadata does not match the freeze authority on the mint",
"5C" => "InvalidDelegate: All tokens in this account have not been delegated to this user.",
"5D" => "CannotAdjustVerifiedCreator: Creator can not be adjusted once they are verified.",
"5E" => "CannotRemoveVerifiedCreator: Verified creators cannot be removed.",
"5F" => "CannotWipeVerifiedCreators: Can not wipe verified creators.",
"60" => "NotAllowedToChangeSellerFeeBasisPoints: Not allowed to change seller fee basis points.",
"61" => "EditionOverrideCannotBeZero: Edition override cannot be zero",
"62" => "InvalidUser: Invalid User",
"63" => "RevokeCollectionAuthoritySignerIncorrect: Revoke Collection Authority signer is incorrect",
"64" => "TokenCloseFailed: Token close failed",
"65" => "UnsizedCollection: Can't use this function on unsized collection",
"66" => "SizedCollection: Can't use this function on a sized collection",
"67" => "MissingCollectionMetadata",
"68" => "NotAMemberOfCollection: This NFT is not a member of the specified collection.",
"69" => "NotVerifiedMemberOfCollection: This NFT is not a verified member of the specified collection.",
"6A" => "NotACollectionParent: This NFT is not a collection parent NFT.",
"6B" => "CouldNotDetermineTokenStandard: Could not determine a TokenStandard type.",
"6C" => "MissingEditionAccount: This mint account has an edition but none was provided.",
"6D" => "NotAMasterEdition: This edition is not a Master Edition",
"6E" => "MasterEditionHasPrints: This Master Edition has existing prints",
"6F" => "BorshDeserializationError: Borsh Deserialization Error",
"70" => "CannotUpdateVerifiedCollection: Cannot update a verified colleciton in this command",
"71" => "CollectionMasterEditionAccountInvalid: Edition account aoesnt match collection ",
"72" => "AlreadyVerified: Item is already verified.",
"73" => "AlreadyUnverified: Item is already unverified.",
};
pub static CANDY_MACHINE_ERROR: phf::Map<&'static str, &'static str> = phf_map! {
"1770" => "Account does not have correct owner",
"1771" => "Account is not initialized",
"1772" => "Mint Mismatch",
"1773" => "Index greater than length",
"1774" => "Numerical overflow error",
"1775" => "Can only provide up to 4 creators to candy machine (because candy machine is one)",
"1776" => "Candy machine is empty",
"1777" => "Candy machines using hidden uris do not have config lines, they have a single hash representing hashed order",
"1778" => "Cannot change number of lines unless is a hidden config",
"1779" => "Cannot switch to hidden settings after items available is greater than 0",
"177A" => "Incorrect collection NFT authority",
"177B" => "The metadata account has data in it, and this must be empty to mint a new NFT",
"177C" => "Can't change collection settings after items have begun to be minted",
"177D" => "Value longer than expected maximum value",
"177E" => "Missing config lines settings",
"177F" => "Cannot increase the length in config lines settings",
"1780" => "Cannot switch from hidden settings",
"1781" => "Cannot change sequential index generation after items have begun to be minted",
"1782" => "Collection public key mismatch",
"1783" => "Could not retrive config line data",
"1784" => "Not all config lines were added to the candy machine",
};
pub static CANDY_GUARD_ERROR: phf::Map<&'static str, &'static str> = phf_map! {
"1770" => "Could not save guard to account",
"1771" => "Could not deserialize guard",
"1772" => "Public key mismatch",
"1773" => "Missing expected remaining account",
"1774" => "Account does not have correct owner",
"1775" => "Account is not initialized",
"1776" => "Missing expected remaining account",
"1777" => "Numerical overflow error",
"1778" => "Missing required group label",
"1779" => "Group not found",
"177A" => "Group not found",
"177B" => "Candy machine is empty",
"177C" => "No instruction was found",
"177D" => "Collection public key mismatch",
"177E" => "Missing collection accounts",
"177F" => "Collection update authority public key mismatch",
"1780" => "Mint must be the last instructions of the transaction",
"1781" => "Mint is not live",
"1782" => "Not enough SOL to pay for the mint",
"1783" => "Token burn failed",
"1784" => "Not enough tokens on the account",
"1785" => "Token transfer failed",
"1786" => "A signature was required but not found",
"1787" => "Gateway token is not valid",
"1788" => "Current time is after the set end date",
"1789" => "Current time is not within the allowed mint time",
"178A" => "Address not found on the allowed list",
"178B" => "Missing allowed list proof",
"178C" => "Allow list guard is not enabled",
"178D" => "The maximum number of allowed mints was reached",
"178E" => "Invalid NFT collection",
"178F" => "Missing NFT on the account",
"1790" => "Current redemeed items is at the set maximum amount",
"1791" => "Address not authorized",
"1792" => "Missing freeze instruction data",
"1793" => "Freeze guard must be enabled",
"1794" => "Freeze must be initialized",
"1795" => "Missing freeze period",
"1796" => "The freeze escrow account already exists",
"1797" => "Maximum freeze period exceeded",
"1798" => "Thaw is not enabled",
"1799" => "Unlock is not enabled (not all NFTs are thawed)",
"179A" => "Duplicated group label",
"179B" => "Duplicated mint limit id",
"179C" => "An unauthorized program was found in the transaction",
};
pub static ANCHOR_ERROR: phf::Map<&'static str, &'static str> = phf_map! {
"64" => "InstructionMissing: 8 byte instruction identifier not provided",
"65" => "InstructionFallbackNotFound: Fallback functions are not supported",
"66" => "InstructionDidNotDeserialize: The program could not deserialize the given instruction",
"67" => "InstructionDidNotSerialize: The program could not serialize the given instruction",
"3E8" => "IdlInstructionStub: The program was compiled without idl instructions",
"3E9" => "IdlInstructionInvalidProgram: Invalid program given to the IDL instruction",
"7D0" => "ConstraintMut: A mut constraint was violated",
"7D1" => "ConstraintHasOne: A has one constraint was violated",
"7D2" => "ConstraintSigner: A signer constraint was violated",
"7D3" => "ConstraintRaw: A raw constraint was violated",
"7D4" => "ConstraintOwner: An owner constraint was violated",
"7D5" => "ConstraintRentExempt: A rent exemption constraint was violated",
"7D6" => "ConstraintSeeds: A seeds constraint was violated",
"7D7" => "ConstraintExecutable: An executable constraint was violated",
"7D8" => "ConstraintState: A state constraint was violated",
"7D9" => "ConstraintAssociated: An associated constraint was violated",
"7DA" => "ConstraintAssociatedInit: An associated init constraint was violated",
"7DB" => "ConstraintClose: A close constraint was violated",
"7DC" => "ConstraintAddress: An address constraint was violated",
"7DD" => "ConstraintZero: Expected zero account discriminant",
"7DE" => "ConstraintTokenMint: A token mint constraint was violated",
"7DF" => "ConstraintTokenOwner: A token owner constraint was violated",
"7E0" => "ConstraintMintMintAuthority: A mint mint authority constraint was violated",
"7E1" => "ConstraintMintFreezeAuthority: A mint freeze authority constraint was violated",
"7E2" => "ConstraintMintDecimals: A mint decimals constraint was violated",
"7E3" => "ConstraintSpace: A space constraint was violated",
"9C4" => "RequireViolated: A require expression was violated",
"9C5" => "RequireEqViolated: A require_eq expression was violated",
"9C6" => "RequireKeysEqViolated: A require_keys_eq expression was violated",
"9C7" => "RequireNeqViolated: A require_neq expression was violated",
"9C8" => "RequireKeysNeqViolated: A require_keys_neq expression was violated",
"9C9" => "RequireGtViolated: A require_gt expression was violated",
"9CA" => "RequireGteViolated: A require_gte expression was violated",
"BB8" => "AccountDiscriminatorAlreadySet: The account discriminator was already set on this account",
"BB9" => "AccountDiscriminatorNotFound: No 8 byte discriminator was found on the account",
"BBA" => "AccountDiscriminatorMismatch: 8 byte discriminator did not match what was expected",
"BBB" => "AccountDidNotDeserialize: Failed to deserialize the account",
"BBC" => "AccountDidNotSerialize: Failed to serialize the account",
"BBD" => "AccountNotEnoughKeys: Not enough account keys given to the instruction",
"BBE" => "AccountNotMutable: The given account is not mutable",
"BBF" => "AccountOwnedByWrongProgram: The given account is owned by a different program than expected",
"BC0" => "InvalidProgramId: Program ID was not as expected",
"BC1" => "InvalidProgramExecutable: Program account is not executable",
"BC2" => "AccountNotSigner: The given account did not sign",
"BC3" => "AccountNotSystemOwned: The given account is not owned by the system program",
"BC4" => "AccountNotInitialized: The program expected this account to be already initialized",
"BC5" => "AccountNotProgramData: The given account is not a program data account",
"BC6" => "AccountNotAssociatedTokenAccount: The given account is not the associated token account",
"BC7" => "AccountSysvarMismatch: The given public key does not match the required sysvar",
"BC8" => "AccountReallocExceedsLimit: The account reallocation exceeds the MAX_PERMITTED_DATA_INCREASE limit",
"BC9" => "AccountDuplicateReallocs: The account was duplicated for more than one reallocation",
"FA0" => "StateInvalidAddress: The given state account does not have the correct address",
"1004" => "DeclaredProgramIdMismatch: The declared program id does not match the actual program id",
"1388" => "Deprecated: The API being used is deprecated and should no longer be used",
};