This commit is contained in:
Hardhat Chad
2024-05-02 15:03:56 +00:00
parent 813006cc99
commit dc84a347e7
8 changed files with 47 additions and 7 deletions

View File

@@ -5,6 +5,16 @@ use solana_program::{
use crate::{instruction::PauseArgs, loaders::*, state::Config, utils::AccountDeserialize};
/// Pause updates the program's pause flag. Its responsibilities include:
/// 1. Update the pause flag.
///
/// Safety requirements:
/// - Can only succeed if the signer is the program admin.
/// - Can only succeed if the provided config is valid.
///
/// Discussion:
/// - This should only be used to address critical contract risks and force migration to a new
/// verison (hardfork).
pub fn process_pause<'a, 'info>(
_program_id: &Pubkey,
accounts: &'a [AccountInfo<'info>],