Skip to main content

derive_pda

Macro derive_pda 

Source
macro_rules! derive_pda {
    ($program_id:expr, $bump:expr, $($seed:expr),+ $(,)?) => { ... };
}
Expand description

Derive a PDA with a known bump. Cheap (~100 CU, no curve check).

Wraps pinocchio_pubkey::derive_address. The bump is appended automatically. Returns Address.

let pda = derive_pda!(program_id, bump, b"vault", authority.as_ref());
check_pda(vault_account, &pda)?;