2025-08-14 14:09:04 -03:00
|
|
|
use nssa_core::{
|
|
|
|
|
account::Account,
|
2026-03-25 16:56:04 -03:00
|
|
|
program::{AccountPostState, ProgramInput, ProgramOutput, read_nssa_inputs},
|
2025-08-14 14:09:04 -03:00
|
|
|
};
|
2025-08-10 09:57:10 -03:00
|
|
|
|
2025-08-10 18:59:29 -03:00
|
|
|
type Instruction = ();
|
2025-08-10 18:51:55 -03:00
|
|
|
|
2025-08-10 09:57:10 -03:00
|
|
|
fn main() {
|
2026-04-02 12:10:37 +02:00
|
|
|
let (
|
|
|
|
|
ProgramInput {
|
|
|
|
|
self_program_id,
|
|
|
|
|
pre_states,
|
|
|
|
|
..
|
|
|
|
|
},
|
|
|
|
|
instruction_words,
|
|
|
|
|
) = read_nssa_inputs::<Instruction>();
|
2025-08-10 09:57:10 -03:00
|
|
|
|
2026-03-03 23:21:08 +03:00
|
|
|
let Ok([pre]) = <[_; 1]>::try_from(pre_states) else {
|
|
|
|
|
return;
|
2025-08-10 09:57:10 -03:00
|
|
|
};
|
|
|
|
|
|
2025-08-14 14:09:04 -03:00
|
|
|
let account_pre = pre.account.clone();
|
2025-08-10 09:57:10 -03:00
|
|
|
|
2026-03-25 16:56:04 -03:00
|
|
|
ProgramOutput::new(
|
2026-04-02 00:41:55 +02:00
|
|
|
self_program_id,
|
2025-11-18 01:38:47 -03:00
|
|
|
instruction_words,
|
|
|
|
|
vec![pre],
|
2025-12-03 16:39:33 -03:00
|
|
|
vec![
|
|
|
|
|
AccountPostState::new(account_pre),
|
|
|
|
|
AccountPostState::new(Account::default()),
|
|
|
|
|
],
|
2026-03-25 16:56:04 -03:00
|
|
|
)
|
|
|
|
|
.write();
|
2025-08-10 09:57:10 -03:00
|
|
|
}
|