Skip to content

Commit

Permalink
Merge pull request #6434 from multiversx/esdt-testing-scenarios
Browse files Browse the repository at this point in the history
add testing scenarios and update go mod
  • Loading branch information
BeniaminDrasovean authored Sep 4, 2024
2 parents 0998a1e + 7c71e3f commit a1c51b3
Show file tree
Hide file tree
Showing 5 changed files with 500 additions and 121 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ require (
github.com/multiversx/mx-chain-logger-go v1.0.15
github.com/multiversx/mx-chain-scenario-go v1.4.4
github.com/multiversx/mx-chain-storage-go v1.0.16
github.com/multiversx/mx-chain-vm-common-go v1.5.14-0.20240830102128-33dd73d11361
github.com/multiversx/mx-chain-vm-go v1.5.32-0.20240830102521-585b30e96690
github.com/multiversx/mx-chain-vm-common-go v1.5.14-0.20240903110629-ee357f94b63c
github.com/multiversx/mx-chain-vm-go v1.5.32-0.20240903110843-ed790853265d
github.com/multiversx/mx-chain-vm-v1_2-go v1.2.68
github.com/multiversx/mx-chain-vm-v1_3-go v1.3.69
github.com/multiversx/mx-chain-vm-v1_4-go v1.4.98
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -399,10 +399,10 @@ github.com/multiversx/mx-chain-scenario-go v1.4.4 h1:DVE2V+FPeyD/yWoC+KEfPK3jsFz
github.com/multiversx/mx-chain-scenario-go v1.4.4/go.mod h1:kI+TWR3oIEgUkbwkHCPo2CQ3VjIge+ezGTibiSGwMxo=
github.com/multiversx/mx-chain-storage-go v1.0.16 h1:l2lJq+EAN3YwLbjJrnoKfFd1/1Xmo9DcAUECND2obLs=
github.com/multiversx/mx-chain-storage-go v1.0.16/go.mod h1:uM/z7YyqTOD3wgyH8TfapyEl5sb+7x/Jaxne4cfG4HI=
github.com/multiversx/mx-chain-vm-common-go v1.5.14-0.20240830102128-33dd73d11361 h1:N1CxdRfh+7S0Yywtl3N8LmQDE3ff7wutV58hZvfdnyQ=
github.com/multiversx/mx-chain-vm-common-go v1.5.14-0.20240830102128-33dd73d11361/go.mod h1:sN471lwUKZMIfhNEDgHnSUR5SOv+BCoxF2kv2AnOCj8=
github.com/multiversx/mx-chain-vm-go v1.5.32-0.20240830102521-585b30e96690 h1:rdTYzHlQY4BCru5/hBn5cobNiUwyoCwmxpjNOFUC17k=
github.com/multiversx/mx-chain-vm-go v1.5.32-0.20240830102521-585b30e96690/go.mod h1:up5NULwRXIPld30uaU1IQulTzW9Bew/L1LTcKBTN8Zc=
github.com/multiversx/mx-chain-vm-common-go v1.5.14-0.20240903110629-ee357f94b63c h1:VLAdXl0NsnMWBuJZUJPxK8qK1AKyEzqSoQ7I8NOj0t4=
github.com/multiversx/mx-chain-vm-common-go v1.5.14-0.20240903110629-ee357f94b63c/go.mod h1:sN471lwUKZMIfhNEDgHnSUR5SOv+BCoxF2kv2AnOCj8=
github.com/multiversx/mx-chain-vm-go v1.5.32-0.20240903110843-ed790853265d h1:TSObh+pVpKdjBb0eyLHjBRULIZU+v6voSJd2CNprllg=
github.com/multiversx/mx-chain-vm-go v1.5.32-0.20240903110843-ed790853265d/go.mod h1:2x0I5wbWgrVKj7zeVSWITWqdnqmAiuBfsAdrdbAViQE=
github.com/multiversx/mx-chain-vm-v1_2-go v1.2.68 h1:L3GoAVFtLLzr9ya0rVv1YdTUzS3MyM7kQNBSAjCNO2g=
github.com/multiversx/mx-chain-vm-v1_2-go v1.2.68/go.mod h1:ixxwib+1pXwSDHG5Wa34v0SRScF+BwFzH4wFWY31saI=
github.com/multiversx/mx-chain-vm-v1_3-go v1.3.69 h1:G/PLsyfQV4bMLs2amGRvaLKZoW1DC7M+7ecVaLuaCNc=
Expand Down
10 changes: 5 additions & 5 deletions integrationTests/chainSimulator/vm/egldMultiTransfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func TestChainSimulator_EGLD_MultiTransfer(t *testing.T) {
}

for i := range tokenIDs {
tx = nftCreateTx(nonce, addrs[0].Bytes, tokenIDs[i], tokensMetadata[i])
tx = esdtNftCreateTx(nonce, addrs[0].Bytes, tokenIDs[i], tokensMetadata[i], 1)

txResult, err = cs.SendTxAndGenerateBlockTilTxIsExecuted(tx, maxNumOfBlockToGenerateWhenExecutingTx)
require.Nil(t, err)
Expand Down Expand Up @@ -275,7 +275,7 @@ func TestChainSimulator_EGLD_MultiTransfer_Insufficient_Funds(t *testing.T) {
nftMetaData := txsFee.GetDefaultMetaData()
nftMetaData.Nonce = []byte(hex.EncodeToString(big.NewInt(1).Bytes()))

tx = nftCreateTx(nonce, addrs[0].Bytes, nftTokenID, nftMetaData)
tx = esdtNftCreateTx(nonce, addrs[0].Bytes, nftTokenID, nftMetaData, 1)
nonce++

txResult, err = cs.SendTxAndGenerateBlockTilTxIsExecuted(tx, maxNumOfBlockToGenerateWhenExecutingTx)
Expand Down Expand Up @@ -397,7 +397,7 @@ func TestChainSimulator_EGLD_MultiTransfer_Invalid_Value(t *testing.T) {
nftMetaData := txsFee.GetDefaultMetaData()
nftMetaData.Nonce = []byte(hex.EncodeToString(big.NewInt(1).Bytes()))

tx = nftCreateTx(nonce, addrs[0].Bytes, nftTokenID, nftMetaData)
tx = esdtNftCreateTx(nonce, addrs[0].Bytes, nftTokenID, nftMetaData, 1)
nonce++

txResult, err = cs.SendTxAndGenerateBlockTilTxIsExecuted(tx, maxNumOfBlockToGenerateWhenExecutingTx)
Expand Down Expand Up @@ -519,7 +519,7 @@ func TestChainSimulator_Multiple_EGLD_Transfers(t *testing.T) {
nftMetaData := txsFee.GetDefaultMetaData()
nftMetaData.Nonce = []byte(hex.EncodeToString(big.NewInt(1).Bytes()))

tx = nftCreateTx(nonce, addrs[0].Bytes, nftTokenID, nftMetaData)
tx = esdtNftCreateTx(nonce, addrs[0].Bytes, nftTokenID, nftMetaData, 1)
nonce++

txResult, err = cs.SendTxAndGenerateBlockTilTxIsExecuted(tx, maxNumOfBlockToGenerateWhenExecutingTx)
Expand Down Expand Up @@ -732,7 +732,7 @@ func TestChainSimulator_IssueToken_EGLDTicker(t *testing.T) {
nftMetaData := txsFee.GetDefaultMetaData()
nftMetaData.Nonce = []byte(hex.EncodeToString(big.NewInt(1).Bytes()))

tx = nftCreateTx(nonce, addrs[0].Bytes, nftTokenID, nftMetaData)
tx = esdtNftCreateTx(nonce, addrs[0].Bytes, nftTokenID, nftMetaData, 1)
nonce++

txResult, err = cs.SendTxAndGenerateBlockTilTxIsExecuted(tx, maxNumOfBlockToGenerateWhenExecutingTx)
Expand Down
Loading

0 comments on commit a1c51b3

Please sign in to comment.