Skip to main content

assert_address

Function assert_address 

Source
pub fn assert_address(
    account: &AccountView,
    expected: &Address,
) -> ProgramResult
Expand description

Verify an account’s address matches an expected address exactly.

Useful for singletons, well-known accounts, or config accounts that must be a specific pubkey.

assert_address(config_account, &EXPECTED_CONFIG_KEY)?;