use crate::*;
#[account]
#[derive(Copy, Default, Debug)]
pub struct MintWrapper {
pub base: Pubkey,
pub bump: u8,
pub hard_cap: u64,
pub admin: Pubkey,
pub pending_admin: Pubkey,
pub token_mint: Pubkey,
pub num_minters: u64,
pub total_allowance: u64,
pub total_minted: u64,
}
impl MintWrapper {
pub const LEN: usize = 32 + 1 + 8 + 32 + 32 + 32 + 8 + 8 + 8;
}
#[account]
#[derive(Copy, Default, Debug)]
pub struct Minter {
pub mint_wrapper: Pubkey,
pub minter_authority: Pubkey,
pub bump: u8,
pub index: u64,
pub allowance: u64,
pub total_minted: u64,
}
impl Minter {
pub const LEN: usize = 32 + 32 + 1 + 8 + 8 + 8;
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_mint_wrapper_len() {
assert_eq!(
MintWrapper::default().try_to_vec().unwrap().len(),
MintWrapper::LEN
);
}
#[test]
fn test_minter_len() {
assert_eq!(Minter::default().try_to_vec().unwrap().len(), Minter::LEN);
}
}