diff --git a/integrationTests/relayers/slowTests/framework/chainSimulatorWrapper.go b/integrationTests/relayers/slowTests/framework/chainSimulatorWrapper.go index f651091a..5e864877 100644 --- a/integrationTests/relayers/slowTests/framework/chainSimulatorWrapper.go +++ b/integrationTests/relayers/slowTests/framework/chainSimulatorWrapper.go @@ -155,8 +155,15 @@ func (instance *chainSimulatorWrapper) DeploySC(ctx context.Context, wasmFilePat func (instance *chainSimulatorWrapper) getTransactionResult(ctx context.Context, hash string) *data.TransactionOnNetwork { instance.GenerateBlocksUntilTxProcessed(ctx, hash) - txResult, errGet := instance.proxyInstance.GetTransactionInfoWithResults(ctx, hash) - require.Nil(instance, errGet) + txResult, err := instance.proxyInstance.GetTransactionInfoWithResults(ctx, hash) + require.Nil(instance, err) + + txStatus, err := instance.proxyInstance.ProcessTransactionStatus(ctx, hash) + require.Nil(instance, err) + + jsonData, err := json.MarshalIndent(txResult.Data.Transaction, "", " ") + require.Nil(instance, err) + require.Equal(instance, transaction.TxStatusSuccess, txStatus, fmt.Sprintf("tx hash: %s,\n tx: %s", hash, string(jsonData))) return &txResult.Data.Transaction } diff --git a/integrationTests/relayers/slowTests/framework/multiversxHandler.go b/integrationTests/relayers/slowTests/framework/multiversxHandler.go index bdb112f9..69326eeb 100644 --- a/integrationTests/relayers/slowTests/framework/multiversxHandler.go +++ b/integrationTests/relayers/slowTests/framework/multiversxHandler.go @@ -66,7 +66,8 @@ const ( submitBatchFunction = "submitBatch" createTransactionFunction = "createTransaction" unwrapTokenFunction = "unwrapToken" - setupBridgedTokenWrapperFunction = "setBridgedTokensWrapper" + setBridgedTokensWrapperAddressFunction = "setBridgedTokensWrapperAddress" + setMultiTransferAddressFunction = "setMultiTransferAddress" initSupplyMintBurnEsdtSafe = "initSupplyMintBurnEsdtSafe" initSupplyEsdtSafe = "initSupplyEsdtSafe" ) @@ -259,13 +260,27 @@ func (handler *MultiversxHandler) DeployContracts(ctx context.Context) { handler.ScProxyAddress, zeroStringValue, setCallsGasLimit, - setupBridgedTokenWrapperFunction, + setBridgedTokensWrapperAddressFunction, []string{ handler.WrapperAddress.Hex(), }, ) log.Info("setupEsdtSafe in SC bridge proxy tx executed", "hash", hash, "status", txResult.Status) + // setMultiTransferAddress in SC bridge proxy + hash, txResult = handler.ChainSimulator.ScCall( + ctx, + handler.OwnerKeys.MvxSk, + handler.ScProxyAddress, + zeroStringValue, + setCallsGasLimit, + setMultiTransferAddressFunction, + []string{ + multiTransferAddress.Hex(), + }, + ) + log.Info("setMultiTransferAddress in SC bridge proxy tx executed", "hash", hash, "status", txResult.Status) + // setEsdtSafeOnWrapper hash, txResult = handler.ChainSimulator.ScCall( ctx, diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridge-proxy.abi.json b/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridge-proxy.abi.json index c4ac5c08..60db4d30 100644 --- a/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridge-proxy.abi.json +++ b/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridge-proxy.abi.json @@ -1,11 +1,11 @@ { "buildInfo": { "rustc": { - "version": "1.78.0", - "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", - "commitDate": "2024-04-29", + "version": "1.80.0", + "commitHash": "051478957371ee0084a7c0913941d2a8c4757bb9", + "commitDate": "2024-07-21", "channel": "Stable", - "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" + "short": "rustc 1.80.0 (051478957 2024-07-21)" }, "contractCrate": { "name": "bridge-proxy", @@ -57,6 +57,17 @@ ], "outputs": [] }, + { + "name": "cancel", + "mutability": "mutable", + "inputs": [ + { + "name": "tx_id", + "type": "u32" + } + ], + "outputs": [] + }, { "name": "getPendingTransactionById", "mutability": "readonly", @@ -84,7 +95,7 @@ ] }, { - "name": "setupMultiTransfer", + "name": "setMultiTransferAddress", "onlyOwner": true, "mutability": "mutable", "inputs": [ @@ -97,7 +108,20 @@ "outputs": [] }, { - "name": "setBridgedTokensWrapper", + "name": "setBridgedTokensWrapperAddress", + "onlyOwner": true, + "mutability": "mutable", + "inputs": [ + { + "name": "opt_address", + "type": "optional
", + "multi_arg": true + } + ], + "outputs": [] + }, + { + "name": "setEsdtSafeAddress", "onlyOwner": true, "mutability": "mutable", "inputs": [ @@ -129,6 +153,16 @@ } ] }, + { + "name": "getEsdtSafeContractAddress", + "mutability": "readonly", + "inputs": [], + "outputs": [ + { + "type": "Address" + } + ] + }, { "name": "lowestTxId", "mutability": "readonly", diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridge-proxy.wasm b/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridge-proxy.wasm index 0f6f5222..7e0351cc 100755 Binary files a/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridge-proxy.wasm and b/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridge-proxy.wasm differ diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridged-tokens-wrapper.abi.json b/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridged-tokens-wrapper.abi.json index 1287c24b..24458021 100644 --- a/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridged-tokens-wrapper.abi.json +++ b/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridged-tokens-wrapper.abi.json @@ -1,11 +1,11 @@ { "buildInfo": { "rustc": { - "version": "1.78.0", - "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", - "commitDate": "2024-04-29", + "version": "1.80.0", + "commitHash": "051478957371ee0084a7c0913941d2a8c4757bb9", + "commitDate": "2024-07-21", "channel": "Stable", - "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" + "short": "rustc 1.80.0 (051478957 2024-07-21)" }, "contractCrate": { "name": "bridged-tokens-wrapper", @@ -171,6 +171,11 @@ { "name": "to", "type": "EthAddress" + }, + { + "name": "opt_refunding_address", + "type": "optional
", + "multi_arg": true } ], "outputs": [] diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridged-tokens-wrapper.wasm b/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridged-tokens-wrapper.wasm index ea8a30cc..ab77601e 100755 Binary files a/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridged-tokens-wrapper.wasm and b/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridged-tokens-wrapper.wasm differ diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/esdt-safe.abi.json b/integrationTests/relayers/slowTests/testdata/contracts/mvx/esdt-safe.abi.json index 703eae8a..45023f63 100644 --- a/integrationTests/relayers/slowTests/testdata/contracts/mvx/esdt-safe.abi.json +++ b/integrationTests/relayers/slowTests/testdata/contracts/mvx/esdt-safe.abi.json @@ -1,11 +1,11 @@ { "buildInfo": { "rustc": { - "version": "1.78.0", - "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", - "commitDate": "2024-04-29", + "version": "1.80.0", + "commitHash": "051478957371ee0084a7c0913941d2a8c4757bb9", + "commitDate": "2024-07-21", "channel": "Stable", - "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" + "short": "rustc 1.80.0 (051478957 2024-07-21)" }, "contractCrate": { "name": "esdt-safe", @@ -122,6 +122,10 @@ { "name": "to", "type": "EthAddress" + }, + { + "name": "refunding_address", + "type": "Address" } ], "outputs": [] diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/esdt-safe.wasm b/integrationTests/relayers/slowTests/testdata/contracts/mvx/esdt-safe.wasm index 2cd1fb13..9102fdf6 100755 Binary files a/integrationTests/relayers/slowTests/testdata/contracts/mvx/esdt-safe.wasm and b/integrationTests/relayers/slowTests/testdata/contracts/mvx/esdt-safe.wasm differ diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multi-transfer-esdt.abi.json b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multi-transfer-esdt.abi.json index 2b33988e..e943648e 100644 --- a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multi-transfer-esdt.abi.json +++ b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multi-transfer-esdt.abi.json @@ -1,11 +1,11 @@ { "buildInfo": { "rustc": { - "version": "1.78.0", - "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", - "commitDate": "2024-04-29", + "version": "1.80.0", + "commitHash": "051478957371ee0084a7c0913941d2a8c4757bb9", + "commitDate": "2024-07-21", "channel": "Stable", - "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" + "short": "rustc 1.80.0 (051478957 2024-07-21)" }, "contractCrate": { "name": "multi-transfer-esdt", @@ -76,6 +76,18 @@ ], "outputs": [] }, + { + "name": "addUnprocessedRefundTxToBatch", + "onlyOwner": true, + "mutability": "mutable", + "inputs": [ + { + "name": "tx_id", + "type": "u64" + } + ], + "outputs": [] + }, { "name": "setEsdtSafeContractAddress", "onlyOwner": true, @@ -343,6 +355,16 @@ "indexed": true } ] + }, + { + "identifier": "unprocessedRefundTxs", + "inputs": [ + { + "name": "tx_id", + "type": "u64", + "indexed": true + } + ] } ], "esdtAttributes": [], diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multi-transfer-esdt.wasm b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multi-transfer-esdt.wasm index 1af6fbd2..d699c462 100755 Binary files a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multi-transfer-esdt.wasm and b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multi-transfer-esdt.wasm differ diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.abi.json b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.abi.json index 877d03e7..6ccb77af 100644 --- a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.abi.json +++ b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.abi.json @@ -1,11 +1,11 @@ { "buildInfo": { "rustc": { - "version": "1.78.0", - "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", - "commitDate": "2024-04-29", + "version": "1.80.0", + "commitHash": "051478957371ee0084a7c0913941d2a8c4757bb9", + "commitDate": "2024-07-21", "channel": "Stable", - "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" + "short": "rustc 1.80.0 (051478957 2024-07-21)" }, "contractCrate": { "name": "multisig", @@ -205,6 +205,18 @@ ], "outputs": [] }, + { + "name": "addUnprocessedRefundTxToBatch", + "onlyOwner": true, + "mutability": "mutable", + "inputs": [ + { + "name": "tx_id", + "type": "u64" + } + ], + "outputs": [] + }, { "docs": [ "Proposers and board members use this to launch signed actions." @@ -1214,7 +1226,7 @@ ], "events": [ { - "identifier": "add_mapping", + "identifier": "addMapping", "inputs": [ { "name": "erc20_address", @@ -1229,7 +1241,7 @@ ] }, { - "identifier": "clear_mapping", + "identifier": "clearMapping", "inputs": [ { "name": "erc20_address", @@ -1244,15 +1256,25 @@ ] }, { - "identifier": "move_refund_batch_to_safe", + "identifier": "moveRefundBatchToSafeEvent", "inputs": [] }, { - "identifier": "pause_esdt_safe", + "identifier": "addUnprocessedRefundTxToBatchEvent", + "inputs": [ + { + "name": "tx_id", + "type": "u64", + "indexed": true + } + ] + }, + { + "identifier": "pauseEsdtEvent", "inputs": [] }, { - "identifier": "unpause_esdt_safe", + "identifier": "unpauseEsdtEvent", "inputs": [] }, { diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.wasm b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.wasm index 6bce4c46..b87095b9 100755 Binary files a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.wasm and b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.wasm differ diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/test-caller.abi.json b/integrationTests/relayers/slowTests/testdata/contracts/mvx/test-caller.abi.json index e7c1a897..ee4eb128 100644 --- a/integrationTests/relayers/slowTests/testdata/contracts/mvx/test-caller.abi.json +++ b/integrationTests/relayers/slowTests/testdata/contracts/mvx/test-caller.abi.json @@ -1,11 +1,11 @@ { "buildInfo": { "rustc": { - "version": "1.78.0", - "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", - "commitDate": "2024-04-29", + "version": "1.80.0", + "commitHash": "051478957371ee0084a7c0913941d2a8c4757bb9", + "commitDate": "2024-07-21", "channel": "Stable", - "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" + "short": "rustc 1.80.0 (051478957 2024-07-21)" }, "contractCrate": { "name": "test-caller", diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/test-caller.wasm b/integrationTests/relayers/slowTests/testdata/contracts/mvx/test-caller.wasm index 8419ee51..9692eece 100755 Binary files a/integrationTests/relayers/slowTests/testdata/contracts/mvx/test-caller.wasm and b/integrationTests/relayers/slowTests/testdata/contracts/mvx/test-caller.wasm differ