Skip to main content

find_pda

Macro find_pda 

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

Find a PDA and return (Address, u8) with the canonical bump.

Uses the find_program_address syscall. Only available on-chain.

let (pda, bump) = find_pda!(program_id, b"vault", authority.as_ref());