From f2de2637ddf7601911b46f364346ad2e78c053e5 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Fri, 14 Jul 2023 11:44:47 +0300 Subject: [PATCH] removed sc_deploy_use_new_address --- .../adder_mandos_constructed_with_calls_test.rs | 4 ++-- .../scenario/src/facade/scenario_world_steps.rs | 11 ----------- framework/snippets/src/interactor_sc_extra.rs | 16 ---------------- 3 files changed, 2 insertions(+), 29 deletions(-) diff --git a/contracts/examples/adder/tests/adder_mandos_constructed_with_calls_test.rs b/contracts/examples/adder/tests/adder_mandos_constructed_with_calls_test.rs index 5a565c42cb..2e4e1841e7 100644 --- a/contracts/examples/adder/tests/adder_mandos_constructed_with_calls_test.rs +++ b/contracts/examples/adder/tests/adder_mandos_constructed_with_calls_test.rs @@ -24,14 +24,14 @@ fn adder_scenario_constructed_raw() { .put_account(owner_address, Account::new().nonce(1)) .new_address(owner_address, 1, "sc:adder"), ) - .sc_deploy_use_new_address( + .sc_deploy_use_result( ScDeployStep::new() .from(owner_address) .contract_code("file:output/adder.wasm", &ic) .call(adder_contract.init(5u32)) .gas_limit("5,000,000") .expect(TxExpect::ok().no_result()), - |new_address| { + |new_address, _| { assert_eq!(new_address, adder_contract.to_address()); }, ) diff --git a/framework/scenario/src/facade/scenario_world_steps.rs b/framework/scenario/src/facade/scenario_world_steps.rs index 119aa9b42b..721dd9a572 100644 --- a/framework/scenario/src/facade/scenario_world_steps.rs +++ b/framework/scenario/src/facade/scenario_world_steps.rs @@ -191,17 +191,6 @@ impl ScenarioWorld { (new_address, typed_response.result.unwrap()) } - pub fn sc_deploy_use_new_address(&mut self, step: S, use_new_address: F) -> &mut Self - where - S: AsMut, - F: FnOnce(Address), - { - self.sc_deploy_use_raw_response(step, |response| { - let new_address = unwrap_new_address(response); - use_new_address(new_address); - }) - } - /// Adds a simple transfer step, then executes it. pub fn transfer_step(&mut self, step: TransferStep) -> &mut Self { self.run_transfer_step(&step); diff --git a/framework/snippets/src/interactor_sc_extra.rs b/framework/snippets/src/interactor_sc_extra.rs index 9a25a0edf6..df14ac9180 100644 --- a/framework/snippets/src/interactor_sc_extra.rs +++ b/framework/snippets/src/interactor_sc_extra.rs @@ -134,22 +134,6 @@ impl Interactor { }) .await } - - pub async fn sc_deploy_use_new_address( - &mut self, - step: S, - use_new_address: F, - ) -> &mut Self - where - S: AsMut, - F: FnOnce(Address), - { - self.sc_deploy_use_raw_response(step, |response| { - let new_address = unwrap_new_address(response); - use_new_address(new_address); - }) - .await - } } fn unwrap_response(opt_response: &Option) -> &TxResponse {