jonesmarvin8 d78d97c815 Reapply "Merge branch 'main' into simple_amm"
This reverts commit 2419d4a1126afa9882b3fefbe518582ae130a817.
2025-12-15 18:13:31 -05:00

19 lines
554 B
Rust

use nssa_core::program::{read_nssa_inputs, write_nssa_outputs, AccountPostState, ProgramInput};
type Instruction = ();
fn main() {
let (ProgramInput { pre_states, .. } , instruction_words) = read_nssa_inputs::<Instruction>();
let [pre] = match pre_states.try_into() {
Ok(array) => array,
Err(_) => return,
};
let account_pre = &pre.account;
let mut account_post = account_pre.clone();
account_post.nonce += 1;
write_nssa_outputs(instruction_words ,vec![pre], vec![AccountPostState::new(account_post)]);
}