diff --git a/Cargo.lock b/Cargo.lock index c1c3ef01..6930ade6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -234,8 +234,8 @@ dependencies = [ "multiversx-sc-modules", "multiversx-sc-scenario", "num-bigint", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -255,8 +255,8 @@ dependencies = [ "multiversx-sc-modules", "multiversx-sc-scenario", "num-bigint", + "operation", "proxies", - "transaction", "utils", ] @@ -501,11 +501,11 @@ dependencies = [ "multiversx-sc-scenario", "num-bigint", "num-traits", + "operation", "proxies", "setup-phase", "token-handler", "token-whitelist", - "transaction", "tx-batch-module", "utils", ] @@ -530,13 +530,13 @@ dependencies = [ "max-bridged-amount-module", "multiversx-sc", "multiversx-sc-snippets", + "operation", "proxies", "serde", "setup-phase", "token-handler", "token-whitelist", "toml", - "transaction", "tx-batch-module", "utils", ] @@ -593,10 +593,10 @@ dependencies = [ "multiversx-sc-scenario", "num-bigint", "num-traits", + "operation", "proxies", "setup-phase", "token-whitelist", - "transaction", "tx-batch-module", "utils", ] @@ -612,10 +612,10 @@ dependencies = [ "multiversx-sc", "multiversx-sc-scenario", "multiversx-sc-snippets", + "operation", "proxies", "serde", "toml", - "transaction", "tx-batch-module", ] @@ -640,9 +640,9 @@ dependencies = [ "multiversx-sc", "multiversx-sc-scenario", "num-bigint", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -842,9 +842,9 @@ dependencies = [ "multiversx-sc", "multiversx-sc-scenario", "num-bigint", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -1634,6 +1634,13 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "parking_lot" version = "0.12.3" @@ -1751,7 +1758,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -2161,9 +2168,9 @@ dependencies = [ "multiversx-sc-modules", "multiversx-sc-scenario", "num-bigint", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -2306,8 +2313,8 @@ dependencies = [ "multiversx-sc-modules", "multiversx-sc-scenario", "num-bigint", + "operation", "proxies", - "transaction", ] [[package]] @@ -2427,13 +2434,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "try-lock" version = "0.2.5" @@ -2446,7 +2446,7 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-scenario", - "transaction", + "operation", ] [[package]] @@ -2522,6 +2522,7 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] [[package]] diff --git a/chain-config/Cargo.toml b/chain-config/Cargo.toml index 0de59e23..ab406fcd 100644 --- a/chain-config/Cargo.toml +++ b/chain-config/Cargo.toml @@ -20,8 +20,8 @@ version = "=0.54.6" [dependencies.multiversx-sc-modules] version = "=0.54.6" -[dependencies.transaction] -path = "../common/transaction" +[dependencies.operation] +path = "../common/operation" [dependencies.setup-phase] path = "../common/setup-phase" diff --git a/chain-config/src/lib.rs b/chain-config/src/lib.rs index e7cb54f0..c34fb988 100644 --- a/chain-config/src/lib.rs +++ b/chain-config/src/lib.rs @@ -1,7 +1,7 @@ #![no_std] use multiversx_sc_modules::only_admin; -use transaction::StakeMultiArg; +use operation::aliases::StakeMultiArg; use validator_rules::TokenIdAmountPair; multiversx_sc::imports!(); diff --git a/chain-config/wasm-chain-config-full/Cargo.lock b/chain-config/wasm-chain-config-full/Cargo.lock index 3de0ad8e..5a256c49 100644 --- a/chain-config/wasm-chain-config-full/Cargo.lock +++ b/chain-config/wasm-chain-config-full/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -153,6 +153,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -205,13 +212,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "unicode-ident" version = "1.0.12" diff --git a/chain-config/wasm-chain-config-view/Cargo.lock b/chain-config/wasm-chain-config-view/Cargo.lock index fdb25e68..10fd0cfa 100644 --- a/chain-config/wasm-chain-config-view/Cargo.lock +++ b/chain-config/wasm-chain-config-view/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -153,6 +153,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -205,13 +212,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "unicode-ident" version = "1.0.12" diff --git a/chain-config/wasm/Cargo.lock b/chain-config/wasm/Cargo.lock index 81cb4cfa..d59281b8 100644 --- a/chain-config/wasm/Cargo.lock +++ b/chain-config/wasm/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -153,6 +153,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -205,13 +212,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "unicode-ident" version = "1.0.13" diff --git a/chain-factory/Cargo.toml b/chain-factory/Cargo.toml index 3b39b943..8f8b2987 100644 --- a/chain-factory/Cargo.toml +++ b/chain-factory/Cargo.toml @@ -29,5 +29,5 @@ path = "../chain-config" [dependencies.proxies] path = "../common/proxies" -[dependencies.transaction] -path = "../common/transaction" +[dependencies.operation] +path = "../common/operation" diff --git a/chain-factory/src/factory.rs b/chain-factory/src/factory.rs index 3021d809..c6a1dbb3 100644 --- a/chain-factory/src/factory.rs +++ b/chain-factory/src/factory.rs @@ -7,7 +7,7 @@ use proxies::{ fee_market_proxy::{FeeMarketProxy, FeeStruct}, header_verifier_proxy::HeaderverifierProxy, }; -use transaction::StakeMultiArg; +use operation::aliases::StakeMultiArg; multiversx_sc::derive_imports!(); #[multiversx_sc::module] diff --git a/chain-factory/tests/chain_factory_tests.rs b/chain-factory/tests/chain_factory_tests.rs index 4cd14984..117523e1 100644 --- a/chain-factory/tests/chain_factory_tests.rs +++ b/chain-factory/tests/chain_factory_tests.rs @@ -10,7 +10,7 @@ use multiversx_sc_scenario::{ use proxies::{ chain_config_proxy::ChainConfigContractProxy, chain_factory_proxy::ChainFactoryContractProxy, }; -use transaction::StakeMultiArg; +use operation::aliases::StakeMultiArg; const FACTORY_ADDRESS: TestSCAddress = TestSCAddress::new("chain-factory"); const CODE_PATH: MxscPath = MxscPath::new("output/chain-factory.mxsc.json"); diff --git a/chain-factory/wasm-chain-factory-full/Cargo.lock b/chain-factory/wasm-chain-factory-full/Cargo.lock index 02c027a6..22268f52 100644 --- a/chain-factory/wasm-chain-factory-full/Cargo.lock +++ b/chain-factory/wasm-chain-factory-full/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -37,8 +37,8 @@ dependencies = [ "chain-config", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", "utils", ] @@ -165,6 +165,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -179,7 +186,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -226,19 +233,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -258,4 +258,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/chain-factory/wasm-chain-factory-view/Cargo.lock b/chain-factory/wasm-chain-factory-view/Cargo.lock index 8ddfdd5c..bacd5bcd 100644 --- a/chain-factory/wasm-chain-factory-view/Cargo.lock +++ b/chain-factory/wasm-chain-factory-view/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -37,8 +37,8 @@ dependencies = [ "chain-config", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", "utils", ] @@ -165,6 +165,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -179,7 +186,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -226,19 +233,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -258,4 +258,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/chain-factory/wasm/Cargo.lock b/chain-factory/wasm/Cargo.lock index 5cb83e25..0ffcb83b 100644 --- a/chain-factory/wasm/Cargo.lock +++ b/chain-factory/wasm/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -37,8 +37,8 @@ dependencies = [ "chain-config", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", "utils", ] @@ -165,6 +165,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -179,7 +186,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -226,19 +233,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -258,4 +258,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/common/transaction/Cargo.toml b/common/operation/Cargo.toml similarity index 89% rename from common/transaction/Cargo.toml rename to common/operation/Cargo.toml index 763b50bf..47bfa68b 100644 --- a/common/transaction/Cargo.toml +++ b/common/operation/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "transaction" +name = "operation" version = "0.0.0" authors = ["dorin-iancu "] edition = "2018" diff --git a/common/operation/src/aliases.rs b/common/operation/src/aliases.rs new file mode 100644 index 00000000..5f240ebe --- /dev/null +++ b/common/operation/src/aliases.rs @@ -0,0 +1,20 @@ +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +pub type BatchId = u64; +pub type TxId = u64; +pub type GasLimit = u64; +pub type TxNonce = u64; + +pub type BlockNonce = u64; +pub type SenderAddress = ManagedAddress; +pub type ReceiverAddress = ManagedAddress; +pub type EventPaymentTuple = MultiValue3, u64, EsdtTokenData>; +pub type PaymentsVec = ManagedVec>; +pub type ExtractedFeeResult = + MultiValue2>, ManagedVec>>; +pub type OptionalValueTransferDataTuple = + OptionalValue, ManagedVec>>>; +pub type StakeMultiArg = MultiValue2, BigUint>; +pub type OptionalTransferData = + OptionalValue, ManagedVec>>>; diff --git a/common/transaction/src/lib.rs b/common/operation/src/lib.rs similarity index 70% rename from common/transaction/src/lib.rs rename to common/operation/src/lib.rs index b17fca1e..ffdcf0fa 100644 --- a/common/transaction/src/lib.rs +++ b/common/operation/src/lib.rs @@ -1,39 +1,15 @@ #![no_std] +use aliases::{EventPaymentTuple, GasLimit, OptionalValueTransferDataTuple, TxId}; + multiversx_sc::imports!(); multiversx_sc::derive_imports!(); -pub mod transaction_status; +pub mod aliases; // revert protection pub const MIN_BLOCKS_FOR_FINALITY: u64 = 10; -pub type BatchId = u64; -pub type TxId = u64; -pub type GasLimit = u64; -pub type TxNonce = u64; - -pub type BlockNonce = u64; -pub type SenderAddress = ManagedAddress; -pub type ReceiverAddress = ManagedAddress; -pub type TxAsMultiValue = MultiValue7< - BlockNonce, - TxNonce, - SenderAddress, - ReceiverAddress, - ManagedVec>, - ManagedVec>, - Option>, ->; -pub type PaymentsVec = ManagedVec>; -pub type EventPaymentTuple = MultiValue3, u64, EsdtTokenData>; -pub type TxBatchSplitInFields = MultiValue2>>; -pub type ExtractedFeeResult = - MultiValue2>, ManagedVec>>; -pub type OptionalValueTransferDataTuple = - OptionalValue, ManagedVec>>>; -pub type StakeMultiArg = MultiValue2, BigUint>; - #[type_abi] #[derive(TopEncode, TopDecode, NestedEncode, NestedDecode, ManagedVecItem, Clone)] pub struct Operation { @@ -229,49 +205,3 @@ impl Default for OperationEsdtPayment { } } } - -#[type_abi] -#[derive(TopEncode, TopDecode, NestedEncode, NestedDecode, ManagedVecItem, Clone)] -pub struct Transaction { - pub block_nonce: BlockNonce, - pub nonce: TxNonce, - pub from: ManagedAddress, - pub to: ManagedAddress, - pub tokens: ManagedVec>, - pub token_data: ManagedVec>, - pub opt_transfer_data: Option>, - pub is_refund_tx: bool, -} - -impl From> for Transaction { - fn from(tx_as_multiresult: TxAsMultiValue) -> Self { - let (block_nonce, nonce, from, to, tokens, token_data, opt_transfer_data) = - tx_as_multiresult.into_tuple(); - - Transaction { - block_nonce, - nonce, - from, - to, - tokens, - token_data, - opt_transfer_data, - is_refund_tx: false, - } - } -} - -impl Transaction { - pub fn into_multiresult(self) -> TxAsMultiValue { - ( - self.block_nonce, - self.nonce, - self.from, - self.to, - self.tokens, - self.token_data, - self.opt_transfer_data, - ) - .into() - } -} diff --git a/common/proxies/Cargo.toml b/common/proxies/Cargo.toml index e4c8de15..1a40ae89 100644 --- a/common/proxies/Cargo.toml +++ b/common/proxies/Cargo.toml @@ -6,8 +6,8 @@ edition = "2021" [dependencies.multiversx-sc] version = "=0.54.6" -[dependencies.transaction] -path = "../transaction" +[dependencies.operation] +path = "../operation" [dependencies.tx-batch-module] path = "../tx-batch-module" diff --git a/common/proxies/src/enshrine_esdt_safe_proxy.rs b/common/proxies/src/enshrine_esdt_safe_proxy.rs index a87a274a..6a136022 100644 --- a/common/proxies/src/enshrine_esdt_safe_proxy.rs +++ b/common/proxies/src/enshrine_esdt_safe_proxy.rs @@ -163,7 +163,7 @@ where pub fn execute_operations< Arg0: ProxyArg>, - Arg1: ProxyArg>, + Arg1: ProxyArg>, >( self, hash_of_hashes: Arg0, diff --git a/common/proxies/src/esdt_safe_proxy.rs b/common/proxies/src/esdt_safe_proxy.rs index 6bbef655..cf8f4797 100644 --- a/common/proxies/src/esdt_safe_proxy.rs +++ b/common/proxies/src/esdt_safe_proxy.rs @@ -178,7 +178,7 @@ where pub fn execute_operations< Arg0: ProxyArg>, - Arg1: ProxyArg>, + Arg1: ProxyArg>, >( self, hash_of_hashes: Arg0, diff --git a/common/proxies/src/token_handler_proxy.rs b/common/proxies/src/token_handler_proxy.rs index 8e27c2a4..9a80bf2a 100644 --- a/common/proxies/src/token_handler_proxy.rs +++ b/common/proxies/src/token_handler_proxy.rs @@ -99,9 +99,9 @@ where } pub fn transfer_tokens< - Arg0: ProxyArg>>, + Arg0: ProxyArg>>, Arg1: ProxyArg>, - Arg2: ProxyArg>>, + Arg2: ProxyArg>>, >( self, opt_transfer_data: Arg0, diff --git a/common/transaction/src/transaction_status.rs b/common/transaction/src/transaction_status.rs deleted file mode 100644 index b7bc9c91..00000000 --- a/common/transaction/src/transaction_status.rs +++ /dev/null @@ -1,13 +0,0 @@ -multiversx_sc::imports!(); -multiversx_sc::derive_imports!(); - -#[derive( - TopEncode, TopDecode, NestedEncode, NestedDecode, PartialEq, Clone, Copy, ManagedVecItem, -)] -pub enum TransactionStatus { - None, - Pending, - InProgress, - Executed, - Rejected, -} diff --git a/common/tx-batch-module/Cargo.toml b/common/tx-batch-module/Cargo.toml index f07bac1b..b4895bcd 100644 --- a/common/tx-batch-module/Cargo.toml +++ b/common/tx-batch-module/Cargo.toml @@ -7,8 +7,8 @@ edition = "2018" [dependencies.multiversx-sc] version = "=0.54.6" -[dependencies.transaction] -path = "../transaction" +[dependencies.operation] +path = "../operation" [dev-dependencies.multiversx-sc-scenario] version = "=0.54.6" diff --git a/common/tx-batch-module/src/lib.rs b/common/tx-batch-module/src/lib.rs index 6e94ebe7..718ce170 100644 --- a/common/tx-batch-module/src/lib.rs +++ b/common/tx-batch-module/src/lib.rs @@ -3,7 +3,7 @@ multiversx_sc::imports!(); multiversx_sc::derive_imports!(); -use transaction::TxNonce; +use operation::aliases::TxNonce; #[multiversx_sc::module] pub trait TxBatchModule { diff --git a/common/utils/Cargo.toml b/common/utils/Cargo.toml index 022e6477..418d5994 100644 --- a/common/utils/Cargo.toml +++ b/common/utils/Cargo.toml @@ -7,6 +7,9 @@ edition = "2021" [lib] path = "src/lib.rs" +[dependencies.operation] +path = "../operation" + [dependencies.multiversx-sc] version = "=0.54.6" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/utils/src/lib.rs b/common/utils/src/lib.rs index 6700e77e..104e0e8e 100644 --- a/common/utils/src/lib.rs +++ b/common/utils/src/lib.rs @@ -1,8 +1,8 @@ #![no_std] -multiversx_sc::imports!(); +use operation::aliases::PaymentsVec; -pub type PaymentsVec = ManagedVec>; +multiversx_sc::imports!(); static ERR_EMPTY_PAYMENTS: &[u8] = b"No payments"; const DASH: u8 = b'-'; diff --git a/enshrine-esdt-safe/Cargo.toml b/enshrine-esdt-safe/Cargo.toml index 3bc7ac08..c085198a 100644 --- a/enshrine-esdt-safe/Cargo.toml +++ b/enshrine-esdt-safe/Cargo.toml @@ -8,8 +8,8 @@ publish = false [lib] path = "src/lib.rs" -[dependencies.transaction] -path = "../common/transaction" +[dependencies.operation] +path = "../common/operation" [dependencies.tx-batch-module] path = "../common/tx-batch-module" diff --git a/enshrine-esdt-safe/interactor/Cargo.toml b/enshrine-esdt-safe/interactor/Cargo.toml index d96376e2..b90da4bb 100644 --- a/enshrine-esdt-safe/interactor/Cargo.toml +++ b/enshrine-esdt-safe/interactor/Cargo.toml @@ -18,8 +18,8 @@ toml = "0.8.6" [dependencies.enshrine-esdt-safe] path = ".." -[dependencies.transaction] -path = "../../common/transaction" +[dependencies.operation] +path = "../../common/operation" [dependencies.tx-batch-module] path = "../../common/tx-batch-module" diff --git a/enshrine-esdt-safe/interactor/src/enshrine_esdt_safe_interactor.rs b/enshrine-esdt-safe/interactor/src/enshrine_esdt_safe_interactor.rs index 7d342d44..2b8260d4 100644 --- a/enshrine-esdt-safe/interactor/src/enshrine_esdt_safe_interactor.rs +++ b/enshrine-esdt-safe/interactor/src/enshrine_esdt_safe_interactor.rs @@ -1,22 +1,20 @@ #![allow(non_snake_case)] #![allow(unused)] +use aliases::{OptionalTransferData, PaymentsVec}; use fee_market_proxy::*; use interactor::constants::{TOKEN_ID, WHITELIST_TOKEN_ID}; use interactor::interactor_config::Config; use interactor::interactor_state::State; use multiversx_sc_snippets::imports::*; use proxies::*; -use transaction::*; +use operation::*; const FEE_MARKET_CODE_PATH: &str = "../fee-market/output/fee-market.mxsc.json"; const HEADER_VERIFIER_CODE_PATH: &str = "../header-verifier/output/header-verifier.mxsc.json"; const ENSHRINE_ESDT_SAFE_CODE_PATH: &str = "output/enshrine-esdt-safe.mxsc.json"; const TOKEN_HANDLER_CODE_PATH: &str = "../token-handler/output/token-handler.mxsc.json"; -type OptionalTransferData = - OptionalValue, ManagedVec>>>; - pub async fn enshrine_esdt_safe_cli() { env_logger::init(); @@ -33,11 +31,7 @@ pub async fn enshrine_esdt_safe_cli() { "setHeaderVerifierAddress" => interact.set_header_verifier_address().await, "setMaxTxGasLimit" => interact.set_max_user_tx_gas_limit().await, "setBannedEndpoint" => interact.set_banned_endpoint().await, - "deposit" => { - interact - .deposit(OptionalTransferData::None, Option::None) - .await - } + "deposit" => interact.deposit(None.into(), Option::None).await, "executeBridgeOps" => interact.execute_operations().await, "registerNewTokenID" => interact.register_new_token_id().await, "setMaxBridgedAmount" => interact.set_max_bridged_amount().await, diff --git a/enshrine-esdt-safe/interactor/tests/enshrine-esdt-safe_interactor_tests.rs b/enshrine-esdt-safe/interactor/tests/enshrine-esdt-safe_interactor_tests.rs index 6ec9d646..8ccab55a 100644 --- a/enshrine-esdt-safe/interactor/tests/enshrine-esdt-safe_interactor_tests.rs +++ b/enshrine-esdt-safe/interactor/tests/enshrine-esdt-safe_interactor_tests.rs @@ -1,11 +1,12 @@ use std::vec; +use aliases::{GasLimit, PaymentsVec}; use enshrine_esdt_safe_interactor::ContractInteract; use interactor::constants::{TOKEN_ID, WHITELIST_TOKEN_ID}; use interactor::interactor_config::Config; use multiversx_sc_snippets::imports::*; use proxies::*; -use transaction::*; +use operation::*; type OptionalTransferData = OptionalValue, ManagedVec>>>; diff --git a/enshrine-esdt-safe/src/common/storage.rs b/enshrine-esdt-safe/src/common/storage.rs index 7c56d22b..46d1fda6 100644 --- a/enshrine-esdt-safe/src/common/storage.rs +++ b/enshrine-esdt-safe/src/common/storage.rs @@ -1,5 +1,5 @@ use multiversx_sc::imports::*; -use transaction::OperationEsdtPayment; +use operation::OperationEsdtPayment; #[multiversx_sc::module] pub trait CommonStorage { diff --git a/enshrine-esdt-safe/src/from_sovereign/transfer_tokens.rs b/enshrine-esdt-safe/src/from_sovereign/transfer_tokens.rs index cd65defb..0fd1aafe 100644 --- a/enshrine-esdt-safe/src/from_sovereign/transfer_tokens.rs +++ b/enshrine-esdt-safe/src/from_sovereign/transfer_tokens.rs @@ -1,7 +1,7 @@ use crate::{common, to_sovereign}; use multiversx_sc::imports::*; use proxies::{header_verifier_proxy::HeaderverifierProxy, token_handler_proxy::TokenHandlerProxy}; -use transaction::{Operation, OperationData, OperationEsdtPayment, OperationTuple}; +use operation::{Operation, OperationData, OperationEsdtPayment, OperationTuple}; const DEFAULT_ISSUE_COST: u64 = 50_000_000_000_000_000; // 0.05 * 10^18 diff --git a/enshrine-esdt-safe/src/lib.rs b/enshrine-esdt-safe/src/lib.rs index 750cce35..2f056d02 100644 --- a/enshrine-esdt-safe/src/lib.rs +++ b/enshrine-esdt-safe/src/lib.rs @@ -1,7 +1,7 @@ #![no_std] use multiversx_sc::imports::*; -use transaction::GasLimit; +use operation::aliases::GasLimit; pub mod common; pub mod from_sovereign; diff --git a/enshrine-esdt-safe/src/to_sovereign/create_tx.rs b/enshrine-esdt-safe/src/to_sovereign/create_tx.rs index da03c345..bb02a869 100644 --- a/enshrine-esdt-safe/src/to_sovereign/create_tx.rs +++ b/enshrine-esdt-safe/src/to_sovereign/create_tx.rs @@ -1,7 +1,8 @@ use crate::common; use proxies::fee_market_proxy::FeeMarketProxy; -use transaction::{ - EventPayment, GasLimit, OperationData, OptionalValueTransferDataTuple, TransferData, +use operation::{ + aliases::{GasLimit, OptionalValueTransferDataTuple}, + EventPayment, OperationData, TransferData, }; use multiversx_sc::imports::*; diff --git a/enshrine-esdt-safe/src/to_sovereign/events.rs b/enshrine-esdt-safe/src/to_sovereign/events.rs index 15439c68..fe9b68b9 100644 --- a/enshrine-esdt-safe/src/to_sovereign/events.rs +++ b/enshrine-esdt-safe/src/to_sovereign/events.rs @@ -1,4 +1,4 @@ -use transaction::OperationData; +use operation::OperationData; multiversx_sc::imports!(); multiversx_sc::derive_imports!(); diff --git a/enshrine-esdt-safe/tests/enshrine_esdt_safe_blackbox_test.rs b/enshrine-esdt-safe/tests/enshrine_esdt_safe_blackbox_test.rs index 73e10f51..8ee19254 100644 --- a/enshrine-esdt-safe/tests/enshrine_esdt_safe_blackbox_test.rs +++ b/enshrine-esdt-safe/tests/enshrine_esdt_safe_blackbox_test.rs @@ -1,5 +1,5 @@ use multiversx_sc::codec::TopEncode; -use multiversx_sc::imports::{MultiValue3, OptionalValue}; +use multiversx_sc::imports::OptionalValue; use multiversx_sc::types::{ Address, BigUint, EsdtTokenData, EsdtTokenPayment, ManagedBuffer, ManagedVec, MultiValueEncoded, TestAddress, TestSCAddress, TestTokenIdentifier, TokenIdentifier, @@ -12,8 +12,8 @@ use proxies::enshrine_esdt_safe_proxy::EnshrineEsdtSafeProxy; use proxies::fee_market_proxy::{FeeMarketProxy, FeeStruct, FeeType}; use proxies::header_verifier_proxy::HeaderverifierProxy; use proxies::token_handler_proxy::TokenHandlerProxy; -use transaction::{GasLimit, Operation, OperationData, OperationEsdtPayment}; -use utils::PaymentsVec; +use operation::aliases::{GasLimit, OptionalTransferData, PaymentsVec}; +use operation::{Operation, OperationData, OperationEsdtPayment}; const ENSHRINE_ESDT_ADDRESS: TestSCAddress = TestSCAddress::new("enshrine-esdt"); const ENSHRINE_ESDT_CODE_PATH: MxscPath = MxscPath::new("output/enshrine-esdt-safe.mxsc-json"); @@ -47,9 +47,6 @@ const WEGLD_IDENTIFIER: TestTokenIdentifier = TestTokenIdentifier::new("WEGLD-12 const WEGLD_BALANCE: u128 = 100_000_000_000_000_000; const SOVEREIGN_TOKEN_PREFIX: &str = "sov"; -type OptionalTransferData = - OptionalValue, ManagedVec>>>; - fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); diff --git a/enshrine-esdt-safe/wasm-enshrine-esdt-safe-full/Cargo.lock b/enshrine-esdt-safe/wasm-enshrine-esdt-safe-full/Cargo.lock index 79f6c6d2..46e96fad 100644 --- a/enshrine-esdt-safe/wasm-enshrine-esdt-safe-full/Cargo.lock +++ b/enshrine-esdt-safe/wasm-enshrine-esdt-safe-full/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -37,8 +37,8 @@ dependencies = [ "chain-config", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", "utils", ] @@ -57,11 +57,11 @@ dependencies = [ "max-bridged-amount-module", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", "setup-phase", "token-handler", "token-whitelist", - "transaction", "tx-batch-module", "utils", ] @@ -79,9 +79,9 @@ name = "fee-market" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -90,9 +90,9 @@ name = "header-verifier" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -211,6 +211,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -225,7 +232,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -279,8 +286,8 @@ dependencies = [ "chain-factory", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", ] [[package]] @@ -292,19 +299,12 @@ dependencies = [ "utils", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -324,4 +324,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/enshrine-esdt-safe/wasm-enshrine-esdt-safe-view/Cargo.lock b/enshrine-esdt-safe/wasm-enshrine-esdt-safe-view/Cargo.lock index c7a7c119..3aed28de 100644 --- a/enshrine-esdt-safe/wasm-enshrine-esdt-safe-view/Cargo.lock +++ b/enshrine-esdt-safe/wasm-enshrine-esdt-safe-view/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -37,8 +37,8 @@ dependencies = [ "chain-config", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", "utils", ] @@ -57,11 +57,11 @@ dependencies = [ "max-bridged-amount-module", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", "setup-phase", "token-handler", "token-whitelist", - "transaction", "tx-batch-module", "utils", ] @@ -79,9 +79,9 @@ name = "fee-market" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -90,9 +90,9 @@ name = "header-verifier" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -211,6 +211,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -225,7 +232,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -279,8 +286,8 @@ dependencies = [ "chain-factory", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", ] [[package]] @@ -292,19 +299,12 @@ dependencies = [ "utils", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -324,4 +324,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/enshrine-esdt-safe/wasm/Cargo.lock b/enshrine-esdt-safe/wasm/Cargo.lock index 2fed3df2..7fbe49fc 100644 --- a/enshrine-esdt-safe/wasm/Cargo.lock +++ b/enshrine-esdt-safe/wasm/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -37,8 +37,8 @@ dependencies = [ "chain-config", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", "utils", ] @@ -57,11 +57,11 @@ dependencies = [ "max-bridged-amount-module", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", "setup-phase", "token-handler", "token-whitelist", - "transaction", "tx-batch-module", "utils", ] @@ -79,9 +79,9 @@ name = "fee-market" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -90,9 +90,9 @@ name = "header-verifier" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -211,6 +211,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -225,7 +232,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -279,8 +286,8 @@ dependencies = [ "chain-factory", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", ] [[package]] @@ -292,19 +299,12 @@ dependencies = [ "utils", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -324,4 +324,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/esdt-safe/Cargo.toml b/esdt-safe/Cargo.toml index f6b346fd..ac484985 100644 --- a/esdt-safe/Cargo.toml +++ b/esdt-safe/Cargo.toml @@ -8,8 +8,8 @@ publish = false [lib] path = "src/lib.rs" -[dependencies.transaction] -path = "../common/transaction" +[dependencies.operation] +path = "../common/operation" [dependencies.tx-batch-module] path = "../common/tx-batch-module" diff --git a/esdt-safe/interactor/Cargo.toml b/esdt-safe/interactor/Cargo.toml index 408a745c..376facde 100644 --- a/esdt-safe/interactor/Cargo.toml +++ b/esdt-safe/interactor/Cargo.toml @@ -18,8 +18,8 @@ toml = "0.8.6" [dependencies.esdt-safe] path = ".." -[dependencies.transaction] -path = "../../common/transaction" +[dependencies.operation] +path = "../../common/operation" [dependencies.proxies] path = "../../common/proxies" diff --git a/esdt-safe/interactor/src/esdt_safe_interactor.rs b/esdt-safe/interactor/src/esdt_safe_interactor.rs index c19afc95..43581c90 100644 --- a/esdt-safe/interactor/src/esdt_safe_interactor.rs +++ b/esdt-safe/interactor/src/esdt_safe_interactor.rs @@ -12,17 +12,15 @@ use proxies::esdt_safe_proxy::EsdtSafeProxy; use proxies::fee_market_proxy::{FeeMarketProxy, FeeStruct, FeeType}; use proxies::header_verifier_proxy::HeaderverifierProxy; use proxies::testing_sc_proxy::TestingScProxy; -use transaction::{GasLimit, Operation, OperationData, PaymentsVec}; -use transaction::{OperationEsdtPayment, TransferData}; +use operation::aliases::{OptionalTransferData, PaymentsVec}; +use operation::{Operation, OperationData}; +use operation::{OperationEsdtPayment, TransferData}; const FEE_MARKET_CODE_PATH: &str = "../../fee-market/output/fee-market.mxsc.json"; const HEADER_VERIFIER_CODE_PATH: &str = "../../header-verifier/output/header-verifier.mxsc.json"; const ESDT_SAFE_CODE_PATH: &str = "../output/esdt-safe.mxsc.json"; const TESTING_SC_CODE_PATH: &str = "../../testing-sc/output/testing-sc.mxsc.json"; -type OptionalTransferData = - OptionalValue, ManagedVec>>>; - pub async fn esdt_safe_cli() { env_logger::init(); @@ -36,7 +34,7 @@ pub async fn esdt_safe_cli() { "upgrade" => interact.upgrade().await, "setFeeMarketAddress" => interact.set_fee_market_address().await, "setHeaderVerifierAddress" => interact.set_header_verifier_address().await, - "deposit" => interact.deposit(OptionalTransferData::None, None).await, + "deposit" => interact.deposit(None.into(), None).await, "registerToken" => interact.register_token().await, "setMaxBridgedAmount" => interact.set_max_bridged_amount().await, "getMaxBridgedAmount" => interact.max_bridged_amount().await, @@ -112,9 +110,10 @@ impl ContractInteract { .await; let new_address_bech32 = bech32::encode(&new_address); - self.state.set_esdt_safe_address(Bech32Address::from_bech32_string( - new_address_bech32.clone(), - )); + self.state + .set_esdt_safe_address(Bech32Address::from_bech32_string( + new_address_bech32.clone(), + )); println!("new address: {new_address_bech32}"); } diff --git a/esdt-safe/src/from_sovereign/transfer_tokens.rs b/esdt-safe/src/from_sovereign/transfer_tokens.rs index ca1b3bc6..c56c3cb7 100644 --- a/esdt-safe/src/from_sovereign/transfer_tokens.rs +++ b/esdt-safe/src/from_sovereign/transfer_tokens.rs @@ -1,6 +1,8 @@ use multiversx_sc::api::ESDT_MULTI_TRANSFER_FUNC_NAME; use proxies::header_verifier_proxy::HeaderverifierProxy; -use transaction::{GasLimit, Operation, OperationData, OperationEsdtPayment, OperationTuple}; +use operation::{ + aliases::GasLimit, Operation, OperationData, OperationEsdtPayment, OperationTuple, +}; use crate::to_sovereign; diff --git a/esdt-safe/src/lib.rs b/esdt-safe/src/lib.rs index 49b9ec56..c9de40ad 100644 --- a/esdt-safe/src/lib.rs +++ b/esdt-safe/src/lib.rs @@ -1,6 +1,6 @@ #![no_std] -use transaction::GasLimit; +use operation::aliases::GasLimit; multiversx_sc::imports!(); multiversx_sc::derive_imports!(); diff --git a/esdt-safe/src/to_sovereign/create_tx.rs b/esdt-safe/src/to_sovereign/create_tx.rs index fa4a8552..968455e3 100644 --- a/esdt-safe/src/to_sovereign/create_tx.rs +++ b/esdt-safe/src/to_sovereign/create_tx.rs @@ -1,9 +1,9 @@ use crate::from_sovereign::token_mapping; use multiversx_sc::storage::StorageKey; use proxies::fee_market_proxy::FeeMarketProxy; -use transaction::{ - EventPaymentTuple, ExtractedFeeResult, GasLimit, OperationData, OptionalValueTransferDataTuple, - TransferData, +use operation::{ + aliases::{EventPaymentTuple, ExtractedFeeResult, GasLimit, OptionalValueTransferDataTuple}, + OperationData, TransferData, }; multiversx_sc::imports!(); diff --git a/esdt-safe/src/to_sovereign/events.rs b/esdt-safe/src/to_sovereign/events.rs index 15439c68..fe9b68b9 100644 --- a/esdt-safe/src/to_sovereign/events.rs +++ b/esdt-safe/src/to_sovereign/events.rs @@ -1,4 +1,4 @@ -use transaction::OperationData; +use operation::OperationData; multiversx_sc::imports!(); multiversx_sc::derive_imports!(); diff --git a/esdt-safe/tests/bridge_blackbox_tests.rs b/esdt-safe/tests/bridge_blackbox_tests.rs index 1f77d6ac..f5d8d287 100644 --- a/esdt-safe/tests/bridge_blackbox_tests.rs +++ b/esdt-safe/tests/bridge_blackbox_tests.rs @@ -14,7 +14,7 @@ use multiversx_sc_scenario::{ use proxies::esdt_safe_proxy::EsdtSafeProxy; use proxies::fee_market_proxy::{FeeMarketProxy, FeeStruct, FeeType}; use proxies::header_verifier_proxy::HeaderverifierProxy; -use transaction::{Operation, OperationData, OperationEsdtPayment}; +use operation::{Operation, OperationData, OperationEsdtPayment}; const BRIDGE_ADDRESS: TestSCAddress = TestSCAddress::new("bridge"); const BRIDGE_CODE_PATH: MxscPath = MxscPath::new("output/esdt-safe.mxsc.json"); diff --git a/esdt-safe/wasm-esdt-safe-full/Cargo.lock b/esdt-safe/wasm-esdt-safe-full/Cargo.lock index 5d75b32c..fa5e4fae 100644 --- a/esdt-safe/wasm-esdt-safe-full/Cargo.lock +++ b/esdt-safe/wasm-esdt-safe-full/Cargo.lock @@ -35,10 +35,10 @@ dependencies = [ "max-bridged-amount-module", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", "setup-phase", "token-whitelist", - "transaction", "tx-batch-module", "utils", ] @@ -56,9 +56,9 @@ name = "fee-market" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -67,9 +67,9 @@ name = "header-verifier" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -188,6 +188,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -202,7 +209,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -258,19 +265,12 @@ dependencies = [ "utils", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -290,4 +290,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/esdt-safe/wasm-esdt-safe-view/Cargo.lock b/esdt-safe/wasm-esdt-safe-view/Cargo.lock index 7bf1eec6..083dbcaa 100644 --- a/esdt-safe/wasm-esdt-safe-view/Cargo.lock +++ b/esdt-safe/wasm-esdt-safe-view/Cargo.lock @@ -35,10 +35,10 @@ dependencies = [ "max-bridged-amount-module", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", "setup-phase", "token-whitelist", - "transaction", "tx-batch-module", "utils", ] @@ -56,9 +56,9 @@ name = "fee-market" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -67,9 +67,9 @@ name = "header-verifier" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -188,6 +188,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -202,7 +209,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -258,19 +265,12 @@ dependencies = [ "utils", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -290,4 +290,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/esdt-safe/wasm/Cargo.lock b/esdt-safe/wasm/Cargo.lock index a08903bf..3fd73e2b 100644 --- a/esdt-safe/wasm/Cargo.lock +++ b/esdt-safe/wasm/Cargo.lock @@ -35,10 +35,10 @@ dependencies = [ "max-bridged-amount-module", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", "setup-phase", "token-whitelist", - "transaction", "tx-batch-module", "utils", ] @@ -56,9 +56,9 @@ name = "fee-market" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -67,9 +67,9 @@ name = "header-verifier" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -188,6 +188,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -202,7 +209,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -258,19 +265,12 @@ dependencies = [ "utils", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -290,4 +290,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/fee-market/Cargo.toml b/fee-market/Cargo.toml index 12864569..68eeb953 100644 --- a/fee-market/Cargo.toml +++ b/fee-market/Cargo.toml @@ -11,8 +11,8 @@ path = "src/lib.rs" [dependencies.utils] path = "../common/utils" -[dependencies.transaction] -path = "../common/transaction" +[dependencies.operation] +path = "../common/operation" [dependencies.proxies] path = "../common/proxies" diff --git a/fee-market/src/subtract_fee.rs b/fee-market/src/subtract_fee.rs index 287cd700..b46681ce 100644 --- a/fee-market/src/subtract_fee.rs +++ b/fee-market/src/subtract_fee.rs @@ -1,4 +1,4 @@ -use transaction::GasLimit; +use operation::aliases::GasLimit; use crate::fee_type::FeeType; diff --git a/fee-market/wasm-fee-market-view/Cargo.lock b/fee-market/wasm-fee-market-view/Cargo.lock index f476910c..ae20d54b 100644 --- a/fee-market/wasm-fee-market-view/Cargo.lock +++ b/fee-market/wasm-fee-market-view/Cargo.lock @@ -31,9 +31,9 @@ name = "fee-market" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -145,6 +145,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -159,7 +166,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -206,19 +213,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -238,4 +238,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/fee-market/wasm-fee-market/Cargo.lock b/fee-market/wasm-fee-market/Cargo.lock index 681b158a..6b0ecadb 100644 --- a/fee-market/wasm-fee-market/Cargo.lock +++ b/fee-market/wasm-fee-market/Cargo.lock @@ -31,9 +31,9 @@ name = "fee-market" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -145,6 +145,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -159,7 +166,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -206,19 +213,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -238,4 +238,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/fee-market/wasm/Cargo.lock b/fee-market/wasm/Cargo.lock index 681b158a..6b0ecadb 100644 --- a/fee-market/wasm/Cargo.lock +++ b/fee-market/wasm/Cargo.lock @@ -31,9 +31,9 @@ name = "fee-market" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -145,6 +145,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -159,7 +166,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -206,19 +213,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -238,4 +238,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/header-verifier/Cargo.toml b/header-verifier/Cargo.toml index adf0e431..259f715f 100644 --- a/header-verifier/Cargo.toml +++ b/header-verifier/Cargo.toml @@ -11,8 +11,8 @@ path = "src/lib.rs" [dependencies.multiversx-sc] version = "=0.54.6" -[dependencies.transaction] -path = "../common/transaction" +[dependencies.operation] +path = "../common/operation" [dependencies.proxies] path = "../common/proxies" diff --git a/header-verifier/wasm-header-verifier-full/Cargo.lock b/header-verifier/wasm-header-verifier-full/Cargo.lock index f698ca52..5602cef1 100644 --- a/header-verifier/wasm-header-verifier-full/Cargo.lock +++ b/header-verifier/wasm-header-verifier-full/Cargo.lock @@ -31,9 +31,9 @@ name = "header-verifier" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -144,6 +144,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -158,7 +165,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -205,19 +212,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] diff --git a/header-verifier/wasm-multisig-view/Cargo.lock b/header-verifier/wasm-multisig-view/Cargo.lock index 38d22ecb..4b69eb8a 100644 --- a/header-verifier/wasm-multisig-view/Cargo.lock +++ b/header-verifier/wasm-multisig-view/Cargo.lock @@ -31,9 +31,9 @@ name = "header-verifier" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -144,6 +144,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -158,7 +165,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -205,19 +212,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] diff --git a/header-verifier/wasm/Cargo.lock b/header-verifier/wasm/Cargo.lock index 30c17546..48db0192 100644 --- a/header-verifier/wasm/Cargo.lock +++ b/header-verifier/wasm/Cargo.lock @@ -31,9 +31,9 @@ name = "header-verifier" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -144,6 +144,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -158,7 +165,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -205,19 +212,12 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] diff --git a/sovereign-forge/Cargo.toml b/sovereign-forge/Cargo.toml index c789c2f4..d24f34dd 100644 --- a/sovereign-forge/Cargo.toml +++ b/sovereign-forge/Cargo.toml @@ -32,8 +32,8 @@ path = "../esdt-safe" [dependencies.proxies] path = "../common/proxies" -[dependencies.transaction] -path = "../common/transaction" +[dependencies.operation] +path = "../common/operation" [dependencies.setup-phase] path = "../common/setup-phase" diff --git a/sovereign-forge/src/common/sc_deploy.rs b/sovereign-forge/src/common/sc_deploy.rs index 765013de..bfbc5bbe 100644 --- a/sovereign-forge/src/common/sc_deploy.rs +++ b/sovereign-forge/src/common/sc_deploy.rs @@ -1,7 +1,7 @@ use crate::err_msg; use multiversx_sc::types::{MultiValueEncoded, ReturnsResult}; use proxies::{chain_factory_proxy::ChainFactoryContractProxy, fee_market_proxy::FeeStruct}; -use transaction::StakeMultiArg; +use operation::aliases::StakeMultiArg; #[multiversx_sc::module] pub trait ScDeployModule: super::utils::UtilsModule + super::storage::StorageModule { diff --git a/sovereign-forge/src/phases.rs b/sovereign-forge/src/phases.rs index 777a69a4..0f292019 100644 --- a/sovereign-forge/src/phases.rs +++ b/sovereign-forge/src/phases.rs @@ -1,9 +1,9 @@ use crate::err_msg; use core::ops::Deref; use proxies::fee_market_proxy::FeeStruct; -use transaction::StakeMultiArg; use multiversx_sc::{require, types::MultiValueEncoded}; +use operation::aliases::StakeMultiArg; use crate::common::{ self, diff --git a/sovereign-forge/tests/sovereign_forge_unit_tests.rs b/sovereign-forge/tests/sovereign_forge_unit_tests.rs index 71d871a8..a90dea0d 100644 --- a/sovereign-forge/tests/sovereign_forge_unit_tests.rs +++ b/sovereign-forge/tests/sovereign_forge_unit_tests.rs @@ -16,7 +16,7 @@ use sovereign_forge::common::{ storage::StorageModule, utils::{ScArray, UtilsModule}, }; -use transaction::StakeMultiArg; +use operation::aliases::StakeMultiArg; const FORGE_ADDRESS: TestSCAddress = TestSCAddress::new("sovereign-forge"); const FORGE_CODE_PATH: MxscPath = MxscPath::new("output/sovereign-forge.mxsc.json"); diff --git a/sovereign-forge/wasm-sovereign-forge-full/Cargo.lock b/sovereign-forge/wasm-sovereign-forge-full/Cargo.lock index 07656aea..de35174c 100644 --- a/sovereign-forge/wasm-sovereign-forge-full/Cargo.lock +++ b/sovereign-forge/wasm-sovereign-forge-full/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -37,8 +37,8 @@ dependencies = [ "chain-config", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", "utils", ] @@ -57,10 +57,10 @@ dependencies = [ "max-bridged-amount-module", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", "setup-phase", "token-whitelist", - "transaction", "tx-batch-module", "utils", ] @@ -70,9 +70,9 @@ name = "fee-market" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -81,9 +81,9 @@ name = "header-verifier" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -202,6 +202,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -216,7 +223,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -263,9 +270,9 @@ dependencies = [ "header-verifier", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -296,19 +303,12 @@ dependencies = [ "utils", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -328,4 +328,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/sovereign-forge/wasm-soveriegn-forge-view/Cargo.lock b/sovereign-forge/wasm-soveriegn-forge-view/Cargo.lock index c66cfd2d..f1997c65 100644 --- a/sovereign-forge/wasm-soveriegn-forge-view/Cargo.lock +++ b/sovereign-forge/wasm-soveriegn-forge-view/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -37,8 +37,8 @@ dependencies = [ "chain-config", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", "utils", ] @@ -57,10 +57,10 @@ dependencies = [ "max-bridged-amount-module", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", "setup-phase", "token-whitelist", - "transaction", "tx-batch-module", "utils", ] @@ -70,9 +70,9 @@ name = "fee-market" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -81,9 +81,9 @@ name = "header-verifier" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -202,6 +202,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -216,7 +223,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -263,9 +270,9 @@ dependencies = [ "header-verifier", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -296,19 +303,12 @@ dependencies = [ "utils", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -328,4 +328,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/sovereign-forge/wasm/Cargo.lock b/sovereign-forge/wasm/Cargo.lock index c3019ed7..b8c27dad 100644 --- a/sovereign-forge/wasm/Cargo.lock +++ b/sovereign-forge/wasm/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -37,8 +37,8 @@ dependencies = [ "chain-config", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", "utils", ] @@ -57,10 +57,10 @@ dependencies = [ "max-bridged-amount-module", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", "setup-phase", "token-whitelist", - "transaction", "tx-batch-module", "utils", ] @@ -70,9 +70,9 @@ name = "fee-market" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", "utils", ] @@ -81,9 +81,9 @@ name = "header-verifier" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -202,6 +202,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -216,7 +223,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -263,9 +270,9 @@ dependencies = [ "header-verifier", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", "setup-phase", - "transaction", ] [[package]] @@ -296,19 +303,12 @@ dependencies = [ "utils", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -328,4 +328,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/token-handler/Cargo.toml b/token-handler/Cargo.toml index c2ee9be1..4b96734c 100644 --- a/token-handler/Cargo.toml +++ b/token-handler/Cargo.toml @@ -8,8 +8,8 @@ publish = false [lib] path = "src/lib.rs" -[dependencies.transaction] -path = "../common/transaction" +[dependencies.operation] +path = "../common/operation" [dependencies.proxies] path = "../common/proxies" diff --git a/token-handler/src/transfer_tokens.rs b/token-handler/src/transfer_tokens.rs index 49070932..af3624cb 100644 --- a/token-handler/src/transfer_tokens.rs +++ b/token-handler/src/transfer_tokens.rs @@ -5,7 +5,8 @@ use multiversx_sc::types::{ system_proxy, EsdtTokenPayment, ManagedArgBuffer, MultiValueEncoded, ToSelf, }; use multiversx_sc::types::{ManagedVec, TokenIdentifier}; -use transaction::{GasLimit, OperationEsdtPayment, TransferData}; +use operation::aliases::GasLimit; +use operation::{OperationEsdtPayment, TransferData}; use crate::common_storage; diff --git a/token-handler/tests/token_handler_blackbox_tests.rs b/token-handler/tests/token_handler_blackbox_tests.rs index d74c5a54..0bc1211a 100644 --- a/token-handler/tests/token_handler_blackbox_tests.rs +++ b/token-handler/tests/token_handler_blackbox_tests.rs @@ -6,7 +6,7 @@ use multiversx_sc_scenario::{api::StaticApi, imports::MxscPath, ScenarioWorld}; use multiversx_sc_scenario::{ExpectError, ReturnsHandledOrError, ScenarioTxRun}; use proxies::chain_factory_proxy::ChainFactoryContractProxy; use proxies::token_handler_proxy::TokenHandlerProxy; -use transaction::{OperationEsdtPayment, TransferData}; +use operation::{OperationEsdtPayment, TransferData}; const TOKEN_HANDLER_ADDRESS: TestSCAddress = TestSCAddress::new("token-handler"); const TOKEN_HANDLER_CODE_PATH: MxscPath = MxscPath::new("output/token-handler.mxsc.json"); diff --git a/token-handler/wasm-token-handler-full/Cargo.lock b/token-handler/wasm-token-handler-full/Cargo.lock index 9dc04a79..92d9b364 100644 --- a/token-handler/wasm-token-handler-full/Cargo.lock +++ b/token-handler/wasm-token-handler-full/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -37,8 +37,8 @@ dependencies = [ "chain-config", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", "utils", ] @@ -157,6 +157,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -171,7 +178,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -225,8 +232,8 @@ dependencies = [ "chain-factory", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", ] [[package]] @@ -237,19 +244,12 @@ dependencies = [ "token-handler", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -269,4 +269,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/token-handler/wasm-token-handler-view/Cargo.lock b/token-handler/wasm-token-handler-view/Cargo.lock index c09c712a..7b7ef58a 100644 --- a/token-handler/wasm-token-handler-view/Cargo.lock +++ b/token-handler/wasm-token-handler-view/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -37,8 +37,8 @@ dependencies = [ "chain-config", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", "utils", ] @@ -157,6 +157,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -171,7 +178,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -225,8 +232,8 @@ dependencies = [ "chain-factory", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", ] [[package]] @@ -237,19 +244,12 @@ dependencies = [ "token-handler", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -269,4 +269,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ] diff --git a/token-handler/wasm/Cargo.lock b/token-handler/wasm/Cargo.lock index 9859b2f6..fc343720 100644 --- a/token-handler/wasm/Cargo.lock +++ b/token-handler/wasm/Cargo.lock @@ -26,8 +26,8 @@ version = "0.0.0" dependencies = [ "multiversx-sc", "multiversx-sc-modules", + "operation", "setup-phase", - "transaction", ] [[package]] @@ -37,8 +37,8 @@ dependencies = [ "chain-config", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", "utils", ] @@ -157,6 +157,13 @@ dependencies = [ "autocfg", ] +[[package]] +name = "operation" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + [[package]] name = "proc-macro2" version = "1.0.86" @@ -171,7 +178,7 @@ name = "proxies" version = "0.1.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", "tx-batch-module", ] @@ -225,8 +232,8 @@ dependencies = [ "chain-factory", "multiversx-sc", "multiversx-sc-modules", + "operation", "proxies", - "transaction", ] [[package]] @@ -237,19 +244,12 @@ dependencies = [ "token-handler", ] -[[package]] -name = "transaction" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "tx-batch-module" version = "0.0.0" dependencies = [ "multiversx-sc", - "transaction", + "operation", ] [[package]] @@ -269,4 +269,5 @@ name = "utils" version = "0.0.0" dependencies = [ "multiversx-sc", + "operation", ]