Function mpl_utils::token::assert_holder
source · pub fn assert_holder(
token_account: impl ToTokenAccount,
owner_info: &AccountInfo<'_>,
mint_info: &AccountInfo<'_>,
error: impl Into<ProgramError> + Clone
) -> ProgramResult
Expand description
Asserts that
- the given token account is initialized
- it’s owner matches the provided owner
- it’s mint matches the provided mint
- it holds more than than 0 tokens of the given mint. Accepts either an &AccountInfo or an Account for token_account parameter.