From f7b5321243b015530225663e53616fb337fa1377 Mon Sep 17 00:00:00 2001 From: Thibault Martinez Date: Tue, 5 Sep 2023 16:54:54 +0200 Subject: [PATCH] Add with_ prefix to ISA setters --- .../api/block_builder/input_selection/mod.rs | 10 ++--- .../operations/transaction/input_selection.rs | 22 +++++----- .../client/input_selection/account_outputs.rs | 22 +++++----- .../client/input_selection/basic_outputs.rs | 6 +-- sdk/tests/client/input_selection/burn.rs | 40 +++++++++---------- .../client/input_selection/expiration.rs | 38 +++++++++--------- .../client/input_selection/foundry_outputs.rs | 14 +++---- .../client/input_selection/native_tokens.rs | 8 ++-- .../client/input_selection/nft_outputs.rs | 6 +-- sdk/tests/client/input_selection/outputs.rs | 2 +- sdk/tests/client/input_selection/timelock.rs | 10 ++--- sdk/tests/client/signing/mod.rs | 2 +- 12 files changed, 90 insertions(+), 90 deletions(-) diff --git a/sdk/src/client/api/block_builder/input_selection/mod.rs b/sdk/src/client/api/block_builder/input_selection/mod.rs index 96d1336746..4baa80fc55 100644 --- a/sdk/src/client/api/block_builder/input_selection/mod.rs +++ b/sdk/src/client/api/block_builder/input_selection/mod.rs @@ -194,31 +194,31 @@ impl InputSelection { } /// Sets the required inputs of an [`InputSelection`]. - pub fn required_inputs(mut self, inputs: impl Into>) -> Self { + pub fn with_required_inputs(mut self, inputs: impl Into>) -> Self { self.required_inputs = inputs.into(); self } /// Sets the forbidden inputs of an [`InputSelection`]. - pub fn forbidden_inputs(mut self, inputs: HashSet) -> Self { + pub fn with_forbidden_inputs(mut self, inputs: HashSet) -> Self { self.forbidden_inputs = inputs; self } /// Sets the burn of an [`InputSelection`]. - pub fn burn(mut self, burn: impl Into>) -> Self { + pub fn with_burn(mut self, burn: impl Into>) -> Self { self.burn = burn.into(); self } /// Sets the remainder address of an [`InputSelection`]. - pub fn remainder_address(mut self, address: impl Into>) -> Self { + pub fn with_remainder_address(mut self, address: impl Into>) -> Self { self.remainder_address = address.into(); self } /// Sets the slot index of an [`InputSelection`]. - pub fn slot_index(mut self, slot_index: impl Into) -> Self { + pub fn with_slot_index(mut self, slot_index: impl Into) -> Self { self.slot_index = slot_index.into(); self } diff --git a/sdk/src/wallet/account/operations/transaction/input_selection.rs b/sdk/src/wallet/account/operations/transaction/input_selection.rs index dacf54d910..7674e1eeaf 100644 --- a/sdk/src/wallet/account/operations/transaction/input_selection.rs +++ b/sdk/src/wallet/account/operations/transaction/input_selection.rs @@ -100,15 +100,15 @@ where addresses, protocol_parameters.clone(), ) - .required_inputs(custom_inputs) - .forbidden_inputs(forbidden_inputs); + .with_required_inputs(custom_inputs) + .with_forbidden_inputs(forbidden_inputs); if let Some(address) = remainder_address { - input_selection = input_selection.remainder_address(address); + input_selection = input_selection.with_remainder_address(address); } if let Some(burn) = burn { - input_selection = input_selection.burn(burn.clone()); + input_selection = input_selection.with_burn(burn.clone()); } let selected_transaction_data = input_selection.select()?; @@ -135,15 +135,15 @@ where addresses, protocol_parameters.clone(), ) - .required_inputs(mandatory_inputs) - .forbidden_inputs(forbidden_inputs); + .with_required_inputs(mandatory_inputs) + .with_forbidden_inputs(forbidden_inputs); if let Some(address) = remainder_address { - input_selection = input_selection.remainder_address(address); + input_selection = input_selection.with_remainder_address(address); } if let Some(burn) = burn { - input_selection = input_selection.burn(burn.clone()); + input_selection = input_selection.with_burn(burn.clone()); } let selected_transaction_data = input_selection.select()?; @@ -167,14 +167,14 @@ where addresses, protocol_parameters.clone(), ) - .forbidden_inputs(forbidden_inputs); + .with_forbidden_inputs(forbidden_inputs); if let Some(address) = remainder_address { - input_selection = input_selection.remainder_address(address); + input_selection = input_selection.with_remainder_address(address); } if let Some(burn) = burn { - input_selection = input_selection.burn(burn.clone()); + input_selection = input_selection.with_burn(burn.clone()); } let selected_transaction_data = match input_selection.select() { diff --git a/sdk/tests/client/input_selection/account_outputs.rs b/sdk/tests/client/input_selection/account_outputs.rs index dc06483db3..9e1ce84ec2 100644 --- a/sdk/tests/client/input_selection/account_outputs.rs +++ b/sdk/tests/client/input_selection/account_outputs.rs @@ -325,7 +325,7 @@ fn burn_account() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_account(account_id_2)) + .with_burn(Burn::new().add_account(account_id_2)) .select() .unwrap(); @@ -1160,7 +1160,7 @@ fn account_burn_should_not_validate_account_sender() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_account(account_id_1)) + .with_burn(Burn::new().add_account(account_id_1)) .select(); assert!(matches!( @@ -1205,7 +1205,7 @@ fn account_burn_should_not_validate_account_address() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_account(account_id_1)) + .with_burn(Burn::new().add_account(account_id_1)) .select(); assert!(matches!( @@ -1536,7 +1536,7 @@ fn state_controller_sender_required_already_selected() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .required_inputs([*inputs[0].output_id()]) + .with_required_inputs([*inputs[0].output_id()]) .select() .unwrap(); @@ -1590,7 +1590,7 @@ fn state_controller_sender_required_but_governance() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .required_inputs([*inputs[0].output_id()]) + .with_required_inputs([*inputs[0].output_id()]) .select(); assert!(matches!( @@ -1702,7 +1702,7 @@ fn governor_sender_required_already_selected() { addresses([BECH32_ADDRESS_ED25519_1]), protocol_parameters, ) - .required_inputs([*inputs[0].output_id()]) + .with_required_inputs([*inputs[0].output_id()]) .select() .unwrap(); @@ -1744,7 +1744,7 @@ fn governance_transition_and_required() { addresses([BECH32_ADDRESS_ED25519_1]), protocol_parameters, ) - .required_inputs([*inputs[0].output_id()]) + .with_required_inputs([*inputs[0].output_id()]) .select() .unwrap(); @@ -1786,7 +1786,7 @@ fn state_transition_and_required() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .required_inputs([*inputs[0].output_id()]) + .with_required_inputs([*inputs[0].output_id()]) .select() .unwrap(); @@ -1840,7 +1840,7 @@ fn governor_sender_required_but_state() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .required_inputs([*inputs[0].output_id()]) + .with_required_inputs([*inputs[0].output_id()]) .select(); assert!(matches!( @@ -1992,7 +1992,7 @@ fn remainder_address_in_governor() { protocol_parameters, ) // Add the basic output so it will be consumed - .required_inputs([*inputs[1].output_id()]) + .with_required_inputs([*inputs[1].output_id()]) .select() .unwrap(); @@ -2216,7 +2216,7 @@ fn burn_account_but_governor_not_owned() { addresses([BECH32_ADDRESS_ED25519_2]), protocol_parameters, ) - .burn(Burn::new().add_account(account_id_1)) + .with_burn(Burn::new().add_account(account_id_1)) .select(); assert!(matches!( diff --git a/sdk/tests/client/input_selection/basic_outputs.rs b/sdk/tests/client/input_selection/basic_outputs.rs index f6e03dfed0..5ac987dd0a 100644 --- a/sdk/tests/client/input_selection/basic_outputs.rs +++ b/sdk/tests/client/input_selection/basic_outputs.rs @@ -217,7 +217,7 @@ fn input_amount_greater_than_output_amount_with_remainder_address() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .remainder_address(remainder_address) + .with_remainder_address(remainder_address) .select() .unwrap(); @@ -1196,7 +1196,7 @@ fn sender_already_selected() { addresses([BECH32_ADDRESS_ED25519_0, BECH32_ADDRESS_ED25519_1]), protocol_parameters, ) - .required_inputs([*inputs[0].output_id()]) + .with_required_inputs([*inputs[0].output_id()]) .select() .unwrap(); @@ -1235,7 +1235,7 @@ fn single_mandatory_input() { addresses([BECH32_ADDRESS_ED25519_0, BECH32_ADDRESS_ED25519_1]), protocol_parameters, ) - .required_inputs([*inputs[0].output_id()]) + .with_required_inputs([*inputs[0].output_id()]) .select() .unwrap(); diff --git a/sdk/tests/client/input_selection/burn.rs b/sdk/tests/client/input_selection/burn.rs index 8af888de2b..03d3071ba8 100644 --- a/sdk/tests/client/input_selection/burn.rs +++ b/sdk/tests/client/input_selection/burn.rs @@ -58,7 +58,7 @@ fn burn_account_present() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_account(account_id_1)) + .with_burn(Burn::new().add_account(account_id_1)) .select() .unwrap(); @@ -103,8 +103,8 @@ fn burn_account_present_and_required() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_account(account_id_1)) - .required_inputs([*inputs[0].output_id()]) + .with_burn(Burn::new().add_account(account_id_1)) + .with_required_inputs([*inputs[0].output_id()]) .select() .unwrap(); @@ -150,7 +150,7 @@ fn burn_account_id_zero() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_nft(nft_id)) + .with_burn(Burn::new().add_nft(nft_id)) .select() .unwrap(); @@ -191,7 +191,7 @@ fn burn_account_absent() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_account(account_id_1)) + .with_burn(Burn::new().add_account(account_id_1)) .select(); assert!(matches!( @@ -248,7 +248,7 @@ fn burn_accounts_present() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().set_accounts(HashSet::from([account_id_1, account_id_2]))) + .with_burn(Burn::new().set_accounts(HashSet::from([account_id_1, account_id_2]))) .select() .unwrap(); @@ -296,7 +296,7 @@ fn burn_account_in_outputs() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_account(account_id_1)) + .with_burn(Burn::new().add_account(account_id_1)) .select(); assert!(matches!( @@ -341,7 +341,7 @@ fn burn_nft_present() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_nft(nft_id_1)) + .with_burn(Burn::new().add_nft(nft_id_1)) .select() .unwrap(); @@ -386,8 +386,8 @@ fn burn_nft_present_and_required() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_nft(nft_id_1)) - .required_inputs([*inputs[0].output_id()]) + .with_burn(Burn::new().add_nft(nft_id_1)) + .with_required_inputs([*inputs[0].output_id()]) .select() .unwrap(); @@ -433,7 +433,7 @@ fn burn_nft_id_zero() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_account(account_id)) + .with_burn(Burn::new().add_account(account_id)) .select() .unwrap(); @@ -474,7 +474,7 @@ fn burn_nft_absent() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_nft(nft_id_1)) + .with_burn(Burn::new().add_nft(nft_id_1)) .select(); assert!(matches!( @@ -531,7 +531,7 @@ fn burn_nfts_present() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().set_nfts(HashSet::from([nft_id_1, nft_id_2]))) + .with_burn(Burn::new().set_nfts(HashSet::from([nft_id_1, nft_id_2]))) .select() .unwrap(); @@ -579,7 +579,7 @@ fn burn_nft_in_outputs() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_nft(nft_id_1)) + .with_burn(Burn::new().add_nft(nft_id_1)) .select(); assert!(matches!( @@ -631,7 +631,7 @@ fn burn_foundry_present() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_foundry(inputs[0].output.as_foundry().id())) + .with_burn(Burn::new().add_foundry(inputs[0].output.as_foundry().id())) .select() .unwrap(); @@ -717,7 +717,7 @@ fn burn_foundry_absent() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_foundry(foundry_id_1)) + .with_burn(Burn::new().add_foundry(foundry_id_1)) .select(); assert!(matches!( @@ -775,7 +775,7 @@ fn burn_foundries_present() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().set_foundries(HashSet::from([ + .with_burn(Burn::new().set_foundries(HashSet::from([ inputs[0].output.as_foundry().id(), inputs[1].output.as_foundry().id(), ]))) @@ -839,7 +839,7 @@ fn burn_foundry_in_outputs() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_foundry(foundry_id_1)) + .with_burn(Burn::new().add_foundry(foundry_id_1)) .select(); assert!(matches!( @@ -869,7 +869,7 @@ fn burn_native_tokens() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().set_native_tokens(HashMap::from([ + .with_burn(Burn::new().set_native_tokens(HashMap::from([ (TokenId::from_str(TOKEN_ID_1).unwrap(), 20), (TokenId::from_str(TOKEN_ID_2).unwrap(), 30), ]))) @@ -929,7 +929,7 @@ fn burn_foundry_and_its_account() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn( + .with_burn( Burn::new() .add_foundry(inputs[0].output.as_foundry().id()) .add_account(account_id_1), diff --git a/sdk/tests/client/input_selection/expiration.rs b/sdk/tests/client/input_selection/expiration.rs index 98baac9392..01c47bb738 100644 --- a/sdk/tests/client/input_selection/expiration.rs +++ b/sdk/tests/client/input_selection/expiration.rs @@ -49,7 +49,7 @@ fn one_output_expiration_not_expired() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select(); assert!(matches!(selected, Err(Error::NoAvailableInputsProvided))); @@ -86,7 +86,7 @@ fn expiration_equal_timestamp() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(200) + .with_slot_index(200) .select() .unwrap(); @@ -125,7 +125,7 @@ fn one_output_expiration_expired() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -176,7 +176,7 @@ fn two_outputs_one_expiration_expired() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -219,7 +219,7 @@ fn two_outputs_one_unexpired_one_missing() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -272,7 +272,7 @@ fn two_outputs_two_expired() { addresses([BECH32_ADDRESS_ED25519_2]), protocol_parameters, ) - .slot_index(200) + .with_slot_index(200) .select() .unwrap(); @@ -324,7 +324,7 @@ fn two_outputs_two_expired_2() { addresses([BECH32_ADDRESS_ED25519_1, BECH32_ADDRESS_ED25519_2]), protocol_parameters, ) - .slot_index(200) + .with_slot_index(200) .select() .unwrap(); @@ -363,7 +363,7 @@ fn expiration_expired_with_sdr() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -402,7 +402,7 @@ fn expiration_expired_with_sdr_2() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -441,7 +441,7 @@ fn expiration_expired_with_sdr_and_timelock() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -480,7 +480,7 @@ fn expiration_expired_with_sdr_and_timelock_2() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -525,7 +525,7 @@ fn sender_in_expiration() { addresses([BECH32_ADDRESS_ED25519_0, BECH32_ADDRESS_ED25519_1]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -565,8 +565,8 @@ fn sender_in_expiration_already_selected() { addresses([BECH32_ADDRESS_ED25519_0, BECH32_ADDRESS_ED25519_1]), protocol_parameters, ) - .slot_index(100) - .required_inputs([*inputs[0].output_id()]) + .with_slot_index(100) + .with_required_inputs([*inputs[0].output_id()]) .select() .unwrap(); @@ -605,7 +605,7 @@ fn remainder_in_expiration() { addresses([BECH32_ADDRESS_ED25519_0, BECH32_ADDRESS_ED25519_1]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -655,7 +655,7 @@ fn expiration_expired_non_ed25519_in_address_unlock_condition() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -709,7 +709,7 @@ fn expiration_expired_only_account_addresses() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -751,7 +751,7 @@ fn one_nft_output_expiration_unexpired() { addresses([BECH32_ADDRESS_ED25519_1]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -793,7 +793,7 @@ fn one_nft_output_expiration_expired() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); diff --git a/sdk/tests/client/input_selection/foundry_outputs.rs b/sdk/tests/client/input_selection/foundry_outputs.rs index 922f510e28..d52f9b1961 100644 --- a/sdk/tests/client/input_selection/foundry_outputs.rs +++ b/sdk/tests/client/input_selection/foundry_outputs.rs @@ -322,7 +322,7 @@ fn destroy_foundry_with_account_state_transition() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_foundry(inputs[1].output.as_foundry().id())) + .with_burn(Burn::new().add_foundry(inputs[1].output.as_foundry().id())) .select() .unwrap(); @@ -364,7 +364,7 @@ fn destroy_foundry_with_account_governance_transition() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_foundry(inputs[1].output.as_foundry().id())) + .with_burn(Burn::new().add_foundry(inputs[1].output.as_foundry().id())) .select(); assert!(matches!( @@ -415,7 +415,7 @@ fn destroy_foundry_with_account_burn() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn( + .with_burn( Burn::new() .add_foundry(inputs[1].output.as_foundry().id()) .add_account(account_id_2), @@ -750,7 +750,7 @@ fn mint_and_burn_at_the_same_time() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_native_token(token_id, 10)) + .with_burn(Burn::new().add_native_token(token_id, 10)) .select(); assert!(matches!( @@ -864,7 +864,7 @@ fn create_native_token_but_burn_account() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_account(account_id_1)) + .with_burn(Burn::new().add_account(account_id_1)) .select(); assert!(matches!( @@ -966,7 +966,7 @@ fn burned_tokens_not_provided() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_native_token(token_id_1, 100)) + .with_burn(Burn::new().add_native_token(token_id_1, 100)) .select(); assert!(matches!( @@ -1020,7 +1020,7 @@ fn foundry_in_outputs_and_required() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .required_inputs([*inputs[1].output_id()]) + .with_required_inputs([*inputs[1].output_id()]) .select() .unwrap(); diff --git a/sdk/tests/client/input_selection/native_tokens.rs b/sdk/tests/client/input_selection/native_tokens.rs index 90957705c1..d2ec8f1133 100644 --- a/sdk/tests/client/input_selection/native_tokens.rs +++ b/sdk/tests/client/input_selection/native_tokens.rs @@ -404,7 +404,7 @@ fn burn_and_send_at_the_same_time() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_native_token(TokenId::from_str(TOKEN_ID_1).unwrap(), 10)) + .with_burn(Burn::new().add_native_token(TokenId::from_str(TOKEN_ID_1).unwrap(), 10)) .select() .unwrap(); @@ -444,7 +444,7 @@ fn burn_one_input_no_output() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_native_token(TokenId::from_str(TOKEN_ID_1).unwrap(), 50)) + .with_burn(Burn::new().add_native_token(TokenId::from_str(TOKEN_ID_1).unwrap(), 50)) .select() .unwrap(); @@ -491,7 +491,7 @@ fn burn_two_inputs_no_output() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_native_token(TokenId::from_str(TOKEN_ID_1).unwrap(), 50)) + .with_burn(Burn::new().add_native_token(TokenId::from_str(TOKEN_ID_1).unwrap(), 50)) .select() .unwrap(); @@ -527,7 +527,7 @@ fn burn_one_input_two_tokens_no_output() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_native_token(TokenId::from_str(TOKEN_ID_1).unwrap(), 50)) + .with_burn(Burn::new().add_native_token(TokenId::from_str(TOKEN_ID_1).unwrap(), 50)) .select() .unwrap(); diff --git a/sdk/tests/client/input_selection/nft_outputs.rs b/sdk/tests/client/input_selection/nft_outputs.rs index 9da0b86a1b..abb1a24456 100644 --- a/sdk/tests/client/input_selection/nft_outputs.rs +++ b/sdk/tests/client/input_selection/nft_outputs.rs @@ -276,7 +276,7 @@ fn burn_nft() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_nft(nft_id_2)) + .with_burn(Burn::new().add_nft(nft_id_2)) .select() .unwrap(); @@ -1075,7 +1075,7 @@ fn nft_burn_should_validate_nft_sender() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_nft(nft_id_1)) + .with_burn(Burn::new().add_nft(nft_id_1)) .select() .unwrap(); @@ -1119,7 +1119,7 @@ fn nft_burn_should_validate_nft_address() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_nft(nft_id_1)) + .with_burn(Burn::new().add_nft(nft_id_1)) .select() .unwrap(); diff --git a/sdk/tests/client/input_selection/outputs.rs b/sdk/tests/client/input_selection/outputs.rs index 0b998916ab..d3003d0e19 100644 --- a/sdk/tests/client/input_selection/outputs.rs +++ b/sdk/tests/client/input_selection/outputs.rs @@ -92,7 +92,7 @@ fn no_outputs_but_burn() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .burn(Burn::new().add_account(account_id_2)) + .with_burn(Burn::new().add_account(account_id_2)) .select() .unwrap(); diff --git a/sdk/tests/client/input_selection/timelock.rs b/sdk/tests/client/input_selection/timelock.rs index 6df09e3f15..86c36f096e 100644 --- a/sdk/tests/client/input_selection/timelock.rs +++ b/sdk/tests/client/input_selection/timelock.rs @@ -42,7 +42,7 @@ fn one_output_timelock_not_expired() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select(); assert!(matches!(selected, Err(Error::NoAvailableInputsProvided))); @@ -79,7 +79,7 @@ fn timelock_equal_timestamp() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(200) + .with_slot_index(200) .select() .unwrap(); @@ -130,7 +130,7 @@ fn two_outputs_one_timelock_expired() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -173,7 +173,7 @@ fn two_outputs_one_timelocked_one_missing() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); @@ -213,7 +213,7 @@ fn one_output_timelock_expired() { addresses([BECH32_ADDRESS_ED25519_0]), protocol_parameters, ) - .slot_index(100) + .with_slot_index(100) .select() .unwrap(); diff --git a/sdk/tests/client/signing/mod.rs b/sdk/tests/client/signing/mod.rs index e78632f79e..6564152eb2 100644 --- a/sdk/tests/client/signing/mod.rs +++ b/sdk/tests/client/signing/mod.rs @@ -366,7 +366,7 @@ async fn all_combined() -> Result<()> { ], protocol_parameters.clone(), ) - .slot_index(slot_index) + .with_slot_index(slot_index) .select() .unwrap();