diff --git a/integrationTests/relayers/slowTests/framework/multiversxHandler.go b/integrationTests/relayers/slowTests/framework/multiversxHandler.go index 3aabc2a7..1f5b1c0e 100644 --- a/integrationTests/relayers/slowTests/framework/multiversxHandler.go +++ b/integrationTests/relayers/slowTests/framework/multiversxHandler.go @@ -49,6 +49,7 @@ const ( stakeFunction = "stake" unpauseFunction = "unpause" unpauseEsdtSafeFunction = "unpauseEsdtSafe" + unpauseProxyFunction = "unpauseProxy" pauseEsdtSafeFunction = "pauseEsdtSafe" pauseFunction = "pause" issueFunction = "issue" @@ -174,12 +175,26 @@ func (handler *MultiversxHandler) DeployContracts(ctx context.Context) { require.NotEqual(handler, emptyAddress, handler.SafeAddress) log.Info("safe contract deployed", "address", handler.SafeAddress, "transaction hash", hash) + // deploy bridge proxy + handler.ScProxyAddress, hash, _ = handler.ChainSimulator.DeploySC( + ctx, + bridgeProxyContractPath, + handler.OwnerKeys.MvxSk, + deployGasLimit, + []string{ + multiTransferAddress.Hex(), + }, + ) + require.NotEqual(handler, emptyAddress, handler.ScProxyAddress) + log.Info("bridge proxy contract deployed", "address", handler.ScProxyAddress, "transaction hash", hash) + // deploy multisig minRelayerStakeInt, _ := big.NewInt(0).SetString(minRelayerStake, 10) minRelayerStakeHex := hex.EncodeToString(minRelayerStakeInt.Bytes()) params := []string{ handler.SafeAddress.Hex(), multiTransferAddress.Hex(), + handler.ScProxyAddress.Hex(), minRelayerStakeHex, slashAmount, handler.Quorum} @@ -196,19 +211,6 @@ func (handler *MultiversxHandler) DeployContracts(ctx context.Context) { require.NotEqual(handler, emptyAddress, handler.MultisigAddress) log.Info("multisig contract deployed", "address", handler.MultisigAddress, "transaction hash", hash) - // deploy bridge proxy - handler.ScProxyAddress, hash, _ = handler.ChainSimulator.DeploySC( - ctx, - bridgeProxyContractPath, - handler.OwnerKeys.MvxSk, - deployGasLimit, - []string{ - multiTransferAddress.Hex(), - }, - ) - require.NotEqual(handler, emptyAddress, handler.ScProxyAddress) - log.Info("bridge proxy contract deployed", "address", handler.ScProxyAddress, "transaction hash", hash) - // deploy test-caller handler.TestCallerAddress, hash, _ = handler.ChainSimulator.DeploySC( ctx, @@ -304,10 +306,6 @@ func (handler *MultiversxHandler) DeployContracts(ctx context.Context) { ) log.Info("ChangeOwnerAddress for multi-transfer tx executed", "hash", hash, "status", txResult.Status) - // unpause sc proxy - hash, txResult = handler.callContractNoParams(ctx, handler.ScProxyAddress, unpauseFunction) - log.Info("unpaused sc proxy executed", "hash", hash, "status", txResult.Status) - // ChangeOwnerAddress for bridge proxy hash, txResult = handler.ChainSimulator.ScCall( ctx, @@ -322,6 +320,10 @@ func (handler *MultiversxHandler) DeployContracts(ctx context.Context) { ) log.Info("ChangeOwnerAddress for bridge proxy tx executed", "hash", hash, "status", txResult.Status) + // unpause sc proxy + hash, txResult = handler.callContractNoParams(ctx, handler.MultisigAddress, unpauseProxyFunction) + log.Info("unpaused sc proxy executed", "hash", hash, "status", txResult.Status) + // setEsdtSafeOnMultiTransfer hash, txResult = handler.ChainSimulator.ScCall( ctx, diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.abi.json b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.abi.json index afc35103..90441e9e 100644 --- a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.abi.json +++ b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.abi.json @@ -35,6 +35,10 @@ "name": "multi_transfer_sc_address", "type": "Address" }, + { + "name": "proxy_sc_address", + "type": "Address" + }, { "name": "required_stake", "type": "BigUint" @@ -56,7 +60,20 @@ "outputs": [] }, "upgradeConstructor": { - "inputs": [], + "inputs": [ + { + "name": "esdt_safe_sc_address", + "type": "Address" + }, + { + "name": "multi_transfer_sc_address", + "type": "Address" + }, + { + "name": "proxy_sc_address", + "type": "Address" + } + ], "outputs": [] }, "endpoints": [ @@ -345,6 +362,20 @@ "inputs": [], "outputs": [] }, + { + "name": "pauseProxy", + "onlyOwner": true, + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, + { + "name": "unpauseProxy", + "onlyOwner": true, + "mutability": "mutable", + "inputs": [], + "outputs": [] + }, { "name": "changeFeeEstimatorContractAddress", "onlyOwner": true, @@ -755,6 +786,16 @@ } ] }, + { + "name": "getProxyAddress", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "Address" + } + ] + }, { "docs": [ "Returns the current EsdtSafe batch.", diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.wasm b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.wasm index 30a8d34e..2ef56cb9 100755 Binary files a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.wasm and b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.wasm differ