From fd594789eff24b8dc37102d851480db6312abbca Mon Sep 17 00:00:00 2001 From: Iulian Pascalau Date: Fri, 9 Aug 2024 17:20:00 +0300 Subject: [PATCH 1/5] - added more refund tests + fixes --- bridges/ethMultiversX/bridgeExecutor.go | 7 + bridges/ethMultiversX/bridgeExecutor_test.go | 98 ++++++++---- clients/multiversx/client.go | 2 +- cmd/scCallsExecutor/config/config.toml | 2 +- docker/docker-compose.yml | 4 +- go.mod | 2 +- go.sum | 4 +- integrationTests/relayers/slowTests/common.go | 33 ++-- .../ethToMultiversXWithChainSimulator_test.go | 10 +- .../slowTests/framework/ethereumHandler.go | 15 +- .../relayers/slowTests/framework/testSetup.go | 6 +- .../relayers/slowTests/framework/types.go | 4 +- .../refundWithChainSimulator_test.go | 141 ++++++++++++++++-- 13 files changed, 230 insertions(+), 98 deletions(-) diff --git a/bridges/ethMultiversX/bridgeExecutor.go b/bridges/ethMultiversX/bridgeExecutor.go index c9b52dfd..f6f63231 100644 --- a/bridges/ethMultiversX/bridgeExecutor.go +++ b/bridges/ethMultiversX/bridgeExecutor.go @@ -483,6 +483,13 @@ func (executor *bridgeExecutor) addMetadataToTransfer(transfer *bridgeCommon.Dep for _, event := range events { if event.DepositNonce.Uint64() == transfer.Nonce { transfer.Data = []byte(event.CallData) + if len(transfer.Data) > 0 && transfer.Data[0] != parsers.DataPresentProtocolMarker { + executor.log.Warn("found a call data that does not adhere to the protocol, adding data present marker on the first byte", + "deposit nonce", transfer.Nonce, "call data", []byte(transfer.Data)) + + transfer.Data = append([]byte{parsers.DataPresentProtocolMarker}, transfer.Data...) + } + var err error transfer.DisplayableData, err = ConvertToDisplayableData(transfer.Data) if err != nil { diff --git a/bridges/ethMultiversX/bridgeExecutor_test.go b/bridges/ethMultiversX/bridgeExecutor_test.go index 7da6d87d..8ff165de 100644 --- a/bridges/ethMultiversX/bridgeExecutor_test.go +++ b/bridges/ethMultiversX/bridgeExecutor_test.go @@ -16,6 +16,7 @@ import ( bridgeCommon "github.com/multiversx/mx-bridge-eth-go/common" "github.com/multiversx/mx-bridge-eth-go/core" "github.com/multiversx/mx-bridge-eth-go/core/batchProcessor" + "github.com/multiversx/mx-bridge-eth-go/parsers" "github.com/multiversx/mx-bridge-eth-go/testsCommon" bridgeTests "github.com/multiversx/mx-bridge-eth-go/testsCommon/bridge" "github.com/multiversx/mx-chain-core-go/core/check" @@ -399,36 +400,75 @@ func TestEthToMultiversXBridgeExecutor_GetAndStoreBatchFromEthereum(t *testing.T assert.True(t, expectedBatch == executor.batch) }) t.Run("should add deposits metadata for sc calls", func(t *testing.T) { - args := createMockExecutorArgs() - providedNonce := uint64(8346) - depositNonce := uint64(100) - depositData := "testData" - expectedBatch := &bridgeCommon.TransferBatch{ - ID: providedNonce, - Deposits: []*bridgeCommon.DepositTransfer{ - { - Nonce: depositNonce, + t.Run("data contains the marker", func(t *testing.T) { + t.Parallel() + + args := createMockExecutorArgs() + providedNonce := uint64(8346) + depositNonce := uint64(100) + depositData := string([]byte{parsers.DataPresentProtocolMarker}) + "testData" + expectedBatch := &bridgeCommon.TransferBatch{ + ID: providedNonce, + Deposits: []*bridgeCommon.DepositTransfer{ + { + Nonce: depositNonce, + }, }, - }, - } - args.EthereumClient = &bridgeTests.EthereumClientStub{ - GetBatchCalled: func(ctx context.Context, nonce uint64) (*bridgeCommon.TransferBatch, bool, error) { - assert.Equal(t, providedNonce, nonce) - return expectedBatch, true, nil - }, - GetBatchSCMetadataCalled: func(ctx context.Context, nonce uint64) ([]*contract.ERC20SafeERC20SCDeposit, error) { - return []*contract.ERC20SafeERC20SCDeposit{{ - DepositNonce: big.NewInt(0).SetUint64(depositNonce), - CallData: depositData, - }}, nil - }, - } - executor, _ := NewBridgeExecutor(args) - err := executor.GetAndStoreBatchFromEthereum(context.Background(), providedNonce) - - assert.Nil(t, err) - assert.True(t, expectedBatch == executor.GetStoredBatch()) // pointer testing - assert.Equal(t, depositData, string(executor.batch.Deposits[0].Data)) + } + args.EthereumClient = &bridgeTests.EthereumClientStub{ + GetBatchCalled: func(ctx context.Context, nonce uint64) (*bridgeCommon.TransferBatch, bool, error) { + assert.Equal(t, providedNonce, nonce) + return expectedBatch, true, nil + }, + GetBatchSCMetadataCalled: func(ctx context.Context, nonce uint64) ([]*contract.ERC20SafeERC20SCDeposit, error) { + return []*contract.ERC20SafeERC20SCDeposit{{ + DepositNonce: big.NewInt(0).SetUint64(depositNonce), + CallData: depositData, + }}, nil + }, + } + executor, _ := NewBridgeExecutor(args) + err := executor.GetAndStoreBatchFromEthereum(context.Background(), providedNonce) + + assert.Nil(t, err) + assert.True(t, expectedBatch == executor.GetStoredBatch()) // pointer testing + assert.Equal(t, depositData, string(executor.batch.Deposits[0].Data)) + }) + t.Run("data does not contain the marker", func(t *testing.T) { + t.Parallel() + + args := createMockExecutorArgs() + providedNonce := uint64(8346) + depositNonce := uint64(100) + depositData := "testData" + expectedBatch := &bridgeCommon.TransferBatch{ + ID: providedNonce, + Deposits: []*bridgeCommon.DepositTransfer{ + { + Nonce: depositNonce, + }, + }, + } + args.EthereumClient = &bridgeTests.EthereumClientStub{ + GetBatchCalled: func(ctx context.Context, nonce uint64) (*bridgeCommon.TransferBatch, bool, error) { + assert.Equal(t, providedNonce, nonce) + return expectedBatch, true, nil + }, + GetBatchSCMetadataCalled: func(ctx context.Context, nonce uint64) ([]*contract.ERC20SafeERC20SCDeposit, error) { + return []*contract.ERC20SafeERC20SCDeposit{{ + DepositNonce: big.NewInt(0).SetUint64(depositNonce), + CallData: depositData, + }}, nil + }, + } + executor, _ := NewBridgeExecutor(args) + err := executor.GetAndStoreBatchFromEthereum(context.Background(), providedNonce) + + assert.Nil(t, err) + assert.True(t, expectedBatch == executor.GetStoredBatch()) // pointer testing + expectedData := append([]byte{parsers.DataPresentProtocolMarker}, depositData...) + assert.Equal(t, string(expectedData), string(executor.batch.Deposits[0].Data)) + }) }) t.Run("should add deposits metadata for sc calls even if with no data", func(t *testing.T) { args := createMockExecutorArgs() diff --git a/clients/multiversx/client.go b/clients/multiversx/client.go index a955cc53..8ecd9cd7 100644 --- a/clients/multiversx/client.go +++ b/clients/multiversx/client.go @@ -324,7 +324,7 @@ func (c *client) ProposeSetStatus(ctx context.Context, batch *common.TransferBat gasLimit := c.gasMapConfig.ProposeStatusBase + uint64(len(batch.Deposits))*c.gasMapConfig.ProposeStatusForEach hash, err := c.txHandler.SendTransactionReturnHash(ctx, txBuilder, gasLimit) if err == nil { - c.log.Info("proposed set statuses"+batch.String(), "transaction hash", hash) + c.log.Info("proposed set statuses "+batch.String(), "transaction hash", hash) } return hash, err diff --git a/cmd/scCallsExecutor/config/config.toml b/cmd/scCallsExecutor/config/config.toml index 19b2ac33..8efb058f 100644 --- a/cmd/scCallsExecutor/config/config.toml +++ b/cmd/scCallsExecutor/config/config.toml @@ -1,5 +1,5 @@ ScProxyBech32Address = "erd1qqqqqqqqqqqqqpgqnef5f5aq32d63kljld8w5vnvz4gk5sy9hrrq2ld08s" -ExtraGasToExecute = 50000000 +ExtraGasToExecute = 60000000 #this value allow the SC calls without provided gas limit to be refunded NetworkAddress = "127.0.0.1:8085" ProxyMaxNoncesDelta = 7 ProxyFinalityCheck = true diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 243e9a32..ece35b11 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,8 +1,8 @@ version: "3.9" services: - multiversx: - image: multiversx/chainsimulator:v1.7.13-fix3 + chain-simulator: + image: multiversx/chainsimulator:v1.7.13-patch1 ports: - 8085:8085 volumes: diff --git a/go.mod b/go.mod index bc2151db..396cd1a7 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/multiversx/mx-chain-communication-go v1.0.14 github.com/multiversx/mx-chain-core-go v1.2.20 github.com/multiversx/mx-chain-crypto-go v1.2.11 - github.com/multiversx/mx-chain-go v1.7.12 + github.com/multiversx/mx-chain-go v1.7.13-patch1 github.com/multiversx/mx-chain-logger-go v1.0.14 github.com/multiversx/mx-sdk-go v1.4.1 github.com/pelletier/go-toml v1.9.3 diff --git a/go.sum b/go.sum index a3df2160..04e3b8f5 100644 --- a/go.sum +++ b/go.sum @@ -532,8 +532,8 @@ github.com/multiversx/mx-chain-crypto-go v1.2.11 h1:MNPJoiTJA5/tedYrI0N22OorbsKD github.com/multiversx/mx-chain-crypto-go v1.2.11/go.mod h1:pcZutPdfLiAFytzCU3LxU3s8cXkvpNqquyitFSfoF3o= github.com/multiversx/mx-chain-es-indexer-go v1.4.21 h1:rzxXCkgOsqj67GRYtqzKuf9XgHwnZLTZhU90Ck3VbrE= github.com/multiversx/mx-chain-es-indexer-go v1.4.21/go.mod h1:V9xxOBkfV7GjN4K5SODaOetoGVpQm4snibMVPCjL0Kk= -github.com/multiversx/mx-chain-go v1.7.12 h1:cQ3g5sFZEcQmIRwi/wt+K/3d5nIwCMQRC1ZnJDRuRY4= -github.com/multiversx/mx-chain-go v1.7.12/go.mod h1:HwklJGQfMpv/yyF4oLpxjwdKCawspv1JjdgezlWBpRQ= +github.com/multiversx/mx-chain-go v1.7.13-patch1 h1:x3U0BFpQrwXcXXa81KMgM25hNRGgjsquzq6ot+f9Ot4= +github.com/multiversx/mx-chain-go v1.7.13-patch1/go.mod h1:qyW6EBgsqgZwA+SrAhLVi6cCM6kFqlm6Lh28Re1LrIA= github.com/multiversx/mx-chain-logger-go v1.0.14 h1:PRMpAvXE7Nec2d//QNmbYfKVHMomOKmcN4UXurQWX9o= github.com/multiversx/mx-chain-logger-go v1.0.14/go.mod h1:bDfHSdwqIimn7Gp8w+SH5KlDuGzJ//nlyEANAaTSc3o= github.com/multiversx/mx-chain-scenario-go v1.4.3 h1:9xeVB8TOsolXS4YEr1CZ/VZr5Qk0X+nde8nRGnxJICo= diff --git a/integrationTests/relayers/slowTests/common.go b/integrationTests/relayers/slowTests/common.go index e05f3463..7c8ba6c9 100644 --- a/integrationTests/relayers/slowTests/common.go +++ b/integrationTests/relayers/slowTests/common.go @@ -6,6 +6,7 @@ import ( "math/big" "github.com/multiversx/mx-bridge-eth-go/integrationTests/relayers/slowTests/framework" + "github.com/multiversx/mx-bridge-eth-go/parsers" ) // GenerateTestUSDCToken will generate a test USDC token @@ -33,23 +34,15 @@ func GenerateTestUSDCToken() framework.TestTokenParams { { ValueToTransferToMvx: big.NewInt(5000), ValueToSendFromMvX: big.NewInt(2500), - MvxSCCallMethod: "", - MvxSCCallGasLimit: 0, - MvxSCCallArguments: nil, }, { ValueToTransferToMvx: big.NewInt(7000), ValueToSendFromMvX: big.NewInt(300), - MvxSCCallMethod: "", - MvxSCCallGasLimit: 0, - MvxSCCallArguments: nil, }, { ValueToTransferToMvx: big.NewInt(1000), ValueToSendFromMvX: nil, - MvxSCCallMethod: "callPayable", - MvxSCCallGasLimit: 50000000, - MvxSCCallArguments: nil, + MvxSCCallData: createScCallData("callPayable", 50000000), }, }, ESDTSafeExtraBalance: big.NewInt(100), // extra is just for the fees for the 2 transfers mvx->eth @@ -82,26 +75,30 @@ func GenerateTestMEMEToken() framework.TestTokenParams { { ValueToTransferToMvx: big.NewInt(2400), ValueToSendFromMvX: big.NewInt(4000), - MvxSCCallMethod: "", - MvxSCCallGasLimit: 0, - MvxSCCallArguments: nil, }, { ValueToTransferToMvx: big.NewInt(200), ValueToSendFromMvX: big.NewInt(6000), - MvxSCCallMethod: "", - MvxSCCallGasLimit: 0, - MvxSCCallArguments: nil, }, { ValueToTransferToMvx: big.NewInt(1000), ValueToSendFromMvX: big.NewInt(2000), - MvxSCCallMethod: "callPayable", - MvxSCCallGasLimit: 50000000, - MvxSCCallArguments: nil, + MvxSCCallData: createScCallData("callPayable", 50000000), }, }, ESDTSafeExtraBalance: big.NewInt(4000 + 6000 + 2000), // everything is locked in the safe esdt contract EthTestAddrExtraBalance: big.NewInt(4000 - 50 + 6000 - 50 + 2000 - 50), } } + +func createScCallData(function string, gasLimit uint64, args ...string) []byte { + codec := parsers.MultiversxCodec{} + callData := parsers.CallData{ + Type: parsers.DataPresentProtocolMarker, + Function: function, + GasLimit: gasLimit, + Arguments: args, + } + + return codec.EncodeCallData(callData) +} diff --git a/integrationTests/relayers/slowTests/ethToMultiversXWithChainSimulator_test.go b/integrationTests/relayers/slowTests/ethToMultiversXWithChainSimulator_test.go index 4c155882..54fb6299 100644 --- a/integrationTests/relayers/slowTests/ethToMultiversXWithChainSimulator_test.go +++ b/integrationTests/relayers/slowTests/ethToMultiversXWithChainSimulator_test.go @@ -193,23 +193,15 @@ func createBadToken() framework.TestTokenParams { { ValueToTransferToMvx: big.NewInt(5000), ValueToSendFromMvX: big.NewInt(2500), - MvxSCCallMethod: "", - MvxSCCallGasLimit: 0, - MvxSCCallArguments: nil, }, { ValueToTransferToMvx: big.NewInt(7000), ValueToSendFromMvX: big.NewInt(300), - MvxSCCallMethod: "", - MvxSCCallGasLimit: 0, - MvxSCCallArguments: nil, }, { ValueToTransferToMvx: big.NewInt(1000), ValueToSendFromMvX: nil, - MvxSCCallMethod: "callPayable", - MvxSCCallGasLimit: 50000000, - MvxSCCallArguments: nil, + MvxSCCallData: createScCallData("callPayable", 50000000), }, }, ESDTSafeExtraBalance: big.NewInt(0), diff --git a/integrationTests/relayers/slowTests/framework/ethereumHandler.go b/integrationTests/relayers/slowTests/framework/ethereumHandler.go index 286cbf67..0168bb38 100644 --- a/integrationTests/relayers/slowTests/framework/ethereumHandler.go +++ b/integrationTests/relayers/slowTests/framework/ethereumHandler.go @@ -20,7 +20,6 @@ import ( "github.com/multiversx/mx-bridge-eth-go/clients/ethereum/wrappers" "github.com/multiversx/mx-bridge-eth-go/core/converters" "github.com/multiversx/mx-bridge-eth-go/integrationTests" - "github.com/multiversx/mx-bridge-eth-go/parsers" "github.com/multiversx/mx-bridge-eth-go/testsCommon" "github.com/multiversx/mx-sdk-go/core" "github.com/stretchr/testify/require" @@ -355,23 +354,13 @@ func (handler *EthereumHandler) createDepositsOnEthereumForToken( } var tx *types.Transaction - if len(operation.MvxSCCallMethod) > 0 { - codec := parsers.MultiversxCodec{} - callData := parsers.CallData{ - Type: parsers.DataPresentProtocolMarker, - Function: operation.MvxSCCallMethod, - GasLimit: operation.MvxSCCallGasLimit, - Arguments: operation.MvxSCCallArguments, - } - - buff := codec.EncodeCallData(callData) - + if len(operation.MvxSCCallData) > 0 { tx, err = handler.SafeContract.DepositWithSCExecution( auth, token.EthErc20Address, operation.ValueToTransferToMvx, mvxTestCallerAddress.AddressSlice(), - string(buff), + string(operation.MvxSCCallData), ) } else { tx, err = handler.SafeContract.Deposit(auth, token.EthErc20Address, operation.ValueToTransferToMvx, handler.TestKeys.MvxAddress.AddressSlice()) diff --git a/integrationTests/relayers/slowTests/framework/testSetup.go b/integrationTests/relayers/slowTests/framework/testSetup.go index afc2009c..28f8736e 100644 --- a/integrationTests/relayers/slowTests/framework/testSetup.go +++ b/integrationTests/relayers/slowTests/framework/testSetup.go @@ -110,7 +110,7 @@ func (setup *TestSetup) StartRelayersAndScModule() { func (setup *TestSetup) startScCallerModule() { cfg := config.ScCallsModuleConfig{ ScProxyBech32Address: setup.MultiversxHandler.ScProxyAddress.Bech32(), - ExtraGasToExecute: 30_000_000, // 30 million (50 mil call -> provided + 20 mil callback + 10 mil extra) + ExtraGasToExecute: 60_000_000, // 60 million: this ensures that a SC call with 0 gas limit is refunded NetworkAddress: setup.ChainSimulator.GetNetworkAddress(), ProxyMaxNoncesDelta: 5, ProxyFinalityCheck: false, @@ -184,7 +184,7 @@ func (setup *TestSetup) isTransferDoneFromEthereumForToken(params TestTokenParam continue } - if len(operation.MvxSCCallMethod) > 0 { + if len(operation.MvxSCCallData) > 0 { if !operation.MvxFaultySCCall { expectedValueOnContract.Add(expectedValueOnContract, operation.ValueToTransferToMvx) } @@ -228,7 +228,7 @@ func (setup *TestSetup) isTransferDoneFromEthereumWithRefundForToken(params Test } expectedValueOnReceiver.Add(expectedValueOnReceiver, big.NewInt(0).Sub(valueToSendFromMvX, valueToTransferToMvx)) - if len(operation.MvxSCCallMethod) > 0 { + if len(operation.MvxSCCallData) > 0 { if operation.MvxFaultySCCall { // the balance should be bridged back to the receiver on Ethereum - fee expectedValueOnReceiver.Add(expectedValueOnReceiver, valueToTransferToMvx) diff --git a/integrationTests/relayers/slowTests/framework/types.go b/integrationTests/relayers/slowTests/framework/types.go index 61697ba4..f494c8bf 100644 --- a/integrationTests/relayers/slowTests/framework/types.go +++ b/integrationTests/relayers/slowTests/framework/types.go @@ -33,9 +33,7 @@ type IssueTokenParams struct { type TokenOperations struct { ValueToTransferToMvx *big.Int ValueToSendFromMvX *big.Int - MvxSCCallMethod string - MvxSCCallGasLimit uint64 - MvxSCCallArguments []string + MvxSCCallData []byte MvxFaultySCCall bool } diff --git a/integrationTests/relayers/slowTests/refundWithChainSimulator_test.go b/integrationTests/relayers/slowTests/refundWithChainSimulator_test.go index b582d94a..47f3237a 100644 --- a/integrationTests/relayers/slowTests/refundWithChainSimulator_test.go +++ b/integrationTests/relayers/slowTests/refundWithChainSimulator_test.go @@ -10,25 +10,134 @@ import ( "testing" "github.com/multiversx/mx-bridge-eth-go/integrationTests/relayers/slowTests/framework" + "github.com/multiversx/mx-bridge-eth-go/parsers" ) func TestRelayersShouldExecuteTransfersWithRefund(t *testing.T) { - usdcToken := GenerateTestUSDCToken() - usdcToken.TestOperations[2].MvxSCCallMethod = "unknownFunction" - usdcToken.TestOperations[2].MvxFaultySCCall = true - usdcToken.EthTestAddrExtraBalance = big.NewInt(-5000 + 2500 - 50 - 7000 + 300 - 50 - 1000 + 950) // -(eth->mvx) + (mvx->eth) - fees + revert after bad SC call - usdcToken.ESDTSafeExtraBalance = big.NewInt(150) // extra is just for the fees for the 2 transfers mvx->eth and the failed eth->mvx that needed refund - - memeToken := GenerateTestMEMEToken() - memeToken.TestOperations[2].MvxSCCallMethod = "unknownFunction" - memeToken.TestOperations[2].MvxFaultySCCall = true - - testRelayersWithChainSimulatorAndTokensAndRefund( - t, - make(chan error), - usdcToken, - memeToken, - ) + t.Run("unknown marker and damaged SC call data should refund", func(t *testing.T) { + t.Skip("TODO: fix this test") // TODO: fix this test + + callData := []byte{5, 4, 55} + usdcToken := GenerateTestUSDCToken() + usdcToken.TestOperations[2].MvxSCCallData = callData + usdcToken.TestOperations[2].MvxFaultySCCall = true + usdcToken.EthTestAddrExtraBalance = big.NewInt(-5000 + 2500 - 50 - 7000 + 300 - 50 - 1000 + 950) // -(eth->mvx) + (mvx->eth) - fees + revert after bad SC call + usdcToken.ESDTSafeExtraBalance = big.NewInt(150) // extra is just for the fees for the 2 transfers mvx->eth and the failed eth->mvx that needed refund + + memeToken := GenerateTestMEMEToken() + memeToken.TestOperations[2].MvxSCCallData = callData + memeToken.TestOperations[2].MvxFaultySCCall = true + + testRelayersWithChainSimulatorAndTokensAndRefund( + t, + make(chan error), + usdcToken, + memeToken, + ) + }) + t.Run("damaged SC call data should refund", func(t *testing.T) { + t.Skip("TODO: fix this test") // TODO: fix this test + + callData := []byte{parsers.DataPresentProtocolMarker, 4, 55} + usdcToken := GenerateTestUSDCToken() + usdcToken.TestOperations[2].MvxSCCallData = callData + usdcToken.TestOperations[2].MvxFaultySCCall = true + usdcToken.EthTestAddrExtraBalance = big.NewInt(-5000 + 2500 - 50 - 7000 + 300 - 50 - 1000 + 950) // -(eth->mvx) + (mvx->eth) - fees + revert after bad SC call + usdcToken.ESDTSafeExtraBalance = big.NewInt(150) // extra is just for the fees for the 2 transfers mvx->eth and the failed eth->mvx that needed refund + + memeToken := GenerateTestMEMEToken() + memeToken.TestOperations[2].MvxSCCallData = callData + memeToken.TestOperations[2].MvxFaultySCCall = true + + testRelayersWithChainSimulatorAndTokensAndRefund( + t, + make(chan error), + usdcToken, + memeToken, + ) + }) + t.Run("unknown function should refund", func(t *testing.T) { + callData := createScCallData("unknownFunction", 50000000) + usdcToken := GenerateTestUSDCToken() + usdcToken.TestOperations[2].MvxSCCallData = callData + usdcToken.TestOperations[2].MvxFaultySCCall = true + usdcToken.EthTestAddrExtraBalance = big.NewInt(-5000 + 2500 - 50 - 7000 + 300 - 50 - 1000 + 950) // -(eth->mvx) + (mvx->eth) - fees + revert after bad SC call + usdcToken.ESDTSafeExtraBalance = big.NewInt(150) // extra is just for the fees for the 2 transfers mvx->eth and the failed eth->mvx that needed refund + + memeToken := GenerateTestMEMEToken() + memeToken.TestOperations[2].MvxSCCallData = callData + memeToken.TestOperations[2].MvxFaultySCCall = true + + testRelayersWithChainSimulatorAndTokensAndRefund( + t, + make(chan error), + usdcToken, + memeToken, + ) + }) + t.Run("0 gas limit should refund", func(t *testing.T) { + t.Skip("TODO: fix this test") // TODO: fix this test + + callData := createScCallData("callPayable", 0) + usdcToken := GenerateTestUSDCToken() + usdcToken.TestOperations[2].MvxSCCallData = callData + usdcToken.TestOperations[2].MvxFaultySCCall = true + usdcToken.EthTestAddrExtraBalance = big.NewInt(-5000 + 2500 - 50 - 7000 + 300 - 50 - 1000 + 950) // -(eth->mvx) + (mvx->eth) - fees + revert after bad SC call + usdcToken.ESDTSafeExtraBalance = big.NewInt(150) // extra is just for the fees for the 2 transfers mvx->eth and the failed eth->mvx that needed refund + + memeToken := GenerateTestMEMEToken() + memeToken.TestOperations[2].MvxSCCallData = callData + memeToken.TestOperations[2].MvxFaultySCCall = true + + testRelayersWithChainSimulatorAndTokensAndRefund( + t, + make(chan error), + usdcToken, + memeToken, + ) + }) + t.Run("small gas limit should refund", func(t *testing.T) { + t.Skip("TODO: fix this test") // TODO: fix this test + + callData := createScCallData("callPayable", 2000) + usdcToken := GenerateTestUSDCToken() + usdcToken.TestOperations[2].MvxSCCallData = callData + usdcToken.TestOperations[2].MvxFaultySCCall = true + usdcToken.EthTestAddrExtraBalance = big.NewInt(-5000 + 2500 - 50 - 7000 + 300 - 50 - 1000 + 950) // -(eth->mvx) + (mvx->eth) - fees + revert after bad SC call + usdcToken.ESDTSafeExtraBalance = big.NewInt(150) // extra is just for the fees for the 2 transfers mvx->eth and the failed eth->mvx that needed refund + + memeToken := GenerateTestMEMEToken() + memeToken.TestOperations[2].MvxSCCallData = callData + memeToken.TestOperations[2].MvxFaultySCCall = true + + testRelayersWithChainSimulatorAndTokensAndRefund( + t, + make(chan error), + usdcToken, + memeToken, + ) + }) + t.Run("extra parameter should refund", func(t *testing.T) { + t.Skip("TODO: fix this test") // TODO: fix this test + + callData := createScCallData("callPayable", 50000000, "extra parameter") + usdcToken := GenerateTestUSDCToken() + usdcToken.TestOperations[2].MvxSCCallData = callData + usdcToken.TestOperations[2].MvxFaultySCCall = true + usdcToken.EthTestAddrExtraBalance = big.NewInt(-5000 + 2500 - 50 - 7000 + 300 - 50 - 1000 + 950) // -(eth->mvx) + (mvx->eth) - fees + revert after bad SC call + usdcToken.ESDTSafeExtraBalance = big.NewInt(150) // extra is just for the fees for the 2 transfers mvx->eth and the failed eth->mvx that needed refund + + memeToken := GenerateTestMEMEToken() + memeToken.TestOperations[2].MvxSCCallData = callData + memeToken.TestOperations[2].MvxFaultySCCall = true + + testRelayersWithChainSimulatorAndTokensAndRefund( + t, + make(chan error), + usdcToken, + memeToken, + ) + }) } func testRelayersWithChainSimulatorAndTokensAndRefund(tb testing.TB, manualStopChan chan error, tokens ...framework.TestTokenParams) { From 30ddea000dc81077db13420fb456ae193d8f682c Mon Sep 17 00:00:00 2001 From: Iulian Pascalau Date: Fri, 9 Aug 2024 23:33:10 +0300 Subject: [PATCH 2/5] - fixes and new contracts --- bridges/ethMultiversX/bridgeExecutor.go | 21 +++++--- bridges/ethMultiversX/bridgeExecutor_test.go | 23 +++++--- executors/multiversx/module/interface.go | 6 +++ executors/multiversx/module/scCallsModule.go | 14 +++-- executors/multiversx/scCallsExecutor.go | 9 ++++ executors/multiversx/scCallsExecutor_test.go | 9 ++++ .../ethToMultiversXWithChainSimulator_test.go | 1 + .../relayers/slowTests/framework/interface.go | 6 +++ .../relayers/slowTests/framework/testSetup.go | 35 ++++++++---- .../refundWithChainSimulator_test.go | 14 ++--- .../contracts/mvx/bridge-proxy.abi.json | 20 +++++-- .../testdata/contracts/mvx/bridge-proxy.wasm | Bin 14912 -> 15176 bytes .../mvx/bridged-tokens-wrapper.abi.json | 18 +++++-- .../contracts/mvx/bridged-tokens-wrapper.wasm | Bin 11891 -> 12026 bytes .../testdata/contracts/mvx/esdt-safe.abi.json | 26 +++++---- .../testdata/contracts/mvx/esdt-safe.wasm | Bin 30672 -> 30741 bytes .../mvx/multi-transfer-esdt.abi.json | 43 +++------------ .../contracts/mvx/multi-transfer-esdt.wasm | Bin 21367 -> 21970 bytes .../testdata/contracts/mvx/multisig.abi.json | 50 ++++++++++-------- .../testdata/contracts/mvx/multisig.wasm | Bin 35348 -> 35799 bytes .../contracts/mvx/test-caller.abi.json | 10 ++-- 21 files changed, 184 insertions(+), 121 deletions(-) diff --git a/bridges/ethMultiversX/bridgeExecutor.go b/bridges/ethMultiversX/bridgeExecutor.go index f6f63231..db9aa9a6 100644 --- a/bridges/ethMultiversX/bridgeExecutor.go +++ b/bridges/ethMultiversX/bridgeExecutor.go @@ -38,6 +38,13 @@ type ArgsBridgeExecutor struct { MaxRestriesOnWasProposed uint64 } +var emtpyCallData = parsers.CallData{ + Type: parsers.DataPresentProtocolMarker, + Function: "", + GasLimit: 0, + Arguments: nil, +} + type bridgeExecutor struct { log logger.Logger topologyProvider TopologyProvider @@ -483,17 +490,15 @@ func (executor *bridgeExecutor) addMetadataToTransfer(transfer *bridgeCommon.Dep for _, event := range events { if event.DepositNonce.Uint64() == transfer.Nonce { transfer.Data = []byte(event.CallData) - if len(transfer.Data) > 0 && transfer.Data[0] != parsers.DataPresentProtocolMarker { - executor.log.Warn("found a call data that does not adhere to the protocol, adding data present marker on the first byte", - "deposit nonce", transfer.Nonce, "call data", []byte(transfer.Data)) - - transfer.Data = append([]byte{parsers.DataPresentProtocolMarker}, transfer.Data...) - } - var err error transfer.DisplayableData, err = ConvertToDisplayableData(transfer.Data) if err != nil { - executor.log.Warn("failed to convert call data to displayable data", "error", err) + executor.log.Warn("failed to convert call data to displayable data, will alter and call with an empty call data struct", + "error", err, + "call data", fmt.Sprintf("%+v", emtpyCallData)) + + codec := parsers.MultiversxCodec{} + transfer.Data = codec.EncodeCallData(emtpyCallData) } return transfer diff --git a/bridges/ethMultiversX/bridgeExecutor_test.go b/bridges/ethMultiversX/bridgeExecutor_test.go index 8ff165de..7cd2f1c3 100644 --- a/bridges/ethMultiversX/bridgeExecutor_test.go +++ b/bridges/ethMultiversX/bridgeExecutor_test.go @@ -28,6 +28,7 @@ import ( var expectedErr = errors.New("expected error") var providedBatch = &bridgeCommon.TransferBatch{} var expectedMaxRetries = uint64(3) +var codec = parsers.MultiversxCodec{} func createMockExecutorArgs() ArgsBridgeExecutor { return ArgsBridgeExecutor{ @@ -400,13 +401,13 @@ func TestEthToMultiversXBridgeExecutor_GetAndStoreBatchFromEthereum(t *testing.T assert.True(t, expectedBatch == executor.batch) }) t.Run("should add deposits metadata for sc calls", func(t *testing.T) { - t.Run("data contains the marker", func(t *testing.T) { + t.Run("invalid data", func(t *testing.T) { t.Parallel() args := createMockExecutorArgs() providedNonce := uint64(8346) depositNonce := uint64(100) - depositData := string([]byte{parsers.DataPresentProtocolMarker}) + "testData" + depositData := "testData" expectedBatch := &bridgeCommon.TransferBatch{ ID: providedNonce, Deposits: []*bridgeCommon.DepositTransfer{ @@ -432,15 +433,21 @@ func TestEthToMultiversXBridgeExecutor_GetAndStoreBatchFromEthereum(t *testing.T assert.Nil(t, err) assert.True(t, expectedBatch == executor.GetStoredBatch()) // pointer testing - assert.Equal(t, depositData, string(executor.batch.Deposits[0].Data)) + expectedDepositData := codec.EncodeCallData(emtpyCallData) + assert.Equal(t, string(expectedDepositData), string(executor.batch.Deposits[0].Data)) }) - t.Run("data does not contain the marker", func(t *testing.T) { + t.Run("correct data", func(t *testing.T) { t.Parallel() args := createMockExecutorArgs() providedNonce := uint64(8346) depositNonce := uint64(100) - depositData := "testData" + depositData := string(codec.EncodeCallData(parsers.CallData{ + Type: parsers.DataPresentProtocolMarker, + Function: "function", + GasLimit: 37, + Arguments: []string{"arg1", "arg2"}, + })) expectedBatch := &bridgeCommon.TransferBatch{ ID: providedNonce, Deposits: []*bridgeCommon.DepositTransfer{ @@ -466,8 +473,7 @@ func TestEthToMultiversXBridgeExecutor_GetAndStoreBatchFromEthereum(t *testing.T assert.Nil(t, err) assert.True(t, expectedBatch == executor.GetStoredBatch()) // pointer testing - expectedData := append([]byte{parsers.DataPresentProtocolMarker}, depositData...) - assert.Equal(t, string(expectedData), string(executor.batch.Deposits[0].Data)) + assert.Equal(t, depositData, string(executor.batch.Deposits[0].Data)) }) }) t.Run("should add deposits metadata for sc calls even if with no data", func(t *testing.T) { @@ -500,7 +506,8 @@ func TestEthToMultiversXBridgeExecutor_GetAndStoreBatchFromEthereum(t *testing.T assert.Nil(t, err) assert.True(t, expectedBatch == executor.GetStoredBatch()) // pointer testing - assert.Equal(t, "", string(executor.batch.Deposits[0].Data)) + expectedDepositData := codec.EncodeCallData(emtpyCallData) + assert.Equal(t, string(expectedDepositData), string(executor.batch.Deposits[0].Data)) }) } diff --git a/executors/multiversx/module/interface.go b/executors/multiversx/module/interface.go index 853b1bc9..69fab4b3 100644 --- a/executors/multiversx/module/interface.go +++ b/executors/multiversx/module/interface.go @@ -19,3 +19,9 @@ type pollingHandler interface { Close() error IsInterfaceNil() bool } + +type executor interface { + Execute(ctx context.Context) error + GetNumSentTransaction() uint32 + IsInterfaceNil() bool +} diff --git a/executors/multiversx/module/scCallsModule.go b/executors/multiversx/module/scCallsModule.go index 1adc3dce..444252fa 100644 --- a/executors/multiversx/module/scCallsModule.go +++ b/executors/multiversx/module/scCallsModule.go @@ -23,8 +23,9 @@ var keyGen = signing.NewKeyGenerator(suite) var singleSigner = &singlesig.Ed25519Signer{} type scCallsModule struct { - nonceTxsHandler nonceTransactionsHandler - pollingHandler pollingHandler + nonceTxsHandler nonceTransactionsHandler + pollingHandler pollingHandler + executorInstance executor } // NewScCallsModule creates a starts a new scCallsModule instance @@ -82,7 +83,7 @@ func NewScCallsModule(cfg config.ScCallsModuleConfig, log logger.Logger) (*scCal PrivateKey: privateKey, SingleSigner: singleSigner, } - executor, err := multiversx.NewScCallExecutor(argsExecutor) + module.executorInstance, err = multiversx.NewScCallExecutor(argsExecutor) if err != nil { return nil, err } @@ -92,7 +93,7 @@ func NewScCallsModule(cfg config.ScCallsModuleConfig, log logger.Logger) (*scCal Name: "MultiversX SC calls", PollingInterval: time.Duration(cfg.PollingIntervalInMillis) * time.Millisecond, PollingWhenError: time.Duration(cfg.PollingIntervalInMillis) * time.Millisecond, - Executor: executor, + Executor: module.executorInstance, } module.pollingHandler, err = polling.NewPollingHandler(argsPollingHandler) @@ -108,6 +109,11 @@ func NewScCallsModule(cfg config.ScCallsModuleConfig, log logger.Logger) (*scCal return module, nil } +// GetNumSentTransaction returns the total sent transactions +func (module *scCallsModule) GetNumSentTransaction() uint32 { + return module.executorInstance.GetNumSentTransaction() +} + // Close closes any components started func (module *scCallsModule) Close() error { errPollingHandler := module.pollingHandler.Close() diff --git a/executors/multiversx/scCallsExecutor.go b/executors/multiversx/scCallsExecutor.go index 1404f0a0..4c52c912 100644 --- a/executors/multiversx/scCallsExecutor.go +++ b/executors/multiversx/scCallsExecutor.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "math/big" + "sync/atomic" "github.com/ethereum/go-ethereum/log" "github.com/multiversx/mx-bridge-eth-go/errors" @@ -49,6 +50,7 @@ type scCallExecutor struct { privateKey crypto.PrivateKey singleSigner crypto.SingleSigner senderAddress core.AddressHandler + numSentTransactions uint32 } // NewScCallExecutor creates a new instance of type scCallExecutor @@ -244,6 +246,8 @@ func (executor *scCallExecutor) executeOperation( "extra gas", executor.extraGasToExecute, "sender", bech32Address) + atomic.AddUint32(&executor.numSentTransactions, 1) + return nil } @@ -265,6 +269,11 @@ func (executor *scCallExecutor) signTransactionWithPrivateKey(tx *transaction.Fr return nil } +// GetNumSentTransaction returns the total sent transactions +func (executor *scCallExecutor) GetNumSentTransaction() uint32 { + return atomic.LoadUint32(&executor.numSentTransactions) +} + // IsInterfaceNil returns true if there is no value under the interface func (executor *scCallExecutor) IsInterfaceNil() bool { return executor == nil diff --git a/executors/multiversx/scCallsExecutor_test.go b/executors/multiversx/scCallsExecutor_test.go index 3dc5b5f9..1ca7f4a7 100644 --- a/executors/multiversx/scCallsExecutor_test.go +++ b/executors/multiversx/scCallsExecutor_test.go @@ -187,6 +187,7 @@ func TestScCallExecutor_Execute(t *testing.T) { executor, _ := NewScCallExecutor(args) err := executor.Execute(context.Background()) assert.Equal(t, expectedError, err) + assert.Zero(t, executor.GetNumSentTransaction()) }) t.Run("get pending returns a not ok status, should error", func(t *testing.T) { t.Parallel() @@ -206,6 +207,7 @@ func TestScCallExecutor_Execute(t *testing.T) { err := executor.Execute(context.Background()) assert.NotNil(t, err) assert.Contains(t, err.Error(), "got response code 'NOT OK'") + assert.Zero(t, executor.GetNumSentTransaction()) }) t.Run("get pending returns an odd number of lines, should error", func(t *testing.T) { t.Parallel() @@ -228,6 +230,7 @@ func TestScCallExecutor_Execute(t *testing.T) { err := executor.Execute(context.Background()) assert.ErrorIs(t, err, errInvalidNumberOfResponseLines) assert.Contains(t, err.Error(), "expected an even number, got 1") + assert.Zero(t, executor.GetNumSentTransaction()) }) t.Run("decoder errors, should error", func(t *testing.T) { t.Parallel() @@ -257,6 +260,7 @@ func TestScCallExecutor_Execute(t *testing.T) { executor, _ := NewScCallExecutor(args) err := executor.Execute(context.Background()) assert.ErrorIs(t, err, expectedError) + assert.Zero(t, executor.GetNumSentTransaction()) }) t.Run("get network configs errors, should error", func(t *testing.T) { t.Parallel() @@ -289,6 +293,7 @@ func TestScCallExecutor_Execute(t *testing.T) { executor, _ := NewScCallExecutor(args) err := executor.Execute(context.Background()) assert.ErrorIs(t, err, expectedError) + assert.Zero(t, executor.GetNumSentTransaction()) }) t.Run("ApplyNonceAndGasPrice errors, should error", func(t *testing.T) { t.Parallel() @@ -330,6 +335,7 @@ func TestScCallExecutor_Execute(t *testing.T) { executor, _ := NewScCallExecutor(args) err := executor.Execute(context.Background()) assert.ErrorIs(t, err, expectedError) + assert.Zero(t, executor.GetNumSentTransaction()) }) t.Run("Sign errors, should error", func(t *testing.T) { t.Parallel() @@ -376,6 +382,7 @@ func TestScCallExecutor_Execute(t *testing.T) { executor, _ := NewScCallExecutor(args) err := executor.Execute(context.Background()) assert.ErrorIs(t, err, expectedError) + assert.Zero(t, executor.GetNumSentTransaction()) }) t.Run("SendTransaction errors, should error", func(t *testing.T) { t.Parallel() @@ -416,6 +423,7 @@ func TestScCallExecutor_Execute(t *testing.T) { executor, _ := NewScCallExecutor(args) err := executor.Execute(context.Background()) assert.ErrorIs(t, err, expectedError) + assert.Equal(t, uint32(1), executor.GetNumSentTransaction()) }) t.Run("should work", func(t *testing.T) { t.Parallel() @@ -505,5 +513,6 @@ func TestScCallExecutor_Execute(t *testing.T) { err := executor.Execute(context.Background()) assert.Nil(t, err) assert.True(t, sendWasCalled) + assert.Equal(t, uint32(1), executor.GetNumSentTransaction()) }) } diff --git a/integrationTests/relayers/slowTests/ethToMultiversXWithChainSimulator_test.go b/integrationTests/relayers/slowTests/ethToMultiversXWithChainSimulator_test.go index 54fb6299..7c4cf477 100644 --- a/integrationTests/relayers/slowTests/ethToMultiversXWithChainSimulator_test.go +++ b/integrationTests/relayers/slowTests/ethToMultiversXWithChainSimulator_test.go @@ -95,6 +95,7 @@ func testRelayersWithChainSimulatorAndTokens(tb testing.TB, manualStopChan chan // commit blocks in order to execute incoming txs from relayers setup.EthereumHandler.SimulatedChain.Commit() setup.ChainSimulator.GenerateBlocks(setup.Ctx, 1) + require.LessOrEqual(tb, setup.ScCallerModuleInstance.GetNumSentTransaction(), setup.GetNumScCallsOperations()) return false } diff --git a/integrationTests/relayers/slowTests/framework/interface.go b/integrationTests/relayers/slowTests/framework/interface.go index b2638085..04bb4d48 100644 --- a/integrationTests/relayers/slowTests/framework/interface.go +++ b/integrationTests/relayers/slowTests/framework/interface.go @@ -69,3 +69,9 @@ type TokensRegistry interface { RegisterUniversalToken(abstractTokenIdentifier string, mvxUniversalToken string) RegisterChainSpecificToken(abstractTokenIdentifier string, mvxChainSpecificToken string) } + +// SCCallerModule defines the operation for the module able to execute smart contract calls +type SCCallerModule interface { + GetNumSentTransaction() uint32 + Close() error +} diff --git a/integrationTests/relayers/slowTests/framework/testSetup.go b/integrationTests/relayers/slowTests/framework/testSetup.go index 28f8736e..32261a4e 100644 --- a/integrationTests/relayers/slowTests/framework/testSetup.go +++ b/integrationTests/relayers/slowTests/framework/testSetup.go @@ -3,11 +3,11 @@ package framework import ( "context" "fmt" - "io" "math/big" "os" "path" "sync" + "sync/atomic" "testing" "github.com/multiversx/mx-bridge-eth-go/config" @@ -30,19 +30,20 @@ type TestSetup struct { testing.TB TokensRegistry *KeysStore - Bridge *BridgeComponents - EthereumHandler *EthereumHandler - MultiversxHandler *MultiversxHandler - WorkingDir string - ChainSimulator ChainSimulatorWrapper - ScCallerKeys KeysHolder - ScCallerModule io.Closer + Bridge *BridgeComponents + EthereumHandler *EthereumHandler + MultiversxHandler *MultiversxHandler + WorkingDir string + ChainSimulator ChainSimulatorWrapper + ScCallerKeys KeysHolder + ScCallerModuleInstance SCCallerModule ctxCancel func() Ctx context.Context mutBalances sync.RWMutex esdtBalanceForSafe map[string]*big.Int ethBalanceTestAddress map[string]*big.Int + numScCallsInTest uint32 } // NewTestSetup creates a new e2e test setup @@ -127,7 +128,7 @@ func (setup *TestSetup) startScCallerModule() { } var err error - setup.ScCallerModule, err = module.NewScCallsModule(cfg, log) + setup.ScCallerModuleInstance, err = module.NewScCallsModule(cfg, log) require.Nil(setup, err) log.Info("started SC calls module", "monitoring SC proxy address", setup.MultiversxHandler.ScProxyAddress) } @@ -142,6 +143,7 @@ func (setup *TestSetup) IssueAndConfigureTokens(tokens ...TestTokenParams) { setup.MultiversxHandler.PauseContractsForTokenChanges(setup.Ctx) for _, token := range tokens { + setup.processNumScCallsOperations(token) setup.AddToken(token.IssueTokenParams) setup.EthereumHandler.IssueAndWhitelistToken(setup.Ctx, token.IssueTokenParams) setup.MultiversxHandler.IssueAndWhitelistToken(setup.Ctx, token.IssueTokenParams) @@ -166,6 +168,19 @@ func (setup *TestSetup) IssueAndConfigureTokens(tokens ...TestTokenParams) { } } +func (setup *TestSetup) processNumScCallsOperations(token TestTokenParams) { + for _, op := range token.TestOperations { + if len(op.MvxSCCallData) > 0 { + atomic.AddUint32(&setup.numScCallsInTest, 1) + } + } +} + +// GetNumScCallsOperations returns the number of SC calls in this test setup +func (setup *TestSetup) GetNumScCallsOperations() uint32 { + return atomic.LoadUint32(&setup.numScCallsInTest) +} + // IsTransferDoneFromEthereum returns true if all provided tokens are bridged from Ethereum towards MultiversX func (setup *TestSetup) IsTransferDoneFromEthereum(tokens ...TestTokenParams) bool { isDone := true @@ -312,5 +327,5 @@ func (setup *TestSetup) Close() { require.NoError(setup, setup.EthereumHandler.Close()) setup.ctxCancel() - _ = setup.ScCallerModule.Close() + _ = setup.ScCallerModuleInstance.Close() } diff --git a/integrationTests/relayers/slowTests/refundWithChainSimulator_test.go b/integrationTests/relayers/slowTests/refundWithChainSimulator_test.go index 47f3237a..f6eb391b 100644 --- a/integrationTests/relayers/slowTests/refundWithChainSimulator_test.go +++ b/integrationTests/relayers/slowTests/refundWithChainSimulator_test.go @@ -11,12 +11,11 @@ import ( "github.com/multiversx/mx-bridge-eth-go/integrationTests/relayers/slowTests/framework" "github.com/multiversx/mx-bridge-eth-go/parsers" + "github.com/stretchr/testify/require" ) func TestRelayersShouldExecuteTransfersWithRefund(t *testing.T) { - t.Run("unknown marker and damaged SC call data should refund", func(t *testing.T) { - t.Skip("TODO: fix this test") // TODO: fix this test - + t.Run("unknown marker and malformed SC call data should refund", func(t *testing.T) { callData := []byte{5, 4, 55} usdcToken := GenerateTestUSDCToken() usdcToken.TestOperations[2].MvxSCCallData = callData @@ -35,9 +34,7 @@ func TestRelayersShouldExecuteTransfersWithRefund(t *testing.T) { memeToken, ) }) - t.Run("damaged SC call data should refund", func(t *testing.T) { - t.Skip("TODO: fix this test") // TODO: fix this test - + t.Run("malformed SC call data should refund", func(t *testing.T) { callData := []byte{parsers.DataPresentProtocolMarker, 4, 55} usdcToken := GenerateTestUSDCToken() usdcToken.TestOperations[2].MvxSCCallData = callData @@ -76,8 +73,6 @@ func TestRelayersShouldExecuteTransfersWithRefund(t *testing.T) { ) }) t.Run("0 gas limit should refund", func(t *testing.T) { - t.Skip("TODO: fix this test") // TODO: fix this test - callData := createScCallData("callPayable", 0) usdcToken := GenerateTestUSDCToken() usdcToken.TestOperations[2].MvxSCCallData = callData @@ -97,8 +92,6 @@ func TestRelayersShouldExecuteTransfersWithRefund(t *testing.T) { ) }) t.Run("small gas limit should refund", func(t *testing.T) { - t.Skip("TODO: fix this test") // TODO: fix this test - callData := createScCallData("callPayable", 2000) usdcToken := GenerateTestUSDCToken() usdcToken.TestOperations[2].MvxSCCallData = callData @@ -165,6 +158,7 @@ func testRelayersWithChainSimulatorAndTokensAndRefund(tb testing.TB, manualStopC // commit blocks in order to execute incoming txs from relayers setup.EthereumHandler.SimulatedChain.Commit() setup.ChainSimulator.GenerateBlocks(setup.Ctx, 1) + require.LessOrEqual(tb, setup.ScCallerModuleInstance.GetNumSentTransaction(), setup.GetNumScCallsOperations()) return false } 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 5db4331c..bc9152ac 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.80.0", - "commitHash": "051478957371ee0084a7c0913941d2a8c4757bb9", - "commitDate": "2024-07-21", + "version": "1.78.0", + "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", + "commitDate": "2024-04-29", "channel": "Stable", - "short": "rustc 1.80.0 (051478957 2024-07-21)" + "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" }, "contractCrate": { "name": "bridge-proxy", @@ -13,7 +13,7 @@ }, "framework": { "name": "multiversx-sc", - "version": "0.52.2" + "version": "0.52.3" } }, "name": "BridgeProxyContract", @@ -157,6 +157,16 @@ "promisesCallbackNames": [ "execution_callback" ], + "events": [ + { + "identifier": "pauseContract", + "inputs": [] + }, + { + "identifier": "unpauseContract", + "inputs": [] + } + ], "esdtAttributes": [], "hasCallback": false, "types": { diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridge-proxy.wasm b/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridge-proxy.wasm index 3549ae01ea1c619ba16fbafb515c8b4546b337e8..c337934e3c0a3f2f3669bd8d27fe2c0b3f92435a 100755 GIT binary patch delta 5686 zcmZ`7X>?TO_50qNH#6bQWWG$c$xN2_CJU2|Ajqarc?ePjs>kK%kG7hU5i&qPNUF9+ zCO|~6+Jc`|jED#*Dodf%R;b$zr*w203hkt-O z=#Q~Lz|c9<{Uv&qJKfzuGs~QVuhORvK7og|sDEL4;rWY}T&FQ#dq;aGTgL-ki{~zB zZA-ITd7v%5c+pbWl{}EXHa(}SGtGX>%jTv#FHCo|wRgDLCIGe_>SUU$^zhUgPpf_jh-9 zGmAS1SjJ*v8?M9yG(Je1fC1qho2&w ziJgSI1;?ae>0$-W;ufl7osql@|r;n;yrtr8%Jt(0CFTc!OGg zO-r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NaFNqzK3S zI8K`tK$|Qp{;bGxEg&4T;#L9G1Zvp5xCr*%@Qk`c0!1p6LGr{s*U& 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 249c77c0..1287c24b 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.80.0", - "commitHash": "051478957371ee0084a7c0913941d2a8c4757bb9", - "commitDate": "2024-07-21", + "version": "1.78.0", + "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", + "commitDate": "2024-04-29", "channel": "Stable", - "short": "rustc 1.80.0 (051478957 2024-07-21)" + "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" }, "contractCrate": { "name": "bridged-tokens-wrapper", @@ -13,7 +13,7 @@ }, "framework": { "name": "multiversx-sc", - "version": "0.52.2" + "version": "0.52.3" } }, "name": "BridgedTokensWrapper", @@ -281,6 +281,14 @@ } ], "events": [ + { + "identifier": "pauseContract", + "inputs": [] + }, + { + "identifier": "unpauseContract", + "inputs": [] + }, { "identifier": "wrap_tokens", "inputs": [ 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 615c5f77d8075f6052f0c3088d4631c7cbb5dd18..ea8a30cc1ed5c25288b716e28938171b0dd0e3a1 100755 GIT binary patch delta 3164 zcmai0dvH|M89(RT-Rw>7?&j>~(amEwcXtz#FeV~nQ;L(43jr#%Gdj|7IsY_Vp9?OSyXIMn5usu+L<`|htr4Cv43=0+k#STWeAVjNLv&|YOz4S@0^>2 zq;{Ij+`ZrX_dU*c&&M0CZ2U=?fG>&~C=-dvJH@N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-bf(@>}D>5_K6I>LzAfGK}?&VNHO|q!6?l`A{okt9= zTdKNhxx^dN%xjqTY1P_5skQ&R$Htl%oW`!2(1;$185O}{IcbE%n{q>8oR)Dj6`Wfx z%MkyNLX$Qi-cyfeKvzu@J*#9j*N7}$D(_uj%wzq5w3VGqatFRqv+xF;0O$lPg9@W4 z$Y2!tH`2Tq->lRT&QCRj+`RgdQvF%3Hsnpg?Dw%FoPbMscQ{fU4+4?nL5m!Z@$fg{ zKX@#hjC`)VW?_pB-|~h1Qqy*#dh>pG74Q&nwksxyGGjdIj5SlkhpN zuia9=N0r+r{-v}M=&Euy$nQhEP&)x{)ut6T8CF6jo%%8fQ-fK%JFHrdO>P}{pEx5%=^VLscQt; z0f~J93w1592M^VS-~zr>m+^0xVOB{}HW%A58ExdBjp1$4r7(%xqM z6-*r3xu8f*bCH^4r1y&qf;1$y=o33N4T%>PXYuh^CtZ7|V;!_sHN=b8?+kV{G{Jkg zz9HP9Cr+O}W?Oy55l{jzGfjoGlIeR&$58ad4F0U4bEK5xTdHLBb0wp$Y2t<=ZV`Vk z9VJyknXm2b)6*Vzh~oU&Ki(nh{wfnM%B*N~l$8osF1CX})HOrOVBZp2=dvb&EPlBp z<))C_pr$-wb*}wd!iwQMW||kxpnZ0yB(~&hcu}*XxT-PHqZ3w{%Bd)4$i*4SNq6uo zozk3j8@VX;fm~JEROMG1Z-*=BiMPQCTozwMcgNlFBd`M(B))yUYTjG{EoM1%sJNq@ z_Yj3sOlGcc5`(Uct%;>@8IL5!>#wSlVG4a^ILYyZs+-fQpeti-({cdBrgd-;KWfT( z)QgFbE@F0(-Kg@E{Zu)ACjA=0-XQkq%8MQN`$hZOij@|xDt+-31&O0=`Tzg` 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 bef93d51..68049513 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.80.0", - "commitHash": "051478957371ee0084a7c0913941d2a8c4757bb9", - "commitDate": "2024-07-21", + "version": "1.78.0", + "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", + "commitDate": "2024-04-29", "channel": "Stable", - "short": "rustc 1.80.0 (051478957 2024-07-21)" + "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" }, "contractCrate": { "name": "esdt-safe", @@ -13,7 +13,7 @@ }, "framework": { "name": "multiversx-sc", - "version": "0.52.2" + "version": "0.52.3" } }, "name": "EsdtSafe", @@ -84,10 +84,10 @@ }, { "docs": [ - "Converts failed Ethereum -> Elrond transactions to Elrond -> Ethereum transaction.", + "Converts failed Ethereum -> MultiversX transactions to MultiversX -> Ethereum transaction.", "This is done every now and then to refund the tokens.", "", - "As with normal Elrond -> Ethereum transactions, a part of the tokens will be", + "As with normal MultiversX -> Ethereum transactions, a part of the tokens will be", "subtracted to pay for the fees" ], "name": "addRefundBatch", @@ -105,7 +105,7 @@ }, { "docs": [ - "Create an Elrond -> Ethereum transaction. Only fungible tokens are accepted.", + "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", @@ -128,7 +128,7 @@ }, { "docs": [ - "Claim funds for failed Elrond -> Ethereum transactions.", + "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." ], @@ -796,6 +796,14 @@ "indexed": true } ] + }, + { + "identifier": "pauseContract", + "inputs": [] + }, + { + "identifier": "unpauseContract", + "inputs": [] } ], "esdtAttributes": [], diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/esdt-safe.wasm b/integrationTests/relayers/slowTests/testdata/contracts/mvx/esdt-safe.wasm index 95f39fe76585c3880415f88d3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NI@4GBOB_9|FDPg+A$@we zBg_1wzWI`ZDzE>9As}qQSramvugxY~=2$ER$N72}- zM_7*NIt@{_ZyF*$eg!q%4KgotknRgRNBP&me%`Nx|80)TJ)G#8@$$Q7Hf7Vqc_sk_ z^mb8r9mlI*JZ40N^GJBq8>3MHJ&%z5=&4AkM`@_;)};$hJ4rIQY{8&KhZy2h;!Qn7 zpRP=xK4iN-sgi_5i+xf85tpvGaEVGP3wuL9@0c`9+43QMc){TLoc=)E0}+2Br<%ga ztpH4d72ah@g%cN@#>>20%-7GHx?Y$Os7pe!-mz|H_3+&=1Vy}I%A@g~w7WK-dc%Oj9s z!(LI%7_^=Q6Ax3c`iJ!Ajibazx}vE+qRQl^MPC!6j6ja)uFFP#4TMqJk)$YQl>AMR z?;SRSW8Z+4X+|Xc`g>V(-w45q21NbBQWH&Ojryy;Y2kph-_ZRwei7WJcPuOz#bT5- z$R{SPqlUtJmvfwdw664u0e;29Df*RR;qaked`M~@P>3X6uu1qf6+OS!GcK>i!|&S5 zZ^^!q?sXfjZj=Fs^=ZwOr7k8i_9SHL_l8JXKCD+Xj~vts=TX`h<`2zPMGWI@_i4Z0 z({?PsnCT-k#p^nv4JeduBSRI;oY?qCq8Y?HgC=`IjHwmwP~t69KNu^^e3prW(|;e9 zy;r{->p-#}{6*1o#=G+m{R zcHJ_+e53(CNPwoq*z" + "name": "raw_transfers", + "type": "bytes" } ], "outputs": [] @@ -393,35 +393,6 @@ "type": "array20" } ] - }, - "EthTransaction": { - "type": "struct", - "fields": [ - { - "name": "from", - "type": "EthAddress" - }, - { - "name": "to", - "type": "Address" - }, - { - "name": "token_id", - "type": "TokenIdentifier" - }, - { - "name": "amount", - "type": "BigUint" - }, - { - "name": "tx_nonce", - "type": "u64" - }, - { - "name": "call_data", - "type": "Option" - } - ] } } } 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 9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.", + "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" ], @@ -143,8 +143,8 @@ "type": "u64" }, { - "name": "transfers", - "type": "List" + "name": "raw_transfers", + "type": "bytes" } ], "outputs": [ @@ -155,11 +155,11 @@ }, { "docs": [ - "Failed Ethereum -> Elrond transactions are saved in the MultiTransfer SC", + "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 Elrond -> Ethereum transactions", + "converting the transactions into MultiversX -> Ethereum transactions", "and adding them into EsdtSafe batches" ], "name": "moveRefundBatchToSafeFromChildContract", @@ -366,7 +366,7 @@ "", "where price_per_gas_unit is queried from the aggregator (fee estimator SC)" ], - "name": "changeElrondToEthGasLimit", + "name": "changeMultiversXToEthGasLimit", "onlyOwner": true, "mutability": "mutable", "inputs": [ @@ -507,7 +507,7 @@ }, { "docs": [ - "Sets the maximum bridged amount for the token for the Elrond -> Ethereum direction.", + "Sets the maximum bridged amount for the token for the MultiversX -> Ethereum direction.", "Any attempt to transfer over this amount will be rejected." ], "name": "esdtSafeSetMaxBridgedAmountForToken", @@ -527,7 +527,7 @@ }, { "docs": [ - "Same as the function above, but for Ethereum -> Elrond transactions." + "Same as the function above, but for Ethereum -> MultiversX transactions." ], "name": "multiTransferEsdtSetMaxBridgedAmountForToken", "onlyOwner": true, @@ -546,7 +546,7 @@ }, { "docs": [ - "Any failed Ethereum -> Elrond transactions are added into so-called \"refund batches\\", + "Any failed Ethereum -> MultiversX transactions are added into so-called \"refund batches\\", "This configures the size of a batch." ], "name": "multiTransferEsdtSetMaxRefundTxBatchSize", @@ -704,7 +704,7 @@ }, { "docs": [ - "Mapping between ERC20 Ethereum address and Elrond ESDT Token Identifiers" + "Mapping between ERC20 Ethereum address and MultiversX ESDT Token Identifiers" ], "name": "getErc20AddressForTokenId", "mutability": "readonly", @@ -800,7 +800,7 @@ }, { "docs": [ - "Returns a batch of failed Ethereum -> Elrond transactions.", + "Returns a batch of failed Ethereum -> MultiversX transactions.", "The result format is the same as getCurrentTxBatch" ], "name": "getCurrentRefundBatch", @@ -834,7 +834,7 @@ }, { "docs": [ - "Used for Ethereum -> Elrond batches.", + "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" ], @@ -846,8 +846,8 @@ "type": "u64" }, { - "name": "transfers", - "type": "List" + "name": "raw_transfers", + "type": "bytes" } ], "outputs": [ @@ -870,8 +870,8 @@ "type": "u64" }, { - "name": "transfers", - "type": "List" + "name": "raw_transfers", + "type": "bytes" } ], "outputs": [ @@ -1159,6 +1159,14 @@ { "identifier": "unpause_esdt_safe", "inputs": [] + }, + { + "identifier": "pauseContract", + "inputs": [] + }, + { + "identifier": "unpauseContract", + "inputs": [] } ], "esdtAttributes": [], diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.wasm b/integrationTests/relayers/slowTests/testdata/contracts/mvx/multisig.wasm index 779cdb07207606a078ebae9c39af7385646448a2..30a8d34e06d55775bc002d1b033830e25de7be49 100755 GIT binary patch delta 11538 zcmbVS34B!5)qnTBnPeuD<%WbLB!Rq{1TrjH2_YbbyvQn`;)2LhK}B>FDXSYggG2-? z3S26!wt`v|RBV-6Tdj(UiUKMM;sS_ut)D2ZQmG4k|8wqplL?@|uip=S@7;6HJ@?$R zpF3H((%iku{Nv+3>ml<&^`tL6(MU_nO0&|0C35|Ke}-ZCEyM4({Qh*m6%1wubAug% zxw%GOe$WUSxgA5fR)IfD7-@y3nP#K~gF(y4H7v_8@vjK8mSNyOBhw!=3^l;tt%FrW zv!;Q0!wC9wI~i)0e@?l9js2D|th53vE}TRn5Q-blu8;V&AFuQeHm0Y&Epj_waPgGO zr%fF__p&*c%$quE_PC7)(!cZhp8Z%ns6NkpApf@u5(&dLLbXC%XEx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u@SPtGr&O_FP&M*0TMI5W5B@Ks92ai)~>6YTilyIf? zV+3lt<;Qb)RI;y!G7_gYsOIwrP5s7oV&G{-it6SJby4Sjc7`;0l(qmvq*JH$2nPRh zr){kZR;2Bd->SXmXPe90)L+hzh@&cNYLVI2rmClw9#9P zbwJ}A+Em-rF+nW`!+F#Fa^elOe`%M8Wcuj4c_H%yEQ`cUQ zhVhCErkxeHw}~ydKfqa&<+pSKRh`bwtf=C+;(oT4mR9p)60N(!t_Qw zS56;-5|`_YZhJu-`6dU0uQ<(K_mief9F_26~j*QKY56rK&1E3<%6zT zh+p0jI3?}dS)OUSj+SjiyE<}7ZawoR_p_29WwQzVaxg|EbC?g^OHbWie5of?^V~}D zii*xH9rhMeL=^s!-l&6?f6{NdJd_U;YFOH9oJh*!@#pXAg}LFDZpWXB07{6`J)iKC zleh%#QGG5QGItZ7>h0l?vzl{GhWyW|yn)5k86^*Jr`JjK9<}4rfo|eUtgK*jl=vRu zWa96V_%<*RS)BMv)SSzDof>=xgC}R9l7 zYlyqd3bz4Dv;g|%9};h89Pp+`LyKcCo%1lpR30g^c2U`&IRQ}_n`&# zHOzX~a*L)k1&S? z03}oS$~*bKg>juZJ6VXiZqwe~nhvwhr~x4qUwbG4j zlDaMYhzWA=B~RDu0I!RQXQhv>tWMT4*st=gD(|D;wO{^?k#v)X7VzKHnybsp61VG1 z6G}3jz55$i+vzKG(t{%8U)0{K>fJL=&*Bj|56o)Py{oibVYH9OerU2CK;dJWrk|ypU49@o^#KBdR@sybdBjX4uR6HB{FUi zNqBJ1gM|B3%lOiXm&-jKTsZF=9`)$;+M$N z%mqKX_{#ZnhF&rI%0+W7?)bKSxJX^RaQ5YkE}64%QAfj#IZ5h_o7+>5-I)^bHRAVn F{|81reZl|$ 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 43eeab2d..b09cd36c 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.80.0", - "commitHash": "051478957371ee0084a7c0913941d2a8c4757bb9", - "commitDate": "2024-07-21", + "version": "1.78.0", + "commitHash": "9b00956e56009bab2aa15d7bff10916599e3d6d6", + "commitDate": "2024-04-29", "channel": "Stable", - "short": "rustc 1.80.0 (051478957 2024-07-21)" + "short": "rustc 1.78.0 (9b00956e5 2024-04-29)" }, "contractCrate": { "name": "test-caller", @@ -13,7 +13,7 @@ }, "framework": { "name": "multiversx-sc", - "version": "0.52.2" + "version": "0.52.3" } }, "name": "TestCallerContract", From 7adf666d3f713c0ac8c4f0ab221e52f97716891b Mon Sep 17 00:00:00 2001 From: Iulian Pascalau Date: Mon, 12 Aug 2024 11:12:54 +0300 Subject: [PATCH 3/5] - new contract --- .../refundWithChainSimulator_test.go | 2 -- .../testdata/contracts/mvx/bridge-proxy.wasm | Bin 15176 -> 15609 bytes 2 files changed, 2 deletions(-) diff --git a/integrationTests/relayers/slowTests/refundWithChainSimulator_test.go b/integrationTests/relayers/slowTests/refundWithChainSimulator_test.go index f6eb391b..73667f3d 100644 --- a/integrationTests/relayers/slowTests/refundWithChainSimulator_test.go +++ b/integrationTests/relayers/slowTests/refundWithChainSimulator_test.go @@ -111,8 +111,6 @@ func TestRelayersShouldExecuteTransfersWithRefund(t *testing.T) { ) }) t.Run("extra parameter should refund", func(t *testing.T) { - t.Skip("TODO: fix this test") // TODO: fix this test - callData := createScCallData("callPayable", 50000000, "extra parameter") usdcToken := GenerateTestUSDCToken() usdcToken.TestOperations[2].MvxSCCallData = callData diff --git a/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridge-proxy.wasm b/integrationTests/relayers/slowTests/testdata/contracts/mvx/bridge-proxy.wasm index c337934e3c0a3f2f3669bd8d27fe2c0b3f92435a..94ccf995062b1f140013a963225a3192f7579018 100755 GI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ezpSg$xrg@J+Oi(=u+nEaujkSeoH!EsGz=Mjnm(UtnS=!*|yNoo=J?3xzz3 zQQ~nkiKcWD3d}~tQP9wQXMb9(QZG<1vRn6~_TD?2PKx5*Z3l~Z+p1n~+pGLfxVZi5 delta 1685 zcmb7EU1%Le6rMS|d%M@Yn>#h>P14?m*=-~nnnGI3CZvLQiv58i6e%J;6p=uZ?NdVu z>O*&PlV}6Apo8F(Q2c+02wOo27AXn^p?$De5TvLeDlOC(f1&Z5*}FHyH@V!MnRCvZ zpYMEU{(ABH!pE^)b(}h56~=n<$L)Cze^2MR^V&m0@3b#uO!bSevMghvEt%xvBJFod zTdnKo#Wj94e`Na~9GBg_OBTPWFE^U_z1oocdwr*|2NhQT`6^$}+w!cFzQpZx4>~}v z;!Mbg%~mqeUPMsHDQ`rOSta8uIiNj|`c&!}#h-m-PC`Zavi4 z)$9}}Ug;Etc8Ek#P+pG)ENHj&=-xHHtZ(m~Y2>csr2IU`Ka|McXZqw=lp>N`yhq_M zd_;%$=^#F!FSLpuc|RC}c#DKb5ZnhF8ynjKi?pPZpQx+j^PPhDlxgE(_^HJVG@_gL@ZL3K}DkP32WBK@bfcElq-rp zu~BO_*hZJ8*cJm`7?fq~W3xQ~oOvZZPOH^r;)mbmhlyA)&FAf^~Isy(E?bz@`q9*@H)li|Pc$wm4B;p?@7ns0Ys*vj zCSwg`!!$AZ|%R!d(03Mw;h_|{KliJ zkp2$bDo1SmOvs9tMa_uIm=KW%3>q{BOrmtuv&;A!qZF)!^KIG zE{3Mnf)+k1948Go$gwe+N27c5)`d*}>iYVATs>fXncHd(uaOf43o($NW+HA zS9H}ti6O>2Z*JXFb45xt9ap*Q%y#-N^5 From 7d39d136dbc7712b0a9c7d84ef9a1a8d0ad73dd8 Mon Sep 17 00:00:00 2001 From: Iulian Pascalau Date: Mon, 12 Aug 2024 11:29:32 +0300 Subject: [PATCH 4/5] - fixed test --- executors/multiversx/scCallsExecutor_test.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/executors/multiversx/scCallsExecutor_test.go b/executors/multiversx/scCallsExecutor_test.go index 1ca7f4a7..d388665c 100644 --- a/executors/multiversx/scCallsExecutor_test.go +++ b/executors/multiversx/scCallsExecutor_test.go @@ -416,14 +416,20 @@ func TestScCallExecutor_Execute(t *testing.T) { DecodeProxySCCompleteCallDataCalled: func(buff []byte) (parsers.ProxySCCompleteCallData, error) { assert.Equal(t, []byte{0x03, 0x04}, buff) - return parsers.ProxySCCompleteCallData{}, nil + return parsers.ProxySCCompleteCallData{ + CallData: parsers.CallData{ + Type: parsers.DataPresentProtocolMarker, + Function: "func", + GasLimit: 1000000, + }, + }, nil }, } executor, _ := NewScCallExecutor(args) err := executor.Execute(context.Background()) assert.ErrorIs(t, err, expectedError) - assert.Equal(t, uint32(1), executor.GetNumSentTransaction()) + assert.Equal(t, uint32(0), executor.GetNumSentTransaction()) }) t.Run("should work", func(t *testing.T) { t.Parallel() From 876b57b0b5131d0088bcde4bc13212c64bfece1a Mon Sep 17 00:00:00 2001 From: Iulian Pascalau Date: Mon, 12 Aug 2024 11:49:21 +0300 Subject: [PATCH 5/5] - added timeout to go test operation --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 34a3c4e4..87345d8b 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ test-coverage: slow-tests: clean-test @docker compose -f docker/docker-compose.yml build - @docker compose -f docker/docker-compose.yml up & go test ./integrationTests/... -v -tags slow + @docker compose -f docker/docker-compose.yml up & go test ./integrationTests/... -v -timeout 40m -tags slow @docker compose -f docker/docker-compose.yml down -v lint-install: