Dev Tools
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 totalTermos relacionados explorados0/3
Termos Relacionados
Anchor ConstraintsDev Tools
Declarative validation rules on Anchor account fields. Key constraints: `#[account(mut)]` …
Ver termo →Insufficient Account ConstraintsSecurity
A broad vulnerability category in Anchor programs where the account struct's constraint an…
Ver termo →AutoridadeProgramming Model
A pubkey with administrative privileges over a resource—such as the mint authority (can mi…
Ver termo →