Skip to content

Commit c837b22

Browse files
Merge pull request #818 from multiversx/mandos-58
scenario test update
2 parents f6352e1 + 75053f1 commit c837b22

File tree

10 files changed

+234
-98
lines changed

10 files changed

+234
-98
lines changed

test/adder/scenarios/interactor_trace.scen.json

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"str:CAN-2abf4b": "1000",
1212
"str:CAN-6d39e6": "1000",
1313
"str:CAN-ac1592": "1000"
14-
},
15-
"username": ""
14+
}
1615
}
1716
}
1817
},
@@ -28,53 +27,50 @@
2827
},
2928
{
3029
"step": "scDeploy",
31-
"id": "",
3230
"tx": {
3331
"from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60",
3432
"contractCode": "mxsc:../output/adder.mxsc.json",
3533
"arguments": [
3634
"0x00"
3735
],
38-
"gasLimit": "70,000,000",
39-
"gasPrice": ""
36+
"gasLimit": "70,000,000"
4037
},
4138
"expect": {
39+
"out": [],
4240
"status": "0"
4341
}
4442
},
4543
{
4644
"step": "scCall",
47-
"id": "",
4845
"tx": {
4946
"from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60",
5047
"to": "0x0000000000000000050028600ceb73ac22ec0b6f257aff7bed74dffa3ebfed60",
5148
"function": "add",
5249
"arguments": [
5350
"0x07"
5451
],
55-
"gasLimit": "70,000,000",
56-
"gasPrice": ""
52+
"gasLimit": "70,000,000"
5753
},
5854
"expect": {
55+
"out": [],
5956
"status": "0"
6057
}
6158
},
6259
{
6360
"step": "scCall",
64-
"id": "",
6561
"tx": {
6662
"from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60",
6763
"to": "0x0000000000000000050028600ceb73ac22ec0b6f257aff7bed74dffa3ebfed60",
6864
"function": "add",
6965
"arguments": [
7066
"0x05"
7167
],
72-
"gasLimit": "70,000,000",
73-
"gasPrice": ""
68+
"gasLimit": "70,000,000"
7469
},
7570
"expect": {
71+
"out": [],
7672
"status": "0"
7773
}
7874
}
7975
]
80-
}
76+
}

test/features/basic-features/output/basic-features-storage-bytes.mxsc.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"buildInfo": {
33
"rustc": {
44
"version": "1.76.0-nightly",
5-
"commitHash": "21cce21d8c012f14cf74d5afddd795d324600dac",
6-
"commitDate": "2023-12-11",
5+
"commitHash": "d86d65bbc19b928387f68427fcc3a0da498d8a19",
6+
"commitDate": "2023-12-10",
77
"channel": "Nightly",
8-
"short": "rustc 1.76.0-nightly (21cce21d8 2023-12-11)"
8+
"short": "rustc 1.76.0-nightly (d86d65bbc 2023-12-10)"
99
},
1010
"contractCrate": {
1111
"name": "basic-features",

test/features/basic-features/output/basic-features.mxsc.json

Lines changed: 35 additions & 5 deletions
Large diffs are not rendered by default.

test/features/basic-features/scenarios/big_uint_pow.scen.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@
88
"sc:basic-features": {
99
"nonce": "0",
1010
"balance": "0",
11-
"storage": {},
1211
"code": "mxsc:../output/basic-features.mxsc.json"
1312
},
1413
"address:an_account": {
1514
"nonce": "0",
16-
"balance": "0",
17-
"storage": {},
18-
"code": ""
15+
"balance": "0"
1916
}
2017
}
2118
},
@@ -25,7 +22,6 @@
2522
"tx": {
2623
"from": "address:an_account",
2724
"to": "sc:basic-features",
28-
"value": "0",
2925
"function": "pow_big_uint",
3026
"arguments": [
3127
"10",
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"steps": [
3+
{
4+
"step": "setState",
5+
"accounts": {
6+
"sc:basic-features": {
7+
"nonce": "0",
8+
"balance": "0",
9+
"code": "mxsc:../output/basic-features.mxsc.json",
10+
"codeMetadata": "0x0104"
11+
},
12+
"sc:basic-features-2": {
13+
"nonce": "0",
14+
"balance": "0",
15+
"code": "mxsc:../output/basic-features.mxsc.json",
16+
"codeMetadata": "0x0100"
17+
},
18+
"address:an_account": {
19+
"nonce": "0",
20+
"balance": "0"
21+
}
22+
}
23+
},
24+
{
25+
"step": "scCall",
26+
"id": "get_code_metadata",
27+
"tx": {
28+
"from": "address:an_account",
29+
"to": "sc:basic-features",
30+
"function": "get_code_metadata",
31+
"arguments": [
32+
"sc:basic-features"
33+
],
34+
"gasLimit": "50,000,000",
35+
"gasPrice": "0"
36+
},
37+
"expect": {
38+
"out": [
39+
"0x0104"
40+
],
41+
"status": "",
42+
"logs": "*",
43+
"gas": "*",
44+
"refund": "*"
45+
}
46+
},
47+
{
48+
"step": "scCall",
49+
"id": "get_code_metadata-2",
50+
"tx": {
51+
"from": "address:an_account",
52+
"to": "sc:basic-features",
53+
"function": "get_code_metadata",
54+
"arguments": [
55+
"sc:basic-features-2"
56+
],
57+
"gasLimit": "50,000,000",
58+
"gasPrice": "0"
59+
},
60+
"expect": {
61+
"out": [
62+
"0x0100"
63+
],
64+
"status": "",
65+
"logs": "*",
66+
"gas": "*",
67+
"refund": "*"
68+
}
69+
},
70+
{
71+
"step": "scCall",
72+
"id": "get_code_metadata-missing-address",
73+
"tx": {
74+
"from": "address:an_account",
75+
"to": "sc:basic-features",
76+
"function": "get_code_metadata",
77+
"arguments": [
78+
"sc:missing"
79+
],
80+
"gasLimit": "50,000,000",
81+
"gasPrice": "0"
82+
},
83+
"expect": {
84+
"out": [],
85+
"status": "10",
86+
"message": "str:account not found: 000000000000000000006d697373696e675f5f5f5f5f5f5f5f5f5f5f5f5f5f5f"
87+
}
88+
}
89+
]
90+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"steps": [
3+
{
4+
"step": "setState",
5+
"accounts": {
6+
"sc:basic-features": {
7+
"nonce": "0",
8+
"balance": "0",
9+
"code": "mxsc:../output/basic-features.mxsc.json",
10+
"codeMetadata": "0x0104"
11+
},
12+
"address:an_account": {
13+
"nonce": "0",
14+
"balance": "0"
15+
}
16+
}
17+
},
18+
{
19+
"step": "scCall",
20+
"id": "is builtin function - true",
21+
"tx": {
22+
"from": "address:an_account",
23+
"to": "sc:basic-features",
24+
"function": "is_builtin_function",
25+
"arguments": [
26+
"str:ESDTTransfer"
27+
],
28+
"gasLimit": "50,000,000",
29+
"gasPrice": "0"
30+
},
31+
"expect": {
32+
"out": [
33+
"0x01"
34+
],
35+
"status": "",
36+
"logs": "*",
37+
"gas": "*",
38+
"refund": "*"
39+
}
40+
},
41+
{
42+
"step": "scCall",
43+
"id": "is builtin function - false",
44+
"tx": {
45+
"from": "address:an_account",
46+
"to": "sc:basic-features",
47+
"function": "is_builtin_function",
48+
"arguments": [
49+
"str:anyFunction"
50+
],
51+
"gasLimit": "50,000,000",
52+
"gasPrice": "0"
53+
},
54+
"expect": {
55+
"out": [
56+
"0x"
57+
],
58+
"status": "",
59+
"logs": "*",
60+
"gas": "*",
61+
"refund": "*"
62+
}
63+
}
64+
]
65+
}

0 commit comments

Comments
 (0)