diff --git a/chain/vm/src/tx_mock.rs b/chain/vm/src/tx_mock.rs index 13f6fedac0..ce63ddfe7a 100644 --- a/chain/vm/src/tx_mock.rs +++ b/chain/vm/src/tx_mock.rs @@ -18,7 +18,6 @@ mod tx_managed_types; mod tx_panic; mod tx_result; mod tx_result_calls; -mod tx_transfer_by_user_data; pub use blockchain_update::BlockchainUpdate; pub use tx_async_call_data::*; @@ -37,7 +36,6 @@ pub use tx_managed_types::*; pub use tx_panic::*; pub use tx_result::*; pub use tx_result_calls::*; -pub use tx_transfer_by_user_data::*; #[cfg(feature = "wasm-incompatible")] mod blockchain_rng; diff --git a/chain/vm/src/tx_mock/tx_transfer_by_user_data.rs b/chain/vm/src/tx_mock/tx_transfer_by_user_data.rs deleted file mode 100644 index 2b13a380a3..0000000000 --- a/chain/vm/src/tx_mock/tx_transfer_by_user_data.rs +++ /dev/null @@ -1,45 +0,0 @@ -use crate::{ - tx_mock::TxInput, - types::{VMAddress, H256}, -}; - -use super::{CallType, TxFunctionName, TxTokenTransfer}; - -#[derive(Debug, Clone)] -pub struct TranferByUserData { - pub from: VMAddress, - pub to: VMAddress, - pub token_transfers: Vec, - pub func_name: TxFunctionName, - pub arguments: Vec>, - pub tx_hash: H256, -} - -pub fn transfer_by_user_tx_input( - transfer_by_user_call: &TranferByUserData, - call_type: CallType, -) -> TxInput { - let mut egld_value = num_bigint::BigUint::default(); - let mut esdt_values = Vec::new(); - - for transfer in &transfer_by_user_call.token_transfers { - if transfer.token_identifier.is_empty() && transfer.nonce == 0 { - egld_value += &transfer.value; - } else { - esdt_values.push(transfer.clone()); - } - } - TxInput { - from: transfer_by_user_call.from.clone(), - to: transfer_by_user_call.to.clone(), - egld_value, - esdt_values, - func_name: transfer_by_user_call.func_name.clone(), - args: transfer_by_user_call.arguments.clone(), - call_type, - gas_limit: 1000, - gas_price: 0, - tx_hash: transfer_by_user_call.tx_hash.clone(), - ..Default::default() - } -}