From 5bfad3b2a14298c74d0489cbf2b8bb4d95527e54 Mon Sep 17 00:00:00 2001 From: BiancaIalangi Date: Fri, 29 Nov 2024 15:27:06 +0200 Subject: [PATCH] fix .scen.json test --- .../multi_transfer_with_egld.scen.json | 88 ++++++++++--------- .../tests/basic_features_scenario_rs_test.rs | 2 +- 2 files changed, 48 insertions(+), 42 deletions(-) diff --git a/contracts/feature-tests/basic-features/scenarios/multi_transfer_with_egld.scen.json b/contracts/feature-tests/basic-features/scenarios/multi_transfer_with_egld.scen.json index 92205812ee..0dcd2bfc6d 100644 --- a/contracts/feature-tests/basic-features/scenarios/multi_transfer_with_egld.scen.json +++ b/contracts/feature-tests/basic-features/scenarios/multi_transfer_with_egld.scen.json @@ -2,45 +2,30 @@ "steps": [ { "step": "setState", - "newTokenIdentifiers": [ - "TEST-6bb410" - ] - }, - { - "step": "scCall", - "id": "", - "tx": { - "from": "bech32:erd1y3z4vsn2m026glevhsqpwrc5w4v0xzr2qmukc5qde39jnzze324qf4e2r4", - "to": "bech32:erd1qqqqqqqqqqqqqqqpqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzllls8a5w6u", - "egldValue": "50000000000000000", - "function": "issue", - "arguments": [ - "0x74657374", - "0x54455354", - "0x64", - "0x", - "0x63616e467265657a65", - "0x74727565", - "0x63616e57697065", - "0x74727565", - "0x63616e5061757365", - "0x74727565", - "0x63616e4d696e74", - "0x74727565", - "0x63616e4275726e", - "0x74727565", - "0x63616e4368616e67654f776e6572", - "0x74727565", - "0x63616e55706772616465", - "0x74727565", - "0x63616e4164645370656369616c526f6c6573", - "0x74727565" - ], - "gasLimit": "100000000" - }, - "expect": { - "out": [], - "status": "0" + "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" + } } }, { @@ -52,7 +37,7 @@ "esdtValue": [ { "tokenIdentifier": "0x45474c442d303030303030", - "value": "50000000000000000" + "value": "4" }, { "tokenIdentifier": "0x544553542d366262343130", @@ -61,6 +46,27 @@ ], "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": {} + } + } } ] -} +} \ No newline at end of file diff --git a/contracts/feature-tests/basic-features/tests/basic_features_scenario_rs_test.rs b/contracts/feature-tests/basic-features/tests/basic_features_scenario_rs_test.rs index 3268f63771..0ab2459561 100644 --- a/contracts/feature-tests/basic-features/tests/basic_features_scenario_rs_test.rs +++ b/contracts/feature-tests/basic-features/tests/basic_features_scenario_rs_test.rs @@ -209,7 +209,7 @@ fn echo_u_64_rs() { #[test] #[ignore = "not supported yet"] -fn multi_transfer_with_egld_go() { +fn multi_transfer_with_egld_rs() { world().run("scenarios/multi_transfer_with_egld.scen.json"); }