2026-06-01 17:10:46 -03:00
|
|
|
use lee_core::program::{AccountPostState, ProgramInput, ProgramOutput, read_lee_inputs};
|
2025-12-16 16:22:35 +03:00
|
|
|
|
|
|
|
|
type Instruction = ();
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2026-04-03 01:17:42 +02:00
|
|
|
let (
|
|
|
|
|
ProgramInput {
|
|
|
|
|
self_program_id,
|
2026-04-07 17:54:59 +02:00
|
|
|
caller_program_id,
|
2026-04-03 01:17:42 +02:00
|
|
|
pre_states,
|
|
|
|
|
..
|
|
|
|
|
},
|
|
|
|
|
instruction_words,
|
2026-06-01 17:10:46 -03:00
|
|
|
) = read_lee_inputs::<Instruction>();
|
2025-12-16 16:22:35 +03:00
|
|
|
|
|
|
|
|
let post_states = pre_states
|
|
|
|
|
.iter()
|
|
|
|
|
.map(|account| AccountPostState::new(account.account.clone()))
|
|
|
|
|
.collect();
|
2026-04-07 20:16:42 +02:00
|
|
|
ProgramOutput::new(
|
|
|
|
|
self_program_id,
|
|
|
|
|
caller_program_id,
|
|
|
|
|
instruction_words,
|
|
|
|
|
pre_states,
|
|
|
|
|
post_states,
|
|
|
|
|
)
|
|
|
|
|
.write();
|
2025-12-16 16:22:35 +03:00
|
|
|
}
|