update test guest programs with caller_program_id in ProgramOutput

This commit is contained in:
Moudy 2026-04-07 17:54:59 +02:00
parent 5273c9e076
commit 495680e2ea
19 changed files with 38 additions and 20 deletions

View File

@ -6,7 +6,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
instruction: balance_to_burn,
},
@ -23,6 +23,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![pre],
vec![AccountPostState::new(account_post)],

View File

@ -14,7 +14,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
instruction: (balance, auth_transfer_id, num_chain_calls, pda_seed),
},
@ -58,6 +58,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![sender_pre.clone(), recipient_pre.clone()],
vec![

View File

@ -7,7 +7,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
instruction: (data_opt, should_claim),
},
@ -37,6 +37,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![pre],
vec![post_state],

View File

@ -6,7 +6,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
instruction: (),
},
@ -21,6 +21,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![pre],
vec![account_post],

View File

@ -7,7 +7,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
instruction: data,
},
@ -26,6 +26,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![pre],
vec![AccountPostState::new_claimed(

View File

@ -9,7 +9,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
..
},
@ -24,6 +24,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![pre],
vec![

View File

@ -43,7 +43,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _, // not enforced in this callback
caller_program_id, // not enforced in this callback
pre_states,
instruction,
},
@ -81,6 +81,7 @@ fn main() {
// All mutations go through the token program via chained calls.
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![vault_pre.clone(), receiver_pre.clone()],
vec![

View File

@ -163,6 +163,7 @@ fn main() {
// All mutations happen inside the chained calls (token transfers).
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![vault_pre.clone(), receiver_pre.clone()],
vec![
@ -204,6 +205,7 @@ fn main() {
// Pass-through: no state changes in the invariant check step.
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![vault.clone()],
vec![AccountPostState::new(vault.account)],

View File

@ -15,7 +15,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
instruction: (balance, transfer_program_id),
},
@ -43,6 +43,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![sender.clone(), receiver.clone()],
vec![

View File

@ -8,7 +8,7 @@ fn main() {
let (
ProgramInput {
self_program_id: _, // ignore the correct ID
caller_program_id: _,
caller_program_id,
pre_states,
instruction: (),
},
@ -23,6 +23,7 @@ fn main() {
// Deliberately output wrong self_program_id
ProgramOutput::new(
DEFAULT_PROGRAM_ID, // WRONG: should be self_program_id
caller_program_id,
instruction_words,
pre_states,
post_states,

View File

@ -6,7 +6,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
..
},
@ -26,6 +26,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![pre],
vec![AccountPostState::new(account_post)],

View File

@ -6,7 +6,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
..
},
@ -21,6 +21,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![pre1, pre2],
vec![AccountPostState::new(account_pre1)],

View File

@ -65,7 +65,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
instruction: balance_to_move,
},
@ -82,5 +82,5 @@ fn main() {
}
_ => panic!("invalid params"),
};
ProgramOutput::new(self_program_id, instruction_data, pre_states, post_states).write();
ProgramOutput::new(self_program_id, caller_program_id, instruction_data, pre_states, post_states).write();
}

View File

@ -6,7 +6,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
..
},
@ -23,6 +23,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![pre],
vec![AccountPostState::new(account_post)],

View File

@ -6,7 +6,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
..
},
@ -17,5 +17,5 @@ fn main() {
.iter()
.map(|account| AccountPostState::new(account.account.clone()))
.collect();
ProgramOutput::new(self_program_id, instruction_words, pre_states, post_states).write();
ProgramOutput::new(self_program_id, caller_program_id, instruction_words, pre_states, post_states).write();
}

View File

@ -6,7 +6,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
..
},
@ -23,6 +23,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![pre],
vec![AccountPostState::new(account_post)],

View File

@ -6,7 +6,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
instruction: balance,
},
@ -30,6 +30,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![sender_pre, receiver_pre],
vec![

View File

@ -9,7 +9,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
instruction: (block_validity_window, timestamp_validity_window),
},
@ -24,6 +24,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![pre],
vec![AccountPostState::new(post)],

View File

@ -17,7 +17,7 @@ fn main() {
let (
ProgramInput {
self_program_id,
caller_program_id: _,
caller_program_id,
pre_states,
instruction: (block_validity_window, chained_program_id, chained_block_validity_window),
},
@ -41,6 +41,7 @@ fn main() {
ProgramOutput::new(
self_program_id,
caller_program_id,
instruction_words,
vec![pre],
vec![AccountPostState::new(post)],