namespaces 4.1.61

Cardinal namespaces service
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use {
    crate::{errors::ErrorCode, state::*},
    anchor_lang::prelude::*,
};

#[derive(Accounts)]
pub struct CloseNameEntryCtx<'info> {
    #[account(mut, close = invalidator, constraint = invalidator.key() == namespace.update_authority @ ErrorCode::InvalidUpdateAuthority)]
    pub namespace: Account<'info, Namespace>,
    /// CHECK: This is not dangerous because we don't read or write from this account
    #[account(mut)]
    invalidator: UncheckedAccount<'info>,
}

pub fn handler(_ctx: Context<CloseNameEntryCtx>) -> Result<()> {
    Ok(())
}