#![deny(missing_docs)]
#![cfg_attr(not(test), forbid(unsafe_code))]
pub mod error;
pub mod instruction;
pub mod processor;
pub mod state;
#[cfg(all(not(feature = "no-entrypoint"), not(test)))]
mod entrypoint;
use arch_program::{entrypoint::ProgramResult, program_error::ProgramError, pubkey::Pubkey};
arch_program::declare_id!("MetaLUJnthcRKvy3ayXTnVcxaXqca1fbaQox8ChQqAk");
pub fn check_program_account(program_id: &Pubkey) -> ProgramResult {
if !check_id(program_id) {
return Err(ProgramError::IncorrectProgramId);
}
Ok(())
}
pub const METADATA_SEED: &[u8] = b"metadata";
pub const ATTRIBUTES_SEED: &[u8] = b"attributes";
pub fn find_metadata_pda_with_program(program_id: &Pubkey, mint: &Pubkey) -> (Pubkey, u8) {
Pubkey::find_program_address(&[METADATA_SEED, mint.as_ref()], program_id)
}
pub fn find_attributes_pda_with_program(program_id: &Pubkey, mint: &Pubkey) -> (Pubkey, u8) {
Pubkey::find_program_address(&[ATTRIBUTES_SEED, mint.as_ref()], program_id)
}