diff --git a/common/sc-proxies/src/multisig_proxy.rs b/common/sc-proxies/src/multisig_proxy.rs index a652c8ba..5b111df7 100644 --- a/common/sc-proxies/src/multisig_proxy.rs +++ b/common/sc-proxies/src/multisig_proxy.rs @@ -49,26 +49,29 @@ where Arg0: ProxyArg>, Arg1: ProxyArg>, Arg2: ProxyArg>, - Arg3: ProxyArg>, + Arg3: ProxyArg>, Arg4: ProxyArg>, - Arg5: ProxyArg, - Arg6: ProxyArg>>, + Arg5: ProxyArg>, + Arg6: ProxyArg, + Arg7: ProxyArg>>, >( self, esdt_safe_sc_address: Arg0, multi_transfer_sc_address: Arg1, - proxy_sc_address: Arg2, - required_stake: Arg3, - slash_amount: Arg4, - quorum: Arg5, - board: Arg6, + bridge_proxy_sc_address: Arg2, + bridged_tokens_wrapper_sc_address: Arg3, + required_stake: Arg4, + slash_amount: Arg5, + quorum: Arg6, + board: Arg7, ) -> TxTypedDeploy { self.wrapped_tx .payment(NotPayable) .raw_deploy() .argument(&esdt_safe_sc_address) .argument(&multi_transfer_sc_address) - .argument(&proxy_sc_address) + .argument(&bridge_proxy_sc_address) + .argument(&bridged_tokens_wrapper_sc_address) .argument(&required_stake) .argument(&slash_amount) .argument(&quorum) @@ -90,18 +93,21 @@ where Arg0: ProxyArg>, Arg1: ProxyArg>, Arg2: ProxyArg>, + Arg3: ProxyArg>, >( self, esdt_safe_sc_address: Arg0, multi_transfer_sc_address: Arg1, - proxy_sc_address: Arg2, + bridge_proxy_sc_address: Arg2, + bridged_tokens_wrapper_sc_address: Arg3, ) -> TxTypedUpgrade { self.wrapped_tx .payment(NotPayable) .raw_upgrade() .argument(&esdt_safe_sc_address) .argument(&multi_transfer_sc_address) - .argument(&proxy_sc_address) + .argument(&bridge_proxy_sc_address) + .argument(&bridged_tokens_wrapper_sc_address) .original_result() } } @@ -413,24 +419,6 @@ where .original_result() } - pub fn pause_esdt_safe( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("pauseEsdtSafe") - .original_result() - } - - pub fn unpause_esdt_safe( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("unpauseEsdtSafe") - .original_result() - } - pub fn init_supply_esdt_safe< Arg0: ProxyArg>, Arg1: ProxyArg>, @@ -465,24 +453,6 @@ where .original_result() } - pub fn pause_proxy( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("pauseProxy") - .original_result() - } - - pub fn unpause_proxy( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("unpauseProxy") - .original_result() - } - pub fn change_fee_estimator_contract_address< Arg0: ProxyArg>, >( @@ -732,6 +702,96 @@ where .original_result() } + pub fn pause_processing( + self, + ) -> TxTypedCall { + self.wrapped_tx + .payment(NotPayable) + .raw_call("pauseProcessing") + .original_result() + } + + pub fn unpause_processing( + self, + ) -> TxTypedCall { + self.wrapped_tx + .payment(NotPayable) + .raw_call("unpauseProcessing") + .original_result() + } + + pub fn pause_deposits( + self, + ) -> TxTypedCall { + self.wrapped_tx + .payment(NotPayable) + .raw_call("pauseDeposits") + .original_result() + } + + pub fn unpause_deposits( + self, + ) -> TxTypedCall { + self.wrapped_tx + .payment(NotPayable) + .raw_call("unpauseDeposits") + .original_result() + } + + pub fn pause_esdt_safe( + self, + ) -> TxTypedCall { + self.wrapped_tx + .payment(NotPayable) + .raw_call("pauseEsdtSafe") + .original_result() + } + + pub fn unpause_esdt_safe( + self, + ) -> TxTypedCall { + self.wrapped_tx + .payment(NotPayable) + .raw_call("unpauseEsdtSafe") + .original_result() + } + + pub fn pause_bridge_proxy( + self, + ) -> TxTypedCall { + self.wrapped_tx + .payment(NotPayable) + .raw_call("pauseBridgeProxy") + .original_result() + } + + pub fn unpause_bridge_proxy( + self, + ) -> TxTypedCall { + self.wrapped_tx + .payment(NotPayable) + .raw_call("unpauseBridgeProxy") + .original_result() + } + + pub fn pause_bridged_tokens_wrapper( + self, + ) -> TxTypedCall { + self.wrapped_tx + .payment(NotPayable) + .raw_call("pauseBridgedTokensWrapper") + .original_result() + } + + pub fn unpause_bridged_tokens_wrapper( + self, + ) -> TxTypedCall { + self.wrapped_tx + .payment(NotPayable) + .raw_call("unpauseBridgedTokensWrapper") + .original_result() + } + /// Minimum number of signatures needed to perform any action. pub fn quorum( self, @@ -860,12 +920,21 @@ where .original_result() } - pub fn proxy_address( + pub fn bridge_proxy_address( + self, + ) -> TxTypedCall> { + self.wrapped_tx + .payment(NotPayable) + .raw_call("getBridgeProxyAddress") + .original_result() + } + + pub fn bridged_tokens_wrapper_address( self, ) -> TxTypedCall> { self.wrapped_tx .payment(NotPayable) - .raw_call("getProxyAddress") + .raw_call("getBridgedTokensWrapperAddress") .original_result() } diff --git a/multisig/scenarios/ethereum_to_multiversx_relayer_call_data_several_tx_test.scen.json b/multisig/scenarios/ethereum_to_multiversx_relayer_call_data_several_tx_test.scen.json index fbb56f5e..410d608c 100644 --- a/multisig/scenarios/ethereum_to_multiversx_relayer_call_data_several_tx_test.scen.json +++ b/multisig/scenarios/ethereum_to_multiversx_relayer_call_data_several_tx_test.scen.json @@ -20,6 +20,7 @@ "0x00000000000000000500657364742d736166655f5f5f5f5f5f5f5f5f5f5f5f5f", "0x000000000000000005006d756c74692d7472616e736665725f5f5f5f5f5f5f5f", "0x000000000000000005006272696467652d70726f78795f5f5f5f5f5f5f5f5f5f", + "0x00000000000000000500627269646765642d746f6b656e732d77726170706572", "0x03e8", "0x01f4", "0x02", @@ -351,6 +352,74 @@ "status": "0" } }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:multi-transfer", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:esdt-safe", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:bridge-proxy", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:bridged-tokens-wrapper", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, { "step": "scCall", "id": "", diff --git a/multisig/scenarios/ethereum_to_multiversx_relayer_query2_test.scen.json b/multisig/scenarios/ethereum_to_multiversx_relayer_query2_test.scen.json index 78291d1c..5db2b8ba 100644 --- a/multisig/scenarios/ethereum_to_multiversx_relayer_query2_test.scen.json +++ b/multisig/scenarios/ethereum_to_multiversx_relayer_query2_test.scen.json @@ -20,6 +20,7 @@ "0x00000000000000000500657364742d736166655f5f5f5f5f5f5f5f5f5f5f5f5f", "0x000000000000000005006d756c74692d7472616e736665725f5f5f5f5f5f5f5f", "0x000000000000000005006272696467652d70726f78795f5f5f5f5f5f5f5f5f5f", + "0x00000000000000000500627269646765642d746f6b656e732d77726170706572", "0x03e8", "0x01f4", "0x02", @@ -351,6 +352,74 @@ "status": "0" } }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:multi-transfer", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:esdt-safe", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:bridge-proxy", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:bridged-tokens-wrapper", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, { "step": "scCall", "id": "", diff --git a/multisig/scenarios/ethereum_to_multiversx_relayer_query_test.scen.json b/multisig/scenarios/ethereum_to_multiversx_relayer_query_test.scen.json index b00b780f..bd6318d6 100644 --- a/multisig/scenarios/ethereum_to_multiversx_relayer_query_test.scen.json +++ b/multisig/scenarios/ethereum_to_multiversx_relayer_query_test.scen.json @@ -20,6 +20,7 @@ "0x00000000000000000500657364742d736166655f5f5f5f5f5f5f5f5f5f5f5f5f", "0x000000000000000005006d756c74692d7472616e736665725f5f5f5f5f5f5f5f", "0x000000000000000005006272696467652d70726f78795f5f5f5f5f5f5f5f5f5f", + "0x00000000000000000500627269646765642d746f6b656e732d77726170706572", "0x03e8", "0x01f4", "0x02", @@ -351,6 +352,74 @@ "status": "0" } }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:multi-transfer", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:esdt-safe", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:bridge-proxy", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:bridged-tokens-wrapper", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, { "step": "scCall", "id": "", diff --git a/multisig/scenarios/ethereum_to_multiversx_tx_batch_ok_call_data_encoded.scen.json b/multisig/scenarios/ethereum_to_multiversx_tx_batch_ok_call_data_encoded.scen.json index 84ec33e6..fb6f0eb6 100644 --- a/multisig/scenarios/ethereum_to_multiversx_tx_batch_ok_call_data_encoded.scen.json +++ b/multisig/scenarios/ethereum_to_multiversx_tx_batch_ok_call_data_encoded.scen.json @@ -20,6 +20,7 @@ "0x00000000000000000500657364742d736166655f5f5f5f5f5f5f5f5f5f5f5f5f", "0x000000000000000005006d756c74692d7472616e736665725f5f5f5f5f5f5f5f", "0x000000000000000005006272696467652d70726f78795f5f5f5f5f5f5f5f5f5f", + "0x00000000000000000500627269646765642d746f6b656e732d77726170706572", "0x03e8", "0x01f4", "0x02", @@ -351,6 +352,74 @@ "status": "0" } }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:multi-transfer", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:esdt-safe", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:bridge-proxy", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "address:owner", + "to": "sc:bridged-tokens-wrapper", + "function": "ChangeOwnerAddress", + "arguments": [ + "0x000000000000000005006d756c74697369675f5f5f5f5f5f5f5f5f5f5f5f5f5f" + ], + "gasLimit": "5,000,000" + }, + "expect": { + "out": [], + "status": "0" + } + }, { "step": "scCall", "id": "", diff --git a/multisig/scenarios/setup.scen.json b/multisig/scenarios/setup.scen.json index 9572e774..fbf69a21 100644 --- a/multisig/scenarios/setup.scen.json +++ b/multisig/scenarios/setup.scen.json @@ -143,6 +143,7 @@ "sc:esdt_safe", "sc:multi_transfer", "sc:bridge_proxy", + "sc:bridged_tokens_wrapper", "1000", "500", "2", @@ -168,7 +169,8 @@ "storage": { "str:esdtSafeAddress": "sc:esdt_safe", "str:multiTransferEsdtAddress": "sc:multi_transfer", - "str:proxyAddress": "sc:bridge_proxy", + "str:bridgeProxyAddress": "sc:bridge_proxy", + "str:bridgedTokensWrapperAddress": "sc:bridged_tokens_wrapper", "str:num_board_members": "2", "str:quorum": "2", "str:requiredStakeAmount": "1000", diff --git a/multisig/src/bridge_proxy_contract_proxy.rs b/multisig/src/bridge_proxy_contract_proxy.rs deleted file mode 100644 index 768889b6..00000000 --- a/multisig/src/bridge_proxy_contract_proxy.rs +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by the multiversx-sc proxy generator. DO NOT EDIT. - -//////////////////////////////////////////////////// -////////////////// AUTO-GENERATED ////////////////// -//////////////////////////////////////////////////// - -#![allow(dead_code)] -#![allow(clippy::all)] - -use multiversx_sc::proxy_imports::*; - -pub struct BridgeProxyContractProxy; - -impl TxProxyTrait for BridgeProxyContractProxy -where - Env: TxEnv, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - type TxProxyMethods = BridgeProxyContractProxyMethods; - - fn proxy_methods(self, tx: Tx) -> Self::TxProxyMethods { - BridgeProxyContractProxyMethods { wrapped_tx: tx } - } -} - -pub struct BridgeProxyContractProxyMethods -where - Env: TxEnv, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - wrapped_tx: Tx, -} - -#[rustfmt::skip] -impl BridgeProxyContractProxyMethods -where - Env: TxEnv, - Env::Api: VMApi, - From: TxFrom, - Gas: TxGas, -{ - pub fn init< - Arg0: ProxyArg>>, - >( - self, - opt_multi_transfer_address: Arg0, - ) -> TxTypedDeploy { - self.wrapped_tx - .payment(NotPayable) - .raw_deploy() - .argument(&opt_multi_transfer_address) - .original_result() - } -} - -#[rustfmt::skip] -impl BridgeProxyContractProxyMethods -where - Env: TxEnv, - Env::Api: VMApi, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - pub fn upgrade( - self, - ) -> TxTypedUpgrade { - self.wrapped_tx - .payment(NotPayable) - .raw_upgrade() - .original_result() - } -} - -#[rustfmt::skip] -impl BridgeProxyContractProxyMethods -where - Env: TxEnv, - Env::Api: VMApi, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - pub fn deposit< - Arg0: ProxyArg>, - Arg1: ProxyArg, - >( - self, - eth_tx: Arg0, - batch_id: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .raw_call("deposit") - .argument(ð_tx) - .argument(&batch_id) - .original_result() - } - - pub fn execute< - Arg0: ProxyArg, - >( - self, - tx_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("execute") - .argument(&tx_id) - .original_result() - } - - pub fn update_lowest_tx_id( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("updateLowestTxId") - .original_result() - } - - pub fn get_pending_transaction_by_id< - Arg0: ProxyArg, - >( - self, - tx_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getPendingTransactionById") - .argument(&tx_id) - .original_result() - } - - pub fn get_pending_transactions( - self, - ) -> TxTypedCall>>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getPendingTransactions") - .original_result() - } - - pub fn set_multi_transfer_contract_address< - Arg0: ProxyArg>>, - >( - self, - opt_multi_transfer_address: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setMultiTransferAddress") - .argument(&opt_multi_transfer_address) - .original_result() - } - - pub fn set_bridged_tokens_wrapper_contract_address< - Arg0: ProxyArg>>, - >( - self, - opt_address: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setBridgedTokensWrapperAddress") - .argument(&opt_address) - .original_result() - } - - pub fn set_esdt_safe_contract_address< - Arg0: ProxyArg>>, - >( - self, - opt_address: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setEsdtSafeAddress") - .argument(&opt_address) - .original_result() - } - - pub fn multi_transfer_address( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getMultiTransferAddress") - .original_result() - } - - pub fn bridged_tokens_wrapper_address( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getBridgedTokensWrapperAddress") - .original_result() - } - - pub fn esdt_safe_contract_address( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getEsdtSafeContractAddress") - .original_result() - } - - pub fn lowest_tx_id( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("lowestTxId") - .original_result() - } - - pub fn pause_endpoint( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("pause") - .original_result() - } - - pub fn unpause_endpoint( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("unpause") - .original_result() - } - - pub fn paused_status( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("isPaused") - .original_result() - } -} diff --git a/multisig/src/bridged_tokens_wrapper_proxy.rs b/multisig/src/bridged_tokens_wrapper_proxy.rs deleted file mode 100644 index df5b7a63..00000000 --- a/multisig/src/bridged_tokens_wrapper_proxy.rs +++ /dev/null @@ -1,317 +0,0 @@ -// Code generated by the multiversx-sc proxy generator. DO NOT EDIT. - -//////////////////////////////////////////////////// -////////////////// AUTO-GENERATED ////////////////// -//////////////////////////////////////////////////// - -#![allow(dead_code)] -#![allow(clippy::all)] - -use multiversx_sc::proxy_imports::*; - -pub struct BridgedTokensWrapperProxy; - -impl TxProxyTrait for BridgedTokensWrapperProxy -where - Env: TxEnv, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - type TxProxyMethods = BridgedTokensWrapperProxyMethods; - - fn proxy_methods(self, tx: Tx) -> Self::TxProxyMethods { - BridgedTokensWrapperProxyMethods { wrapped_tx: tx } - } -} - -pub struct BridgedTokensWrapperProxyMethods -where - Env: TxEnv, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - wrapped_tx: Tx, -} - -#[rustfmt::skip] -impl BridgedTokensWrapperProxyMethods -where - Env: TxEnv, - Env::Api: VMApi, - From: TxFrom, - Gas: TxGas, -{ - pub fn init( - self, - ) -> TxTypedDeploy { - self.wrapped_tx - .payment(NotPayable) - .raw_deploy() - .original_result() - } -} - -#[rustfmt::skip] -impl BridgedTokensWrapperProxyMethods -where - Env: TxEnv, - Env::Api: VMApi, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - pub fn upgrade( - self, - ) -> TxTypedUpgrade { - self.wrapped_tx - .payment(NotPayable) - .raw_upgrade() - .original_result() - } -} - -#[rustfmt::skip] -impl BridgedTokensWrapperProxyMethods -where - Env: TxEnv, - Env::Api: VMApi, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - pub fn add_wrapped_token< - Arg0: ProxyArg>, - Arg1: ProxyArg, - >( - self, - universal_bridged_token_ids: Arg0, - num_decimals: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("addWrappedToken") - .argument(&universal_bridged_token_ids) - .argument(&num_decimals) - .original_result() - } - - pub fn update_wrapped_token< - Arg0: ProxyArg>, - Arg1: ProxyArg, - >( - self, - universal_bridged_token_ids: Arg0, - num_decimals: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("updateWrappedToken") - .argument(&universal_bridged_token_ids) - .argument(&num_decimals) - .original_result() - } - - pub fn remove_wrapped_token< - Arg0: ProxyArg>, - >( - self, - universal_bridged_token_ids: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("removeWrappedToken") - .argument(&universal_bridged_token_ids) - .original_result() - } - - pub fn whitelist_token< - Arg0: ProxyArg>, - Arg1: ProxyArg, - Arg2: ProxyArg>, - >( - self, - chain_specific_token_id: Arg0, - chain_specific_token_decimals: Arg1, - universal_bridged_token_ids: Arg2, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("whitelistToken") - .argument(&chain_specific_token_id) - .argument(&chain_specific_token_decimals) - .argument(&universal_bridged_token_ids) - .original_result() - } - - pub fn update_whitelisted_token< - Arg0: ProxyArg>, - Arg1: ProxyArg, - >( - self, - chain_specific_token_id: Arg0, - chain_specific_token_decimals: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("updateWhitelistedToken") - .argument(&chain_specific_token_id) - .argument(&chain_specific_token_decimals) - .original_result() - } - - pub fn blacklist_token< - Arg0: ProxyArg>, - >( - self, - chain_specific_token_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("blacklistToken") - .argument(&chain_specific_token_id) - .original_result() - } - - pub fn deposit_liquidity( - self, - ) -> TxTypedCall { - self.wrapped_tx - .raw_call("depositLiquidity") - .original_result() - } - - /// Will wrap what it can, and send back the rest unchanged - pub fn wrap_tokens( - self, - ) -> TxTypedCall>> { - self.wrapped_tx - .raw_call("wrapTokens") - .original_result() - } - - pub fn unwrap_token< - Arg0: ProxyArg>, - >( - self, - requested_token: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .raw_call("unwrapToken") - .argument(&requested_token) - .original_result() - } - - pub fn unwrap_token_create_transaction< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - requested_token: Arg0, - to: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .raw_call("unwrapTokenCreateTransaction") - .argument(&requested_token) - .argument(&to) - .original_result() - } - - pub fn set_esdt_safe_contract_address< - Arg0: ProxyArg>>, - >( - self, - opt_new_address: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setEsdtSafeContractAddress") - .argument(&opt_new_address) - .original_result() - } - - pub fn universal_bridged_token_ids( - self, - ) -> TxTypedCall>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getUniversalBridgedTokenIds") - .original_result() - } - - pub fn token_liquidity< - Arg0: ProxyArg>, - >( - self, - token: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getTokenLiquidity") - .argument(&token) - .original_result() - } - - pub fn chain_specific_to_universal_mapping< - Arg0: ProxyArg>, - >( - self, - token: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getChainSpecificToUniversalMapping") - .argument(&token) - .original_result() - } - - pub fn chain_specific_token_ids< - Arg0: ProxyArg>, - >( - self, - universal_token_id: Arg0, - ) -> TxTypedCall>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getchainSpecificTokenIds") - .argument(&universal_token_id) - .original_result() - } - - pub fn esdt_safe_contract_address( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getEsdtSafeContractAddress") - .original_result() - } - - pub fn pause_endpoint( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("pause") - .original_result() - } - - pub fn unpause_endpoint( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("unpause") - .original_result() - } - - pub fn paused_status( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("isPaused") - .original_result() - } -} diff --git a/multisig/src/esdt_safe_proxy.rs b/multisig/src/esdt_safe_proxy.rs deleted file mode 100644 index 59e564f3..00000000 --- a/multisig/src/esdt_safe_proxy.rs +++ /dev/null @@ -1,828 +0,0 @@ -// Code generated by the multiversx-sc proxy generator. DO NOT EDIT. - -//////////////////////////////////////////////////// -////////////////// AUTO-GENERATED ////////////////// -//////////////////////////////////////////////////// - -#![allow(dead_code)] -#![allow(clippy::all)] - -use multiversx_sc::proxy_imports::*; - -pub struct EsdtSafeProxy; - -impl TxProxyTrait for EsdtSafeProxy -where - Env: TxEnv, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - type TxProxyMethods = EsdtSafeProxyMethods; - - fn proxy_methods(self, tx: Tx) -> Self::TxProxyMethods { - EsdtSafeProxyMethods { wrapped_tx: tx } - } -} - -pub struct EsdtSafeProxyMethods -where - Env: TxEnv, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - wrapped_tx: Tx, -} - -#[rustfmt::skip] -impl EsdtSafeProxyMethods -where - Env: TxEnv, - Env::Api: VMApi, - From: TxFrom, - Gas: TxGas, -{ - /// fee_estimator_contract_address - The address of a Price Aggregator contract, - /// which will get the price of token A in token B - /// - /// eth_tx_gas_limit - The gas limit that will be used for transactions on the ETH side. - /// Will be used to compute the fees for the transfer - pub fn init< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - Arg2: ProxyArg>, - >( - self, - fee_estimator_contract_address: Arg0, - multi_transfer_contract_address: Arg1, - eth_tx_gas_limit: Arg2, - ) -> TxTypedDeploy { - self.wrapped_tx - .payment(NotPayable) - .raw_deploy() - .argument(&fee_estimator_contract_address) - .argument(&multi_transfer_contract_address) - .argument(ð_tx_gas_limit) - .original_result() - } -} - -#[rustfmt::skip] -impl EsdtSafeProxyMethods -where - Env: TxEnv, - Env::Api: VMApi, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - pub fn upgrade< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - Arg2: ProxyArg>, - Arg3: ProxyArg>, - >( - self, - fee_estimator_contract_address: Arg0, - multi_transfer_contract_address: Arg1, - bridge_proxy_contract_address: Arg2, - eth_tx_gas_limit: Arg3, - ) -> TxTypedUpgrade { - self.wrapped_tx - .payment(NotPayable) - .raw_upgrade() - .argument(&fee_estimator_contract_address) - .argument(&multi_transfer_contract_address) - .argument(&bridge_proxy_contract_address) - .argument(ð_tx_gas_limit) - .original_result() - } -} - -#[rustfmt::skip] -impl EsdtSafeProxyMethods -where - Env: TxEnv, - Env::Api: VMApi, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - /// Sets the statuses for the transactions, after they were executed on the Ethereum side. - /// - /// Only TransactionStatus::Executed (3) and TransactionStatus::Rejected (4) values are allowed. - /// Number of provided statuses must be equal to number of transactions in the batch. - pub fn set_transaction_batch_status< - Arg0: ProxyArg, - Arg1: ProxyArg>, - >( - self, - batch_id: Arg0, - tx_statuses: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setTransactionBatchStatus") - .argument(&batch_id) - .argument(&tx_statuses) - .original_result() - } - - /// Converts failed Ethereum -> MultiversX transactions to MultiversX -> Ethereum transaction. - /// This is done every now and then to refund the tokens. - /// - /// As with normal MultiversX -> Ethereum transactions, a part of the tokens will be - /// subtracted to pay for the fees - pub fn add_refund_batch< - Arg0: ProxyArg>>, - >( - self, - refund_transactions: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .raw_call("addRefundBatch") - .argument(&refund_transactions) - .original_result() - } - - /// Create an MultiversX -> Ethereum transaction. Only fungible tokens are accepted. - /// - /// Every transfer will have a part of the tokens subtracted as fees. - /// The fee amount depends on the global eth_tx_gas_limit - /// and the current GWEI price, respective to the bridged token - /// - /// fee_amount = price_per_gas_unit * eth_tx_gas_limit - pub fn create_transaction< - Arg0: ProxyArg>, - Arg1: ProxyArg>>, - >( - self, - to: Arg0, - opt_refund_info: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .raw_call("createTransaction") - .argument(&to) - .argument(&opt_refund_info) - .original_result() - } - - pub fn create_transaction_sc_call< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - Arg2: ProxyArg>>, - >( - self, - to: Arg0, - data: Arg1, - opt_refund_address: Arg2, - ) -> TxTypedCall { - self.wrapped_tx - .raw_call("createTransactionSCCall") - .argument(&to) - .argument(&data) - .argument(&opt_refund_address) - .original_result() - } - - /// Claim funds for failed MultiversX -> Ethereum transactions. - /// These are not sent automatically to prevent the contract getting stuck. - /// For example, if the receiver is a SC, a frozen account, etc. - pub fn claim_refund< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("claimRefund") - .argument(&token_id) - .original_result() - } - - pub fn set_bridged_tokens_wrapper_contract_address< - Arg0: ProxyArg>>, - >( - self, - opt_address: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setBridgedTokensWrapperAddress") - .argument(&opt_address) - .original_result() - } - - pub fn set_bridge_proxy_contract_address< - Arg0: ProxyArg>>, - >( - self, - opt_new_address: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setBridgeProxyContractAddress") - .argument(&opt_new_address) - .original_result() - } - - pub fn withdraw_refund_fees_for_ethereum< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - multisig_owner: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("withdrawRefundFeesForEthereum") - .argument(&token_id) - .argument(&multisig_owner) - .original_result() - } - - pub fn withdraw_transaction_fees< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - multisig_owner: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("withdrawTransactionFees") - .argument(&token_id) - .argument(&multisig_owner) - .original_result() - } - - pub fn compute_total_amounts_from_index< - Arg0: ProxyArg, - Arg1: ProxyArg, - >( - self, - start_index: Arg0, - end_index: Arg1, - ) -> TxTypedCall>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("computeTotalAmmountsFromIndex") - .argument(&start_index) - .argument(&end_index) - .original_result() - } - - /// Query function that lists all refund amounts for a user. - /// Useful for knowing which token IDs to pass to the claimRefund endpoint. - pub fn get_refund_amounts< - Arg0: ProxyArg>, - >( - self, - address: Arg0, - ) -> TxTypedCall, BigUint>>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getRefundAmounts") - .argument(&address) - .original_result() - } - - pub fn get_total_refund_amounts( - self, - ) -> TxTypedCall, BigUint>>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getTotalRefundAmounts") - .original_result() - } - - pub fn get_refund_fees_for_ethereum< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getRefundFeesForEthereum") - .argument(&token_id) - .original_result() - } - - pub fn get_transaction_fees< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getTransactionFees") - .argument(&token_id) - .original_result() - } - - pub fn bridged_tokens_wrapper_address( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getBridgedTokensWrapperAddress") - .original_result() - } - - pub fn bridge_proxy_contract_address( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getBridgeProxyContractAddress") - .original_result() - } - - pub fn set_fee_estimator_contract_address< - Arg0: ProxyArg>, - >( - self, - new_address: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setFeeEstimatorContractAddress") - .argument(&new_address) - .original_result() - } - - pub fn set_eth_tx_gas_limit< - Arg0: ProxyArg>, - >( - self, - new_limit: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setEthTxGasLimit") - .argument(&new_limit) - .original_result() - } - - /// Default price being used if the aggregator lacks a mapping for this token - /// or the aggregator address is not set - pub fn set_default_price_per_gas_unit< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - default_price_per_gas_unit: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setDefaultPricePerGasUnit") - .argument(&token_id) - .argument(&default_price_per_gas_unit) - .original_result() - } - - /// Token ticker being used when querying the aggregator for GWEI prices - pub fn set_token_ticker< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - ticker: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setTokenTicker") - .argument(&token_id) - .argument(&ticker) - .original_result() - } - - /// Returns the fee for the given token ID (the fee amount is in the given token) - pub fn calculate_required_fee< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("calculateRequiredFee") - .argument(&token_id) - .original_result() - } - - pub fn fee_estimator_contract_address( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getFeeEstimatorContractAddress") - .original_result() - } - - pub fn default_price_per_gas_unit< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getDefaultPricePerGasUnit") - .argument(&token_id) - .original_result() - } - - pub fn eth_tx_gas_limit( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getEthTxGasLimit") - .original_result() - } - - /// Distributes the accumulated fees to the given addresses. - /// Expected arguments are pairs of (address, percentage), - /// where percentages must add up to the PERCENTAGE_TOTAL constant - pub fn distribute_fees< - Arg0: ProxyArg>>, - >( - self, - address_percentage_pairs: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("distributeFees") - .argument(&address_percentage_pairs) - .original_result() - } - - pub fn add_token_to_whitelist< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - Arg2: ProxyArg, - Arg3: ProxyArg, - Arg4: ProxyArg>, - Arg5: ProxyArg>, - Arg6: ProxyArg>, - Arg7: ProxyArg>>, - >( - self, - token_id: Arg0, - ticker: Arg1, - mint_burn_token: Arg2, - native_token: Arg3, - total_balance: Arg4, - mint_balance: Arg5, - burn_balance: Arg6, - opt_default_price_per_gas_unit: Arg7, - ) -> TxTypedCall { - self.wrapped_tx - .raw_call("addTokenToWhitelist") - .argument(&token_id) - .argument(&ticker) - .argument(&mint_burn_token) - .argument(&native_token) - .argument(&total_balance) - .argument(&mint_balance) - .argument(&burn_balance) - .argument(&opt_default_price_per_gas_unit) - .original_result() - } - - pub fn remove_token_from_whitelist< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("removeTokenFromWhitelist") - .argument(&token_id) - .original_result() - } - - pub fn get_tokens< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - amount: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getTokens") - .argument(&token_id) - .argument(&amount) - .original_result() - } - - pub fn init_supply< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - amount: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .raw_call("initSupply") - .argument(&token_id) - .argument(&amount) - .original_result() - } - - pub fn init_supply_mint_burn< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - Arg2: ProxyArg>, - >( - self, - token_id: Arg0, - mint_amount: Arg1, - burn_amount: Arg2, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("initSupplyMintBurn") - .argument(&token_id) - .argument(&mint_amount) - .argument(&burn_amount) - .original_result() - } - - pub fn set_multi_transfer_contract_address< - Arg0: ProxyArg>>, - >( - self, - opt_new_address: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setMultiTransferContractAddress") - .argument(&opt_new_address) - .original_result() - } - - pub fn token_whitelist( - self, - ) -> TxTypedCall>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getAllKnownTokens") - .original_result() - } - - pub fn native_token< - Arg0: ProxyArg>, - >( - self, - token: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("isNativeToken") - .argument(&token) - .original_result() - } - - pub fn mint_burn_token< - Arg0: ProxyArg>, - >( - self, - token: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("isMintBurnToken") - .argument(&token) - .original_result() - } - - pub fn multi_transfer_contract_address( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getMultiTransferContractAddress") - .original_result() - } - - pub fn accumulated_transaction_fees< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getAccumulatedTransactionFees") - .argument(&token_id) - .original_result() - } - - pub fn total_balances< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getTotalBalances") - .argument(&token_id) - .original_result() - } - - pub fn mint_balances< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getMintBalances") - .argument(&token_id) - .original_result() - } - - pub fn burn_balances< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getBurnBalances") - .argument(&token_id) - .original_result() - } - - pub fn set_max_tx_batch_size< - Arg0: ProxyArg, - >( - self, - new_max_tx_batch_size: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setMaxTxBatchSize") - .argument(&new_max_tx_batch_size) - .original_result() - } - - pub fn set_max_tx_batch_block_duration< - Arg0: ProxyArg, - >( - self, - new_max_tx_batch_block_duration: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setMaxTxBatchBlockDuration") - .argument(&new_max_tx_batch_block_duration) - .original_result() - } - - pub fn get_current_tx_batch( - self, - ) -> TxTypedCall, ManagedBuffer, TokenIdentifier, BigUint>>>>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getCurrentTxBatch") - .original_result() - } - - pub fn get_first_batch_any_status( - self, - ) -> TxTypedCall, ManagedBuffer, TokenIdentifier, BigUint>>>>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getFirstBatchAnyStatus") - .original_result() - } - - pub fn get_batch< - Arg0: ProxyArg, - >( - self, - batch_id: Arg0, - ) -> TxTypedCall, ManagedBuffer, TokenIdentifier, BigUint>>>>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getBatch") - .argument(&batch_id) - .original_result() - } - - pub fn get_batch_status< - Arg0: ProxyArg, - >( - self, - batch_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getBatchStatus") - .argument(&batch_id) - .original_result() - } - - pub fn first_batch_id( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getFirstBatchId") - .original_result() - } - - pub fn last_batch_id( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getLastBatchId") - .original_result() - } - - pub fn set_max_bridged_amount< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - max_amount: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setMaxBridgedAmount") - .argument(&token_id) - .argument(&max_amount) - .original_result() - } - - pub fn max_bridged_amount< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getMaxBridgedAmount") - .argument(&token_id) - .original_result() - } - - pub fn pause_endpoint( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("pause") - .original_result() - } - - pub fn unpause_endpoint( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("unpause") - .original_result() - } - - pub fn paused_status( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("isPaused") - .original_result() - } -} - -#[type_abi] -#[derive(TopEncode, TopDecode, NestedEncode, NestedDecode, Clone, ManagedVecItem, PartialEq)] -pub struct RefundInfo -where - Api: ManagedTypeApi, -{ - pub address: ManagedAddress, - pub initial_batch_id: u64, - pub initial_nonce: u64, -} diff --git a/multisig/src/events.rs b/multisig/src/events.rs index a1526a3d..ee6aeba5 100644 --- a/multisig/src/events.rs +++ b/multisig/src/events.rs @@ -22,9 +22,27 @@ pub trait EventsModule { #[event("addUnprocessedRefundTxToBatchEvent")] fn add_unprocessed_refund_tx_to_batch_event(&self, #[indexed] tx_id: u64); + #[event("pauseEsdtSafeEvent")] + fn pause_esdt_safe_event(&self); + + #[event("unpauseEsdtSafeEvent")] + fn unpause_esdt_safe_event(&self); + #[event("pauseBridgeProxyEvent")] fn pause_bridge_proxy_event(&self); #[event("unpauseBridgeProxyEvent")] fn unpause_bridge_proxy_event(&self); + + #[event("pauseBridgedTokensWrapperEvent")] + fn pause_bridged_tokens_wrapper_event(&self); + + #[event("unpauseBridgedTokensWrapperEvent")] + fn unpause_bridged_tokens_wrapper_event(&self); + + #[event("pauseMultiTransferEsdtEvent")] + fn pause_multi_transfer_esdt_event(&self); + + #[event("unpauseMultiTransferEsdtEvent")] + fn unpause_multi_transfer_esdt_event(&self); } diff --git a/multisig/src/lib.rs b/multisig/src/lib.rs index d8aecf3a..2e7584d6 100644 --- a/multisig/src/lib.rs +++ b/multisig/src/lib.rs @@ -40,7 +40,8 @@ pub trait Multisig: &self, esdt_safe_sc_address: ManagedAddress, multi_transfer_sc_address: ManagedAddress, - proxy_sc_address: ManagedAddress, + bridge_proxy_sc_address: ManagedAddress, + bridged_tokens_wrapper_sc_address: ManagedAddress, required_stake: BigUint, slash_amount: BigUint, quorum: usize, @@ -83,10 +84,19 @@ pub trait Multisig: .set(&multi_transfer_sc_address); require!( - self.blockchain().is_smart_contract(&proxy_sc_address), - "Proxy address is not a Smart Contract address" + self.blockchain() + .is_smart_contract(&bridge_proxy_sc_address), + "Bridge Proxy address is not a Smart Contract address" + ); + self.bridge_proxy_address().set(&bridge_proxy_sc_address); + + require!( + self.blockchain() + .is_smart_contract(&bridged_tokens_wrapper_sc_address), + "Bridged Tokens Wrapper address is not a Smart Contract address" ); - self.proxy_address().set(&proxy_sc_address); + self.bridged_tokens_wrapper_address() + .set(&bridged_tokens_wrapper_sc_address); self.set_paused(true); } @@ -96,7 +106,8 @@ pub trait Multisig: &self, esdt_safe_sc_address: ManagedAddress, multi_transfer_sc_address: ManagedAddress, - proxy_sc_address: ManagedAddress, + bridge_proxy_sc_address: ManagedAddress, + bridged_tokens_wrapper_sc_address: ManagedAddress, ) { require!( self.blockchain().is_smart_contract(&esdt_safe_sc_address), @@ -113,10 +124,19 @@ pub trait Multisig: .set(&multi_transfer_sc_address); require!( - self.blockchain().is_smart_contract(&proxy_sc_address), - "Proxy address is not a Smart Contract address" + self.blockchain() + .is_smart_contract(&bridge_proxy_sc_address), + "Bridge Proxy address is not a Smart Contract address" + ); + self.bridge_proxy_address().set(&bridge_proxy_sc_address); + + require!( + self.blockchain() + .is_smart_contract(&bridged_tokens_wrapper_sc_address), + "Bridged Tokens Wrapper address is not a Smart Contract address" ); - self.proxy_address().set(&proxy_sc_address); + self.bridged_tokens_wrapper_address() + .set(&bridged_tokens_wrapper_sc_address); self.set_paused(true); } diff --git a/multisig/src/multisig_proxy.rs b/multisig/src/multisig_proxy.rs deleted file mode 100644 index a652c8ba..00000000 --- a/multisig/src/multisig_proxy.rs +++ /dev/null @@ -1,1185 +0,0 @@ -// Code generated by the multiversx-sc proxy generator. DO NOT EDIT. - -//////////////////////////////////////////////////// -////////////////// AUTO-GENERATED ////////////////// -//////////////////////////////////////////////////// - -#![allow(dead_code)] -#![allow(clippy::all)] - -use multiversx_sc::proxy_imports::*; - -pub struct MultisigProxy; - -impl TxProxyTrait for MultisigProxy -where - Env: TxEnv, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - type TxProxyMethods = MultisigProxyMethods; - - fn proxy_methods(self, tx: Tx) -> Self::TxProxyMethods { - MultisigProxyMethods { wrapped_tx: tx } - } -} - -pub struct MultisigProxyMethods -where - Env: TxEnv, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - wrapped_tx: Tx, -} - -#[rustfmt::skip] -impl MultisigProxyMethods -where - Env: TxEnv, - Env::Api: VMApi, - From: TxFrom, - Gas: TxGas, -{ - /// EsdtSafe and MultiTransferEsdt are expected to be deployed and configured separately, - /// and then having their ownership changed to this Multisig SC. - pub fn init< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - Arg2: ProxyArg>, - Arg3: ProxyArg>, - Arg4: ProxyArg>, - Arg5: ProxyArg, - Arg6: ProxyArg>>, - >( - self, - esdt_safe_sc_address: Arg0, - multi_transfer_sc_address: Arg1, - proxy_sc_address: Arg2, - required_stake: Arg3, - slash_amount: Arg4, - quorum: Arg5, - board: Arg6, - ) -> TxTypedDeploy { - self.wrapped_tx - .payment(NotPayable) - .raw_deploy() - .argument(&esdt_safe_sc_address) - .argument(&multi_transfer_sc_address) - .argument(&proxy_sc_address) - .argument(&required_stake) - .argument(&slash_amount) - .argument(&quorum) - .argument(&board) - .original_result() - } -} - -#[rustfmt::skip] -impl MultisigProxyMethods -where - Env: TxEnv, - Env::Api: VMApi, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - pub fn upgrade< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - Arg2: ProxyArg>, - >( - self, - esdt_safe_sc_address: Arg0, - multi_transfer_sc_address: Arg1, - proxy_sc_address: Arg2, - ) -> TxTypedUpgrade { - self.wrapped_tx - .payment(NotPayable) - .raw_upgrade() - .argument(&esdt_safe_sc_address) - .argument(&multi_transfer_sc_address) - .argument(&proxy_sc_address) - .original_result() - } -} - -#[rustfmt::skip] -impl MultisigProxyMethods -where - Env: TxEnv, - Env::Api: VMApi, - From: TxFrom, - To: TxTo, - Gas: TxGas, -{ - /// Distributes the accumulated fees to the given addresses. - /// Expected arguments are pairs of (address, percentage), - /// where percentages must add up to the PERCENTAGE_TOTAL constant - pub fn distribute_fees_from_child_contracts< - Arg0: ProxyArg, u32>>>, - >( - self, - dest_address_percentage_pairs: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("distributeFeesFromChildContracts") - .argument(&dest_address_percentage_pairs) - .original_result() - } - - /// Board members have to stake a certain amount of EGLD - /// before being allowed to sign actions - pub fn stake( - self, - ) -> TxTypedCall { - self.wrapped_tx - .raw_call("stake") - .original_result() - } - - pub fn unstake< - Arg0: ProxyArg>, - >( - self, - amount: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("unstake") - .argument(&amount) - .original_result() - } - - /// After a batch is processed on the Ethereum side, - /// the EsdtSafe expects a list of statuses of said transactions (success or failure). - /// - /// This endpoint proposes an action to set the statuses to a certain list of values. - /// Nothing is changed in the EsdtSafe contract until the action is signed and executed. - pub fn propose_esdt_safe_set_current_transaction_batch_status< - Arg0: ProxyArg, - Arg1: ProxyArg>, - >( - self, - esdt_safe_batch_id: Arg0, - tx_batch_status: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("proposeEsdtSafeSetCurrentTransactionBatchStatus") - .argument(&esdt_safe_batch_id) - .argument(&tx_batch_status) - .original_result() - } - - /// Proposes a batch of Ethereum -> MultiversX transfers. - /// Transactions have to be separated by fields, in the following order: - /// Sender Address, Destination Address, Token ID, Amount, Tx Nonce - pub fn propose_multi_transfer_esdt_batch< - Arg0: ProxyArg, - Arg1: ProxyArg, ManagedAddress, TokenIdentifier, BigUint, u64, ManagedOption>>>>, - >( - self, - eth_batch_id: Arg0, - transfers: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("proposeMultiTransferEsdtBatch") - .argument(ð_batch_id) - .argument(&transfers) - .original_result() - } - - /// Failed Ethereum -> MultiversX transactions are saved in the MultiTransfer SC - /// as "refund transactions", and stored in batches, using the same mechanism as EsdtSafe. - /// - /// This function moves the first refund batch into the EsdtSafe SC, - /// converting the transactions into MultiversX -> Ethereum transactions - /// and adding them into EsdtSafe batches - pub fn move_refund_batch_to_safe_from_child_contract( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("moveRefundBatchToSafeFromChildContract") - .original_result() - } - - pub fn init_supply_from_child_contract< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - amount: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .raw_call("initSupplyFromChildContract") - .argument(&token_id) - .argument(&amount) - .original_result() - } - - pub fn add_unprocessed_refund_tx_to_batch< - Arg0: ProxyArg, - >( - self, - tx_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("addUnprocessedRefundTxToBatch") - .argument(&tx_id) - .original_result() - } - - pub fn withdraw_refund_fees_for_ethereum< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("withdrawRefundFeesForEthereum") - .argument(&token_id) - .original_result() - } - - pub fn withdraw_transaction_fees< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("withdrawTransactionFees") - .argument(&token_id) - .original_result() - } - - pub fn withdraw_slashed_amount( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("withdrawSlashedAmount") - .original_result() - } - - /// Proposers and board members use this to launch signed actions. - pub fn perform_action_endpoint< - Arg0: ProxyArg, - >( - self, - action_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("performAction") - .argument(&action_id) - .original_result() - } - - /// Used by board members to sign actions. - pub fn sign< - Arg0: ProxyArg, - >( - self, - action_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("sign") - .argument(&action_id) - .original_result() - } - - pub fn upgrade_child_contract_from_source< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - Arg2: ProxyArg, - Arg3: ProxyArg>>, - >( - self, - child_sc_address: Arg0, - source_address: Arg1, - is_payable: Arg2, - init_args: Arg3, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("upgradeChildContractFromSource") - .argument(&child_sc_address) - .argument(&source_address) - .argument(&is_payable) - .argument(&init_args) - .original_result() - } - - pub fn add_board_member_endpoint< - Arg0: ProxyArg>, - >( - self, - board_member: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("addBoardMember") - .argument(&board_member) - .original_result() - } - - pub fn remove_user< - Arg0: ProxyArg>, - >( - self, - board_member: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("removeUser") - .argument(&board_member) - .original_result() - } - - /// Cuts a fixed amount from a board member's stake. - /// This should be used only in cases where the board member - /// is being actively malicious. - /// - /// After stake is cut, the board member would have to stake again - /// to be able to sign actions. - pub fn slash_board_member< - Arg0: ProxyArg>, - >( - self, - board_member: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("slashBoardMember") - .argument(&board_member) - .original_result() - } - - pub fn change_quorum< - Arg0: ProxyArg, - >( - self, - new_quorum: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("changeQuorum") - .argument(&new_quorum) - .original_result() - } - - /// Maps an ESDT token to an ERC20 address. Used by relayers. - pub fn add_mapping< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - erc20_address: Arg0, - token_id: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("addMapping") - .argument(&erc20_address) - .argument(&token_id) - .original_result() - } - - pub fn clear_mapping< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - erc20_address: Arg0, - token_id: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("clearMapping") - .argument(&erc20_address) - .argument(&token_id) - .original_result() - } - - pub fn pause_esdt_safe( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("pauseEsdtSafe") - .original_result() - } - - pub fn unpause_esdt_safe( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("unpauseEsdtSafe") - .original_result() - } - - pub fn init_supply_esdt_safe< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - amount: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .raw_call("initSupplyEsdtSafe") - .argument(&token_id) - .argument(&amount) - .original_result() - } - - pub fn init_supply_mint_burn_esdt_safe< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - Arg2: ProxyArg>, - >( - self, - token_id: Arg0, - mint_amount: Arg1, - burn_amount: Arg2, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("initSupplyMintBurnEsdtSafe") - .argument(&token_id) - .argument(&mint_amount) - .argument(&burn_amount) - .original_result() - } - - pub fn pause_proxy( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("pauseProxy") - .original_result() - } - - pub fn unpause_proxy( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("unpauseProxy") - .original_result() - } - - pub fn change_fee_estimator_contract_address< - Arg0: ProxyArg>, - >( - self, - new_address: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("changeFeeEstimatorContractAddress") - .argument(&new_address) - .original_result() - } - - /// Sets the gas limit being used for Ethereum transactions - /// This is used in the EsdtSafe contract to determine the fee amount - /// - /// fee_amount = eth_gas_limit * price_per_gas_unit - /// - /// where price_per_gas_unit is queried from the aggregator (fee estimator SC) - pub fn change_multiversx_to_eth_gas_limit< - Arg0: ProxyArg>, - >( - self, - new_gas_limit: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("changeMultiversXToEthGasLimit") - .argument(&new_gas_limit) - .original_result() - } - - /// Default price being used if the aggregator lacks a mapping for this token - /// or the aggregator address is not set - pub fn change_default_price_per_gas_unit< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - new_value: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("changeDefaultPricePerGasUnit") - .argument(&token_id) - .argument(&new_value) - .original_result() - } - - /// Token ticker being used when querying the aggregator for GWEI prices - pub fn change_token_ticker< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - new_ticker: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("changeTokenTicker") - .argument(&token_id) - .argument(&new_ticker) - .original_result() - } - - pub fn esdt_safe_add_token_to_whitelist< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - Arg2: ProxyArg, - Arg3: ProxyArg, - Arg4: ProxyArg>, - Arg5: ProxyArg>, - Arg6: ProxyArg>, - Arg7: ProxyArg>>, - >( - self, - token_id: Arg0, - ticker: Arg1, - mint_burn_allowed: Arg2, - is_native_token: Arg3, - total_balance: Arg4, - mint_balance: Arg5, - burn_balance: Arg6, - opt_default_price_per_gas_unit: Arg7, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("esdtSafeAddTokenToWhitelist") - .argument(&token_id) - .argument(&ticker) - .argument(&mint_burn_allowed) - .argument(&is_native_token) - .argument(&total_balance) - .argument(&mint_balance) - .argument(&burn_balance) - .argument(&opt_default_price_per_gas_unit) - .original_result() - } - - pub fn set_multi_transfer_on_esdt_safe( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setMultiTransferOnEsdtSafe") - .original_result() - } - - pub fn set_esdt_safe_on_multi_transfer( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("setEsdtSafeOnMultiTransfer") - .original_result() - } - - pub fn esdt_safe_remove_token_from_whitelist< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("esdtSafeRemoveTokenFromWhitelist") - .argument(&token_id) - .original_result() - } - - /// Sets maximum batch size for the EsdtSafe SC. - /// If a batch reaches this amount of transactions, it is considered full, - /// and a new incoming transaction will be put into a new batch. - pub fn esdt_safe_set_max_tx_batch_size< - Arg0: ProxyArg, - >( - self, - new_max_tx_batch_size: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("esdtSafeSetMaxTxBatchSize") - .argument(&new_max_tx_batch_size) - .original_result() - } - - /// Sets the maximum block duration in which an EsdtSafe batch accepts transactions - /// For a batch to be considered "full", it has to either reach `maxTxBatchSize` transactions, - /// or have txBatchBlockDuration blocks pass since the first tx was added in the batch - pub fn esdt_safe_set_max_tx_batch_block_duration< - Arg0: ProxyArg, - >( - self, - new_max_tx_batch_block_duration: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("esdtSafeSetMaxTxBatchBlockDuration") - .argument(&new_max_tx_batch_block_duration) - .original_result() - } - - /// Sets the maximum bridged amount for the token for the MultiversX -> Ethereum direction. - /// Any attempt to transfer over this amount will be rejected. - pub fn esdt_safe_set_max_bridged_amount_for_token< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - max_amount: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("esdtSafeSetMaxBridgedAmountForToken") - .argument(&token_id) - .argument(&max_amount) - .original_result() - } - - /// Same as the function above, but for Ethereum -> MultiversX transactions. - pub fn multi_transfer_esdt_set_max_bridged_amount_for_token< - Arg0: ProxyArg>, - Arg1: ProxyArg>, - >( - self, - token_id: Arg0, - max_amount: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("multiTransferEsdtSetMaxBridgedAmountForToken") - .argument(&token_id) - .argument(&max_amount) - .original_result() - } - - /// Any failed Ethereum -> MultiversX transactions are added into so-called "refund batches\ - /// This configures the size of a batch. - pub fn multi_transfer_esdt_set_max_refund_tx_batch_size< - Arg0: ProxyArg, - >( - self, - new_max_tx_batch_size: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("multiTransferEsdtSetMaxRefundTxBatchSize") - .argument(&new_max_tx_batch_size) - .original_result() - } - - /// Max block duration for refund batches. Default is "infinite" (u64::MAX) - /// and only max batch size matters - pub fn multi_transfer_esdt_set_max_refund_tx_batch_block_duration< - Arg0: ProxyArg, - >( - self, - new_max_tx_batch_block_duration: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("multiTransferEsdtSetMaxRefundTxBatchBlockDuration") - .argument(&new_max_tx_batch_block_duration) - .original_result() - } - - /// Sets the wrapping contract address. - /// This contract is used to map multiple tokens to a universal one. - /// Useful in cases where a single token (USDC for example) - /// is being transferred from multiple chains. - /// - /// They will all have different token IDs, but can be swapped 1:1 in the wrapping SC. - /// The wrapping is done automatically, so the user only receives the universal token. - pub fn multi_transfer_esdt_set_wrapping_contract_address< - Arg0: ProxyArg>>, - >( - self, - opt_wrapping_contract_address: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("multiTransferEsdtSetWrappingContractAddress") - .argument(&opt_wrapping_contract_address) - .original_result() - } - - /// Minimum number of signatures needed to perform any action. - pub fn quorum( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getQuorum") - .original_result() - } - - /// Denormalized board member count. - /// It is kept in sync with the user list by the contract. - pub fn num_board_members( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getNumBoardMembers") - .original_result() - } - - /// The required amount to stake for accepting relayer position - pub fn required_stake_amount( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getRequiredStakeAmount") - .original_result() - } - - /// Staked amount by each board member. - pub fn amount_staked< - Arg0: ProxyArg>, - >( - self, - board_member_address: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getAmountStaked") - .argument(&board_member_address) - .original_result() - } - - /// Amount of stake slashed if a relayer is misbehaving - pub fn slash_amount( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getSlashAmount") - .original_result() - } - - /// Total slashed tokens accumulated - pub fn slashed_tokens_amount( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getSlashedTokensAmount") - .original_result() - } - - pub fn last_executed_eth_batch_id( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getLastExecutedEthBatchId") - .original_result() - } - - pub fn last_executed_eth_tx_id( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getLastExecutedEthTxId") - .original_result() - } - - /// Mapping between ERC20 Ethereum address and MultiversX ESDT Token Identifiers - pub fn erc20_address_for_token_id< - Arg0: ProxyArg>, - >( - self, - token_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getErc20AddressForTokenId") - .argument(&token_id) - .original_result() - } - - pub fn token_id_for_erc20_address< - Arg0: ProxyArg>, - >( - self, - erc20_address: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getTokenIdForErc20Address") - .argument(&erc20_address) - .original_result() - } - - pub fn esdt_safe_address( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getEsdtSafeAddress") - .original_result() - } - - pub fn multi_transfer_esdt_address( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getMultiTransferEsdtAddress") - .original_result() - } - - pub fn proxy_address( - self, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getProxyAddress") - .original_result() - } - - /// Returns the current EsdtSafe batch. - /// - /// First result is the batch ID, then pairs of 6 results, representing transactions - /// split by fields: - /// - /// Block Nonce, Tx Nonce, Sender Address, Receiver Address, Token ID, Amount - pub fn get_current_tx_batch( - self, - ) -> TxTypedCall, ManagedBuffer, TokenIdentifier, BigUint>>>>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getCurrentTxBatch") - .original_result() - } - - /// Returns the EsdtSafe batch that has the provided batch_id. - /// - /// First result is the batch ID, then pairs of 6 results, representing transactions - /// split by fields: - /// - /// Block Nonce, Tx Nonce, Sender Address, Receiver Address, Token ID, Amount - pub fn get_batch< - Arg0: ProxyArg, - >( - self, - batch_id: Arg0, - ) -> TxTypedCall, ManagedBuffer, TokenIdentifier, BigUint>>>>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getBatch") - .argument(&batch_id) - .original_result() - } - - /// Returns a batch of failed Ethereum -> MultiversX transactions. - /// The result format is the same as getCurrentTxBatch - pub fn get_current_refund_batch( - self, - ) -> TxTypedCall, ManagedBuffer, TokenIdentifier, BigUint>>>>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getCurrentRefundBatch") - .original_result() - } - - /// Actions are cleared after execution, so an empty entry means the action was executed already - /// Returns "false" if the action ID is invalid - pub fn was_action_executed< - Arg0: ProxyArg, - >( - self, - action_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("wasActionExecuted") - .argument(&action_id) - .original_result() - } - - /// Used for Ethereum -> MultiversX batches. - /// If the mapping was made, it means that the transfer action was proposed in the past. - /// To check if it was executed as well, use the wasActionExecuted view - pub fn was_transfer_action_proposed< - Arg0: ProxyArg, - Arg1: ProxyArg, ManagedAddress, TokenIdentifier, BigUint, u64, ManagedOption>>>>, - >( - self, - eth_batch_id: Arg0, - transfers: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("wasTransferActionProposed") - .argument(ð_batch_id) - .argument(&transfers) - .original_result() - } - - /// Used for Ethereum -> MultiversX batches. - /// If `wasActionExecuted` returns true, then this can be used to get the action ID. - /// Will return 0 if the transfers were not proposed - pub fn get_action_id_for_transfer_batch< - Arg0: ProxyArg, - Arg1: ProxyArg, ManagedAddress, TokenIdentifier, BigUint, u64, ManagedOption>>>>, - >( - self, - eth_batch_id: Arg0, - transfers: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getActionIdForTransferBatch") - .argument(ð_batch_id) - .argument(&transfers) - .original_result() - } - - /// Used for MultiversX -> Ethereum batches. - /// Returns "true" if an action was already proposed for the given batch, - /// with these exact transaction statuses, in this exact order - pub fn was_set_current_transaction_batch_status_action_proposed< - Arg0: ProxyArg, - Arg1: ProxyArg>, - >( - self, - esdt_safe_batch_id: Arg0, - expected_tx_batch_status: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("wasSetCurrentTransactionBatchStatusActionProposed") - .argument(&esdt_safe_batch_id) - .argument(&expected_tx_batch_status) - .original_result() - } - - /// If `wasSetCurrentTransactionBatchStatusActionProposed` return true, - /// this can be used to get the action ID. - /// Will return 0 if the set status action was not proposed - pub fn get_action_id_for_set_current_transaction_batch_status< - Arg0: ProxyArg, - Arg1: ProxyArg>, - >( - self, - esdt_safe_batch_id: Arg0, - expected_tx_batch_status: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getActionIdForSetCurrentTransactionBatchStatus") - .argument(&esdt_safe_batch_id) - .argument(&expected_tx_batch_status) - .original_result() - } - - /// Returns `true` (`1`) if the user has signed the action. - /// Does not check whether or not the user is still a board member and the signature valid. - pub fn signed< - Arg0: ProxyArg>, - Arg1: ProxyArg, - >( - self, - user: Arg0, - action_id: Arg1, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("signed") - .argument(&user) - .argument(&action_id) - .original_result() - } - - /// Indicates user rights. - /// `0` = no rights, - /// `1` = can propose. Can also sign if they have enough stake. - pub fn user_role< - Arg0: ProxyArg>, - >( - self, - user: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("userRole") - .argument(&user) - .original_result() - } - - /// Lists all board members - pub fn get_all_board_members( - self, - ) -> TxTypedCall>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getAllBoardMembers") - .original_result() - } - - /// Lists all board members that staked the correct amount. - /// A board member with not enough stake can propose, but cannot sign. - pub fn get_all_staked_relayers( - self, - ) -> TxTypedCall>> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getAllStakedRelayers") - .original_result() - } - - /// Gets the number of signatures for the action with the given ID - pub fn get_action_signer_count< - Arg0: ProxyArg, - >( - self, - action_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getActionSignerCount") - .argument(&action_id) - .original_result() - } - - /// It is possible for board members to lose their role. - /// They are not automatically removed from all actions when doing so, - /// therefore the contract needs to re-check every time when actions are performed. - /// This function is used to validate the signers before performing an action. - /// It also makes it easy to check before performing an action. - pub fn get_action_valid_signer_count< - Arg0: ProxyArg, - >( - self, - action_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getActionValidSignerCount") - .argument(&action_id) - .original_result() - } - - /// Returns `true` (`1`) if `getActionValidSignerCount >= getQuorum`. - pub fn quorum_reached< - Arg0: ProxyArg, - >( - self, - action_id: Arg0, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("quorumReached") - .argument(&action_id) - .original_result() - } - - /// The index of the last proposed action. - /// 0 means that no action was ever proposed yet. - pub fn get_action_last_index( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getActionLastIndex") - .original_result() - } - - /// Serialized action data of an action with index. - pub fn get_action_data< - Arg0: ProxyArg, - >( - self, - action_id: Arg0, - ) -> TxTypedCall> { - self.wrapped_tx - .payment(NotPayable) - .raw_call("getActionData") - .argument(&action_id) - .original_result() - } - - pub fn pause_endpoint( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("pause") - .original_result() - } - - pub fn unpause_endpoint( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("unpause") - .original_result() - } - - pub fn paused_status( - self, - ) -> TxTypedCall { - self.wrapped_tx - .payment(NotPayable) - .raw_call("isPaused") - .original_result() - } -} - -#[type_abi] -#[derive(TopEncode, TopDecode, Clone, Copy, PartialEq)] -pub enum UserRole { - None, - BoardMember, -} - -#[rustfmt::skip] -#[type_abi] -#[derive(NestedEncode, NestedDecode, TopEncode, TopDecode)] -pub enum Action -where - Api: ManagedTypeApi, -{ - Nothing, - SetCurrentTransactionBatchStatus { - esdt_safe_batch_id: u64, - tx_batch_status: ManagedVec, - }, - BatchTransferEsdtToken { - eth_batch_id: u64, - transfers: ManagedVec>, - }, -} diff --git a/multisig/src/setup.rs b/multisig/src/setup.rs index 848bf094..978beb0a 100644 --- a/multisig/src/setup.rs +++ b/multisig/src/setup.rs @@ -1,7 +1,10 @@ use multiversx_sc::imports::*; use eth_address::EthAddress; -use sc_proxies::{bridge_proxy_contract_proxy, esdt_safe_proxy, multi_transfer_esdt_proxy}; +use sc_proxies::{ + bridge_proxy_contract_proxy, bridged_tokens_wrapper_proxy, esdt_safe_proxy, + multi_transfer_esdt_proxy, +}; #[multiversx_sc::module] pub trait SetupModule: @@ -130,33 +133,6 @@ pub trait SetupModule: self.clear_mapping_event(erc20_address, token_id); } - #[only_owner] - #[endpoint(pauseEsdtSafe)] - fn pause_esdt_safe(&self) { - let esdt_safe_addr = self.esdt_safe_address().get(); - - self.tx() - .to(esdt_safe_addr) - .typed(esdt_safe_proxy::EsdtSafeProxy) - .pause_endpoint() - .sync_call(); - - self.pause_bridge_proxy_event(); - } - - #[only_owner] - #[endpoint(unpauseEsdtSafe)] - fn unpause_esdt_safe(&self) { - let esdt_safe_addr = self.esdt_safe_address().get(); - - self.tx() - .to(esdt_safe_addr) - .typed(esdt_safe_proxy::EsdtSafeProxy) - .unpause_endpoint() - .sync_call(); - self.unpause_bridge_proxy_event(); - } - #[only_owner] #[payable("*")] #[endpoint(initSupplyEsdtSafe)] @@ -189,34 +165,6 @@ pub trait SetupModule: .sync_call(); } - #[only_owner] - #[endpoint(pauseProxy)] - fn pause_proxy(&self) { - let proxy_addr = self.proxy_address().get(); - - self.tx() - .to(proxy_addr) - .typed(bridge_proxy_contract_proxy::BridgeProxyContractProxy) - .pause_endpoint() - .sync_call(); - - self.pause_bridge_proxy_event(); - } - - #[only_owner] - #[endpoint(unpauseProxy)] - fn unpause_proxy(&self) { - let proxy_addr = self.proxy_address().get(); - - self.tx() - .to(proxy_addr) - .typed(bridge_proxy_contract_proxy::BridgeProxyContractProxy) - .unpause_endpoint() - .sync_call(); - - self.unpause_bridge_proxy_event(); - } - #[only_owner] #[endpoint(changeFeeEstimatorContractAddress)] fn change_fee_estimator_contract_address(&self, new_address: ManagedAddress) { @@ -455,4 +403,117 @@ pub trait SetupModule: .set_wrapping_contract_address(opt_wrapping_contract_address) .sync_call(); } + + // Pause/Unpause endpoints + + #[only_owner] + #[endpoint(pauseProcessing)] + fn pause_processing(&self) { + self.pause_endpoint(); + } + + #[only_owner] + #[endpoint(unpauseProcessing)] + fn unpause_processing(&self) { + self.unpause_endpoint(); + } + + #[only_owner] + #[endpoint(pauseDeposits)] + fn pause_deposits(&self) { + self.pause_esdt_safe(); + self.pause_bridge_proxy(); + self.pause_bridged_tokens_wrapper(); + } + + #[only_owner] + #[endpoint(unpauseDeposits)] + fn unpause_deposits(&self) { + self.unpause_esdt_safe(); + self.unpause_bridge_proxy(); + self.unpause_bridged_tokens_wrapper(); + } + + #[only_owner] + #[endpoint(pauseEsdtSafe)] + fn pause_esdt_safe(&self) { + let esdt_safe_addr = self.esdt_safe_address().get(); + + self.tx() + .to(esdt_safe_addr) + .typed(esdt_safe_proxy::EsdtSafeProxy) + .pause_endpoint() + .sync_call(); + + self.pause_esdt_safe_event(); + } + + #[only_owner] + #[endpoint(unpauseEsdtSafe)] + fn unpause_esdt_safe(&self) { + let esdt_safe_addr = self.esdt_safe_address().get(); + + self.tx() + .to(esdt_safe_addr) + .typed(esdt_safe_proxy::EsdtSafeProxy) + .unpause_endpoint() + .sync_call(); + self.unpause_esdt_safe_event(); + } + + #[only_owner] + #[endpoint(pauseBridgeProxy)] + fn pause_bridge_proxy(&self) { + let proxy_addr = self.bridge_proxy_address().get(); + + self.tx() + .to(proxy_addr) + .typed(bridge_proxy_contract_proxy::BridgeProxyContractProxy) + .pause_endpoint() + .sync_call(); + + self.pause_bridge_proxy_event(); + } + + #[only_owner] + #[endpoint(unpauseBridgeProxy)] + fn unpause_bridge_proxy(&self) { + let proxy_addr = self.bridge_proxy_address().get(); + + self.tx() + .to(proxy_addr) + .typed(bridge_proxy_contract_proxy::BridgeProxyContractProxy) + .unpause_endpoint() + .sync_call(); + + self.unpause_bridge_proxy_event(); + } + + #[only_owner] + #[endpoint(pauseBridgedTokensWrapper)] + fn pause_bridged_tokens_wrapper(&self) { + let proxy_addr = self.bridged_tokens_wrapper_address().get(); + + self.tx() + .to(proxy_addr) + .typed(bridged_tokens_wrapper_proxy::BridgedTokensWrapperProxy) + .pause_endpoint() + .sync_call(); + + self.pause_bridged_tokens_wrapper_event(); + } + + #[only_owner] + #[endpoint(unpauseBridgedTokensWrapper)] + fn unpause_bridged_tokens_wrapper(&self) { + let proxy_addr = self.bridged_tokens_wrapper_address().get(); + + self.tx() + .to(proxy_addr) + .typed(bridged_tokens_wrapper_proxy::BridgedTokensWrapperProxy) + .unpause_endpoint() + .sync_call(); + + self.unpause_bridged_tokens_wrapper_event(); + } } diff --git a/multisig/src/storage.rs b/multisig/src/storage.rs index e130c3c4..7e234f38 100644 --- a/multisig/src/storage.rs +++ b/multisig/src/storage.rs @@ -99,7 +99,11 @@ pub trait StorageModule { #[storage_mapper("multiTransferEsdtAddress")] fn multi_transfer_esdt_address(&self) -> SingleValueMapper; - #[view(getProxyAddress)] - #[storage_mapper("proxyAddress")] - fn proxy_address(&self) -> SingleValueMapper; + #[view(getBridgeProxyAddress)] + #[storage_mapper("bridgeProxyAddress")] + fn bridge_proxy_address(&self) -> SingleValueMapper; + + #[view(getBridgedTokensWrapperAddress)] + #[storage_mapper("bridgedTokensWrapperAddress")] + fn bridged_tokens_wrapper_address(&self) -> SingleValueMapper; } diff --git a/multisig/tests/multisig_blackbox_test.rs b/multisig/tests/multisig_blackbox_test.rs index eb3df1a9..786c42fb 100644 --- a/multisig/tests/multisig_blackbox_test.rs +++ b/multisig/tests/multisig_blackbox_test.rs @@ -14,6 +14,7 @@ use multiversx_sc::{ }, contract_base::ManagedSerializer, hex_literal::hex, + imports::UserBuiltinProxy, storage::mappers::SingleValue, types::{ Address, BigUint, CodeMetadata, ManagedAddress, ManagedBuffer, ManagedByteArray, @@ -148,6 +149,7 @@ impl MultiTransferTestState { ESDT_SAFE_ADDRESS, MULTI_TRANSFER_ADDRESS, BRIDGE_PROXY_ADDRESS, + BRIDGED_TOKENS_WRAPPER_ADDRESS, 1_000u64, 500u64, 2usize, @@ -354,6 +356,42 @@ impl MultiTransferTestState { assert!(staked_relayers .to_vec() .contains(&RELAYER2_ADDRESS.to_managed_address())); + + self.yield_ownership(); + } + + fn yield_ownership(&mut self) { + self.world + .tx() + .from(OWNER_ADDRESS) + .to(MULTI_TRANSFER_ADDRESS) + .typed(UserBuiltinProxy) + .change_owner_address(&ManagedAddress::from(MULTISIG_ADDRESS.to_address())) + .run(); + + self.world + .tx() + .from(OWNER_ADDRESS) + .to(ESDT_SAFE_ADDRESS) + .typed(UserBuiltinProxy) + .change_owner_address(&ManagedAddress::from(MULTISIG_ADDRESS.to_address())) + .run(); + + self.world + .tx() + .from(OWNER_ADDRESS) + .to(BRIDGE_PROXY_ADDRESS) + .typed(UserBuiltinProxy) + .change_owner_address(&ManagedAddress::from(MULTISIG_ADDRESS.to_address())) + .run(); + + self.world + .tx() + .from(OWNER_ADDRESS) + .to(BRIDGED_TOKENS_WRAPPER_ADDRESS) + .typed(UserBuiltinProxy) + .change_owner_address(&ManagedAddress::from(MULTISIG_ADDRESS.to_address())) + .run(); } } @@ -908,3 +946,133 @@ fn ethereum_to_multiversx_tx_batch_rejected_test() { .move_refund_batch_to_safe_from_child_contract() .run(); } + +#[test] +fn multisig_pause_all_child_scs_test() { + let mut state = MultiTransferTestState::new(); + + state.multisig_deploy(); + state.safe_deploy(Address::zero()); + state.multi_transfer_deploy(); + state.bridge_proxy_deploy(); + state.bridged_tokens_wrapper_deploy(); + state.config_multisig(); + + //Pause + state + .world + .tx() + .from(OWNER_ADDRESS) + .to(MULTISIG_ADDRESS) + .typed(multisig_proxy::MultisigProxy) + .pause_deposits() + .run(); + + state + .world + .tx() + .from(MULTISIG_ADDRESS) + .to(BRIDGE_PROXY_ADDRESS) + .typed(bridge_proxy_contract_proxy::BridgeProxyContractProxy) + .paused_status() + .returns(ExpectValue(true)) + .run(); + + state + .world + .tx() + .from(MULTISIG_ADDRESS) + .to(BRIDGED_TOKENS_WRAPPER_ADDRESS) + .typed(bridged_tokens_wrapper_proxy::BridgedTokensWrapperProxy) + .paused_status() + .returns(ExpectValue(true)) + .run(); + + state + .world + .tx() + .from(MULTISIG_ADDRESS) + .to(ESDT_SAFE_ADDRESS) + .typed(esdt_safe_proxy::EsdtSafeProxy) + .paused_status() + .returns(ExpectValue(true)) + .run(); + + // Unpause + state + .world + .tx() + .from(OWNER_ADDRESS) + .to(MULTISIG_ADDRESS) + .typed(multisig_proxy::MultisigProxy) + .unpause_deposits() + .run(); + + state + .world + .tx() + .from(MULTISIG_ADDRESS) + .to(BRIDGE_PROXY_ADDRESS) + .typed(bridge_proxy_contract_proxy::BridgeProxyContractProxy) + .paused_status() + .returns(ExpectValue(false)) + .run(); + + state + .world + .tx() + .from(MULTISIG_ADDRESS) + .to(BRIDGED_TOKENS_WRAPPER_ADDRESS) + .typed(bridged_tokens_wrapper_proxy::BridgedTokensWrapperProxy) + .paused_status() + .returns(ExpectValue(false)) + .run(); + + state + .world + .tx() + .from(MULTISIG_ADDRESS) + .to(ESDT_SAFE_ADDRESS) + .typed(esdt_safe_proxy::EsdtSafeProxy) + .paused_status() + .returns(ExpectValue(false)) + .run(); + + state + .world + .tx() + .from(OWNER_ADDRESS) + .to(MULTISIG_ADDRESS) + .typed(multisig_proxy::MultisigProxy) + .pause_processing() + .run(); + + state + .world + .tx() + .from(OWNER_ADDRESS) + .to(MULTISIG_ADDRESS) + .typed(multisig_proxy::MultisigProxy) + .paused_status() + .returns(ExpectValue(true)) + .run(); + + state + .world + .tx() + .from(OWNER_ADDRESS) + .to(MULTISIG_ADDRESS) + .typed(multisig_proxy::MultisigProxy) + .unpause_processing() + .run(); + + state + .world + .tx() + .from(OWNER_ADDRESS) + .to(MULTISIG_ADDRESS) + .typed(multisig_proxy::MultisigProxy) + .paused_status() + .returns(ExpectValue(false)) + .run(); +} diff --git a/multisig/wasm/src/lib.rs b/multisig/wasm/src/lib.rs index d7138aaa..383b97d1 100644 --- a/multisig/wasm/src/lib.rs +++ b/multisig/wasm/src/lib.rs @@ -6,9 +6,9 @@ // Init: 1 // Upgrade: 1 -// Endpoints: 74 +// Endpoints: 81 // Async Callback (empty): 1 -// Total number of exported functions: 77 +// Total number of exported functions: 84 #![no_std] @@ -40,12 +40,8 @@ multiversx_sc_wasm_adapter::endpoints! { changeQuorum => change_quorum addMapping => add_mapping clearMapping => clear_mapping - pauseEsdtSafe => pause_esdt_safe - unpauseEsdtSafe => unpause_esdt_safe initSupplyEsdtSafe => init_supply_esdt_safe initSupplyMintBurnEsdtSafe => init_supply_mint_burn_esdt_safe - pauseProxy => pause_proxy - unpauseProxy => unpause_proxy changeFeeEstimatorContractAddress => change_fee_estimator_contract_address changeMultiversXToEthGasLimit => change_multiversx_to_eth_gas_limit changeDefaultPricePerGasUnit => change_default_price_per_gas_unit @@ -61,6 +57,16 @@ multiversx_sc_wasm_adapter::endpoints! { multiTransferEsdtSetMaxRefundTxBatchSize => multi_transfer_esdt_set_max_refund_tx_batch_size multiTransferEsdtSetMaxRefundTxBatchBlockDuration => multi_transfer_esdt_set_max_refund_tx_batch_block_duration multiTransferEsdtSetWrappingContractAddress => multi_transfer_esdt_set_wrapping_contract_address + pauseProcessing => pause_processing + unpauseProcessing => unpause_processing + pauseDeposits => pause_deposits + unpauseDeposits => unpause_deposits + pauseEsdtSafe => pause_esdt_safe + unpauseEsdtSafe => unpause_esdt_safe + pauseBridgeProxy => pause_bridge_proxy + unpauseBridgeProxy => unpause_bridge_proxy + pauseBridgedTokensWrapper => pause_bridged_tokens_wrapper + unpauseBridgedTokensWrapper => unpause_bridged_tokens_wrapper getQuorum => quorum getNumBoardMembers => num_board_members getRequiredStakeAmount => required_stake_amount @@ -73,7 +79,8 @@ multiversx_sc_wasm_adapter::endpoints! { getTokenIdForErc20Address => token_id_for_erc20_address getEsdtSafeAddress => esdt_safe_address getMultiTransferEsdtAddress => multi_transfer_esdt_address - getProxyAddress => proxy_address + getBridgeProxyAddress => bridge_proxy_address + getBridgedTokensWrapperAddress => bridged_tokens_wrapper_address getCurrentTxBatch => get_current_tx_batch getBatch => get_batch getCurrentRefundBatch => get_current_refund_batch