This commit is contained in:
Hardhat Chad
2024-03-07 18:48:01 +00:00
parent cba2c748e2
commit 3af8f31089
20 changed files with 165 additions and 27 deletions

View File

@@ -5,6 +5,12 @@ use solana_program::{
use crate::{instruction::UpdateAdminArgs, loaders::*, state::Treasury, utils::AccountDeserialize};
/// UpdateAdmin updates the program's admin account. It has 1 responsibility:
/// 1. Update the treasury admin address.
///
/// Safety requirements:
/// - Can only succeed if the signer is the current program admin.
/// - Can only succeed if the provided treasury is valid.
pub fn process_update_admin<'a, 'info>(
_program_id: &Pubkey,
accounts: &'a [AccountInfo<'info>],