use pinocchio::{
cpi::invoke,
instruction::{InstructionAccount, InstructionView},
AccountView, ProgramResult,
};
pub struct UpgradeNonceAccount<'a> {
pub account: &'a AccountView,
}
impl UpgradeNonceAccount<'_> {
#[inline(always)]
pub fn invoke(&self) -> ProgramResult {
let instruction_accounts: [InstructionAccount; 1] =
[InstructionAccount::writable(self.account.address())];
let instruction = InstructionView {
program_id: &crate::ID,
accounts: &instruction_accounts,
data: &[12, 0, 0, 0],
};
invoke(&instruction, &[self.account])
}
}