Skip to content

Commit 9fc1aa9

Browse files
Merge pull request #904 from multiversx/mandos-only-egld-multi-transfer
mandos tests for fixed issues from mx-scenario
2 parents e0d48e0 + 611c6d2 commit 9fc1aa9

File tree

5 files changed

+170
-3
lines changed

5 files changed

+170
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/multiversx/mx-chain-core-go v1.2.22
1212
github.com/multiversx/mx-chain-crypto-go v1.2.12-0.20240725071000-c3212540166f
1313
github.com/multiversx/mx-chain-logger-go v1.0.15
14-
github.com/multiversx/mx-chain-scenario-go v1.4.5-0.20250211131210-ca58313a13f8
14+
github.com/multiversx/mx-chain-scenario-go v1.5.1-0.20250218130524-4d5a15e117af
1515
github.com/multiversx/mx-chain-storage-go v1.0.16-0.20240725070753-aa7fb322ebdf
1616
github.com/multiversx/mx-chain-vm-common-go v1.5.17-0.20241021074004-c2bdb78da54a
1717
github.com/multiversx/mx-components-big-int v1.0.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ github.com/multiversx/mx-chain-crypto-go v1.2.12-0.20240725071000-c3212540166f h
8989
github.com/multiversx/mx-chain-crypto-go v1.2.12-0.20240725071000-c3212540166f/go.mod h1:9aSp//uBSvqFdzh4gvYISraoruhr1FCTXgPQalQ687k=
9090
github.com/multiversx/mx-chain-logger-go v1.0.15 h1:HlNdK8etyJyL9NQ+6mIXyKPEBo+wRqOwi3n+m2QIHXc=
9191
github.com/multiversx/mx-chain-logger-go v1.0.15/go.mod h1:t3PRKaWB1M+i6gUfD27KXgzLJJC+mAQiN+FLlL1yoGQ=
92-
github.com/multiversx/mx-chain-scenario-go v1.4.5-0.20250211131210-ca58313a13f8 h1:70mdcqvonAsPdN00tU1r92+dGsgsPH8oA8r1PGIwTxI=
93-
github.com/multiversx/mx-chain-scenario-go v1.4.5-0.20250211131210-ca58313a13f8/go.mod h1:sLKkfFGXK8EtnjBKmPcTZ0pbVGPsnUVFKOc2kWhGdFU=
92+
github.com/multiversx/mx-chain-scenario-go v1.5.1-0.20250218130524-4d5a15e117af h1:6ORdoM22EjKrzPXU14ddCpqmP++v9Pz3vGo+lNPv1ac=
93+
github.com/multiversx/mx-chain-scenario-go v1.5.1-0.20250218130524-4d5a15e117af/go.mod h1:sLKkfFGXK8EtnjBKmPcTZ0pbVGPsnUVFKOc2kWhGdFU=
9494
github.com/multiversx/mx-chain-storage-go v1.0.16-0.20240725070753-aa7fb322ebdf h1:L9K7Xzq5SZz6k55R7HrafiRcU+c8/PqozJxys65G4bI=
9595
github.com/multiversx/mx-chain-storage-go v1.0.16-0.20240725070753-aa7fb322ebdf/go.mod h1:ptvW/8r6bam55mVpeVZbyvvvydYM0DQwcPOH0W4Xyx8=
9696
github.com/multiversx/mx-chain-vm-common-go v1.5.17-0.20241021074004-c2bdb78da54a h1:+D5GR9SkHTkKU6fIMZLdSQHeIzbDzOT6fSJfKBG80+g=
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
{
2+
"comment": "simple ESDT transfer to nonexistent account, no SC",
3+
"steps": [
4+
{
5+
"step": "setState",
6+
"accounts": {
7+
"address:A": {
8+
"nonce": "0",
9+
"balance": "0x1000000000",
10+
"esdt": {
11+
"str:TOK-123456": "150"
12+
}
13+
}
14+
}
15+
},
16+
{
17+
"step": "transfer",
18+
"id": "1",
19+
"tx": {
20+
"from": "address:A",
21+
"to": "address:B",
22+
"esdtValue": [
23+
{
24+
"tokenIdentifier": "str:TOK-123456",
25+
"value": "100"
26+
}
27+
],
28+
"gasLimit": "0x100000000",
29+
"gasPrice": "0x01"
30+
}
31+
},
32+
{
33+
"step": "checkState",
34+
"id": "check-1",
35+
"comment": "check after tx 1",
36+
"accounts": {
37+
"address:A": {
38+
"nonce": "1",
39+
"balance": "0xf00000000",
40+
"esdt": {
41+
"str:TOK-123456": "50"
42+
},
43+
"storage": {},
44+
"code": ""
45+
},
46+
"address:B": {
47+
"nonce": "0",
48+
"esdt": {
49+
"str:TOK-123456": "100"
50+
},
51+
"storage": {},
52+
"code": ""
53+
}
54+
}
55+
},
56+
{
57+
"step": "transfer",
58+
"id": "2",
59+
"tx": {
60+
"from": "address:A",
61+
"to": "address:B",
62+
"esdtValue": [
63+
{
64+
"tokenIdentifier": "str:TOK-123456",
65+
"value": "50"
66+
}
67+
],
68+
"gasLimit": "0x100000000",
69+
"gasPrice": "0x01"
70+
}
71+
},
72+
{
73+
"step": "checkState",
74+
"id": "check-2",
75+
"comment": "check after tx 2",
76+
"accounts": {
77+
"address:A": {
78+
"nonce": "2",
79+
"balance": "0xe00000000",
80+
"esdt": {
81+
"str:TOK-123456": "0"
82+
},
83+
"storage": {},
84+
"code": ""
85+
},
86+
"address:B": {
87+
"nonce": "0",
88+
"esdt": {
89+
"str:TOK-123456": "150"
90+
},
91+
"storage": {},
92+
"code": ""
93+
}
94+
}
95+
}
96+
]
97+
}

test/features/payable-features/scenarios/payable_all_transfers.scen.json renamed to test/features/payable-features/scenarios/payable_all_transfers_1.scen.json

File renamed without changes.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"steps": [
3+
{
4+
"step": "setState",
5+
"accounts": {
6+
"address:a_user": {
7+
"nonce": "0",
8+
"balance": "100",
9+
"esdt": {
10+
"str:TOK-123456": "100"
11+
}
12+
},
13+
"sc:payable": {
14+
"nonce": "0",
15+
"balance": "0",
16+
"code": "mxsc:../output/payable-features.mxsc.json"
17+
}
18+
}
19+
},
20+
{
21+
"step": "scCall",
22+
"id": "",
23+
"tx": {
24+
"from": "address:a_user",
25+
"to": "sc:payable",
26+
"esdtValue": [
27+
{
28+
"tokenIdentifier": "str:EGLD-000000",
29+
"value": "10"
30+
}
31+
],
32+
"function": "payable_all_transfers",
33+
"arguments": [],
34+
"gasLimit": "6000000"
35+
},
36+
"expect": {
37+
"out": [
38+
[
39+
"nested:str:EGLD|u64:0|biguint:10"
40+
]
41+
],
42+
"status": "",
43+
"logs": "*",
44+
"gas": "*",
45+
"refund": "*"
46+
}
47+
},
48+
{
49+
"step": "checkState",
50+
"accounts": {
51+
"address:a_user": {
52+
"nonce": "*",
53+
"balance": "90",
54+
"storage": {},
55+
"esdt": {
56+
"str:TOK-123456": "100"
57+
},
58+
"code": ""
59+
},
60+
"sc:payable": {
61+
"nonce": "0",
62+
"balance": "10",
63+
"storage": {},
64+
"esdt": {},
65+
"code": "mxsc:../output/payable-features.mxsc.json"
66+
}
67+
}
68+
}
69+
]
70+
}

0 commit comments

Comments
 (0)