use anchor_lang::prelude::Pubkey;
use anchor_lang::prelude::*;
#[account]
pub struct MintingAccountRecordPlugin {
pub roadmap: Pubkey,
pub program_id: Pubkey,
pub minting_account: Pubkey,
pub max_supply: u64,
pub price: u64,
pub quantity_left: u64,
pub go_live_date: Option<i64>,
pub is_closed: bool,
pub collection_mint: Option<Pubkey>,
pub collection_authority_record_signer: Option<Pubkey>,
pub bump: u8,
pub reserved: [u8; 128],
}
impl MintingAccountRecordPlugin {
pub fn space() -> usize {
8 +
std::mem::size_of::<Pubkey>() + std::mem::size_of::<Pubkey>() + std::mem::size_of::<Pubkey>() + std::mem::size_of::<u64>() + std::mem::size_of::<u64>() + std::mem::size_of::<u64>() + std::mem::size_of::<Option<i64>>() + 1 + std::mem::size_of::<Option<Pubkey>>() + std::mem::size_of::<Option<Pubkey>>() + 1 + 128
}
}
pub fn get_minting_account_record_plugin(roadmap: &Pubkey, program_id: &Pubkey) -> Pubkey {
Pubkey::find_program_address(
&[b"phase_minting_account_record", roadmap.as_ref()],
&program_id,
)
.0
}