From 12dabb93417f757086bca470d32c139fb4d17355 Mon Sep 17 00:00:00 2001 From: Artem Gureev Date: Wed, 19 Aug 2026 16:48:06 +0000 Subject: [PATCH] refactor: rename remaining instruction_words to instruction_data across programs, tests, tools, ffi --- .../src/bin/hello_world_with_move_function.rs | 4 +-- integration_tests/tests/wallet_ffi.rs | 28 +++++++++---------- .../guest/src/bin/auth_asserting_noop.rs | 4 +-- .../test_methods/guest/src/bin/burner.rs | 4 +-- .../guest/src/bin/chain_caller.rs | 8 +++--- .../guest/src/bin/changer_claimer.rs | 4 +-- .../test_methods/guest/src/bin/claimer.rs | 4 +-- .../guest/src/bin/data_changer.rs | 4 +-- .../guest/src/bin/dropped_account.rs | 4 +-- .../guest/src/bin/extra_output.rs | 4 +-- .../guest/src/bin/flash_swap_callback.rs | 4 +-- .../guest/src/bin/flash_swap_initiator.rs | 6 ++-- .../bin/malicious_authorization_changer.rs | 8 +++--- .../src/bin/malicious_caller_program_id.rs | 4 +-- .../guest/src/bin/malicious_injector.rs | 4 +-- .../guest/src/bin/malicious_launderer.rs | 4 +-- .../src/bin/malicious_self_program_id.rs | 4 +-- .../test_methods/guest/src/bin/minter.rs | 4 +-- .../guest/src/bin/missing_output.rs | 4 +-- .../guest/src/bin/non_delegating_forwarder.rs | 4 +-- .../guest/src/bin/nonce_changer.rs | 4 +-- .../test_methods/guest/src/bin/noop.rs | 4 +-- .../test_methods/guest/src/bin/pda_claimer.rs | 4 +-- .../guest/src/bin/pda_spend_proxy.rs | 4 +-- .../guest/src/bin/private_pda_delegator.rs | 4 +-- .../guest/src/bin/program_owner_changer.rs | 4 +-- .../guest/src/bin/selective_pda_delegator.rs | 4 +-- .../guest/src/bin/simple_balance_transfer.rs | 6 ++-- .../guest/src/bin/simple_transfer_proxy.rs | 6 ++-- .../guest/src/bin/two_pda_claimer.rs | 4 +-- .../src/bin/undeclaring_pda_delegator.rs | 4 +-- .../guest/src/bin/validity_window.rs | 4 +-- .../src/bin/validity_window_chain_caller.rs | 4 +-- lez/programs/amm/src/main.rs | 4 +-- .../associated_token_account/src/main.rs | 4 +-- .../authenticated_transfer/src/main.rs | 4 +-- lez/programs/bridge/src/main.rs | 4 +-- lez/programs/clock/src/main.rs | 4 +-- lez/programs/cross_zone_outbox/src/main.rs | 4 +-- lez/programs/faucet/src/main.rs | 4 +-- lez/programs/pinata/src/main.rs | 4 +-- lez/programs/pinata_token/src/main.rs | 4 +-- lez/programs/sequencer_stake/src/main.rs | 4 +-- lez/programs/token/src/main.rs | 4 +-- lez/programs/vault/src/main.rs | 4 +-- .../guest/src/bin/authority_proxy.rs | 10 +++---- test_programs/guest/src/bin/chain_caller.rs | 9 +++--- test_programs/guest/src/bin/claimer.rs | 4 +-- .../guest/src/bin/clock_chain_caller.rs | 4 +-- .../guest/src/bin/faucet_chain_caller.rs | 4 +-- .../guest/src/bin/pda_spend_proxy.rs | 4 +-- .../guest/src/bin/pinata_cooldown.rs | 4 +-- .../guest/src/bin/simple_balance_transfer.rs | 6 ++-- .../guest/src/bin/time_locked_transfer.rs | 4 +-- tools/cycle_bench/src/main.rs | 10 +++---- 55 files changed, 139 insertions(+), 138 deletions(-) diff --git a/examples/program_deployment/methods/guest/src/bin/hello_world_with_move_function.rs b/examples/program_deployment/methods/guest/src/bin/hello_world_with_move_function.rs index ebb146ecc..9d4dc8efd 100644 --- a/examples/program_deployment/methods/guest/src/bin/hello_world_with_move_function.rs +++ b/examples/program_deployment/methods/guest/src/bin/hello_world_with_move_function.rs @@ -71,7 +71,7 @@ fn main() { pre_states, instruction: (function_id, data), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let post_states = match (pre_states.as_slice(), function_id, data.len()) { @@ -90,7 +90,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, post_states, ) diff --git a/integration_tests/tests/wallet_ffi.rs b/integration_tests/tests/wallet_ffi.rs index 958bd2180..5c7f63110 100644 --- a/integration_tests/tests/wallet_ffi.rs +++ b/integration_tests/tests/wallet_ffi.rs @@ -235,8 +235,8 @@ unsafe extern "C" { handle: *mut WalletHandle, account_identities: *const FfiAccountIdentity, account_identities_size: usize, - instruction_words: *const u8, - instruction_words_size: usize, + instruction_data: *const u8, + instruction_data_size: usize, program_id: FfiProgramId, out_result: *mut FfiTransactionResult, ) -> error::WalletFfiError; @@ -251,8 +251,8 @@ unsafe extern "C" { handle: *mut WalletHandle, account_identities: *const FfiAccountIdentity, account_identities_size: usize, - instruction_words: *const u8, - instruction_words_size: usize, + instruction_data: *const u8, + instruction_data_size: usize, program_with_dependencies: *const FfiProgramWithDependencies, out_result: *mut FfiTransactionResult, ) -> error::WalletFfiError; @@ -1634,8 +1634,8 @@ fn test_wallet_ffi_transfer_generic_public() -> Result<()> { amount, }) .unwrap(); - let instruction_words_size = instruction_data.len(); - let instruction_words = Box::into_raw(instruction_data.into_boxed_slice()) as *const u8; + let instruction_data_size = instruction_data.len(); + let instruction_data_ptr = Box::into_raw(instruction_data.into_boxed_slice()) as *const u8; let program_id = programs::authenticated_transfer().id(); @@ -1644,8 +1644,8 @@ fn test_wallet_ffi_transfer_generic_public() -> Result<()> { wallet_ffi_handle, account_identities, account_identities_size, - instruction_words, - instruction_words_size, + instruction_data_ptr, + instruction_data_size, program_id.into(), &raw mut transaction_result, ) @@ -1683,7 +1683,7 @@ fn test_wallet_ffi_transfer_generic_public() -> Result<()> { wallet_ffi_free_account_identity(account_identities_mut.add(1)); let instruction_data = - std::slice::from_raw_parts_mut(instruction_words.cast_mut(), instruction_words_size); + std::slice::from_raw_parts_mut(instruction_data_ptr.cast_mut(), instruction_data_size); drop(Box::from_raw(std::ptr::from_mut(instruction_data))); wallet_ffi_free_transaction_result(&raw mut transaction_result); @@ -1730,8 +1730,8 @@ fn test_wallet_ffi_transfer_generic_private() -> Result<()> { amount, }) .unwrap(); - let instruction_words_size = instruction_data.len(); - let instruction_words = Box::into_raw(instruction_data.into_boxed_slice()) as *const u8; + let instruction_data_size = instruction_data.len(); + let instruction_data_ptr = Box::into_raw(instruction_data.into_boxed_slice()) as *const u8; let program: ProgramWithDependencies = programs::authenticated_transfer().into(); let program_with_dependencies: FfiProgramWithDependencies = program.into(); @@ -1741,8 +1741,8 @@ fn test_wallet_ffi_transfer_generic_private() -> Result<()> { wallet_ffi_handle, account_identities, account_identities_size, - instruction_words, - instruction_words_size, + instruction_data_ptr, + instruction_data_size, &raw const program_with_dependencies, &raw mut transaction_result, ) @@ -1792,7 +1792,7 @@ fn test_wallet_ffi_transfer_generic_private() -> Result<()> { wallet_ffi_free_account_identity(account_identities_mut.add(1)); let instruction_data = - std::slice::from_raw_parts_mut(instruction_words.cast_mut(), instruction_words_size); + std::slice::from_raw_parts_mut(instruction_data_ptr.cast_mut(), instruction_data_size); drop(Box::from_raw(std::ptr::from_mut(instruction_data))); wallet_ffi_free_transaction_result(&raw mut transaction_result); diff --git a/lee/state_machine/test_methods/guest/src/bin/auth_asserting_noop.rs b/lee/state_machine/test_methods/guest/src/bin/auth_asserting_noop.rs index 91983c1d4..1b75b41bb 100644 --- a/lee/state_machine/test_methods/guest/src/bin/auth_asserting_noop.rs +++ b/lee/state_machine/test_methods/guest/src/bin/auth_asserting_noop.rs @@ -14,7 +14,7 @@ fn main() { pre_states, .. }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); for pre in &pre_states { @@ -32,7 +32,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, post_states, ) diff --git a/lee/state_machine/test_methods/guest/src/bin/burner.rs b/lee/state_machine/test_methods/guest/src/bin/burner.rs index 4cbf61a2f..2d8c7f38f 100644 --- a/lee/state_machine/test_methods/guest/src/bin/burner.rs +++ b/lee/state_machine/test_methods/guest/src/bin/burner.rs @@ -10,7 +10,7 @@ fn main() { pre_states, instruction: balance_to_burn, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre]) = <[_; 1]>::try_from(pre_states) else { @@ -24,7 +24,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![AccountPostState::new(account_post)], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/chain_caller.rs b/lee/state_machine/test_methods/guest/src/bin/chain_caller.rs index ee196f3fa..9bc5b4cbf 100644 --- a/lee/state_machine/test_methods/guest/src/bin/chain_caller.rs +++ b/lee/state_machine/test_methods/guest/src/bin/chain_caller.rs @@ -17,14 +17,14 @@ fn main() { pre_states, instruction: (balance, simple_transfer_id, num_chain_calls, pda_seed), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([recipient_pre, sender_pre]) = <[_; 2]>::try_from(pre_states) else { return; }; - let instruction_data = to_vec(&balance).unwrap(); + let call_instruction_data = to_vec(&balance).unwrap(); let mut running_recipient_pre = recipient_pre.clone(); let mut running_sender_pre = sender_pre.clone(); @@ -37,7 +37,7 @@ fn main() { for _i in 0..num_chain_calls { let new_chained_call = ChainedCall { program_id: simple_transfer_id, - instruction_data: instruction_data.clone(), + instruction_data: call_instruction_data.clone(), pre_states: vec![running_sender_pre.clone(), running_recipient_pre.clone()], /* <- Account order permutation here */ pda_seeds: pda_seed.iter().copied().collect(), }; @@ -58,7 +58,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![sender_pre.clone(), recipient_pre.clone()], vec![ AccountPostState::new(sender_pre.account), diff --git a/lee/state_machine/test_methods/guest/src/bin/changer_claimer.rs b/lee/state_machine/test_methods/guest/src/bin/changer_claimer.rs index 0d3c0df80..6122a1fd2 100644 --- a/lee/state_machine/test_methods/guest/src/bin/changer_claimer.rs +++ b/lee/state_machine/test_methods/guest/src/bin/changer_claimer.rs @@ -11,7 +11,7 @@ fn main() { pre_states, instruction: (data_opt, should_claim), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre]) = <[_; 1]>::try_from(pre_states) else { @@ -38,7 +38,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![post_state], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/claimer.rs b/lee/state_machine/test_methods/guest/src/bin/claimer.rs index b0efe9925..64c6a47ea 100644 --- a/lee/state_machine/test_methods/guest/src/bin/claimer.rs +++ b/lee/state_machine/test_methods/guest/src/bin/claimer.rs @@ -10,7 +10,7 @@ fn main() { pre_states, instruction: (), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre]) = <[_; 1]>::try_from(pre_states) else { @@ -22,7 +22,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![account_post], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/data_changer.rs b/lee/state_machine/test_methods/guest/src/bin/data_changer.rs index 4ab30a618..8362cec81 100644 --- a/lee/state_machine/test_methods/guest/src/bin/data_changer.rs +++ b/lee/state_machine/test_methods/guest/src/bin/data_changer.rs @@ -11,7 +11,7 @@ fn main() { pre_states, instruction: data, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre]) = <[_; 1]>::try_from(pre_states) else { @@ -27,7 +27,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![AccountPostState::new_claimed( account_post, diff --git a/lee/state_machine/test_methods/guest/src/bin/dropped_account.rs b/lee/state_machine/test_methods/guest/src/bin/dropped_account.rs index 348eefa85..60505df34 100644 --- a/lee/state_machine/test_methods/guest/src/bin/dropped_account.rs +++ b/lee/state_machine/test_methods/guest/src/bin/dropped_account.rs @@ -15,7 +15,7 @@ fn main() { pre_states, .. }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre1, _pre2]) = <[_; 2]>::try_from(pre_states) else { @@ -27,7 +27,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre1], vec![AccountPostState::new(account_pre1)], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/extra_output.rs b/lee/state_machine/test_methods/guest/src/bin/extra_output.rs index 6c9ee9ed2..16266bfb6 100644 --- a/lee/state_machine/test_methods/guest/src/bin/extra_output.rs +++ b/lee/state_machine/test_methods/guest/src/bin/extra_output.rs @@ -13,7 +13,7 @@ fn main() { pre_states, .. }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre]) = <[_; 1]>::try_from(pre_states) else { @@ -25,7 +25,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![ AccountPostState::new(account_pre), diff --git a/lee/state_machine/test_methods/guest/src/bin/flash_swap_callback.rs b/lee/state_machine/test_methods/guest/src/bin/flash_swap_callback.rs index e604409ce..94fcf9d37 100644 --- a/lee/state_machine/test_methods/guest/src/bin/flash_swap_callback.rs +++ b/lee/state_machine/test_methods/guest/src/bin/flash_swap_callback.rs @@ -45,7 +45,7 @@ fn main() { pre_states, instruction, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); // pre_states[0] = vault (after transfer out), pre_states[1] = receiver (after transfer out) @@ -80,7 +80,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![vault_pre.clone(), receiver_pre.clone()], vec![ AccountPostState::new(vault_pre.account), diff --git a/lee/state_machine/test_methods/guest/src/bin/flash_swap_initiator.rs b/lee/state_machine/test_methods/guest/src/bin/flash_swap_initiator.rs index d95872805..242ae116c 100644 --- a/lee/state_machine/test_methods/guest/src/bin/flash_swap_initiator.rs +++ b/lee/state_machine/test_methods/guest/src/bin/flash_swap_initiator.rs @@ -75,7 +75,7 @@ fn main() { pre_states, instruction, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); match instruction { @@ -162,7 +162,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![vault_pre.clone(), receiver_pre.clone()], vec![ AccountPostState::new(vault_pre.account), @@ -204,7 +204,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![vault.clone()], vec![AccountPostState::new(vault.account)], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/malicious_authorization_changer.rs b/lee/state_machine/test_methods/guest/src/bin/malicious_authorization_changer.rs index 3f1851e6f..420a2cbf1 100644 --- a/lee/state_machine/test_methods/guest/src/bin/malicious_authorization_changer.rs +++ b/lee/state_machine/test_methods/guest/src/bin/malicious_authorization_changer.rs @@ -19,7 +19,7 @@ fn main() { pre_states, instruction: (balance, transfer_program_id), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([sender, receiver]) = <[_; 2]>::try_from(pre_states) else { @@ -32,11 +32,11 @@ fn main() { ..sender.clone() }; - let instruction_data = to_vec(&balance).unwrap(); + let call_instruction_data = to_vec(&balance).unwrap(); let chained_call = ChainedCall { program_id: transfer_program_id, - instruction_data, + instruction_data: call_instruction_data, pre_states: vec![authorised_sender, receiver.clone()], pda_seeds: vec![], }; @@ -44,7 +44,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![sender.clone(), receiver.clone()], vec![ AccountPostState::new(sender.account), diff --git a/lee/state_machine/test_methods/guest/src/bin/malicious_caller_program_id.rs b/lee/state_machine/test_methods/guest/src/bin/malicious_caller_program_id.rs index 171ad6935..18792f69b 100644 --- a/lee/state_machine/test_methods/guest/src/bin/malicious_caller_program_id.rs +++ b/lee/state_machine/test_methods/guest/src/bin/malicious_caller_program_id.rs @@ -12,7 +12,7 @@ fn main() { pre_states, instruction: (), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let post_states = pre_states @@ -26,7 +26,7 @@ fn main() { ProgramOutput::new( self_program_id, Some(DEFAULT_PROGRAM_ID), // WRONG: should be None for a top-level call - instruction_words, + instruction_data, pre_states, post_states, ) diff --git a/lee/state_machine/test_methods/guest/src/bin/malicious_injector.rs b/lee/state_machine/test_methods/guest/src/bin/malicious_injector.rs index 92f1da53c..35bf692f6 100644 --- a/lee/state_machine/test_methods/guest/src/bin/malicious_injector.rs +++ b/lee/state_machine/test_methods/guest/src/bin/malicious_injector.rs @@ -47,7 +47,7 @@ fn main() { amount, ), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); // Echo own pre_states (attacker's account) unchanged. @@ -91,7 +91,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, post_states, ) diff --git a/lee/state_machine/test_methods/guest/src/bin/malicious_launderer.rs b/lee/state_machine/test_methods/guest/src/bin/malicious_launderer.rs index 34089fc63..afc7824dc 100644 --- a/lee/state_machine/test_methods/guest/src/bin/malicious_launderer.rs +++ b/lee/state_machine/test_methods/guest/src/bin/malicious_launderer.rs @@ -11,7 +11,7 @@ fn main() { pre_states, instruction: (simple_transfer_id, amount), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); // Output empty pre/post states. P2 processes no accounts itself, so the @@ -28,7 +28,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![], vec![], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/malicious_self_program_id.rs b/lee/state_machine/test_methods/guest/src/bin/malicious_self_program_id.rs index da719514f..575c56ef7 100644 --- a/lee/state_machine/test_methods/guest/src/bin/malicious_self_program_id.rs +++ b/lee/state_machine/test_methods/guest/src/bin/malicious_self_program_id.rs @@ -12,7 +12,7 @@ fn main() { pre_states, instruction: (), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let post_states = pre_states @@ -24,7 +24,7 @@ fn main() { ProgramOutput::new( DEFAULT_PROGRAM_ID, // WRONG: should be self_program_id caller_program_id, - instruction_words, + instruction_data, pre_states, post_states, ) diff --git a/lee/state_machine/test_methods/guest/src/bin/minter.rs b/lee/state_machine/test_methods/guest/src/bin/minter.rs index a71c32007..950938d88 100644 --- a/lee/state_machine/test_methods/guest/src/bin/minter.rs +++ b/lee/state_machine/test_methods/guest/src/bin/minter.rs @@ -10,7 +10,7 @@ fn main() { pre_states, .. }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre]) = <[_; 1]>::try_from(pre_states) else { @@ -27,7 +27,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![AccountPostState::new(account_post)], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/missing_output.rs b/lee/state_machine/test_methods/guest/src/bin/missing_output.rs index e8c53a345..edb351468 100644 --- a/lee/state_machine/test_methods/guest/src/bin/missing_output.rs +++ b/lee/state_machine/test_methods/guest/src/bin/missing_output.rs @@ -10,7 +10,7 @@ fn main() { pre_states, .. }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre1, pre2]) = <[_; 2]>::try_from(pre_states) else { @@ -22,7 +22,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre1, pre2], vec![AccountPostState::new(account_pre1)], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/non_delegating_forwarder.rs b/lee/state_machine/test_methods/guest/src/bin/non_delegating_forwarder.rs index 81b30f666..19265de6b 100644 --- a/lee/state_machine/test_methods/guest/src/bin/non_delegating_forwarder.rs +++ b/lee/state_machine/test_methods/guest/src/bin/non_delegating_forwarder.rs @@ -13,7 +13,7 @@ fn main() { pre_states, instruction: (callee_program_id, callee_instruction, declare_pre_states), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let (output_pre_states, output_post_states) = if declare_pre_states { @@ -31,7 +31,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, output_pre_states, output_post_states, ) diff --git a/lee/state_machine/test_methods/guest/src/bin/nonce_changer.rs b/lee/state_machine/test_methods/guest/src/bin/nonce_changer.rs index 9b00fc834..fa7126925 100644 --- a/lee/state_machine/test_methods/guest/src/bin/nonce_changer.rs +++ b/lee/state_machine/test_methods/guest/src/bin/nonce_changer.rs @@ -10,7 +10,7 @@ fn main() { pre_states, .. }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre]) = <[_; 1]>::try_from(pre_states) else { @@ -24,7 +24,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![AccountPostState::new(account_post)], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/noop.rs b/lee/state_machine/test_methods/guest/src/bin/noop.rs index 09bd1cca9..e8257e1b1 100644 --- a/lee/state_machine/test_methods/guest/src/bin/noop.rs +++ b/lee/state_machine/test_methods/guest/src/bin/noop.rs @@ -10,7 +10,7 @@ fn main() { pre_states, .. }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let post_states = pre_states @@ -20,7 +20,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, post_states, ) diff --git a/lee/state_machine/test_methods/guest/src/bin/pda_claimer.rs b/lee/state_machine/test_methods/guest/src/bin/pda_claimer.rs index 2571aadfa..aba378973 100644 --- a/lee/state_machine/test_methods/guest/src/bin/pda_claimer.rs +++ b/lee/state_machine/test_methods/guest/src/bin/pda_claimer.rs @@ -12,7 +12,7 @@ fn main() { pre_states, instruction: seed, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre]) = <[_; 1]>::try_from(pre_states) else { @@ -24,7 +24,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![account_post], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/pda_spend_proxy.rs b/lee/state_machine/test_methods/guest/src/bin/pda_spend_proxy.rs index e290b968e..5f08cdf85 100644 --- a/lee/state_machine/test_methods/guest/src/bin/pda_spend_proxy.rs +++ b/lee/state_machine/test_methods/guest/src/bin/pda_spend_proxy.rs @@ -17,7 +17,7 @@ fn main() { pre_states, instruction: (seed, amount, simple_transfer_id), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([first, second]) = <[_; 2]>::try_from(pre_states) else { @@ -40,7 +40,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![first, second], vec![first_post, second_post], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/private_pda_delegator.rs b/lee/state_machine/test_methods/guest/src/bin/private_pda_delegator.rs index 2bbec21c3..14028b402 100644 --- a/lee/state_machine/test_methods/guest/src/bin/private_pda_delegator.rs +++ b/lee/state_machine/test_methods/guest/src/bin/private_pda_delegator.rs @@ -19,7 +19,7 @@ fn main() { pre_states, instruction: (claim_seed, delegated_seed, callee_program_id), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre]) = <[_; 1]>::try_from(pre_states) else { @@ -42,7 +42,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![claimed], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/program_owner_changer.rs b/lee/state_machine/test_methods/guest/src/bin/program_owner_changer.rs index cc3b99369..c229114a1 100644 --- a/lee/state_machine/test_methods/guest/src/bin/program_owner_changer.rs +++ b/lee/state_machine/test_methods/guest/src/bin/program_owner_changer.rs @@ -10,7 +10,7 @@ fn main() { pre_states, .. }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre]) = <[_; 1]>::try_from(pre_states) else { @@ -24,7 +24,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![AccountPostState::new(account_post)], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/selective_pda_delegator.rs b/lee/state_machine/test_methods/guest/src/bin/selective_pda_delegator.rs index 6602f5b02..fb49b4cb6 100644 --- a/lee/state_machine/test_methods/guest/src/bin/selective_pda_delegator.rs +++ b/lee/state_machine/test_methods/guest/src/bin/selective_pda_delegator.rs @@ -21,7 +21,7 @@ fn main() { instruction: (claim_seed, delegated_seed, callee_program_id, callee_instruction, sibling), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Some((pda, rest)) = pre_states.split_first() else { @@ -69,7 +69,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pda.clone()], // Claim first PDA supplied vec![AccountPostState::new_claimed( diff --git a/lee/state_machine/test_methods/guest/src/bin/simple_balance_transfer.rs b/lee/state_machine/test_methods/guest/src/bin/simple_balance_transfer.rs index addc4a191..b9fe73c33 100644 --- a/lee/state_machine/test_methods/guest/src/bin/simple_balance_transfer.rs +++ b/lee/state_machine/test_methods/guest/src/bin/simple_balance_transfer.rs @@ -10,7 +10,7 @@ fn main() { pre_states, instruction: balance, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); if let Ok([account_pre]) = <[_; 1]>::try_from(pre_states.clone()) { @@ -20,7 +20,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, vec![account_post], ) @@ -46,7 +46,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![sender_pre, receiver_pre], vec![ AccountPostState::new_claimed_if_default(sender_post, Claim::Authorized), diff --git a/lee/state_machine/test_methods/guest/src/bin/simple_transfer_proxy.rs b/lee/state_machine/test_methods/guest/src/bin/simple_transfer_proxy.rs index c6789161e..ec24af3ef 100644 --- a/lee/state_machine/test_methods/guest/src/bin/simple_transfer_proxy.rs +++ b/lee/state_machine/test_methods/guest/src/bin/simple_transfer_proxy.rs @@ -37,7 +37,7 @@ fn main() { pre_states, instruction: (pda_seed, simple_transfer_id, amount, is_withdraw), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); if is_withdraw { @@ -65,7 +65,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, vec![pda_post, recipient_post], ) @@ -89,7 +89,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, vec![pda_post], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/two_pda_claimer.rs b/lee/state_machine/test_methods/guest/src/bin/two_pda_claimer.rs index 57df37d52..f5eac71ee 100644 --- a/lee/state_machine/test_methods/guest/src/bin/two_pda_claimer.rs +++ b/lee/state_machine/test_methods/guest/src/bin/two_pda_claimer.rs @@ -16,7 +16,7 @@ fn main() { pre_states, instruction: seed, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre_a, pre_b]) = <[_; 2]>::try_from(pre_states) else { @@ -29,7 +29,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre_a, pre_b], vec![claim_a, claim_b], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/undeclaring_pda_delegator.rs b/lee/state_machine/test_methods/guest/src/bin/undeclaring_pda_delegator.rs index 6653bee9d..514f913fb 100644 --- a/lee/state_machine/test_methods/guest/src/bin/undeclaring_pda_delegator.rs +++ b/lee/state_machine/test_methods/guest/src/bin/undeclaring_pda_delegator.rs @@ -19,7 +19,7 @@ fn main() { mut pre_states, instruction: (seed, declare_authorized, callee_program_id, callee_instruction, sibling), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Some(first) = pre_states.first_mut() else { @@ -50,7 +50,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, Vec::new(), Vec::new(), ) diff --git a/lee/state_machine/test_methods/guest/src/bin/validity_window.rs b/lee/state_machine/test_methods/guest/src/bin/validity_window.rs index ad7ecbb7b..d9c341479 100644 --- a/lee/state_machine/test_methods/guest/src/bin/validity_window.rs +++ b/lee/state_machine/test_methods/guest/src/bin/validity_window.rs @@ -13,7 +13,7 @@ fn main() { pre_states, instruction: (block_validity_window, timestamp_validity_window), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre]) = <[_; 1]>::try_from(pre_states) else { @@ -25,7 +25,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![AccountPostState::new(post)], ) diff --git a/lee/state_machine/test_methods/guest/src/bin/validity_window_chain_caller.rs b/lee/state_machine/test_methods/guest/src/bin/validity_window_chain_caller.rs index bd02d8802..556184f3d 100644 --- a/lee/state_machine/test_methods/guest/src/bin/validity_window_chain_caller.rs +++ b/lee/state_machine/test_methods/guest/src/bin/validity_window_chain_caller.rs @@ -21,7 +21,7 @@ fn main() { pre_states, instruction: (block_validity_window, chained_program_id, chained_block_validity_window), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let [pre] = <[_; 1]>::try_from(pre_states.clone()).expect("Expected exactly one pre state"); @@ -42,7 +42,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![AccountPostState::new(post)], ) diff --git a/lez/programs/amm/src/main.rs b/lez/programs/amm/src/main.rs index 9d4afc638..43af47fc0 100644 --- a/lez/programs/amm/src/main.rs +++ b/lez/programs/amm/src/main.rs @@ -19,7 +19,7 @@ fn main() { pre_states, instruction, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let pre_states_clone = pre_states.clone(); @@ -157,7 +157,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states_clone, post_states, ) diff --git a/lez/programs/associated_token_account/src/main.rs b/lez/programs/associated_token_account/src/main.rs index 2eaa2f3cb..960a3fc13 100644 --- a/lez/programs/associated_token_account/src/main.rs +++ b/lez/programs/associated_token_account/src/main.rs @@ -9,7 +9,7 @@ fn main() { pre_states, instruction, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let pre_states_clone = pre_states.clone(); @@ -61,7 +61,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states_clone, post_states, ) diff --git a/lez/programs/authenticated_transfer/src/main.rs b/lez/programs/authenticated_transfer/src/main.rs index 746ad5928..877d9eb77 100644 --- a/lez/programs/authenticated_transfer/src/main.rs +++ b/lez/programs/authenticated_transfer/src/main.rs @@ -70,7 +70,7 @@ fn main() { pre_states, instruction, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let post_states = match instruction { @@ -91,7 +91,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, post_states, ) diff --git a/lez/programs/bridge/src/main.rs b/lez/programs/bridge/src/main.rs index 1fd3333a0..0bed04459 100644 --- a/lez/programs/bridge/src/main.rs +++ b/lez/programs/bridge/src/main.rs @@ -21,7 +21,7 @@ fn main() { pre_states, instruction, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); assert!( @@ -139,7 +139,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states_clone, post_states, ) diff --git a/lez/programs/clock/src/main.rs b/lez/programs/clock/src/main.rs index 7bb2c9aa3..11ab5e0e3 100644 --- a/lez/programs/clock/src/main.rs +++ b/lez/programs/clock/src/main.rs @@ -44,7 +44,7 @@ fn main() { pre_states, instruction: timestamp, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre_01, pre_10, pre_50]) = <[_; 3]>::try_from(pre_states) else { @@ -87,7 +87,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre_01, pre_10, pre_50], vec![post_01, post_10, post_50], ) diff --git a/lez/programs/cross_zone_outbox/src/main.rs b/lez/programs/cross_zone_outbox/src/main.rs index a4b674df1..c2f966b21 100644 --- a/lez/programs/cross_zone_outbox/src/main.rs +++ b/lez/programs/cross_zone_outbox/src/main.rs @@ -12,7 +12,7 @@ fn main() { pre_states, instruction, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); // The emitter, and the only identity here the state machine verifies: it @@ -88,7 +88,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![outbox], vec![post], ) diff --git a/lez/programs/faucet/src/main.rs b/lez/programs/faucet/src/main.rs index 3646382d1..10b126645 100644 --- a/lez/programs/faucet/src/main.rs +++ b/lez/programs/faucet/src/main.rs @@ -20,7 +20,7 @@ fn main() { pre_states, instruction, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); assert!( @@ -90,7 +90,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states_clone, post_states, ) diff --git a/lez/programs/pinata/src/main.rs b/lez/programs/pinata/src/main.rs index cb8df9316..beb8231fd 100644 --- a/lez/programs/pinata/src/main.rs +++ b/lez/programs/pinata/src/main.rs @@ -51,7 +51,7 @@ fn main() { pre_states, instruction: solution, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pinata, winner]) = <[_; 2]>::try_from(pre_states) else { @@ -83,7 +83,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pinata, winner], vec![ AccountPostState::new_claimed_if_default(pinata_post, Claim::Authorized), diff --git a/lez/programs/pinata_token/src/main.rs b/lez/programs/pinata_token/src/main.rs index 7e7fd97d6..76e364bc2 100644 --- a/lez/programs/pinata_token/src/main.rs +++ b/lez/programs/pinata_token/src/main.rs @@ -57,7 +57,7 @@ fn main() { pre_states, instruction: solution, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok( @@ -101,7 +101,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![ pinata_definition, pinata_token_holding, diff --git a/lez/programs/sequencer_stake/src/main.rs b/lez/programs/sequencer_stake/src/main.rs index 4a53bd000..0d4753911 100644 --- a/lez/programs/sequencer_stake/src/main.rs +++ b/lez/programs/sequencer_stake/src/main.rs @@ -20,7 +20,7 @@ fn main() { pre_states, instruction, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let (post_states, chained_calls) = match instruction { @@ -78,7 +78,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, post_states, ) diff --git a/lez/programs/token/src/main.rs b/lez/programs/token/src/main.rs index 6e5cb8df1..860c40efb 100644 --- a/lez/programs/token/src/main.rs +++ b/lez/programs/token/src/main.rs @@ -17,7 +17,7 @@ fn main() { pre_states, instruction, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let pre_states_clone = pre_states.clone(); @@ -86,7 +86,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states_clone, post_states, ) diff --git a/lez/programs/vault/src/main.rs b/lez/programs/vault/src/main.rs index 89bde3638..d800b3620 100644 --- a/lez/programs/vault/src/main.rs +++ b/lez/programs/vault/src/main.rs @@ -27,7 +27,7 @@ fn main() { pre_states, instruction, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let pre_states_clone = pre_states.clone(); @@ -85,7 +85,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states_clone, post_states, ) diff --git a/test_programs/guest/src/bin/authority_proxy.rs b/test_programs/guest/src/bin/authority_proxy.rs index 2ef6f9f8a..acabbeda6 100644 --- a/test_programs/guest/src/bin/authority_proxy.rs +++ b/test_programs/guest/src/bin/authority_proxy.rs @@ -6,7 +6,7 @@ use lee_core::{ }, }; -/// Chain-calls an arbitrary target with caller-supplied instruction words, +/// Chain-calls an arbitrary target with caller-supplied instruction data, /// forwarding every account it was given. With a seed, the PDA derived from /// `(self, seed)` is delegated through `pda_seeds` and flagged authorized in the /// call, which is how a program-held authority acts on a callee. @@ -18,9 +18,9 @@ fn main() { self_program_id, caller_program_id, pre_states, - instruction: (target_program_id, target_instruction_words, pda_seed), + instruction: (target_program_id, target_instruction_data, pda_seed), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let mut call_pre_states = pre_states.clone(); @@ -35,7 +35,7 @@ fn main() { let chained_call = ChainedCall { program_id: target_program_id, - instruction_data: target_instruction_words, + instruction_data: target_instruction_data, pre_states: call_pre_states, pda_seeds: pda_seed.into_iter().collect(), }; @@ -48,7 +48,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, post_states, ) diff --git a/test_programs/guest/src/bin/chain_caller.rs b/test_programs/guest/src/bin/chain_caller.rs index 1c851b29c..65b0daf84 100644 --- a/test_programs/guest/src/bin/chain_caller.rs +++ b/test_programs/guest/src/bin/chain_caller.rs @@ -18,14 +18,15 @@ fn main() { pre_states, instruction: (balance, auth_transfer_id, num_chain_calls, pda_seed), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([recipient_pre, sender_pre]) = <[_; 2]>::try_from(pre_states) else { return; }; - let instruction_data = to_vec(&AuthTransferInstruction::Transfer { amount: balance }).unwrap(); + let call_instruction_data = + to_vec(&AuthTransferInstruction::Transfer { amount: balance }).unwrap(); let mut running_recipient_pre = recipient_pre.clone(); let mut running_sender_pre = sender_pre.clone(); @@ -38,7 +39,7 @@ fn main() { for _i in 0..num_chain_calls { let new_chained_call = ChainedCall { program_id: auth_transfer_id, - instruction_data: instruction_data.clone(), + instruction_data: call_instruction_data.clone(), pre_states: vec![running_sender_pre.clone(), running_recipient_pre.clone()], /* <- Account order permutation here */ pda_seeds: pda_seed.iter().copied().collect(), }; @@ -59,7 +60,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![sender_pre.clone(), recipient_pre.clone()], vec![ AccountPostState::new(sender_pre.account), diff --git a/test_programs/guest/src/bin/claimer.rs b/test_programs/guest/src/bin/claimer.rs index b0efe9925..64c6a47ea 100644 --- a/test_programs/guest/src/bin/claimer.rs +++ b/test_programs/guest/src/bin/claimer.rs @@ -10,7 +10,7 @@ fn main() { pre_states, instruction: (), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pre]) = <[_; 1]>::try_from(pre_states) else { @@ -22,7 +22,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pre], vec![account_post], ) diff --git a/test_programs/guest/src/bin/clock_chain_caller.rs b/test_programs/guest/src/bin/clock_chain_caller.rs index 9e79121e0..322b05964 100644 --- a/test_programs/guest/src/bin/clock_chain_caller.rs +++ b/test_programs/guest/src/bin/clock_chain_caller.rs @@ -19,7 +19,7 @@ fn main() { pre_states, instruction: (clock_program_id, timestamp), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let post_states: Vec<_> = pre_states @@ -37,7 +37,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, post_states, ) diff --git a/test_programs/guest/src/bin/faucet_chain_caller.rs b/test_programs/guest/src/bin/faucet_chain_caller.rs index 1e25e5109..2366d02aa 100644 --- a/test_programs/guest/src/bin/faucet_chain_caller.rs +++ b/test_programs/guest/src/bin/faucet_chain_caller.rs @@ -17,7 +17,7 @@ fn main() { pre_states, instruction: (faucet_program_id, vault_program_id, recipient_id, amount), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let post_states: Vec<_> = pre_states @@ -43,7 +43,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, post_states, ) diff --git a/test_programs/guest/src/bin/pda_spend_proxy.rs b/test_programs/guest/src/bin/pda_spend_proxy.rs index ce39e7d3f..e494b5260 100644 --- a/test_programs/guest/src/bin/pda_spend_proxy.rs +++ b/test_programs/guest/src/bin/pda_spend_proxy.rs @@ -17,7 +17,7 @@ fn main() { pre_states, instruction: (seed, amount, auth_transfer_id), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([first, second]) = <[_; 2]>::try_from(pre_states) else { @@ -41,7 +41,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![first, second], vec![first_post, second_post], ) diff --git a/test_programs/guest/src/bin/pinata_cooldown.rs b/test_programs/guest/src/bin/pinata_cooldown.rs index 24e572dc7..2ced8961f 100644 --- a/test_programs/guest/src/bin/pinata_cooldown.rs +++ b/test_programs/guest/src/bin/pinata_cooldown.rs @@ -53,7 +53,7 @@ fn main() { pre_states, instruction: (), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([pinata, winner, clock_pre]) = <[_; 3]>::try_from(pre_states) else { @@ -104,7 +104,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![pinata, winner, clock_pre], vec![ AccountPostState::new_claimed_if_default(pinata_post, Claim::Authorized), diff --git a/test_programs/guest/src/bin/simple_balance_transfer.rs b/test_programs/guest/src/bin/simple_balance_transfer.rs index addc4a191..b9fe73c33 100644 --- a/test_programs/guest/src/bin/simple_balance_transfer.rs +++ b/test_programs/guest/src/bin/simple_balance_transfer.rs @@ -10,7 +10,7 @@ fn main() { pre_states, instruction: balance, }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); if let Ok([account_pre]) = <[_; 1]>::try_from(pre_states.clone()) { @@ -20,7 +20,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, pre_states, vec![account_post], ) @@ -46,7 +46,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![sender_pre, receiver_pre], vec![ AccountPostState::new_claimed_if_default(sender_post, Claim::Authorized), diff --git a/test_programs/guest/src/bin/time_locked_transfer.rs b/test_programs/guest/src/bin/time_locked_transfer.rs index 76391b892..705161ddc 100644 --- a/test_programs/guest/src/bin/time_locked_transfer.rs +++ b/test_programs/guest/src/bin/time_locked_transfer.rs @@ -23,7 +23,7 @@ fn main() { pre_states, instruction: (amount, deadline), }, - instruction_words, + instruction_data, ) = read_lee_inputs::(); let Ok([sender_pre, receiver_pre, clock_pre]) = <[_; 3]>::try_from(pre_states) else { @@ -60,7 +60,7 @@ fn main() { ProgramOutput::new( self_program_id, caller_program_id, - instruction_words, + instruction_data, vec![sender_pre, receiver_pre, clock_pre], vec![ AccountPostState::new(sender_post), diff --git a/tools/cycle_bench/src/main.rs b/tools/cycle_bench/src/main.rs index cf3e731a3..b0bae7e54 100644 --- a/tools/cycle_bench/src/main.rs +++ b/tools/cycle_bench/src/main.rs @@ -175,7 +175,7 @@ struct Case { instruction_label: &'static str, program: Program, pre_states: Vec, - instruction_words: InstructionData, + instruction_data: InstructionData, } impl Case { @@ -191,7 +191,7 @@ impl Case { instruction_label, program, pre_states, - instruction_words: borsh::to_vec(instruction)?, + instruction_data: borsh::to_vec(instruction)?, }) } @@ -201,7 +201,7 @@ impl Case { instruction_label, program, pre_states, - instruction_words, + instruction_data, } = self; let caller_program_id: Option = None; @@ -216,7 +216,7 @@ impl Case { program.write_inputs( caller_program_id, &pre_states, - &instruction_words, + &instruction_data, &mut env_builder, )?; let env = env_builder.build()?; @@ -243,7 +243,7 @@ impl Case { program.write_inputs( caller_program_id, &pre_states, - &instruction_words, + &instruction_data, &mut env_builder, )?; let env = env_builder.build()?;