Skip to content

Commit cd9d6af

Browse files
mandos - composability test update - incl back-transfers
1 parent 89f0661 commit cd9d6af

12 files changed

+1180
-18
lines changed

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: 79 additions & 5 deletions
Large diffs are not rendered by default.

test/features/composability/scenarios/forwarder_call_sync_retrieve_egld_bt.scen.json renamed to test/features/composability/scenarios/forwarder_call_sync_retrieve_bt_legacy_egld.scen.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"tx": {
2727
"from": "address:a_user",
2828
"to": "sc:forwarder",
29-
"function": "forward_sync_retrieve_funds_bt",
29+
"function": "forward_sync_retrieve_funds_bt_legacy",
3030
"arguments": [
3131
"sc:vault",
3232
"str:EGLD",
@@ -82,7 +82,7 @@
8282
},
8383
{
8484
"address": "sc:forwarder",
85-
"endpoint": "str:forward_sync_retrieve_funds_bt",
85+
"endpoint": "str:forward_sync_retrieve_funds_bt_legacy",
8686
"topics": [
8787
"str:back_transfers",
8888
"1000"

test/features/composability/scenarios/forwarder_call_sync_retrieve_esdt_bt.scen.json renamed to test/features/composability/scenarios/forwarder_call_sync_retrieve_bt_legacy_esdt.scen.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"tx": {
3030
"from": "address:a_user",
3131
"to": "sc:forwarder",
32-
"function": "forward_sync_retrieve_funds_bt",
32+
"function": "forward_sync_retrieve_funds_bt_legacy",
3333
"arguments": [
3434
"sc:vault",
3535
"str:TEST-TOKENA",
@@ -89,7 +89,7 @@
8989
},
9090
{
9191
"address": "sc:forwarder",
92-
"endpoint": "str:forward_sync_retrieve_funds_bt",
92+
"endpoint": "str:forward_sync_retrieve_funds_bt_legacy",
9393
"topics": [
9494
"str:back_transfers",
9595
"0",

test/features/composability/scenarios/forwarder_call_sync_retrieve_nft_bt.scen.json renamed to test/features/composability/scenarios/forwarder_call_sync_retrieve_bt_legacy_nft.scen.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"tx": {
3737
"from": "address:a_user",
3838
"to": "sc:forwarder",
39-
"function": "forward_sync_retrieve_funds_bt",
39+
"function": "forward_sync_retrieve_funds_bt_legacy",
4040
"arguments": [
4141
"sc:vault",
4242
"str:NFT-000001",
@@ -98,7 +98,7 @@
9898
},
9999
{
100100
"address": "sc:forwarder",
101-
"endpoint": "str:forward_sync_retrieve_funds_bt",
101+
"endpoint": "str:forward_sync_retrieve_funds_bt_legacy",
102102
"topics": [
103103
"str:back_transfers",
104104
"0",
Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
{
2+
"gasSchedule": "v3",
3+
"steps": [
4+
{
5+
"step": "setState",
6+
"accounts": {
7+
"address:a_user": {
8+
"nonce": "0",
9+
"balance": "0"
10+
},
11+
"sc:vault": {
12+
"nonce": "0",
13+
"balance": "4000",
14+
"esdt": {
15+
"str:FWD-TOKEN": "1000",
16+
"str:NFT-123456": {
17+
"instances": [
18+
{
19+
"nonce": "1",
20+
"balance": "1"
21+
}
22+
]
23+
},
24+
"str:SFT-456789": {
25+
"instances": [
26+
{
27+
"nonce": "3",
28+
"balance": "10"
29+
}
30+
]
31+
}
32+
},
33+
"code": "mxsc:../vault/output/vault.mxsc.json"
34+
},
35+
"sc:forwarder": {
36+
"nonce": "0",
37+
"balance": "0",
38+
"code": "mxsc:../forwarder/output/forwarder.mxsc.json"
39+
}
40+
}
41+
},
42+
{
43+
"step": "scCall",
44+
"id": "1",
45+
"tx": {
46+
"from": "address:a_user",
47+
"to": "sc:forwarder",
48+
"function": "forward_sync_retrieve_funds_bt_multi",
49+
"arguments": [
50+
"sc:vault",
51+
"str:FWD-TOKEN",
52+
"0",
53+
"100",
54+
"str:NFT-123456",
55+
"1",
56+
"1",
57+
"str:EGLD-000000",
58+
"0",
59+
"100",
60+
"str:SFT-456789",
61+
"3",
62+
"6"
63+
],
64+
"gasLimit": "50,000,000",
65+
"gasPrice": "0"
66+
},
67+
"expect": {
68+
"out": [],
69+
"status": "0",
70+
"logs": [
71+
{
72+
"address": "sc:forwarder",
73+
"endpoint": "str:transferValueOnly",
74+
"topics": [
75+
"",
76+
"sc:vault"
77+
],
78+
"data": [
79+
"str:ExecuteOnDestContext",
80+
"str:retrieve_funds_multi",
81+
"str:FWD-TOKEN",
82+
"0",
83+
"100",
84+
"str:NFT-123456",
85+
"1",
86+
"1",
87+
"str:EGLD-000000",
88+
"0",
89+
"100",
90+
"str:SFT-456789",
91+
"3",
92+
"6"
93+
]
94+
},
95+
{
96+
"address": "sc:vault",
97+
"endpoint": "str:retrieve_funds_multi",
98+
"topics": [
99+
"str:retrieve_funds_multi",
100+
"str:FWD-TOKEN",
101+
"0",
102+
"100",
103+
"str:NFT-123456",
104+
"1",
105+
"1",
106+
"str:EGLD-000000",
107+
"0",
108+
"100",
109+
"str:SFT-456789",
110+
"3",
111+
"6"
112+
],
113+
"data": [
114+
""
115+
]
116+
},
117+
{
118+
"address": "sc:vault",
119+
"endpoint": "str:MultiESDTNFTTransfer",
120+
"topics": [
121+
"str:FWD-TOKEN",
122+
"0",
123+
"100",
124+
"str:NFT-123456",
125+
"1",
126+
"1",
127+
"str:EGLD-000000",
128+
"0",
129+
"100",
130+
"str:SFT-456789",
131+
"3",
132+
"6",
133+
"sc:forwarder"
134+
],
135+
"data": [
136+
"str:BackTransfer",
137+
"str:MultiESDTNFTTransfer",
138+
"sc:forwarder",
139+
"4",
140+
"str:FWD-TOKEN",
141+
"0",
142+
"100",
143+
"str:NFT-123456",
144+
"1",
145+
"1",
146+
"str:EGLD-000000",
147+
"0",
148+
"100",
149+
"str:SFT-456789",
150+
"3",
151+
"6"
152+
]
153+
},
154+
{
155+
"address": "sc:forwarder",
156+
"endpoint": "str:forward_sync_retrieve_funds_bt_multi",
157+
"topics": [
158+
"str:back_transfers_egld_event",
159+
"100"
160+
],
161+
"data": [
162+
""
163+
]
164+
},
165+
{
166+
"address": "sc:forwarder",
167+
"endpoint": "str:forward_sync_retrieve_funds_bt_multi",
168+
"topics": [
169+
"str:back_transfers_multi_event",
170+
"str:FWD-TOKEN",
171+
"0",
172+
"100",
173+
"str:NFT-123456",
174+
"1",
175+
"1",
176+
"str:EGLD",
177+
"0",
178+
"100",
179+
"str:SFT-456789",
180+
"3",
181+
"6"
182+
],
183+
"data": [
184+
""
185+
]
186+
}
187+
],
188+
"gas": "*",
189+
"refund": "*"
190+
}
191+
},
192+
{
193+
"step": "checkState",
194+
"accounts": {
195+
"address:a_user": {
196+
"nonce": "*",
197+
"balance": "0",
198+
"storage": {},
199+
"code": ""
200+
},
201+
"sc:vault": {
202+
"nonce": "0",
203+
"balance": "3900",
204+
"esdt": {
205+
"str:FWD-TOKEN": "900",
206+
"str:SFT-456789": {
207+
"instances": [
208+
{
209+
"nonce": "3",
210+
"balance": "4"
211+
}
212+
]
213+
}
214+
},
215+
"storage": {},
216+
"code": "mxsc:../vault/output/vault.mxsc.json"
217+
},
218+
"sc:forwarder": {
219+
"nonce": "0",
220+
"balance": "100",
221+
"esdt": {
222+
"str:FWD-TOKEN": "100",
223+
"str:NFT-123456": {
224+
"instances": [
225+
{
226+
"nonce": "1",
227+
"balance": "1"
228+
}
229+
]
230+
},
231+
"str:SFT-456789": {
232+
"instances": [
233+
{
234+
"nonce": "3",
235+
"balance": "6"
236+
}
237+
]
238+
}
239+
},
240+
"storage": "*",
241+
"code": "mxsc:../forwarder/output/forwarder.mxsc.json"
242+
}
243+
}
244+
}
245+
]
246+
}

0 commit comments

Comments
 (0)