diff --git a/bridge-proxy/src/bridge-proxy.rs b/bridge-proxy/src/bridge-proxy.rs index 32913859..ac32037f 100644 --- a/bridge-proxy/src/bridge-proxy.rs +++ b/bridge-proxy/src/bridge-proxy.rs @@ -12,11 +12,11 @@ const MIN_GAS_LIMIT_FOR_SC_CALL: u64 = 10_000_000; const MAX_GAS_LIMIT_FOR_SC_CALL: u64 = 249999999; const DEFAULT_GAS_LIMIT_FOR_REFUND_CALLBACK: u64 = 20_000_000; // 20 million const DELAY_BEFORE_OWNER_CAN_CANCEL_TRANSACTION: u64 = 300; -const MIN_GAS_TO_SAVE_PROGRESS: u64 = 100_000; +const MIN_GAS_TO_SAVE_PROGRESS: u64 = 1_000_000; #[multiversx_sc::contract] pub trait BridgeProxyContract: - config::ConfigModule + config::ConfigModule + multiversx_sc_modules::pause::PauseModule + multiversx_sc_modules::ongoing_operation::OngoingOperationModule { @@ -81,7 +81,10 @@ pub trait BridgeProxyContract: } let gas_left = self.blockchain().get_gas_left(); - require!(gas_left > call_data.gas_limit + DEFAULT_GAS_LIMIT_FOR_REFUND_CALLBACK, "Not enough gas to execute"); + require!( + gas_left > call_data.gas_limit + DEFAULT_GAS_LIMIT_FOR_REFUND_CALLBACK, + "Not enough gas to execute" + ); let tx_call = self .tx() @@ -136,11 +139,14 @@ pub trait BridgeProxyContract: self.tx() .to(esdt_safe_contract_address) .typed(esdt_safe_proxy::EsdtSafeProxy) - .create_transaction(tx.from, OptionalValue::Some(esdt_safe_proxy::RefundInfo { - address: tx.to, - initial_batch_id: batch_id, - initial_nonce: tx.tx_nonce, - })) + .create_transaction( + tx.from, + OptionalValue::Some(esdt_safe_proxy::RefundInfo { + address: tx.to, + initial_batch_id: batch_id, + initial_nonce: tx.tx_nonce, + }), + ) .single_esdt( &unwrapped_token.token_identifier, unwrapped_token.token_nonce, @@ -159,7 +165,7 @@ pub trait BridgeProxyContract: let transfers = self .tx() - .to(&bridged_tokens_wrapper_address) + .to(&bridged_tokens_wrapper_address) .typed(bridged_tokens_wrapper_proxy::BridgedTokensWrapperProxy) .unwrap_token(requested_token) .single_esdt(