From 6e6c9e1ffc76b39204e2aeb89b4769b3cad7eca6 Mon Sep 17 00:00:00 2001 From: Andrei Marinica Date: Thu, 29 Aug 2024 10:40:17 +0300 Subject: [PATCH] ESDTSystemSCAddress in interactor --- .../markers/esdt_system_sc_address.rs | 16 ++++---- .../interact/src/basic_interact.rs | 38 +++++++++---------- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/framework/base/src/types/interaction/markers/esdt_system_sc_address.rs b/framework/base/src/types/interaction/markers/esdt_system_sc_address.rs index b7b646ae16..e422553ca4 100644 --- a/framework/base/src/types/interaction/markers/esdt_system_sc_address.rs +++ b/framework/base/src/types/interaction/markers/esdt_system_sc_address.rs @@ -3,8 +3,8 @@ use multiversx_sc_codec::{EncodeErrorHandler, TopEncode, TopEncodeOutput}; use crate::{ abi::TypeAbiFrom, - api::{CallTypeApi, ManagedTypeApi}, - types::{AnnotatedValue, ManagedAddress, ManagedBuffer, TxScEnv, TxTo, TxToSpecified}, + api::ManagedTypeApi, + types::{AnnotatedValue, ManagedAddress, ManagedBuffer, TxEnv, TxTo, TxToSpecified}, }; /// Address of the system smart contract that manages ESDT. @@ -35,21 +35,21 @@ impl ESDTSystemSCAddress { } } -impl AnnotatedValue, ManagedAddress> for ESDTSystemSCAddress +impl AnnotatedValue> for ESDTSystemSCAddress where - Api: CallTypeApi, + Env: TxEnv, { - fn annotation(&self, _env: &TxScEnv) -> ManagedBuffer { + fn annotation(&self, _env: &Env) -> ManagedBuffer { ManagedBuffer::from(SYSTEM_SC_ADDRESS_ANNOTATION) } - fn to_value(&self, _env: &TxScEnv) -> ManagedAddress { + fn to_value(&self, _env: &Env) -> ManagedAddress { ESDTSystemSCAddress.to_managed_address() } } -impl TxTo> for ESDTSystemSCAddress where Api: CallTypeApi {} -impl TxToSpecified> for ESDTSystemSCAddress where Api: CallTypeApi {} +impl TxTo for ESDTSystemSCAddress where Env: TxEnv {} +impl TxToSpecified for ESDTSystemSCAddress where Env: TxEnv {} impl TopEncode for ESDTSystemSCAddress { fn top_encode_or_handle_err(&self, output: O, h: H) -> Result<(), H::HandledErr> diff --git a/tools/interactor-system-func-calls/sys-func-calls/interact/src/basic_interact.rs b/tools/interactor-system-func-calls/sys-func-calls/interact/src/basic_interact.rs index fb08fd587b..33edf61b4b 100644 --- a/tools/interactor-system-func-calls/sys-func-calls/interact/src/basic_interact.rs +++ b/tools/interactor-system-func-calls/sys-func-calls/interact/src/basic_interact.rs @@ -231,7 +231,7 @@ impl SysFuncCallsInteract { .interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .issue_fungible( @@ -270,7 +270,7 @@ impl SysFuncCallsInteract { .interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .issue_non_fungible( @@ -306,7 +306,7 @@ impl SysFuncCallsInteract { .interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .issue_semi_fungible( @@ -344,7 +344,7 @@ impl SysFuncCallsInteract { .interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .issue_and_set_all_roles( @@ -372,7 +372,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .set_special_roles( @@ -430,7 +430,7 @@ impl SysFuncCallsInteract { .interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .register_meta_esdt( @@ -461,7 +461,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .change_sft_to_meta_esdt(&TokenIdentifier::from(token_id), num_decimals) @@ -511,7 +511,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .pause(&TokenIdentifier::from(token_id)) @@ -525,7 +525,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .unpause(&TokenIdentifier::from(token_id)) @@ -541,7 +541,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .freeze(&TokenIdentifier::from(token_id), &managed_address) @@ -557,7 +557,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .unfreeze(&TokenIdentifier::from(token_id), &managed_address) @@ -573,7 +573,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .freeze_nft(&TokenIdentifier::from(token_id), nonce, &managed_address) @@ -589,7 +589,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .unfreeze_nft(&TokenIdentifier::from(token_id), nonce, &managed_address) @@ -605,7 +605,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(&ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .wipe(&TokenIdentifier::from(token_id), &managed_address) @@ -621,7 +621,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .wipe_nft(&TokenIdentifier::from(token_id), nonce, &managed_address) @@ -676,7 +676,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .unset_special_roles( @@ -698,7 +698,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .transfer_ownership(&TokenIdentifier::from(token_id), &managed_addr) @@ -722,7 +722,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .transfer_nft_create_role( @@ -740,7 +740,7 @@ impl SysFuncCallsInteract { self.interactor .tx() .from(&self.wallet_address) - .to(ESDTSystemSCAddress.to_managed_address()) + .to(ESDTSystemSCAddress) .gas(100_000_000u64) .typed(ESDTSystemSCProxy) .control_changes(