mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-05-06 08:09:34 +00:00
22 lines
596 B
Rust
22 lines
596 B
Rust
use nssa_core::program::{AccountPostState, ProgramInput, ProgramOutput, read_nssa_inputs};
|
|
|
|
type Instruction = ();
|
|
|
|
fn main() {
|
|
let (
|
|
ProgramInput {
|
|
self_program_id,
|
|
caller_program_id,
|
|
pre_states,
|
|
..
|
|
},
|
|
instruction_words,
|
|
) = read_nssa_inputs::<Instruction>();
|
|
|
|
let post_states = pre_states
|
|
.iter()
|
|
.map(|account| AccountPostState::new(account.account.clone()))
|
|
.collect();
|
|
ProgramOutput::new(self_program_id, caller_program_id, instruction_words, pre_states, post_states).write();
|
|
}
|