Skip to content

Commit 7c2a78b

Browse files
mandos - transfer execute no payment error
1 parent d7945dc commit 7c2a78b

File tree

10 files changed

+145
-18
lines changed

10 files changed

+145
-18
lines changed

test/features/composability/forwarder-barnard/output/forwarder-barnard.mxsc.json

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

test/features/composability/forwarder-queue/output/forwarder-queue-promises.mxsc.json

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

test/features/composability/forwarder-queue/output/forwarder-queue.mxsc.json

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

test/features/composability/forwarder-raw/output/forwarder-raw.mxsc.json

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

test/features/composability/forwarder/output/forwarder.mxsc.json

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

test/features/composability/scenarios/forw_raw_transf_exec_accept_egld.scen.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
{
2424
"step": "scCall",
25-
"id": "11",
25+
"id": "forward_transf_exec_egld 1000 EGLD",
2626
"tx": {
2727
"from": "address:a_user",
2828
"to": "sc:forwarder",
@@ -70,7 +70,7 @@
7070
},
7171
{
7272
"step": "scCall",
73-
"id": "11",
73+
"id": "forward_transf_exec_egld 0 EGLD",
7474
"tx": {
7575
"from": "address:a_user",
7676
"to": "sc:forwarder",
@@ -84,7 +84,8 @@
8484
},
8585
"expect": {
8686
"out": [],
87-
"status": "0",
87+
"status": "4",
88+
"message": "str:transfer execute requires payment",
8889
"logs": "*",
8990
"gas": "*",
9091
"refund": "*"
@@ -103,7 +104,7 @@
103104
"nonce": "0",
104105
"balance": "1000",
105106
"storage": {
106-
"str:call_counts|nested:str:accept_funds": "2"
107+
"str:call_counts|nested:str:accept_funds": "1"
107108
},
108109
"code": "mxsc:../vault/output/vault.mxsc.json"
109110
},
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"steps": [
3+
{
4+
"step": "setState",
5+
"accounts": {
6+
"address:a_user": {
7+
"nonce": "0",
8+
"balance": "0"
9+
},
10+
"sc:forwarder": {
11+
"nonce": "0",
12+
"balance": "1000",
13+
"code": "mxsc:../forwarder-barnard/output/forwarder-barnard.mxsc.json"
14+
},
15+
"sc:vault": {
16+
"nonce": "0",
17+
"balance": "0",
18+
"code": "mxsc:../vault/output/vault.mxsc.json"
19+
}
20+
}
21+
},
22+
{
23+
"step": "scCall",
24+
"id": "transfer_execute_fallible - accept - no payment",
25+
"tx": {
26+
"from": "address:a_user",
27+
"to": "sc:forwarder",
28+
"function": "transfer_execute_fallible",
29+
"arguments": [
30+
"sc:vault",
31+
"str:accept_funds"
32+
],
33+
"gasLimit": "1,400,000,000",
34+
"gasPrice": "0"
35+
},
36+
"expect": {
37+
"out": [],
38+
"status": "4",
39+
"message": "str:transfer execute requires payment",
40+
"logs": "*"
41+
}
42+
},
43+
{
44+
"step": "checkState",
45+
"accounts": {
46+
"address:a_user": {
47+
"nonce": "*",
48+
"balance": "0"
49+
},
50+
"sc:forwarder": {
51+
"nonce": "0",
52+
"balance": "1000",
53+
"code": "mxsc:../forwarder-barnard/output/forwarder-barnard.mxsc.json"
54+
},
55+
"sc:vault": {
56+
"nonce": "0",
57+
"balance": "0",
58+
"code": "mxsc:../vault/output/vault.mxsc.json"
59+
}
60+
}
61+
}
62+
]
63+
}
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"steps": [
3+
{
4+
"step": "setState",
5+
"accounts": {
6+
"address:a_user": {
7+
"nonce": "0",
8+
"balance": "0"
9+
},
10+
"sc:forwarder": {
11+
"nonce": "0",
12+
"balance": "1000",
13+
"code": "mxsc:../forwarder-barnard/output/forwarder-barnard.mxsc.json"
14+
},
15+
"sc:vault": {
16+
"nonce": "0",
17+
"balance": "0",
18+
"code": "mxsc:../vault/output/vault.mxsc.json"
19+
}
20+
}
21+
},
22+
{
23+
"step": "scCall",
24+
"id": "transfer_execute_fallible - reject - no payment",
25+
"tx": {
26+
"from": "address:a_user",
27+
"to": "sc:forwarder",
28+
"function": "transfer_execute_fallible",
29+
"arguments": [
30+
"sc:vault",
31+
"str:reject_funds"
32+
],
33+
"gasLimit": "1,400,000,000",
34+
"gasPrice": "0"
35+
},
36+
"expect": {
37+
"out": [],
38+
"status": "4",
39+
"message": "str:transfer execute requires payment",
40+
"logs": "*"
41+
}
42+
},
43+
{
44+
"step": "checkState",
45+
"accounts": {
46+
"address:a_user": {
47+
"nonce": "*",
48+
"balance": "0"
49+
},
50+
"sc:forwarder": {
51+
"nonce": "0",
52+
"balance": "1000",
53+
"code": "mxsc:../forwarder-barnard/output/forwarder-barnard.mxsc.json"
54+
},
55+
"sc:vault": {
56+
"nonce": "0",
57+
"balance": "0",
58+
"code": "mxsc:../vault/output/vault.mxsc.json"
59+
}
60+
}
61+
}
62+
]
63+
}

test/features/composability/vault/output/vault-promises.mxsc.json

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

test/features/composability/vault/output/vault.mxsc.json

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

0 commit comments

Comments
 (0)