diff --git a/contracts/examples/adder/interact/src/basic_interact.rs b/contracts/examples/adder/interact/src/basic_interact.rs index f1036b4aa0..7941bd7626 100644 --- a/contracts/examples/adder/interact/src/basic_interact.rs +++ b/contracts/examples/adder/interact/src/basic_interact.rs @@ -8,7 +8,7 @@ use basic_interact_state::State; use clap::Parser; use multiversx_sc_snippets::{ env_logger, - multiversx_sc::types::{Address, ReturnsNewAddress, ReturnsSimilar}, + multiversx_sc::types::{Address, ReturnsNewAddress, ReturnsResultConv}, multiversx_sc_scenario::{ api::StaticApi, bech32, @@ -197,7 +197,7 @@ impl AdderInteract { .to(self.state.adder().to_address()) .typed(adder_proxy::AdderProxy) .sum() - .returns(ReturnsSimilar::::new()) + .returns(ReturnsResultConv::::new()) .prepare_async() .run() .await; diff --git a/contracts/examples/adder/tests/adder_blackbox_chained_test.rs b/contracts/examples/adder/tests/adder_blackbox_chained_test.rs index 6060ad3859..05b95ba905 100644 --- a/contracts/examples/adder/tests/adder_blackbox_chained_test.rs +++ b/contracts/examples/adder/tests/adder_blackbox_chained_test.rs @@ -1,5 +1,5 @@ use adder::*; -use multiversx_sc::types::{AddressExpr, ScExpr, WithResultNewAddress, WithResultSimilar}; +use multiversx_sc::types::{AddressExpr, ScExpr, WithNewAddress, WithResultConv}; use multiversx_sc_scenario::{api::StaticApi, num_bigint::BigUint, scenario_model::*, *}; const ADDER_PATH_EXPR: &str = "mxsc:output/adder.mxsc.json"; @@ -30,7 +30,7 @@ fn adder_blackbox_chained() { .typed(adder_proxy::AdderProxy) .init(5u32) .code(MxscExpr("output/adder.mxsc.json")) - .with_result(WithResultNewAddress::new(|new_address| { + .with_result(WithNewAddress::new(|new_address| { assert_eq!(new_address.to_address(), adder_contract.to_address()); })) }) @@ -38,7 +38,7 @@ fn adder_blackbox_chained() { tx.to(ScExpr("adder")) .typed(adder_proxy::AdderProxy) .sum() - .with_result(WithResultSimilar::new(|value: BigUint| { + .with_result(WithResultConv::new(|value: BigUint| { assert_eq!(value, BigUint::from(5u32)); })) }) diff --git a/contracts/examples/adder/tests/adder_blackbox_legacy_proxy_test.rs b/contracts/examples/adder/tests/adder_blackbox_legacy_proxy_test.rs index 3e7030a3c0..1370a064fc 100644 --- a/contracts/examples/adder/tests/adder_blackbox_legacy_proxy_test.rs +++ b/contracts/examples/adder/tests/adder_blackbox_legacy_proxy_test.rs @@ -1,7 +1,7 @@ use adder::*; use multiversx_sc::{ storage::mappers::SingleValue, - types::{AddressExpr, ReturnsSimilar, WithResultNewAddress}, + types::{AddressExpr, ReturnsResultConv, WithNewAddress}, }; use multiversx_sc_scenario::{api::StaticApi, num_bigint::BigUint, scenario_model::*, *}; @@ -38,7 +38,7 @@ fn adder_blackbox_legacy_proxy() { .typed(adder_proxy::AdderProxy) .init(5u32) .code(CODE_EXPR) - .with_result(WithResultNewAddress::new(|new_address| { + .with_result(WithNewAddress::new(|new_address| { assert_eq!(new_address.to_address(), adder_contract.to_address()); })) .run(); @@ -53,7 +53,7 @@ fn adder_blackbox_legacy_proxy() { let value = world .query() .call(adder_contract.sum()) - .returns(ReturnsSimilar::>::new()) + .returns(ReturnsResultConv::>::new()) .run(); assert_eq!(value.into(), BigUint::from(5u32)); diff --git a/contracts/examples/adder/tests/adder_blackbox_test.rs b/contracts/examples/adder/tests/adder_blackbox_test.rs index 4a09e4117d..ec98935ba4 100644 --- a/contracts/examples/adder/tests/adder_blackbox_test.rs +++ b/contracts/examples/adder/tests/adder_blackbox_test.rs @@ -1,5 +1,5 @@ use adder::*; -use multiversx_sc::types::{AddressExpr, ReturnsSimilar, ScExpr, WithResultNewAddress}; +use multiversx_sc::types::{AddressExpr, ReturnsResultConv, ScExpr, WithNewAddress}; use multiversx_sc_scenario::{api::StaticApi, num_bigint::BigUint, scenario_model::*, *}; const ADDER_PATH_EXPR: &str = "mxsc:output/adder.mxsc.json"; @@ -36,7 +36,7 @@ fn adder_blackbox() { .typed(adder_proxy::AdderProxy) .init(5u32) .code(CODE_EXPR) - .with_result(WithResultNewAddress::new(|new_address| { + .with_result(WithNewAddress::new(|new_address| { assert_eq!(new_address.to_address(), adder_contract.to_address()); })) .run(); @@ -46,7 +46,7 @@ fn adder_blackbox() { .to(SC_ADDER) .typed(adder_proxy::AdderProxy) .sum() - .returns(ReturnsSimilar::::new()) + .returns(ReturnsResultConv::::new()) .run(); assert_eq!(value, BigUint::from(5u32)); diff --git a/contracts/examples/multisig/tests/multisig_blackbox_test.rs b/contracts/examples/multisig/tests/multisig_blackbox_test.rs index eaec591e26..7107a6628e 100644 --- a/contracts/examples/multisig/tests/multisig_blackbox_test.rs +++ b/contracts/examples/multisig/tests/multisig_blackbox_test.rs @@ -9,7 +9,7 @@ use multiversx_sc::{ test_util::top_encode_to_vec_u8_or_panic, }, storage::mappers::SingleValue, - types::{Address, AddressExpr, CodeMetadata, FunctionCall, ReturnsExact}, + types::{Address, AddressExpr, CodeMetadata, FunctionCall, ReturnsResult}, }; use multiversx_sc_scenario::{ api::StaticApi, @@ -131,7 +131,7 @@ impl MultisigTestState { self.multisig_contract .propose_add_board_member(board_member_address), ) - .returns(ReturnsExact) + .returns(ReturnsResult) .run() } diff --git a/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_deploy_upgrade.rs b/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_deploy_upgrade.rs index b8fc6138eb..20ccacf4db 100644 --- a/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_deploy_upgrade.rs +++ b/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_deploy_upgrade.rs @@ -16,7 +16,7 @@ pub trait ForwarderRawDeployUpgrade { .arguments_raw(args.to_arg_buffer()) .with_gas_limit(self.blockchain().get_gas_left()) .returns(ReturnsNewAddress) - .returns(ReturnsRaw) + .returns(ReturnsRawResult) .sync_call() .into() } diff --git a/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_sync.rs b/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_sync.rs index f235aca1da..7fd9958479 100644 --- a/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_sync.rs +++ b/contracts/feature-tests/composability/forwarder-raw/src/forwarder_raw_sync.rs @@ -20,7 +20,7 @@ pub trait ForwarderRawSync: super::forwarder_raw_common::ForwarderRawCommon { .function_name(endpoint_name) .argument(&args) .with_gas_limit(half_gas) - .returns(ReturnsRaw) + .returns(ReturnsRawResult) .sync_call(); self.execute_on_dest_context_result(result); diff --git a/framework/base/src/contract_base/wrappers/send_wrapper.rs b/framework/base/src/contract_base/wrappers/send_wrapper.rs index 83972d0b28..6083b7b92a 100644 --- a/framework/base/src/contract_base/wrappers/send_wrapper.rs +++ b/framework/base/src/contract_base/wrappers/send_wrapper.rs @@ -12,7 +12,7 @@ use crate::{ }, codec, esdt::ESDTSystemSmartContractProxy, - proxy_imports::{ReturnsRaw, ToSelf}, + proxy_imports::{ReturnsRawResult, ToSelf}, types::{ BigUint, ContractCall, ContractCallNoPayment, EgldOrEsdtTokenIdentifier, EsdtTokenPayment, ManagedAddress, ManagedArgBuffer, ManagedBuffer, ManagedType, ManagedVec, TokenIdentifier, @@ -390,7 +390,7 @@ where .raw_call() .function_name(endpoint_name) .arguments_raw(arg_buffer) - .returns(ReturnsRaw) + .returns(ReturnsRawResult) .sync_call() } diff --git a/framework/base/src/types/interaction/tx_result_handler.rs b/framework/base/src/types/interaction/tx_result_handler.rs index 311679c442..754c339931 100644 --- a/framework/base/src/types/interaction/tx_result_handler.rs +++ b/framework/base/src/types/interaction/tx_result_handler.rs @@ -1,3 +1,21 @@ +mod returns_bt; +mod returns_new_address; +mod returns_raw_result; +mod returns_result; +mod returns_result_conv; +mod with_new_address; +mod with_raw_result; +mod with_result; +mod with_result_conv; + +pub use returns_bt::*; +pub use returns_new_address::*; +pub use returns_raw_result::*; +pub use returns_result::*; +pub use returns_result_conv::*; +pub use with_new_address::*; +pub use with_result_conv::*; + use super::TxEnv; pub trait TxResultHandler diff --git a/framework/base/src/types/interaction/tx_rh_list/returns_bt.rs b/framework/base/src/types/interaction/tx_result_handler/returns_bt.rs similarity index 74% rename from framework/base/src/types/interaction/tx_rh_list/returns_bt.rs rename to framework/base/src/types/interaction/tx_result_handler/returns_bt.rs index ceda028bcd..a04469930c 100644 --- a/framework/base/src/types/interaction/tx_rh_list/returns_bt.rs +++ b/framework/base/src/types/interaction/tx_result_handler/returns_bt.rs @@ -1,10 +1,11 @@ use crate::{ contract_base::BlockchainWrapper, - types::{BackTransfers, ManagedAddress, ManagedBuffer, ManagedVec, TxEnv}, + types::{ + BackTransfers, ManagedAddress, ManagedBuffer, ManagedVec, RHListItem, RHListItemExec, TxEnv, + }, }; -use super::{RHListItem, RHListItemExec}; - +/// Indicates that back-transfers will be returned. pub struct ReturnsBackTransfers; impl RHListItem for ReturnsBackTransfers diff --git a/framework/base/src/types/interaction/tx_rh_list/returns_new_address.rs b/framework/base/src/types/interaction/tx_result_handler/returns_new_address.rs similarity index 68% rename from framework/base/src/types/interaction/tx_rh_list/returns_new_address.rs rename to framework/base/src/types/interaction/tx_result_handler/returns_new_address.rs index 2b1b9ccad4..89854b906a 100644 --- a/framework/base/src/types/interaction/tx_rh_list/returns_new_address.rs +++ b/framework/base/src/types/interaction/tx_result_handler/returns_new_address.rs @@ -1,7 +1,8 @@ -use crate::types::{DeployRawResult, ManagedAddress, ManagedBuffer, ManagedVec, TxEnv}; - -use super::{RHListItem, RHListItemExec}; +use crate::types::{ + DeployRawResult, ManagedAddress, ManagedBuffer, ManagedVec, RHListItem, RHListItemExec, TxEnv, +}; +/// Indicates that the newly deployed address will be returned after a deploy. pub struct ReturnsNewAddress; impl RHListItem for ReturnsNewAddress diff --git a/framework/base/src/types/interaction/tx_rh_list/returns_raw.rs b/framework/base/src/types/interaction/tx_result_handler/returns_raw_result.rs similarity index 59% rename from framework/base/src/types/interaction/tx_rh_list/returns_raw.rs rename to framework/base/src/types/interaction/tx_result_handler/returns_raw_result.rs index d1b501d77c..2627d99065 100644 --- a/framework/base/src/types/interaction/tx_rh_list/returns_raw.rs +++ b/framework/base/src/types/interaction/tx_result_handler/returns_raw_result.rs @@ -1,20 +1,19 @@ -use crate::{ - proxy_imports::SyncCallRawResult, - types::{DeployRawResult, ManagedAddress, ManagedBuffer, ManagedVec, TxEnv}, +use crate::types::{ + DeployRawResult, ManagedAddress, ManagedBuffer, ManagedVec, RHListItem, RHListItemExec, + SyncCallRawResult, TxEnv, }; -use super::{RHListItem, RHListItemExec}; +/// Indicates that the raw result data will be returned. +pub struct ReturnsRawResult; -pub struct ReturnsRaw; - -impl RHListItem for ReturnsRaw +impl RHListItem for ReturnsRawResult where Env: TxEnv, { type Returns = ManagedVec>; } -impl RHListItemExec, Env, Original> for ReturnsRaw +impl RHListItemExec, Env, Original> for ReturnsRawResult where Env: TxEnv, { @@ -23,7 +22,7 @@ where } } -impl RHListItemExec, Env, Original> for ReturnsRaw +impl RHListItemExec, Env, Original> for ReturnsRawResult where Env: TxEnv, { diff --git a/framework/base/src/types/interaction/tx_rh_list/returns_exact.rs b/framework/base/src/types/interaction/tx_result_handler/returns_result.rs similarity index 52% rename from framework/base/src/types/interaction/tx_rh_list/returns_exact.rs rename to framework/base/src/types/interaction/tx_result_handler/returns_result.rs index 87a25f0fb2..71cbd020cf 100644 --- a/framework/base/src/types/interaction/tx_rh_list/returns_exact.rs +++ b/framework/base/src/types/interaction/tx_result_handler/returns_result.rs @@ -2,21 +2,25 @@ use multiversx_sc_codec::TopDecodeMulti; use crate::{ proxy_imports::SyncCallRawResult, - types::{interaction::contract_call_exec::decode_result, ManagedBuffer, ManagedVec, TxEnv}, + types::{ + interaction::contract_call_exec::decode_result, ManagedBuffer, ManagedVec, RHListItem, + RHListItemExec, TxEnv, + }, }; -use super::{RHListItem, RHListItemExec}; +/// Indicates that result will be returned. +/// +/// Value will be decoded according to the type defined in the smart contract. +pub struct ReturnsResult; -pub struct ReturnsExact; - -impl RHListItem for ReturnsExact +impl RHListItem for ReturnsResult where Env: TxEnv, { type Returns = Original; } -impl RHListItemExec, Env, Original> for ReturnsExact +impl RHListItemExec, Env, Original> for ReturnsResult where Env: TxEnv, Original: TopDecodeMulti, diff --git a/framework/base/src/types/interaction/tx_rh_list/returns_similar.rs b/framework/base/src/types/interaction/tx_result_handler/returns_result_conv.rs similarity index 65% rename from framework/base/src/types/interaction/tx_rh_list/returns_similar.rs rename to framework/base/src/types/interaction/tx_result_handler/returns_result_conv.rs index adfb2f3bdb..1dbabc0bf1 100644 --- a/framework/base/src/types/interaction/tx_rh_list/returns_similar.rs +++ b/framework/base/src/types/interaction/tx_result_handler/returns_result_conv.rs @@ -3,17 +3,18 @@ use core::marker::PhantomData; use multiversx_sc_codec::{CodecFrom, TopEncodeMulti}; use crate::types::{ - interaction::contract_call_exec::decode_result, ManagedBuffer, ManagedVec, SyncCallRawResult, - TxEnv, + interaction::contract_call_exec::decode_result, ManagedBuffer, ManagedVec, RHListItem, + RHListItemExec, SyncCallRawResult, TxEnv, }; -use super::{RHListItem, RHListItemExec}; - -pub struct ReturnsSimilar { +/// Indicates that result will be returned. +/// +/// Value will be converted to type `T`, which should be compatible with the original type. +pub struct ReturnsResultConv { _phantom: PhantomData, } -impl Default for ReturnsSimilar { +impl Default for ReturnsResultConv { fn default() -> Self { Self { _phantom: Default::default(), @@ -21,13 +22,13 @@ impl Default for ReturnsSimilar { } } -impl ReturnsSimilar { +impl ReturnsResultConv { pub fn new() -> Self { Self::default() } } -impl RHListItem for ReturnsSimilar +impl RHListItem for ReturnsResultConv where Env: TxEnv, Original: TopEncodeMulti, @@ -37,7 +38,7 @@ where } impl RHListItemExec, Env, Original> - for ReturnsSimilar + for ReturnsResultConv where Env: TxEnv, Original: TopEncodeMulti, diff --git a/framework/base/src/types/interaction/tx_rh_list/with_result_new_address.rs b/framework/base/src/types/interaction/tx_result_handler/with_new_address.rs similarity index 62% rename from framework/base/src/types/interaction/tx_rh_list/with_result_new_address.rs rename to framework/base/src/types/interaction/tx_result_handler/with_new_address.rs index 5dad91eef6..2a8840f744 100644 --- a/framework/base/src/types/interaction/tx_rh_list/with_result_new_address.rs +++ b/framework/base/src/types/interaction/tx_result_handler/with_new_address.rs @@ -1,10 +1,11 @@ use core::marker::PhantomData; -use crate::types::{DeployRawResult, ManagedAddress, ManagedBuffer, ManagedVec, TxEnv}; +use crate::types::{ + DeployRawResult, ManagedAddress, ManagedBuffer, ManagedVec, RHListItem, RHListItemExec, TxEnv, +}; -use super::{RHListItem, RHListItemExec}; - -pub struct WithResultNewAddress +/// Defines a lambda function to be called on the newly deployed address, after a deploy. +pub struct WithNewAddress where Env: TxEnv, F: FnOnce(&ManagedAddress), @@ -13,20 +14,20 @@ where pub f: F, } -impl WithResultNewAddress +impl WithNewAddress where Env: TxEnv, F: FnOnce(&ManagedAddress), { pub fn new(f: F) -> Self { - WithResultNewAddress { + WithNewAddress { _phantom: PhantomData, f, } } } -impl RHListItem for WithResultNewAddress +impl RHListItem for WithNewAddress where Env: TxEnv, F: FnOnce(&ManagedAddress), @@ -35,7 +36,7 @@ where } impl RHListItemExec, Env, Original> - for WithResultNewAddress + for WithNewAddress where Env: TxEnv, F: FnOnce(&ManagedAddress), diff --git a/framework/base/src/types/interaction/tx_rh_list/with_result_raw.rs b/framework/base/src/types/interaction/tx_result_handler/with_raw_result.rs similarity index 66% rename from framework/base/src/types/interaction/tx_rh_list/with_result_raw.rs rename to framework/base/src/types/interaction/tx_result_handler/with_raw_result.rs index 35b4053d2a..f2d1457f07 100644 --- a/framework/base/src/types/interaction/tx_rh_list/with_result_raw.rs +++ b/framework/base/src/types/interaction/tx_result_handler/with_raw_result.rs @@ -1,10 +1,11 @@ use core::marker::PhantomData; -use crate::types::{ManagedBuffer, ManagedVec, SyncCallRawResult, TxEnv}; +use crate::types::{ + ManagedBuffer, ManagedVec, RHListItem, RHListItemExec, SyncCallRawResult, TxEnv, +}; -use super::{RHListItem, RHListItemExec}; - -pub struct WithResultRaw +/// Defines a lambda function to be called on the raw result of the transaction. +pub struct WithRawResult where Env: TxEnv, F: FnOnce(&ManagedVec>), @@ -13,20 +14,20 @@ where f: F, } -impl WithResultRaw +impl WithRawResult where Env: TxEnv, F: FnOnce(&ManagedVec>), { pub fn new(f: F) -> Self { - WithResultRaw { + WithRawResult { _phantom: PhantomData, f, } } } -impl RHListItem for WithResultRaw +impl RHListItem for WithRawResult where Env: TxEnv, F: FnOnce(&ManagedVec>), @@ -35,7 +36,7 @@ where } impl RHListItemExec, Env, Original> - for WithResultRaw + for WithRawResult where Env: TxEnv, F: FnOnce(&ManagedVec>), diff --git a/framework/base/src/types/interaction/tx_rh_list/with_result_exact.rs b/framework/base/src/types/interaction/tx_result_handler/with_result.rs similarity index 65% rename from framework/base/src/types/interaction/tx_rh_list/with_result_exact.rs rename to framework/base/src/types/interaction/tx_result_handler/with_result.rs index d3045dca25..800ac30a7a 100644 --- a/framework/base/src/types/interaction/tx_rh_list/with_result_exact.rs +++ b/framework/base/src/types/interaction/tx_result_handler/with_result.rs @@ -3,13 +3,14 @@ use core::marker::PhantomData; use multiversx_sc_codec::TopDecodeMulti; use crate::types::{ - interaction::contract_call_exec::decode_result, ManagedBuffer, ManagedVec, SyncCallRawResult, - TxEnv, + interaction::contract_call_exec::decode_result, ManagedBuffer, ManagedVec, RHListItem, + RHListItemExec, SyncCallRawResult, TxEnv, }; -use super::{RHListItem, RHListItemExec}; - -pub struct WithResultExact +/// Defines a lambda function to be called on the decoded result. +/// +/// Value will be decoded according to the type defined in the smart contract. +pub struct WithResult where F: FnOnce(T), { @@ -17,19 +18,19 @@ where f: F, } -impl WithResultExact +impl WithResult where F: FnOnce(T), { pub fn new(f: F) -> Self { - WithResultExact { + WithResult { _phantom: PhantomData, f, } } } -impl RHListItem for WithResultExact +impl RHListItem for WithResult where Env: TxEnv, F: FnOnce(Original), @@ -38,7 +39,7 @@ where } impl RHListItemExec, Env, Original> - for WithResultExact + for WithResult where Env: TxEnv, Original: TopDecodeMulti, diff --git a/framework/base/src/types/interaction/tx_rh_list/with_result_similar.rs b/framework/base/src/types/interaction/tx_result_handler/with_result_conv.rs similarity index 71% rename from framework/base/src/types/interaction/tx_rh_list/with_result_similar.rs rename to framework/base/src/types/interaction/tx_result_handler/with_result_conv.rs index d2af475447..89831e8283 100644 --- a/framework/base/src/types/interaction/tx_rh_list/with_result_similar.rs +++ b/framework/base/src/types/interaction/tx_result_handler/with_result_conv.rs @@ -3,13 +3,14 @@ use core::marker::PhantomData; use multiversx_sc_codec::{CodecFrom, TopEncodeMulti}; use crate::types::{ - interaction::contract_call_exec::decode_result, ManagedBuffer, ManagedVec, SyncCallRawResult, - TxEnv, + interaction::contract_call_exec::decode_result, ManagedBuffer, ManagedVec, RHListItem, + RHListItemExec, SyncCallRawResult, TxEnv, }; -use super::{RHListItem, RHListItemExec}; - -pub struct WithResultSimilar +/// Defines a lambda function to be called on the decoded result. +/// +/// Value will be converted to type `T`, which should be compatible with the original type. +pub struct WithResultConv where F: FnOnce(T), { @@ -17,19 +18,19 @@ where pub f: F, } -impl WithResultSimilar +impl WithResultConv where F: FnOnce(T), { pub fn new(f: F) -> Self { - WithResultSimilar { + WithResultConv { _phantom: PhantomData, f, } } } -impl RHListItem for WithResultSimilar +impl RHListItem for WithResultConv where Env: TxEnv, Original: TopEncodeMulti, @@ -40,7 +41,7 @@ where } impl RHListItemExec, Env, Original> - for WithResultSimilar + for WithResultConv where Env: TxEnv, Original: TopEncodeMulti, diff --git a/framework/base/src/types/interaction/tx_rh_list.rs b/framework/base/src/types/interaction/tx_rh_list.rs index 4e0bb4327c..b4ca45bc58 100644 --- a/framework/base/src/types/interaction/tx_rh_list.rs +++ b/framework/base/src/types/interaction/tx_rh_list.rs @@ -1,23 +1,7 @@ -mod returns_bt; -mod returns_exact; -mod returns_new_address; -mod returns_raw; -mod returns_similar; mod tx_rh_list_cons; mod tx_rh_list_exec; mod tx_rh_list_item; -mod with_result_exact; -mod with_result_new_address; -mod with_result_raw; -mod with_result_similar; -pub use returns_bt::*; -pub use returns_exact::*; -pub use returns_new_address::*; -pub use returns_raw::*; -pub use returns_similar::*; pub use tx_rh_list_cons::*; pub use tx_rh_list_exec::*; pub use tx_rh_list_item::*; -pub use with_result_new_address::*; -pub use with_result_similar::*; diff --git a/framework/scenario/src/facade/world_tx/scenario_rh_impl.rs b/framework/scenario/src/facade/world_tx/scenario_rh_impl.rs index b0161b52b8..0471e42786 100644 --- a/framework/scenario/src/facade/world_tx/scenario_rh_impl.rs +++ b/framework/scenario/src/facade/world_tx/scenario_rh_impl.rs @@ -1,8 +1,8 @@ use multiversx_sc::{ codec::{CodecFrom, TopDecodeMulti, TopEncodeMulti}, types::{ - ManagedAddress, RHList, RHListItem, RHListItemExec, ReturnsExact, ReturnsNewAddress, - ReturnsSimilar, TxEnv, WithResultNewAddress, WithResultSimilar, + ManagedAddress, RHList, RHListItem, RHListItemExec, ReturnsNewAddress, ReturnsResult, + ReturnsResultConv, TxEnv, WithNewAddress, WithResultConv, }, }; @@ -13,7 +13,7 @@ use crate::{ use super::ScenarioTxEnvData; -impl RHListItemExec for ReturnsExact +impl RHListItemExec for ReturnsResult where Env: TxEnv, Original: TopDecodeMulti, @@ -26,7 +26,7 @@ where } } -impl RHListItemExec for ReturnsSimilar +impl RHListItemExec for ReturnsResultConv where Env: TxEnv, Original: TopEncodeMulti, @@ -40,7 +40,7 @@ where } } -impl RHListItemExec for WithResultSimilar +impl RHListItemExec for WithResultConv where Env: TxEnv, Original: TopEncodeMulti, @@ -70,7 +70,7 @@ where } } -impl RHListItemExec for WithResultNewAddress +impl RHListItemExec for WithNewAddress where Env: TxEnv, F: FnOnce(&ManagedAddress),