Skip to content

Commit

Permalink
back transfer test update
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-marinica committed Nov 1, 2023
1 parent 86b732f commit e237f43
Show file tree
Hide file tree
Showing 17 changed files with 410 additions and 44 deletions.
Binary file not shown.
Binary file not shown.
Binary file modified test/features/composability/forwarder-raw/output/forwarder-raw.wasm
Binary file not shown.
Binary file modified test/features/composability/forwarder/output/forwarder.wasm
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
{
"steps": [
{
"step": "setState",
"accounts": {
"address:a_user": {
"nonce": "0",
"balance": "0"
},
"sc:vault": {
"nonce": "0",
"balance": "1000",
"code": "file:../vault/output/vault.wasm"
},
"sc:forwarder": {
"nonce": "0",
"balance": "0",
"code": "file:../promises-features/output/promises-features.wasm"
}
}
},
{
"step": "scCall",
"id": "1",
"tx": {
"from": "address:a_user",
"to": "sc:forwarder",
"function": "forward_sync_retrieve_funds_bt",
"arguments": [
"sc:vault",
"str:EGLD",
"0",
"1000"
],
"gasLimit": "50,000,000",
"gasPrice": "0"
},
"expect": {
"out": [],
"status": "0",
"logs": [
{
"address": "sc:forwarder",
"endpoint": "str:transferValueOnly",
"topics": [
"0",
"sc:vault"
],
"data": [
"str:ExecuteOnDestContext",
"str:retrieve_funds",
"str:EGLD",
"0",
"1000"
]
},
{
"address": "sc:vault",
"endpoint": "str:retrieve_funds",
"topics": [
"str:retrieve_funds",
"str:EGLD",
"0",
"1000"
],
"data": [
""
]
},
{
"address": "sc:vault",
"endpoint": "str:transferValueOnly",
"topics": [
"1000",
"sc:forwarder"
],
"data": [
"str:BackTransfer",
"0"
]
},
{
"address": "sc:forwarder",
"endpoint": "str:forward_sync_retrieve_funds_bt",
"topics": [
"str:back_tranfers",
"1000"
],
"data": [
""
]
}
],
"gas": "*",
"refund": "*"
}
},
{
"step": "checkState",
"accounts": {
"address:a_user": {
"nonce": "*",
"balance": "0",
"storage": {},
"code": ""
},
"sc:vault": {
"nonce": "0",
"balance": "0",
"storage": {},
"code": "file:../vault/output/vault.wasm"
},
"sc:forwarder": {
"nonce": "0",
"balance": "1000",
"storage": "*",
"code": "file:../promises-features/output/promises-features.wasm"
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
{
"steps": [
{
"step": "setState",
"accounts": {
"address:a_user": {
"nonce": "0",
"balance": "0"
},
"sc:vault": {
"nonce": "0",
"balance": "0",
"esdt": {
"str:TEST-TOKENA": "1000"
},
"code": "file:../vault/output/vault.wasm"
},
"sc:forwarder": {
"nonce": "0",
"balance": "0",
"code": "file:../promises-features/output/promises-features.wasm"
}
}
},
{
"step": "scCall",
"id": "1",
"tx": {
"from": "address:a_user",
"to": "sc:forwarder",
"function": "forward_sync_retrieve_funds_bt",
"arguments": [
"sc:vault",
"str:TEST-TOKENA",
"0",
"1000"
],
"gasLimit": "50,000,000",
"gasPrice": "0"
},
"expect": {
"out": [],
"status": "0",
"logs": [
{
"address": "sc:forwarder",
"endpoint": "str:transferValueOnly",
"topics": [
"",
"sc:vault"
],
"data": [
"str:ExecuteOnDestContext",
"str:retrieve_funds",
"str:TEST-TOKENA",
"0",
"1000"
]
},
{
"address": "sc:vault",
"endpoint": "str:retrieve_funds",
"topics": [
"str:retrieve_funds",
"str:TEST-TOKENA",
"0",
"1000"
],
"data": [
""
]
},
{
"address": "sc:vault",
"endpoint": "str:ESDTTransfer",
"topics": [
"str:TEST-TOKENA",
"0",
"1000",
"sc:forwarder"
],
"data": [
"str:BackTransfer",
"str:ESDTTransfer",
"str:TEST-TOKENA",
"1000"
]
},
{
"address": "sc:forwarder",
"endpoint": "str:forward_sync_retrieve_funds_bt",
"topics": [
"str:back_tranfers",
"0",
"str:TEST-TOKENA",
"0",
"1000"
],
"data": [
""
]
}
],
"gas": "*",
"refund": "*"
}
},
{
"step": "checkState",
"accounts": {
"address:a_user": {
"nonce": "*",
"balance": "0",
"storage": {},
"code": ""
},
"sc:vault": {
"nonce": "0",
"balance": "0",
"storage": {},
"code": "file:../vault/output/vault.wasm"
},
"sc:forwarder": {
"nonce": "0",
"balance": "0",
"esdt": {
"str:TEST-TOKENA": "1000"
},
"storage": "*",
"code": "file:../promises-features/output/promises-features.wasm"
}
}
}
]
}
Loading

0 comments on commit e237f43

Please sign in to comment.