Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test - MultiESDTNFTTransfer with egld #1887

Open
wants to merge 5 commits into
base: rc/v0.55
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"sc:forwarder": {
"nonce": "0",
"balance": "0",
"balance": "4000",
"esdt": {
"str:FWD-TOKEN": "1000",
"str:NFT-123456": {
Expand Down Expand Up @@ -89,7 +89,7 @@
},
"sc:forwarder": {
"nonce": "0",
"balance": "0",
"balance": "4000",
"esdt": {
"str:FWD-TOKEN": "700",
"str:NFT-123456": {
Expand Down Expand Up @@ -130,6 +130,9 @@
"str:NFT-123456",
"1",
"1",
"str:EGLD-000000",
"0",
"100",
"str:SFT-456789",
"3",
"6"
Expand All @@ -156,7 +159,7 @@
},
"sc:vault": {
"nonce": "0",
"balance": "0",
"balance": "100",
"esdt": {
"str:FWD-TOKEN": "800",
"str:NFT-123456": {
Expand All @@ -183,7 +186,7 @@
},
"sc:forwarder": {
"nonce": "0",
"balance": "0",
"balance": "3900",
"esdt": {
"str:FWD-TOKEN": "200",
"str:SFT-456789": {
Expand All @@ -200,4 +203,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
"from": "address:an-account",
"to": "sc:payable-features",
"esdtValue": [
{
"tokenIdentifier": "str:EGLD-000000",
"value": "15"
},
{
"tokenIdentifier": "str:TOK-123456",
"value": "100"
Expand All @@ -107,7 +111,7 @@
},
"expect": {
"out": [
"0",
"15",
[
"nested:str:TOK-123456|u64:0|biguint:100",
"nested:str:OTHERTOK-123456|u64:0|biguint:400",
Expand All @@ -121,4 +125,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
"tokenIdentifier": "str:SFT-123",
"nonce": "5",
"value": "10"
},
{
"tokenIdentifier": "str:EGLD-000000",
"nonce": "0",
"value": "103"
}
],
"function": "payment_array_3",
Expand Down Expand Up @@ -111,7 +116,7 @@
"value": "100"
},
{
"tokenIdentifier": "str:TOK-000002",
"tokenIdentifier": "str:EGLD-000000",
"value": "400"
},
{
Expand All @@ -128,7 +133,7 @@
"expect": {
"out": [
"nested:str:TOK-000001|u64:0|biguint:100",
"nested:str:TOK-000002|u64:0|biguint:400",
"nested:str:EGLD-000000|u64:0|biguint:400",
"nested:str:SFT-123|u64:5|biguint:10"
],
"status": "",
Expand All @@ -138,4 +143,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
"tokenIdentifier": "str:SFT-123",
"nonce": "5",
"value": "10"
},
{
"tokenIdentifier": "str:EGLD-000000",
"nonce": "0",
"value": "120"
}
],
"function": "payment_multiple",
Expand All @@ -59,7 +64,8 @@
[
"nested:str:TOK-123456|u64:0|biguint:100|",
"nested:str:OTHERTOK-123456|u64:0|biguint:400",
"nested:str:SFT-123|u64:5|biguint:10"
"nested:str:SFT-123|u64:5|biguint:10",
"nested:str:EGLD-000000|u64:0|biguint:120"
]
],
"status": "",
Expand All @@ -69,4 +75,4 @@
}
}
]
}
}
10 changes: 10 additions & 0 deletions framework/scenario/tests/multi_transfer_with_egld.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use multiversx_sc_scenario::*;

fn world() -> ScenarioWorld {
ScenarioWorld::vm_go()
}

#[test]
fn multi_transfer_with_egld_test() {
world().run("tests/scenarios-self/multi_transfer_with_egld.scen.json");
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"accounts": {
"address:A": {
"nonce": "0",
"balance": "0x1000000000",
"balance": "1000000000",
"esdt": {
"str:TOK-123456": "150",
"str:OTHERTOK-123456": "500",
Expand Down Expand Up @@ -41,14 +41,17 @@
"tokenIdentifier": "str:OTHERTOK-123456",
"value": "400"
},
{
"tokenIdentifier": "str:EGLD-000000",
"value": "500"
},
{
"tokenIdentifier": "str:NFT-123456",
"nonce": "5",
"value": "10"
}
],
"gasLimit": "0x100000000",
"gasPrice": "0x01"
"gasLimit": "0x100000000"
}
},
{
Expand All @@ -57,7 +60,7 @@
"accounts": {
"address:A": {
"nonce": "1",
"balance": "0xf00000000",
"balance": "999999500",
"esdt": {
"str:TOK-123456": "50",
"str:OTHERTOK-123456": "100",
Expand All @@ -75,6 +78,7 @@
},
"address:B": {
"nonce": "0",
"balance": "500",
"esdt": {
"str:TOK-123456": "100",
"str:OTHERTOK-123456": "400",
Expand All @@ -93,4 +97,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"steps": [
{
"step": "setState",
"accounts": {
"bech32:erd1y3z4vsn2m026glevhsqpwrc5w4v0xzr2qmukc5qde39jnzze324qf4e2r4": {
"nonce": "0",
"balance": "10",
"esdt": {
"str:TEST-6bb410": {
"instances": [
{
"nonce": "0",
"balance": "100",
"royalties": "0",
"attributes": "0x"
}
]
}
},
"developerRewards": "0"
},
"bech32:erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa": {
"nonce": "0",
"balance": "0",
"esdt": {},
"developerRewards": "0"
}
}
},
{
"step": "transfer",
"id": "",
"tx": {
"from": "bech32:erd1y3z4vsn2m026glevhsqpwrc5w4v0xzr2qmukc5qde39jnzze324qf4e2r4",
"to": "bech32:erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa",
"esdtValue": [
{
"tokenIdentifier": "0x45474c442d303030303030",
"value": "4"
},
{
"tokenIdentifier": "0x544553542d366262343130",
"value": "10"
}
],
"gasLimit": "5,000,000"
}
},
{
"step": "checkState",
"accounts": {
"bech32:erd1y3z4vsn2m026glevhsqpwrc5w4v0xzr2qmukc5qde39jnzze324qf4e2r4": {
"nonce": "*",
"balance": "6",
"esdt": {
"str:TEST-6bb410": "90"
},
"storage": {}
},
"bech32:erd1uv40ahysflse896x4ktnh6ecx43u7cmy9wnxnvcyp7deg299a4sq6vaywa": {
"nonce": "*",
"balance": "4",
"esdt": {
"str:TEST-6bb410": "10"
},
"storage": {}
}
}
}
]
}
Loading
Loading