You can for ecxample add a check on who can call the function like so: https://beta.solpg.io/tutorials/battle-coins const ADMIN_PUBKEY: Pubkey = pubkey!("REPLACE_WITH_YOUR_WALLET_PUBKEY"); ... #[account( mut, address = ADMIN_PUBKEY )] pub admin: Signer<'info>,