diff --git a/test_program_methods/guest/src/bin/burner.rs b/test_program_methods/guest/src/bin/burner.rs index 50d8e0f6..02be2d38 100644 --- a/test_program_methods/guest/src/bin/burner.rs +++ b/test_program_methods/guest/src/bin/burner.rs @@ -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)], diff --git a/test_program_methods/guest/src/bin/chain_caller.rs b/test_program_methods/guest/src/bin/chain_caller.rs index 64fb2760..5c124bed 100644 --- a/test_program_methods/guest/src/bin/chain_caller.rs +++ b/test_program_methods/guest/src/bin/chain_caller.rs @@ -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![ diff --git a/test_program_methods/guest/src/bin/changer_claimer.rs b/test_program_methods/guest/src/bin/changer_claimer.rs index ea42ff7c..6d2b51b4 100644 --- a/test_program_methods/guest/src/bin/changer_claimer.rs +++ b/test_program_methods/guest/src/bin/changer_claimer.rs @@ -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], diff --git a/test_program_methods/guest/src/bin/claimer.rs b/test_program_methods/guest/src/bin/claimer.rs index a0e1f9e8..a3a7fb19 100644 --- a/test_program_methods/guest/src/bin/claimer.rs +++ b/test_program_methods/guest/src/bin/claimer.rs @@ -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], diff --git a/test_program_methods/guest/src/bin/data_changer.rs b/test_program_methods/guest/src/bin/data_changer.rs index 760db001..3969d7f6 100644 --- a/test_program_methods/guest/src/bin/data_changer.rs +++ b/test_program_methods/guest/src/bin/data_changer.rs @@ -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( diff --git a/test_program_methods/guest/src/bin/extra_output.rs b/test_program_methods/guest/src/bin/extra_output.rs index 9b3ece3b..3a5df556 100644 --- a/test_program_methods/guest/src/bin/extra_output.rs +++ b/test_program_methods/guest/src/bin/extra_output.rs @@ -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![ diff --git a/test_program_methods/guest/src/bin/flash_swap_callback.rs b/test_program_methods/guest/src/bin/flash_swap_callback.rs index 2b0662eb..251833bb 100644 --- a/test_program_methods/guest/src/bin/flash_swap_callback.rs +++ b/test_program_methods/guest/src/bin/flash_swap_callback.rs @@ -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![ diff --git a/test_program_methods/guest/src/bin/flash_swap_initiator.rs b/test_program_methods/guest/src/bin/flash_swap_initiator.rs index 35be252a..27d1f317 100644 --- a/test_program_methods/guest/src/bin/flash_swap_initiator.rs +++ b/test_program_methods/guest/src/bin/flash_swap_initiator.rs @@ -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)], diff --git a/test_program_methods/guest/src/bin/malicious_authorization_changer.rs b/test_program_methods/guest/src/bin/malicious_authorization_changer.rs index cfa2845c..f7aba4a0 100644 --- a/test_program_methods/guest/src/bin/malicious_authorization_changer.rs +++ b/test_program_methods/guest/src/bin/malicious_authorization_changer.rs @@ -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![ diff --git a/test_program_methods/guest/src/bin/malicious_self_program_id.rs b/test_program_methods/guest/src/bin/malicious_self_program_id.rs index 00d0b4db..be447ab9 100644 --- a/test_program_methods/guest/src/bin/malicious_self_program_id.rs +++ b/test_program_methods/guest/src/bin/malicious_self_program_id.rs @@ -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, diff --git a/test_program_methods/guest/src/bin/minter.rs b/test_program_methods/guest/src/bin/minter.rs index fd36c890..1f31ca05 100644 --- a/test_program_methods/guest/src/bin/minter.rs +++ b/test_program_methods/guest/src/bin/minter.rs @@ -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)], diff --git a/test_program_methods/guest/src/bin/missing_output.rs b/test_program_methods/guest/src/bin/missing_output.rs index a454a59e..d7d2778d 100644 --- a/test_program_methods/guest/src/bin/missing_output.rs +++ b/test_program_methods/guest/src/bin/missing_output.rs @@ -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)], diff --git a/test_program_methods/guest/src/bin/modified_transfer.rs b/test_program_methods/guest/src/bin/modified_transfer.rs index bbc0a6f3..98f4f43e 100644 --- a/test_program_methods/guest/src/bin/modified_transfer.rs +++ b/test_program_methods/guest/src/bin/modified_transfer.rs @@ -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(); } diff --git a/test_program_methods/guest/src/bin/nonce_changer.rs b/test_program_methods/guest/src/bin/nonce_changer.rs index d76a3812..c6e851fe 100644 --- a/test_program_methods/guest/src/bin/nonce_changer.rs +++ b/test_program_methods/guest/src/bin/nonce_changer.rs @@ -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)], diff --git a/test_program_methods/guest/src/bin/noop.rs b/test_program_methods/guest/src/bin/noop.rs index 777c7923..a8d28a9b 100644 --- a/test_program_methods/guest/src/bin/noop.rs +++ b/test_program_methods/guest/src/bin/noop.rs @@ -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(); } diff --git a/test_program_methods/guest/src/bin/program_owner_changer.rs b/test_program_methods/guest/src/bin/program_owner_changer.rs index 3cd5dead..0282b5cc 100644 --- a/test_program_methods/guest/src/bin/program_owner_changer.rs +++ b/test_program_methods/guest/src/bin/program_owner_changer.rs @@ -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)], diff --git a/test_program_methods/guest/src/bin/simple_balance_transfer.rs b/test_program_methods/guest/src/bin/simple_balance_transfer.rs index 0fea0d3f..f324b371 100644 --- a/test_program_methods/guest/src/bin/simple_balance_transfer.rs +++ b/test_program_methods/guest/src/bin/simple_balance_transfer.rs @@ -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![ diff --git a/test_program_methods/guest/src/bin/validity_window.rs b/test_program_methods/guest/src/bin/validity_window.rs index 8ff586b8..03100e8e 100644 --- a/test_program_methods/guest/src/bin/validity_window.rs +++ b/test_program_methods/guest/src/bin/validity_window.rs @@ -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)], diff --git a/test_program_methods/guest/src/bin/validity_window_chain_caller.rs b/test_program_methods/guest/src/bin/validity_window_chain_caller.rs index 97f22f61..212418a2 100644 --- a/test_program_methods/guest/src/bin/validity_window_chain_caller.rs +++ b/test_program_methods/guest/src/bin/validity_window_chain_caller.rs @@ -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)],