Dev Tools
Compartilhar

has_one Constraint (Anchor)

📖O que é

An Anchor validation constraint that asserts a field stored in one account matches the pubkey of another account in the instruction's accounts struct. For example, #[account(has_one = authority)] on a vault account verifies that vault.authority equals the authority account's key. Failing the check returns an Anchor error. has_one prevents unauthorized callers from passing arbitrary accounts for privileged roles.

Sua exploração

0 termos visitados no total
Termos relacionados explorados0/3

Termos Relacionados