22 lines
620 B
Rust
Raw Normal View History

use nssa_core::program::{AccountPostState, Claim, ProgramInput, ProgramOutput, read_nssa_inputs};
type Instruction = ();
fn main() {
let (
ProgramInput { self_program_id, caller_program_id: _,
pre_states,
2026-03-03 23:21:08 +03:00
instruction: (),
},
instruction_words,
) = read_nssa_inputs::<Instruction>();
2026-03-03 23:21:08 +03:00
let Ok([pre]) = <[_; 1]>::try_from(pre_states) else {
return;
};
let account_post = AccountPostState::new_claimed(pre.account.clone(), Claim::Authorized);
ProgramOutput::new(self_program_id, instruction_words, vec![pre], vec![account_post]).write();
}