Skip to main content

require_account_type

Function require_account_type 

Source
pub fn require_account_type(
    account: &AccountView,
    expected_disc: u8,
    expected_owner: &Address,
) -> ProgramResult
Expand description

Assert that an account has the expected discriminator AND is owned by the given program. This two-check combo is the most common “is this the right account type?” pattern in Solana programs.