lssa/test_program_methods/guest/src/bin/missing_output.rs

20 lines
504 B
Rust
Raw Normal View History

2025-12-03 16:39:33 -03:00
use nssa_core::program::{AccountPostState, ProgramInput, read_nssa_inputs, write_nssa_outputs};
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() {
2025-11-18 01:38:47 -03:00
let (ProgramInput { 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([pre1, pre2]) = <[_; 2]>::try_from(pre_states) else {
return;
2025-08-10 09:57:10 -03:00
};
2025-08-14 14:09:04 -03:00
let account_pre1 = pre1.account.clone();
2025-08-10 09:57:10 -03:00
write_nssa_outputs(
instruction_words,
vec![pre1, pre2],
vec![AccountPostState::new(account_pre1)],
);
2025-08-10 09:57:10 -03:00
}