diff --git a/integrationTests/json/scenariosAdderLog_test.go b/integrationTests/json/scenariosAdderLog_test.go index 912523e97..8a1684ab4 100644 --- a/integrationTests/json/scenariosAdderLog_test.go +++ b/integrationTests/json/scenariosAdderLog_test.go @@ -161,7 +161,7 @@ Clean: true func TestRustAdderLog(t *testing.T) { ScenariosTest(t). - Folder("adder/scenarios"). + Folder("adder/scenarios/adder.scen.json"). WithExecutorLogs(). Run(). CheckNoError(). diff --git a/integrationTests/json/scenariosContracts_test.go b/integrationTests/json/scenariosContracts_test.go index 1df613815..d1b83a964 100644 --- a/integrationTests/json/scenariosContracts_test.go +++ b/integrationTests/json/scenariosContracts_test.go @@ -51,7 +51,7 @@ func TestESDTMultiTransferOnCallback(t *testing.T) { func TestCreateAsyncCall(t *testing.T) { ScenariosTest(t). - Folder("features/composability/scenarios-promises"). + Folder("features/composability/scenarios"). File("promises_single_transfer.scen.json"). Run(). CheckNoError() @@ -60,6 +60,7 @@ func TestCreateAsyncCall(t *testing.T) { func TestMultisig(t *testing.T) { ScenariosTest(t). Folder("multisig/scenarios"). + Exclude("multisig/scenarios/interactor*"). Run(). CheckNoError() } diff --git a/integrationTests/json/scenariosExecutorLogs_test.go b/integrationTests/json/scenariosExecutorLogs_test.go index 24230e0f2..01264314f 100644 --- a/integrationTests/json/scenariosExecutorLogs_test.go +++ b/integrationTests/json/scenariosExecutorLogs_test.go @@ -149,7 +149,7 @@ func TestCreateAsyncCallLog(t *testing.T) { } expected := ScenariosTest(t). - Folder("features/composability/scenarios-promises"). + Folder("features/composability/scenarios"). File("promises_single_transfer.scen.json"). WithExecutorFactory(wasmer.ExecutorFactory()). WithExecutorLogs(). @@ -158,7 +158,7 @@ func TestCreateAsyncCallLog(t *testing.T) { ExtractLog() ScenariosTest(t). - Folder("features/composability/scenarios-promises"). + Folder("features/composability/scenarios"). File("promises_single_transfer.scen.json"). WithExecutorFactory(wasmer2.ExecutorFactory()). WithExecutorLogs(). @@ -198,6 +198,7 @@ func TestMultisigLog(t *testing.T) { expected := ScenariosTest(t). Folder("multisig/scenarios"). + Exclude("multisig/scenarios/interactor*"). WithExecutorFactory(wasmer.ExecutorFactory()). WithExecutorLogs(). Run(). @@ -206,6 +207,7 @@ func TestMultisigLog(t *testing.T) { ScenariosTest(t). Folder("multisig/scenarios"). + Exclude("multisig/scenarios/interactor*"). WithExecutorFactory(wasmer2.ExecutorFactory()). WithExecutorLogs(). Run(). diff --git a/integrationTests/json/scenariosFeatures_test.go b/integrationTests/json/scenariosFeatures_test.go index bea69be2f..287179ab5 100644 --- a/integrationTests/json/scenariosFeatures_test.go +++ b/integrationTests/json/scenariosFeatures_test.go @@ -23,6 +23,7 @@ func TestRustBasicFeaturesLatest(t *testing.T) { ScenariosTest(t). Folder("features/basic-features/scenarios"). Exclude("features/basic-features/scenarios/storage_mapper_fungible_token.scen.json"). + Exclude("features/basic-features/scenarios/get_shard_of_address.scen.json"). Run(). CheckNoError() } @@ -90,13 +91,6 @@ func TestRustComposability(t *testing.T) { CheckNoError() } -func TestRustPromisesFeatures(t *testing.T) { - ScenariosTest(t). - Folder("features/composability/scenarios-promises"). - Run(). - CheckNoError() -} - func TestRustFormattedMessageFeatures(t *testing.T) { ScenariosTest(t). Folder("features/formatted-message-features/scenarios"). diff --git a/test/adder/scenarios/interactor_trace.scen.json b/test/adder/scenarios/interactor_trace.scen.json new file mode 100644 index 000000000..bb20201ba --- /dev/null +++ b/test/adder/scenarios/interactor_trace.scen.json @@ -0,0 +1,80 @@ +{ + "steps": [ + { + "step": "setState", + "accounts": { + "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60": { + "nonce": "481", + "balance": "106274669842530000003", + "esdt": { + "str:CAN-14dc0a": "1000", + "str:CAN-2abf4b": "1000", + "str:CAN-6d39e6": "1000", + "str:CAN-ac1592": "1000" + }, + "username": "" + } + } + }, + { + "step": "setState", + "newAddresses": [ + { + "creatorAddress": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "creatorNonce": "481", + "newAddress": "0x0000000000000000050028600ceb73ac22ec0b6f257aff7bed74dffa3ebfed60" + } + ] + }, + { + "step": "scDeploy", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "contractCode": "file:../output/adder.wasm", + "arguments": [ + "0x00" + ], + "gasLimit": "70,000,000", + "gasPrice": "" + }, + "expect": { + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x0000000000000000050028600ceb73ac22ec0b6f257aff7bed74dffa3ebfed60", + "function": "add", + "arguments": [ + "0x07" + ], + "gasLimit": "70,000,000", + "gasPrice": "" + }, + "expect": { + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x0000000000000000050028600ceb73ac22ec0b6f257aff7bed74dffa3ebfed60", + "function": "add", + "arguments": [ + "0x05" + ], + "gasLimit": "70,000,000", + "gasPrice": "" + }, + "expect": { + "status": "0" + } + } + ] +} \ No newline at end of file diff --git a/test/crowdfunding-esdt/output/crowdfunding-esdt.wasm b/test/crowdfunding-esdt/output/crowdfunding-esdt.wasm index 327cb5f04..7a031750f 100755 Binary files a/test/crowdfunding-esdt/output/crowdfunding-esdt.wasm and b/test/crowdfunding-esdt/output/crowdfunding-esdt.wasm differ diff --git a/test/crowdfunding-esdt/scenarios/_generated_fund.scen.json b/test/crowdfunding-esdt/scenarios/_generated_fund.scen.json index c461d43b6..afd4bcaea 100644 --- a/test/crowdfunding-esdt/scenarios/_generated_fund.scen.json +++ b/test/crowdfunding-esdt/scenarios/_generated_fund.scen.json @@ -4,9 +4,7 @@ "step": "setState", "accounts": { "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925": { - "nonce": "0", - "balance": "0", - "developerRewards": "0" + "balance": "0" } } }, @@ -14,9 +12,7 @@ "step": "setState", "accounts": { "0x2b32db6c2c0a6235fb1397e8225ea85e0f0e6e8c7b126d0016ccbde0e667151e": { - "nonce": "0", - "balance": "0", - "developerRewards": "0" + "balance": "0" } } }, @@ -24,9 +20,7 @@ "step": "setState", "accounts": { "0x12771355e46cd47c71ed1721fd5319b383cca3a1f9fce3aa1c8cd3bd37af20d7": { - "nonce": "0", - "balance": "0", - "developerRewards": "0" + "balance": "0" } } }, @@ -34,11 +28,9 @@ "step": "setState", "accounts": { "0x0000000000000000d720a08b839a004c2e6386f5aecc19ec74807d1920cb6aeb": { - "nonce": "0", "balance": "0", "code": "file:../output/crowdfunding-esdt.wasm", - "owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", - "developerRewards": "0" + "owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925" } } }, @@ -54,7 +46,8 @@ { "nonce": "0", "balance": "1000", - "royalties": "0" + "royalties": "0", + "attributes": "0x" } ] } @@ -75,7 +68,8 @@ { "nonce": "0", "balance": "1000", - "royalties": "0" + "royalties": "0", + "attributes": "0x" } ] } @@ -110,22 +104,18 @@ "esdtValue": [ { "tokenIdentifier": "str:CROWD-123456", - "nonce": "0", "value": "1000" } ], "function": "fund", "arguments": [], - "gasLimit": "9223372036854775807", + "gasLimit": "100,000,000", "gasPrice": "0" }, "expect": { "out": [], "status": "0", - "message": "str:", - "logs": "*", - "gas": "*", - "refund": "*" + "message": "str:" } } ] diff --git a/test/crowdfunding-esdt/scenarios/_generated_init.scen.json b/test/crowdfunding-esdt/scenarios/_generated_init.scen.json index 061967ce1..08b369285 100644 --- a/test/crowdfunding-esdt/scenarios/_generated_init.scen.json +++ b/test/crowdfunding-esdt/scenarios/_generated_init.scen.json @@ -4,9 +4,7 @@ "step": "setState", "accounts": { "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925": { - "nonce": "0", - "balance": "0", - "developerRewards": "0" + "balance": "0" } } }, @@ -14,9 +12,7 @@ "step": "setState", "accounts": { "0x2b32db6c2c0a6235fb1397e8225ea85e0f0e6e8c7b126d0016ccbde0e667151e": { - "nonce": "0", - "balance": "0", - "developerRewards": "0" + "balance": "0" } } }, @@ -24,9 +20,7 @@ "step": "setState", "accounts": { "0x12771355e46cd47c71ed1721fd5319b383cca3a1f9fce3aa1c8cd3bd37af20d7": { - "nonce": "0", - "balance": "0", - "developerRewards": "0" + "balance": "0" } } }, @@ -34,11 +28,9 @@ "step": "setState", "accounts": { "0x0000000000000000d720a08b839a004c2e6386f5aecc19ec74807d1920cb6aeb": { - "nonce": "0", "balance": "0", "code": "file:../output/crowdfunding-esdt.wasm", - "owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", - "developerRewards": "0" + "owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925" } } }, @@ -54,7 +46,8 @@ { "nonce": "0", "balance": "1000", - "royalties": "0" + "royalties": "0", + "attributes": "0x" } ] } @@ -75,7 +68,8 @@ { "nonce": "0", "balance": "1000", - "royalties": "0" + "royalties": "0", + "attributes": "0x" } ] } diff --git a/test/crowdfunding-esdt/scenarios/_generated_query_status.scen.json b/test/crowdfunding-esdt/scenarios/_generated_query_status.scen.json index 0cf63dff9..c78a0a799 100644 --- a/test/crowdfunding-esdt/scenarios/_generated_query_status.scen.json +++ b/test/crowdfunding-esdt/scenarios/_generated_query_status.scen.json @@ -4,9 +4,7 @@ "step": "setState", "accounts": { "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925": { - "nonce": "0", - "balance": "0", - "developerRewards": "0" + "balance": "0" } } }, @@ -14,9 +12,7 @@ "step": "setState", "accounts": { "0x2b32db6c2c0a6235fb1397e8225ea85e0f0e6e8c7b126d0016ccbde0e667151e": { - "nonce": "0", - "balance": "0", - "developerRewards": "0" + "balance": "0" } } }, @@ -24,9 +20,7 @@ "step": "setState", "accounts": { "0x12771355e46cd47c71ed1721fd5319b383cca3a1f9fce3aa1c8cd3bd37af20d7": { - "nonce": "0", - "balance": "0", - "developerRewards": "0" + "balance": "0" } } }, @@ -34,11 +28,9 @@ "step": "setState", "accounts": { "0x0000000000000000d720a08b839a004c2e6386f5aecc19ec74807d1920cb6aeb": { - "nonce": "0", "balance": "0", "code": "file:../output/crowdfunding-esdt.wasm", - "owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", - "developerRewards": "0" + "owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925" } } }, @@ -54,7 +46,8 @@ { "nonce": "0", "balance": "1000", - "royalties": "0" + "royalties": "0", + "attributes": "0x" } ] } @@ -75,7 +68,8 @@ { "nonce": "0", "balance": "1000", - "royalties": "0" + "royalties": "0", + "attributes": "0x" } ] } @@ -114,10 +108,7 @@ "0x" ], "status": "0", - "message": "str:", - "logs": "*", - "gas": "*", - "refund": "*" + "message": "str:" } } ] diff --git a/test/crowdfunding-esdt/scenarios/_generated_sc_err.scen.json b/test/crowdfunding-esdt/scenarios/_generated_sc_err.scen.json index 0efef9bd3..465bf2bdd 100644 --- a/test/crowdfunding-esdt/scenarios/_generated_sc_err.scen.json +++ b/test/crowdfunding-esdt/scenarios/_generated_sc_err.scen.json @@ -4,9 +4,7 @@ "step": "setState", "accounts": { "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925": { - "nonce": "0", - "balance": "0", - "developerRewards": "0" + "balance": "0" } } }, @@ -14,9 +12,7 @@ "step": "setState", "accounts": { "0x2b32db6c2c0a6235fb1397e8225ea85e0f0e6e8c7b126d0016ccbde0e667151e": { - "nonce": "0", - "balance": "0", - "developerRewards": "0" + "balance": "0" } } }, @@ -24,9 +20,7 @@ "step": "setState", "accounts": { "0x12771355e46cd47c71ed1721fd5319b383cca3a1f9fce3aa1c8cd3bd37af20d7": { - "nonce": "0", - "balance": "0", - "developerRewards": "0" + "balance": "0" } } }, @@ -34,11 +28,9 @@ "step": "setState", "accounts": { "0x0000000000000000d720a08b839a004c2e6386f5aecc19ec74807d1920cb6aeb": { - "nonce": "0", "balance": "0", "code": "file:../output/crowdfunding-esdt.wasm", - "owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925", - "developerRewards": "0" + "owner": "0x66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925" } } }, @@ -54,7 +46,8 @@ { "nonce": "0", "balance": "1000", - "royalties": "0" + "royalties": "0", + "attributes": "0x" } ] } @@ -75,7 +68,8 @@ { "nonce": "0", "balance": "1000", - "royalties": "0" + "royalties": "0", + "attributes": "0x" } ] } @@ -113,7 +107,8 @@ { "nonce": "0", "balance": "1000", - "royalties": "0" + "royalties": "0", + "attributes": "0x" } ] } @@ -131,16 +126,13 @@ "egldValue": "1000", "function": "fund", "arguments": [], - "gasLimit": "9223372036854775807", + "gasLimit": "100,000,000", "gasPrice": "0" }, "expect": { "out": [], "status": "4", - "message": "str:wrong token", - "logs": "*", - "gas": "*", - "refund": "*" + "message": "str:wrong token" } } ] diff --git a/test/crowdfunding-esdt/scenarios/crowdfunding-claim-failed.scen.json b/test/crowdfunding-esdt/scenarios/crowdfunding-claim-failed.scen.json index 7303c38fe..8e619c9d6 100644 --- a/test/crowdfunding-esdt/scenarios/crowdfunding-claim-failed.scen.json +++ b/test/crowdfunding-esdt/scenarios/crowdfunding-claim-failed.scen.json @@ -107,7 +107,7 @@ { "address": "sc:crowdfunding", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:CROWD-123456", "", "250,000,000,000", @@ -138,7 +138,7 @@ { "address": "sc:crowdfunding", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:CROWD-123456", "", "200,000,000,000", diff --git a/test/crowdfunding-esdt/scenarios/crowdfunding-claim-successful.scen.json b/test/crowdfunding-esdt/scenarios/crowdfunding-claim-successful.scen.json index 74134792a..02f3f5f18 100644 --- a/test/crowdfunding-esdt/scenarios/crowdfunding-claim-successful.scen.json +++ b/test/crowdfunding-esdt/scenarios/crowdfunding-claim-successful.scen.json @@ -125,7 +125,7 @@ { "address": "sc:crowdfunding", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:CROWD-123456", "", "500,000,000,000", diff --git a/test/digital-cash/output/digital-cash.wasm b/test/digital-cash/output/digital-cash.wasm index c4b621a66..a9f1ce9c5 100755 Binary files a/test/digital-cash/output/digital-cash.wasm and b/test/digital-cash/output/digital-cash.wasm differ diff --git a/test/digital-cash/scenarios/claim-egld.scen.json b/test/digital-cash/scenarios/claim-egld.scen.json index ea6ab57e2..c9c70411c 100644 --- a/test/digital-cash/scenarios/claim-egld.scen.json +++ b/test/digital-cash/scenarios/claim-egld.scen.json @@ -3,101 +3,18 @@ "steps": [ { "step": "externalSteps", - "path": "set-accounts.scen.json" - }, - { - "step": "setState", - "comment": "set block", - "currentBlockInfo": { - "blockTimestamp": "511", - "blockNonce": "5", - "blockRound": "555", - "blockEpoch": "1" - } - }, - { - "step": "setState", - "accounts": { - "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915": { - "nonce": "0", - "balance": "1,000,000" - } - } - }, - { - "step": "scCall", - "id": "fund", - "tx": { - "from": "address:acc1", - "to": "sc:the_digital_cash_contract", - "egldValue": "5", - "function": "fund", - "arguments": [ - "0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91", - "u64:605" - ], - "gasLimit": "500,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "sc:the_digital_cash_contract": { - "nonce": "0", - "balance": "5", - "storage": { - "str:deposit|0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91|str:.mapped|nested:str:EGLD|u64:0": "address:acc1|nested:str:EGLD|u64:0|biguint:5|u64:655", - "str:deposit|0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91|str:.value|u32:1": "nested:str:EGLD|u64:0", - "str:deposit|0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91|str:.node_id|nested:str:EGLD|u64:0": "1", - "str:deposit|0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91|str:.info": "u32:1|u32:1|u32:1|u32:1" - }, - "code": "file:../output/digital-cash.wasm" - }, - "address:acc1": { - "nonce": "1", - "balance": "999,995", - "storage": {} - }, - "address:acc2": { - "nonce": "0", - "balance": "1,000,000", - "esdt": { - "str:CASHTOKEN-123456": "100" - }, - "storage": {} - }, - "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915": { - "nonce": "0", - "balance": "1,000,000", - "storage": {} - }, - "address:digital_cash_owner_address": { - "nonce": "1", - "balance": "0", - "storage": {} - } - } + "path": "fund-egld-and-esdt.scen.json" }, { "step": "scCall", "id": "claim2", "tx": { - "from": "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915", + "from": "address:acc2", "to": "sc:the_digital_cash_contract", "function": "claim", "arguments": [ - "0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d81", - "0xf638006f25df5fc9e24ab265e90326b5edf29189608384ff3a3d47104ae7debb3a0867698680f0b78a73833ceb395932427956bc2427669e8c48ef01e7c37705" + "0xd0474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60", + "0x443c75ceadb9ec42acff7e1b92e0305182279446c1d6c0502959484c147a0430d3f96f0b988e646f6736d5bf8e4a843d8ba7730d6fa7e60f0ef3edd225ce630f" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -125,12 +42,12 @@ "step": "scCall", "id": "claim3", "tx": { - "from": "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915", + "from": "address:acc2", "to": "sc:the_digital_cash_contract", "function": "claim", "arguments": [ - "0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91", - "0xf638006f25df5fc9e24ab265e90326b5edf29189608384ff3a3d47104ae7debb3a0867698680f0b78a73833ceb395932427956bc2427669e8c48ef01e7c37705" + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60", + "0x443c75ceadb9ec42acff7e1b92e0305182279446c1d6c0502959484c147a0430d3f96f0b988e646f6736d5bf8e4a843d8ba7730d6fa7e60f0ef3edd225ce630f" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -149,8 +66,8 @@ "comment": "set block", "currentBlockInfo": { "blockTimestamp": "511", - "blockNonce": "12", - "blockRound": "12", + "blockNonce": "8", + "blockRound": "8", "blockEpoch": "1" } }, @@ -158,12 +75,12 @@ "step": "scCall", "id": "claim4", "tx": { - "from": "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915", + "from": "address:acc2", "to": "sc:the_digital_cash_contract", "function": "claim", "arguments": [ - "0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91", - "0xf638006f25ddf5fc9e24ab265e90326b5edf29189608384ff3a3d47104ae7debb3a0867698680f0b78a73833ceb395932427956bc2427669e8c48ef01e7c37705" + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60", + "0x12bb9e58dad361e9dadd0af1021ce53f9ca12b6580f5b3ab4f9c321ee055a38bcdcf35924eb46aef7a80b22387ded0b837734ac8a57e19ea12c33ef808f996c00" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -181,12 +98,12 @@ "step": "scCall", "id": "claim5", "tx": { - "from": "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915", + "from": "address:acc2", "to": "sc:the_digital_cash_contract", "function": "claim", "arguments": [ - "0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91", - "0xf638006f25df5fc9e24ab265e90326b5edf29189608384ff3a3d47104ae7debb3a0867698680f0b78a73833ceb395932427956bc2427669e8c48ef01e7c37705" + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60", + "0x443c75ceadb9ec42acff7e1b92e0305182279446c1d6c0502959484c147a0430d3f96f0b988e646f6736d5bf8e4a843d8ba7730d6fa7e60f0ef3edd225ce630f" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -205,26 +122,76 @@ "accounts": { "sc:the_digital_cash_contract": { "nonce": "0", - "balance": "0", - "storage": {}, + "balance": "2,010", + "esdt": { + "str:CASHTOKEN-123456": "50", + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": { + "str:deposit|0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:1|nested:str:CASHTOKEN-123456|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d": { + "0-depositor_address": "address:acc3", + "1-esdt_funds": "u32:3|nested:str:CASHTOKEN-112233|u64:0|biguint:50|nested:str:CASHTOKEN-445566|u64:0|biguint:50|nested:str:CASHTOKEN-778899|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:3", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1", + "str:collectedFees|nested:str:EGLD": "10" + }, "code": "file:../output/digital-cash.wasm" }, "address:acc1": { - "nonce": "1", - "balance": "999,995", + "nonce": "3", + "balance": "998,990", "storage": {} }, "address:acc2": { - "nonce": "0", + "nonce": "7", "balance": "1,000,000", "esdt": { - "str:CASHTOKEN-123456": "100" + "str:CASHTOKEN-123456": "50" }, "storage": {} }, - "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915": { - "nonce": "4", - "balance": "1,000,005", + "address:acc3": { + "nonce": "3", + "balance": "999,000", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, "storage": {} }, "address:digital_cash_owner_address": { diff --git a/test/digital-cash/scenarios/claim-esdt.scen.json b/test/digital-cash/scenarios/claim-esdt.scen.json index 540127748..8c0931423 100644 --- a/test/digital-cash/scenarios/claim-esdt.scen.json +++ b/test/digital-cash/scenarios/claim-esdt.scen.json @@ -3,109 +3,18 @@ "steps": [ { "step": "externalSteps", - "path": "set-accounts.scen.json" - }, - { - "step": "setState", - "comment": "set block", - "currentBlockInfo": { - "blockTimestamp": "511", - "blockNonce": "5", - "blockRound": "555", - "blockEpoch": "1" - } - }, - { - "step": "setState", - "accounts": { - "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915": { - "nonce": "0", - "balance": "1,000,000" - } - } - }, - { - "step": "scCall", - "id": "fund", - "tx": { - "from": "address:acc2", - "to": "sc:the_digital_cash_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:CASHTOKEN-123456", - "value": "50" - } - ], - "function": "fund", - "arguments": [ - "0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91", - "u64:605" - ], - "gasLimit": "500,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "sc:the_digital_cash_contract": { - "nonce": "0", - "balance": "0", - "esdt": { - "str:CASHTOKEN-123456": "50" - }, - "storage": { - "str:deposit|0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91|str:.mapped|nested:str:CASHTOKEN-123456|u64:0": "address:acc2|nested:str:CASHTOKEN-123456|u64:0|biguint:50|u64:655", - "str:deposit|0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91|str:.value|u32:1": "nested:str:CASHTOKEN-123456|u64:0", - "str:deposit|0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91|str:.node_id|nested:str:CASHTOKEN-123456|u64:0": "1", - "str:deposit|0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91|str:.info": "u32:1|u32:1|u32:1|u32:1" - }, - "code": "file:../output/digital-cash.wasm" - }, - "address:acc1": { - "nonce": "0", - "balance": "1,000,000", - "storage": {} - }, - "address:acc2": { - "nonce": "1", - "balance": "1,000,000", - "esdt": { - "str:CASHTOKEN-123456": "50" - }, - "storage": {} - }, - "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915": { - "nonce": "0", - "balance": "1,000,000", - "storage": {} - }, - "address:digital_cash_owner_address": { - "nonce": "1", - "balance": "0", - "storage": {} - } - } + "path": "fund-egld-and-esdt.scen.json" }, { "step": "scCall", "id": "claim2", "tx": { - "from": "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915", + "from": "address:acc1", "to": "sc:the_digital_cash_contract", "function": "claim", "arguments": [ - "0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d81", - "0xf638006f25df5fc9e24ab265e90326b5edf29189608384ff3a3d47104ae7debb3a0867698680f0b78a73833ceb395932427956bc2427669e8c48ef01e7c37705" + "0x287bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd", + "0xdd092ec3a8d971daede79da4e5c5c90d66af9f2209a6f6541affa00c46a72fc2596e4db1b1bb226ce76e50730733078ff74a79ff7d0d185054375e0989330600" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -133,12 +42,12 @@ "step": "scCall", "id": "claim3", "tx": { - "from": "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915", + "from": "address:acc1", "to": "sc:the_digital_cash_contract", "function": "claim", "arguments": [ - "0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91", - "0xf638006f25df5fc9e24ab265e90326b5edf29189608384ff3a3d47104ae7debb3a0867698680f0b78a73833ceb395932427956bc2427669e8c48ef01e7c37705" + "0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd", + "0xdd092ec3a8d971daede79da4e5c5c90d66af9f2209a6f6541affa00c46a72fc2596e4db1b1bb226ce76e50730733078ff74a79ff7d0d185054375e0989330600" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -157,8 +66,8 @@ "comment": "set block", "currentBlockInfo": { "blockTimestamp": "511", - "blockNonce": "12", - "blockRound": "12", + "blockNonce": "9", + "blockRound": "9", "blockEpoch": "1" } }, @@ -166,12 +75,12 @@ "step": "scCall", "id": "claim4", "tx": { - "from": "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915", + "from": "address:acc1", "to": "sc:the_digital_cash_contract", "function": "claim", "arguments": [ - "0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91", - "0xf638006f25ddf5fc9e24ab265e90326b5edf29189608384ff3a3d47104ae7debb3a0867698680f0b78a73833ceb395932427956bc2427669e8c48ef01e7c37705" + "0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd", + "0x1dd092ec3a8d971daede79da4e5c5c90d66af9f2209a6f6541affa00c46a72fc2596e4db1b1bb226ce76e50730733078ff74a79ff7d0d185054375e0989330600" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -189,12 +98,12 @@ "step": "scCall", "id": "claim5", "tx": { - "from": "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915", + "from": "address:acc1", "to": "sc:the_digital_cash_contract", "function": "claim", "arguments": [ - "0xdfc7efc43c36853ab160e783ad65766043734e30ce46188a448c44e2bbab9d91", - "0xf638006f25df5fc9e24ab265e90326b5edf29189608384ff3a3d47104ae7debb3a0867698680f0b78a73833ceb395932427956bc2427669e8c48ef01e7c37705" + "0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd", + "0xdd092ec3a8d971daede79da4e5c5c90d66af9f2209a6f6541affa00c46a72fc2596e4db1b1bb226ce76e50730733078ff74a79ff7d0d185054375e0989330600" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -213,28 +122,77 @@ "accounts": { "sc:the_digital_cash_contract": { "nonce": "0", - "balance": "0", - "storage": {}, + "balance": "3,010", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": { + "str:deposit|0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60": { + "0-depositor_address": "address:acc1", + "1-esdt_funds": "u32:0", + "2-egld_funds": "biguint:1,000", + "3-valability": "u64:60", + "4-expiration_round": "u64:10", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d": { + "0-depositor_address": "address:acc3", + "1-esdt_funds": "u32:3|nested:str:CASHTOKEN-112233|u64:0|biguint:50|nested:str:CASHTOKEN-445566|u64:0|biguint:50|nested:str:CASHTOKEN-778899|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:3", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1", + "str:collectedFees|nested:str:EGLD": "10" + }, "code": "file:../output/digital-cash.wasm" }, "address:acc1": { - "nonce": "0", - "balance": "1,000,000", + "nonce": "7", + "balance": "998,000", + "esdt": { + "str:CASHTOKEN-123456": "50" + }, "storage": {} }, "address:acc2": { - "nonce": "1", - "balance": "1,000,000", + "nonce": "3", + "balance": "999,990", "esdt": { "str:CASHTOKEN-123456": "50" }, "storage": {} }, - "0xebfd923cd251f857ed7639e87143ac83f12f423827abc4a0cdde0119c3e37915": { - "nonce": "4", - "balance": "1,000,000", + "address:acc3": { + "nonce": "3", + "balance": "999,000", "esdt": { - "str:CASHTOKEN-123456": "50" + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" }, "storage": {} }, diff --git a/test/digital-cash/scenarios/claim-fees.scen.json b/test/digital-cash/scenarios/claim-fees.scen.json new file mode 100644 index 000000000..f1af0b06c --- /dev/null +++ b/test/digital-cash/scenarios/claim-fees.scen.json @@ -0,0 +1,141 @@ +{ + "name": "claim-fees", + "steps": [ + { + "step": "externalSteps", + "path": "claim-egld.scen.json" + }, + { + "step": "scCall", + "id": "claim-fees-fail", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "function": "claimFees", + "arguments": [], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:Endpoint can only be called by owner", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "setState", + "comment": "set block", + "currentBlockInfo": { + "blockTimestamp": "511", + "blockNonce": "1555", + "blockRound": "1555", + "blockEpoch": "1" + } + }, + { + "step": "scCall", + "id": "claim-fees-ok", + "tx": { + "from": "address:digital_cash_owner_address", + "to": "sc:the_digital_cash_contract", + "function": "claimFees", + "arguments": [], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "checkState", + "accounts": { + "sc:the_digital_cash_contract": { + "nonce": "0", + "balance": "2,000", + "esdt": { + "str:CASHTOKEN-123456": "50", + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": { + "str:deposit|0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:1|nested:str:CASHTOKEN-123456|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d": { + "0-depositor_address": "address:acc3", + "1-esdt_funds": "u32:3|nested:str:CASHTOKEN-112233|u64:0|biguint:50|nested:str:CASHTOKEN-445566|u64:0|biguint:50|nested:str:CASHTOKEN-778899|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:3", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1" + }, + "code": "file:../output/digital-cash.wasm" + }, + "address:acc1": { + "nonce": "3", + "balance": "998,990", + "storage": {} + }, + "address:acc2": { + "nonce": "8", + "balance": "1,000,000", + "esdt": { + "str:CASHTOKEN-123456": "50" + }, + "storage": {} + }, + "address:acc3": { + "nonce": "3", + "balance": "999,000", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": {} + }, + "address:digital_cash_owner_address": { + "nonce": "2", + "balance": "10", + "storage": {} + } + } + } + ] +} diff --git a/test/digital-cash/scenarios/claim-multi-esdt.scen.json b/test/digital-cash/scenarios/claim-multi-esdt.scen.json new file mode 100644 index 000000000..301d037ab --- /dev/null +++ b/test/digital-cash/scenarios/claim-multi-esdt.scen.json @@ -0,0 +1,205 @@ +{ + "name": "claim-multi-esdt", + "steps": [ + { + "step": "externalSteps", + "path": "fund-egld-and-esdt.scen.json" + }, + { + "step": "scCall", + "id": "claim2", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "function": "claim", + "arguments": [ + "0x805532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d", + "0x1ac4f6d4d45836d97ffeda83a66aaea7631a3bb3d4063421ccb2b9de9485bdb4c9bd6e44e003f6a9c9eb74379467238204ff579471d203b1878c3f1530592a02" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:non-existent key", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "setState", + "comment": "set block", + "currentBlockInfo": { + "blockTimestamp": "511", + "blockNonce": "1555", + "blockRound": "1555", + "blockEpoch": "1" + } + }, + { + "step": "scCall", + "id": "claim3", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "function": "claim", + "arguments": [ + "0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d", + "0x1ac4f6d4d45836d97ffeda83a66aaea7631a3bb3d4063421ccb2b9de9485bdb4c9bd6e44e003f6a9c9eb74379467238204ff579471d203b1878c3f1530592a02" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:deposit expired", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "setState", + "comment": "set block", + "currentBlockInfo": { + "blockTimestamp": "511", + "blockNonce": "9", + "blockRound": "9", + "blockEpoch": "1" + } + }, + { + "step": "scCall", + "id": "claim4", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "function": "claim", + "arguments": [ + "0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d", + "0x11ac4f6d4d45836d97ffeda83a66aaea7631a3bb3d4063421ccb2b9de9485bdb4c9bd6e44e003f6a9c9eb74379467238204ff579471d203b1878c3f1530592a02" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:argument decode error (signature): bad array length", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "claim5", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "function": "claim", + "arguments": [ + "0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d", + "0x1ac4f6d4d45836d97ffeda83a66aaea7631a3bb3d4063421ccb2b9de9485bdb4c9bd6e44e003f6a9c9eb74379467238204ff579471d203b1878c3f1530592a02" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "checkState", + "accounts": { + "sc:the_digital_cash_contract": { + "nonce": "0", + "balance": "3,030", + "esdt": { + "str:CASHTOKEN-123456": "50" + }, + "storage": { + "str:deposit|0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60": { + "0-depositor_address": "address:acc1", + "1-esdt_funds": "u32:0", + "2-egld_funds": "biguint:1,000", + "3-valability": "u64:60", + "4-expiration_round": "u64:10", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:1|nested:str:CASHTOKEN-123456|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1", + "str:collectedFees|nested:str:EGLD": "30" + }, + "code": "file:../output/digital-cash.wasm" + }, + "address:acc1": { + "nonce": "3", + "balance": "998,000", + "storage": {} + }, + "address:acc2": { + "nonce": "7", + "balance": "999,000", + "esdt": { + "str:CASHTOKEN-123456": "50", + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": {} + }, + "address:acc3": { + "nonce": "3", + "balance": "999,970", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": {} + }, + "address:digital_cash_owner_address": { + "nonce": "1", + "balance": "0", + "storage": {} + } + } + } + ] +} diff --git a/test/digital-cash/scenarios/forward.scen.json b/test/digital-cash/scenarios/forward.scen.json index 012ce6ed2..502b6ea64 100644 --- a/test/digital-cash/scenarios/forward.scen.json +++ b/test/digital-cash/scenarios/forward.scen.json @@ -1,30 +1,115 @@ { - "name": "withdraw-egld", + "name": "forward", "steps": [ { "step": "externalSteps", "path": "fund-egld-and-esdt.scen.json" }, { - "step": "setState", - "comment": "set block", - "currentBlockInfo": { - "blockTimestamp": "511", - "blockNonce": "15", - "blockRound": "15", - "blockEpoch": "0" + "step": "scCall", + "id": "forward-fail", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "function": "forward", + "arguments": [ + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60", + "0xa40e72cdac3580e7203a4c2565c932f7691c35e624bcfd82718d7f559c88f440", + "0x443c75ceadb9ec42acff7e1b92e0305182279446c1d6c0502959484c147a0430d3f96f0b988e646f6736d5bf8e4a843d8ba7730d6fa7e60f0ef3edd225ce630f" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:cannot deposit funds without covering the fee cost first", + "logs": "*", + "gas": "*", + "refund": "*" } }, { "step": "scCall", - "id": "forward-fail", + "id": "deposit-fees-2", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "egldValue": "1,000", + "function": "depositFees", + "arguments": [ + "0xa40e72cdac3580e7203a4c2565c932f7691c35e624bcfd82718d7f559c88f440" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "forward-without-fees-ok", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "function": "forward", + "arguments": [ + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60", + "0xa40e72cdac3580e7203a4c2565c932f7691c35e624bcfd82718d7f559c88f440", + "0x443c75ceadb9ec42acff7e1b92e0305182279446c1d6c0502959484c147a0430d3f96f0b988e646f6736d5bf8e4a843d8ba7730d6fa7e60f0ef3edd225ce630f" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "deposit-fees-4", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "egldValue": "500", + "function": "depositFees", + "arguments": [ + "0x8dc17613990e9b7476401a36d112d1a4d31190dec21e7e9a3c933872a27613ee" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "forward-with-fees-fail", "tx": { "from": "address:acc2", "to": "sc:the_digital_cash_contract", + "egldValue": "500", "function": "forward", "arguments": [ - "0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a", - "address:acc2" + "0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d", + "0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d", + "0x1ac4f6d4d45836d97ffeda83a66aaea7631a3bb3d4063421ccb2b9de9485bdb4c9bd6e44e003f6a9c9eb74379467238204ff579471d203b1878c3f1530592a02" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -32,7 +117,7 @@ "expect": { "out": [], "status": "4", - "message": "str:only depositor can forward", + "message": "str:invalid depositor address", "logs": "*", "gas": "*", "refund": "*" @@ -40,14 +125,16 @@ }, { "step": "scCall", - "id": "forward-ok", + "id": "forward-with-fees-ok", "tx": { - "from": "address:acc1", + "from": "address:acc2", "to": "sc:the_digital_cash_contract", + "egldValue": "500", "function": "forward", "arguments": [ - "0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a", - "address:acc2" + "0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d", + "0x8dc17613990e9b7476401a36d112d1a4d31190dec21e7e9a3c933872a27613ee", + "0x1ac4f6d4d45836d97ffeda83a66aaea7631a3bb3d4063421ccb2b9de9485bdb4c9bd6e44e003f6a9c9eb74379467238204ff579471d203b1878c3f1530592a02" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -65,37 +152,93 @@ "accounts": { "sc:the_digital_cash_contract": { "nonce": "0", - "balance": "1,000,000", + "balance": "4,040", "esdt": { - "str:CASHTOKEN-123456": "50" + "str:CASHTOKEN-123456": "50", + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" }, "storage": { - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.mapped|nested:str:EGLD|u64:0": "address:acc2|nested:str:EGLD|u64:0|biguint:1,000,000|u64:16", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.value|u32:1": "nested:str:EGLD|u64:0", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.node_id|nested:str:EGLD|u64:0": "1", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.info": "u32:1|u32:1|u32:1|u32:1", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.mapped|nested:str:CASHTOKEN-123456|u64:0": "address:acc2|nested:str:CASHTOKEN-123456|u64:0|biguint:50|u64:16", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.value|u32:1": "nested:str:CASHTOKEN-123456|u64:0", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.node_id|nested:str:CASHTOKEN-123456|u64:0": "1", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.info": "u32:1|u32:1|u32:1|u32:1" + "str:deposit|0xa40e72cdac3580e7203a4c2565c932f7691c35e624bcfd82718d7f559c88f440": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:0", + "2-egld_funds": "biguint:1,000", + "3-valability": "u64:60", + "4-expiration_round": "u64:10", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:1|nested:str:CASHTOKEN-123456|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x8dc17613990e9b7476401a36d112d1a4d31190dec21e7e9a3c933872a27613ee": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:3|nested:str:CASHTOKEN-112233|u64:0|biguint:50|nested:str:CASHTOKEN-445566|u64:0|biguint:50|nested:str:CASHTOKEN-778899|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:3", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1", + "str:collectedFees|nested:str:EGLD": "40" }, "code": "file:../output/digital-cash.wasm" }, "address:acc1": { - "nonce": "2", - "balance": "0", + "nonce": "3", + "balance": "998,990", "storage": {} }, "address:acc2": { - "nonce": "2", - "balance": "1,000,000", + "nonce": "9", + "balance": "997,000", "esdt": { "str:CASHTOKEN-123456": "50" }, "storage": {} }, + "address:acc3": { + "nonce": "3", + "balance": "999,970", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": {} + }, "address:digital_cash_owner_address": { "nonce": "1", "balance": "0", diff --git a/test/digital-cash/scenarios/fund-egld-and-esdt.scen.json b/test/digital-cash/scenarios/fund-egld-and-esdt.scen.json index 5af2c949e..b30b5a2b9 100644 --- a/test/digital-cash/scenarios/fund-egld-and-esdt.scen.json +++ b/test/digital-cash/scenarios/fund-egld-and-esdt.scen.json @@ -7,19 +7,66 @@ }, { "step": "scCall", - "id": "fund", + "id": "fail-fund", "tx": { "from": "address:acc1", "to": "sc:the_digital_cash_contract", - "egldValue": "1,000,000", + "egldValue": "1,000", "function": "fund", "arguments": [ - "0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a", + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60", "u64:100" ], "gasLimit": "500,000,000", "gasPrice": "0" }, + "expect": { + "out": [], + "status": "4", + "message": "str:fees not covered", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "deposit-fees-1", + "tx": { + "from": "address:acc1", + "to": "sc:the_digital_cash_contract", + "egldValue": "1,000", + "function": "depositFees", + "arguments": [ + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "fund-1", + "tx": { + "from": "address:acc1", + "to": "sc:the_digital_cash_contract", + "egldValue": "1,000", + "function": "fund", + "arguments": [ + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60", + "u64:60" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, "expect": { "out": [], "status": "0", @@ -34,19 +81,36 @@ "accounts": { "sc:the_digital_cash_contract": { "nonce": "0", - "balance": "1,000,000", + "balance": "2,000", "storage": { - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.mapped|nested:str:EGLD|u64:0": "address:acc1|nested:str:EGLD|u64:0|biguint:1,000,000|u64:16", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.value|u32:1": "nested:str:EGLD|u64:0", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.node_id|nested:str:EGLD|u64:0": "1", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.info": "u32:1|u32:1|u32:1|u32:1" + "str:deposit|0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60": { + "0-depositor_address": "address:acc1", + "1-esdt_funds": "u32:0", + "2-egld_funds": "biguint:1,000", + "3-valability": "u64:60", + "4-expiration_round": "u64:10", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1" }, "code": "file:../output/digital-cash.wasm" }, "address:acc1": { - "nonce": "1", - "balance": "0", + "nonce": "3", + "balance": "998000", "storage": {} }, "address:acc2": { @@ -57,6 +121,16 @@ }, "storage": {} }, + "address:acc3": { + "nonce": "0", + "balance": "1,000,000", + "esdt": { + "str:CASHTOKEN-112233": "100", + "str:CASHTOKEN-445566": "100", + "str:CASHTOKEN-778899": "100" + }, + "storage": {} + }, "address:digital_cash_owner_address": { "nonce": "1", "balance": "0", @@ -64,6 +138,29 @@ } } }, + { + "step": "scCall", + "id": "deposit-fees-2", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "egldValue": "1,000", + "function": "depositFees", + "arguments": [ + "0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, { "step": "scCall", "id": "fund-2", @@ -78,7 +175,7 @@ ], "function": "fund", "arguments": [ - "0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8", + "0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd", "u64:100" ], "gasLimit": "100,000,000", @@ -97,37 +194,295 @@ "accounts": { "sc:the_digital_cash_contract": { "nonce": "0", - "balance": "1,000,000", + "balance": "3,000", "esdt": { - "''CASHTOKEN-123456": "50" + "str:CASHTOKEN-123456": "50" }, "storage": { - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.mapped|nested:str:EGLD|u64:0": "address:acc1|nested:str:EGLD|u64:0|biguint:1,000,000|u64:16", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.value|u32:1": "nested:str:EGLD|u64:0", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.node_id|nested:str:EGLD|u64:0": "1", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.info": "u32:1|u32:1|u32:1|u32:1", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.mapped|nested:str:CASHTOKEN-123456|u64:0": "address:acc2|nested:str:CASHTOKEN-123456|u64:0|biguint:50|u64:16", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.value|u32:1": "nested:str:CASHTOKEN-123456|u64:0", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.node_id|nested:str:CASHTOKEN-123456|u64:0": "1", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.info": "u32:1|u32:1|u32:1|u32:1" + "str:deposit|0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60": { + "0-depositor_address": "address:acc1", + "1-esdt_funds": "u32:0", + "2-egld_funds": "biguint:1,000", + "3-valability": "u64:60", + "4-expiration_round": "u64:10", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:1|nested:str:CASHTOKEN-123456|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1" }, "code": "file:../output/digital-cash.wasm" }, "address:acc1": { + "nonce": "3", + "balance": "998,000", + "storage": {} + }, + "address:acc2": { + "nonce": "2", + "balance": "999,000", + "esdt": { + "str:CASHTOKEN-123456": "50" + }, + "storage": {} + }, + "address:acc3": { + "nonce": "0", + "balance": "1,000,000", + "esdt": { + "str:CASHTOKEN-112233": "100", + "str:CASHTOKEN-445566": "100", + "str:CASHTOKEN-778899": "100" + }, + "storage": {} + }, + "address:digital_cash_owner_address": { "nonce": "1", "balance": "0", "storage": {} + } + } + }, + { + "step": "scCall", + "id": "fund-fail-2", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "esdtValue": [ + { + "tokenIdentifier": "str:CASHTOKEN-123456", + "value": "10" + } + ], + "function": "fund", + "arguments": [ + "0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd", + "u64:100" + ], + "gasLimit": "100,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:key already used", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "fund-fail-3", + "tx": { + "from": "address:acc3", + "to": "sc:the_digital_cash_contract", + "esdtValue": [ + { + "tokenIdentifier": "str:CASHTOKEN-112233", + "value": "50" + }, + { + "tokenIdentifier": "str:CASHTOKEN-445566", + "value": "50" + }, + { + "tokenIdentifier": "str:CASHTOKEN-778899", + "value": "50" + } + ], + "function": "fund", + "arguments": [ + "0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd", + "u64:100" + ], + "gasLimit": "100,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:invalid depositor", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "deposit-fees-3", + "tx": { + "from": "address:acc3", + "to": "sc:the_digital_cash_contract", + "egldValue": "1,000", + "function": "depositFees", + "arguments": [ + "0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "fund-2", + "tx": { + "from": "address:acc3", + "to": "sc:the_digital_cash_contract", + "esdtValue": [ + { + "tokenIdentifier": "str:CASHTOKEN-112233", + "value": "50" + }, + { + "tokenIdentifier": "str:CASHTOKEN-445566", + "value": "50" + }, + { + "tokenIdentifier": "str:CASHTOKEN-778899", + "value": "50" + } + ], + "function": "fund", + "arguments": [ + "0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d", + "u64:100" + ], + "gasLimit": "100,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "", + "message": "", + "gas": "*", + "refund": "*" + } + }, + { + "step": "checkState", + "accounts": { + "sc:the_digital_cash_contract": { + "nonce": "0", + "balance": "4,000", + "esdt": { + "str:CASHTOKEN-123456": "50", + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": { + "str:deposit|0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60": { + "0-depositor_address": "address:acc1", + "1-esdt_funds": "u32:0", + "2-egld_funds": "biguint:1,000", + "3-valability": "u64:60", + "4-expiration_round": "u64:10", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:1|nested:str:CASHTOKEN-123456|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d": { + "0-depositor_address": "address:acc3", + "1-esdt_funds": "u32:3|nested:str:CASHTOKEN-112233|u64:0|biguint:50|nested:str:CASHTOKEN-445566|u64:0|biguint:50|nested:str:CASHTOKEN-778899|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:3", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1" + }, + "code": "file:../output/digital-cash.wasm" + }, + "address:acc1": { + "nonce": "3", + "balance": "998,000", + "storage": {} }, "address:acc2": { - "nonce": "1", - "balance": "1,000,000", + "nonce": "3", + "balance": "999,000", "esdt": { "str:CASHTOKEN-123456": "50" }, "storage": {} }, + "address:acc3": { + "nonce": "3", + "balance": "999,000", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": {} + }, "address:digital_cash_owner_address": { "nonce": "1", "balance": "0", diff --git a/test/digital-cash/scenarios/pay-fee-and-fund-egld.scen.json b/test/digital-cash/scenarios/pay-fee-and-fund-egld.scen.json new file mode 100644 index 000000000..83e5d386e --- /dev/null +++ b/test/digital-cash/scenarios/pay-fee-and-fund-egld.scen.json @@ -0,0 +1,126 @@ +{ + "name": "pay-fee-adn-fund-egld", + "steps": [ + { + "step": "externalSteps", + "path": "whitelist-blacklist-fee-tokens.scen.json" + }, + { + "step": "scCall", + "id": "pay-fee-and-fund-egld-fail", + "tx": { + "from": "address:acc3", + "to": "sc:the_digital_cash_contract", + "egldValue": "10", + "function": "payFeeAndFundEGLD", + "arguments": [ + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60", + "u64:100" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:payment not covering fees", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "pay-fee-and-fund-egld-success", + "tx": { + "from": "address:acc3", + "to": "sc:the_digital_cash_contract", + "egldValue": "1,000", + "function": "payFeeAndFundEGLD", + "arguments": [ + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60", + "u64:100" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "checkState", + "accounts": { + "sc:the_digital_cash_contract": { + "nonce": "0", + "balance": "1,000", + "storage": { + "str:deposit|0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60": { + "0-depositor_address": "address:acc3", + "1-esdt_funds": "u32:0", + "2-egld_funds": "biguint:990", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:10" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:fee|nested:str:CASHTOKEN-778899": "3", + "str:whitelistedFeeTokens|str:.len": "2", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.item|u32:2": "str:CASHTOKEN-778899", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:whitelistedFeeTokens|str:.index|nested:str:CASHTOKEN-778899": "2", + "str:allTimeFeeTokens|str:.len": "3", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.item|u32:2": "str:CASHTOKEN-778899", + "str:allTimeFeeTokens|str:.item|u32:3": "str:ESDT-778899", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.index|nested:str:CASHTOKEN-778899": "2", + "str:allTimeFeeTokens|str:.index|nested:str:ESDT-778899": "3" + }, + "code": "file:../output/digital-cash.wasm" + }, + "address:acc1": { + "nonce": "0", + "balance": "1,000,000", + "storage": {} + }, + "address:acc2": { + "nonce": "0", + "balance": "1,000,000", + "esdt": { + "str:CASHTOKEN-123456": "100" + }, + "storage": {} + }, + "address:acc3": { + "nonce": "2", + "balance": "999000", + "esdt": { + "str:CASHTOKEN-112233": "100", + "str:CASHTOKEN-445566": "100", + "str:CASHTOKEN-778899": "100" + }, + "storage": {} + }, + "address:digital_cash_owner_address": { + "nonce": "6", + "balance": "0", + "storage": {} + } + } + } + ] +} diff --git a/test/digital-cash/scenarios/pay-fee-and-fund-esdt.scen.json b/test/digital-cash/scenarios/pay-fee-and-fund-esdt.scen.json new file mode 100644 index 000000000..7bf2184f8 --- /dev/null +++ b/test/digital-cash/scenarios/pay-fee-and-fund-esdt.scen.json @@ -0,0 +1,148 @@ +{ + "name": "pay-fee-and-fund-esdt", + "steps": [ + { + "step": "externalSteps", + "path": "whitelist-blacklist-fee-tokens.scen.json" + }, + { + "step": "scCall", + "id": "pay-fee-and-fund-esdt-fail", + "tx": { + "from": "address:acc3", + "to": "sc:the_digital_cash_contract", + "esdtValue": [ + { + "tokenIdentifier": "str:CASHTOKEN-445566", + "value": "50" + }, + { + "tokenIdentifier": "str:CASHTOKEN-112233", + "value": "50" + } + ], + "function": "payFeeAndFundESDT", + "arguments": [ + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60", + "u64:100" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:invalid fee toke provided", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "pay-fee-and-fund-esdt-success", + "tx": { + "from": "address:acc3", + "to": "sc:the_digital_cash_contract", + "esdtValue": [ + { + "tokenIdentifier": "str:CASHTOKEN-778899", + "value": "50" + }, + { + "tokenIdentifier": "str:CASHTOKEN-112233", + "value": "50" + } + ], + "function": "payFeeAndFundESDT", + "arguments": [ + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60", + "u64:100" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "checkState", + "accounts": { + "sc:the_digital_cash_contract": { + "nonce": "0", + "balance": "0", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": { + "str:deposit|0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60": { + "0-depositor_address": "address:acc3", + "1-esdt_funds": "u32:1|nested:str:CASHTOKEN-112233|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:CASHTOKEN-778899", + "1-nonce": "u64:0", + "2-amount": "biguint:50" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:fee|nested:str:CASHTOKEN-778899": "3", + "str:whitelistedFeeTokens|str:.len": "2", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.item|u32:2": "str:CASHTOKEN-778899", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:whitelistedFeeTokens|str:.index|nested:str:CASHTOKEN-778899": "2", + "str:allTimeFeeTokens|str:.len": "3", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.item|u32:2": "str:CASHTOKEN-778899", + "str:allTimeFeeTokens|str:.item|u32:3": "str:ESDT-778899", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.index|nested:str:CASHTOKEN-778899": "2", + "str:allTimeFeeTokens|str:.index|nested:str:ESDT-778899": "3" + }, + "code": "file:../output/digital-cash.wasm" + }, + "address:acc1": { + "nonce": "0", + "balance": "1,000,000", + "storage": {} + }, + "address:acc2": { + "nonce": "0", + "balance": "1,000,000", + "esdt": { + "str:CASHTOKEN-123456": "100" + }, + "storage": {} + }, + "address:acc3": { + "nonce": "2", + "balance": "1,000,000", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "100", + "str:CASHTOKEN-778899": "50" + }, + "storage": {} + }, + "address:digital_cash_owner_address": { + "nonce": "6", + "balance": "0", + "storage": {} + } + } + } + ] +} diff --git a/test/digital-cash/scenarios/set-accounts.scen.json b/test/digital-cash/scenarios/set-accounts.scen.json index ad6741019..f010d4059 100644 --- a/test/digital-cash/scenarios/set-accounts.scen.json +++ b/test/digital-cash/scenarios/set-accounts.scen.json @@ -15,6 +15,15 @@ "str:CASHTOKEN-123456": "100" } }, + "address:acc3": { + "nonce": "0", + "balance": "1,000,000", + "esdt": { + "str:CASHTOKEN-112233": "100", + "str:CASHTOKEN-445566": "100", + "str:CASHTOKEN-778899": "100" + } + }, "address:digital_cash_owner_address": { "nonce": "0", "balance": "0" @@ -34,7 +43,10 @@ "tx": { "from": "address:digital_cash_owner_address", "contractCode": "file:../output/digital-cash.wasm", - "arguments": [], + "arguments": [ + "10", + "str:EGLD" + ], "gasLimit": "5,000,000", "gasPrice": "0" }, @@ -44,6 +56,53 @@ "gas": "*", "refund": "*" } + }, + { + "step": "checkState", + "accounts": { + "sc:the_digital_cash_contract": { + "nonce": "0", + "balance": "0", + "storage": { + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1" + }, + "code": "file:../output/digital-cash.wasm" + }, + "address:acc1": { + "nonce": "0", + "balance": "1,000,000", + "storage": {} + }, + "address:acc2": { + "nonce": "0", + "balance": "1,000,000", + "esdt": { + "str:CASHTOKEN-123456": "100" + }, + "storage": {} + }, + "address:acc3": { + "nonce": "0", + "balance": "1,000,000", + "esdt": { + "str:CASHTOKEN-112233": "100", + "str:CASHTOKEN-445566": "100", + "str:CASHTOKEN-778899": "100" + }, + "storage": {} + }, + "address:digital_cash_owner_address": { + "nonce": "1", + "balance": "0", + "storage": {} + } + } } ] } diff --git a/test/digital-cash/scenarios/whitelist-blacklist-fee-tokens.scen.json b/test/digital-cash/scenarios/whitelist-blacklist-fee-tokens.scen.json new file mode 100644 index 000000000..bd9f1afd1 --- /dev/null +++ b/test/digital-cash/scenarios/whitelist-blacklist-fee-tokens.scen.json @@ -0,0 +1,176 @@ +{ + "name": "whitelist-blacklist-fee-token", + "steps": [ + { + "step": "externalSteps", + "path": "set-accounts.scen.json" + }, + { + "step": "scCall", + "id": "whitelist-fail", + "tx": { + "from": "address:digital_cash_owner_address", + "to": "sc:the_digital_cash_contract", + "function": "whitelistFeeToken", + "arguments": [ + "biguint:10", + "str:EGLD" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:Token already whitelisted", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "whitelist-success-1", + "tx": { + "from": "address:digital_cash_owner_address", + "to": "sc:the_digital_cash_contract", + "function": "whitelistFeeToken", + "arguments": [ + "3", + "str:CASHTOKEN-778899" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "whitelist-success-2", + "tx": { + "from": "address:digital_cash_owner_address", + "to": "sc:the_digital_cash_contract", + "function": "whitelistFeeToken", + "arguments": [ + "5", + "str:ESDT-778899" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "blacklist-fail", + "tx": { + "from": "address:digital_cash_owner_address", + "to": "sc:the_digital_cash_contract", + "function": "blacklistFeeToken", + "arguments": [ + "str:ESDT-000000" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:Token is not whitelisted", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "blacklist-success", + "tx": { + "from": "address:digital_cash_owner_address", + "to": "sc:the_digital_cash_contract", + "function": "blacklistFeeToken", + "arguments": [ + "str:ESDT-778899" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "checkState", + "accounts": { + "sc:the_digital_cash_contract": { + "nonce": "0", + "balance": "0", + "storage": { + "str:fee|nested:str:EGLD": "10", + "str:fee|nested:str:CASHTOKEN-778899": "3", + "str:whitelistedFeeTokens|str:.len": "2", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.item|u32:2": "str:CASHTOKEN-778899", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:whitelistedFeeTokens|str:.index|nested:str:CASHTOKEN-778899": "2", + "str:allTimeFeeTokens|str:.len": "3", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.item|u32:2": "str:CASHTOKEN-778899", + "str:allTimeFeeTokens|str:.item|u32:3": "str:ESDT-778899", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.index|nested:str:CASHTOKEN-778899": "2", + "str:allTimeFeeTokens|str:.index|nested:str:ESDT-778899": "3" + }, + "code": "file:../output/digital-cash.wasm" + }, + "address:acc1": { + "nonce": "0", + "balance": "1,000,000", + "storage": {} + }, + "address:acc2": { + "nonce": "0", + "balance": "1,000,000", + "esdt": { + "str:CASHTOKEN-123456": "100" + }, + "storage": {} + }, + "address:acc3": { + "nonce": "0", + "balance": "1,000,000", + "esdt": { + "str:CASHTOKEN-112233": "100", + "str:CASHTOKEN-445566": "100", + "str:CASHTOKEN-778899": "100" + }, + "storage": {} + }, + "address:digital_cash_owner_address": { + "nonce": "6", + "balance": "0", + "storage": {} + } + } + } + ] +} diff --git a/test/digital-cash/scenarios/withdraw-egld.scen.json b/test/digital-cash/scenarios/withdraw-egld.scen.json index 683b12a35..5c4182a16 100644 --- a/test/digital-cash/scenarios/withdraw-egld.scen.json +++ b/test/digital-cash/scenarios/withdraw-egld.scen.json @@ -5,25 +5,15 @@ "step": "externalSteps", "path": "fund-egld-and-esdt.scen.json" }, - { - "step": "setState", - "comment": "set block", - "currentBlockInfo": { - "blockTimestamp": "511", - "blockNonce": "15", - "blockRound": "15", - "blockEpoch": "0" - } - }, { "step": "scCall", - "id": "withdraw-esdt-1", + "id": "withdraw-egld-fail-1", "tx": { "from": "address:acc1", "to": "sc:the_digital_cash_contract", "function": "withdraw", "arguments": [ - "0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a" + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -42,37 +32,92 @@ "accounts": { "sc:the_digital_cash_contract": { "nonce": "0", - "balance": "1,000,000", + "balance": "4,000", "esdt": { - "str:CASHTOKEN-123456": "50" + "str:CASHTOKEN-123456": "50", + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" }, "storage": { - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.mapped|nested:str:EGLD|u64:0": "address:acc1|nested:str:EGLD|u64:0|biguint:1,000,000|u64:16", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.value|u32:1": "nested:str:EGLD|u64:0", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.node_id|nested:str:EGLD|u64:0": "1", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.info": "u32:1|u32:1|u32:1|u32:1", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.mapped|nested:str:CASHTOKEN-123456|u64:0": "address:acc2|nested:str:CASHTOKEN-123456|u64:0|biguint:50|u64:16", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.value|u32:1": "nested:str:CASHTOKEN-123456|u64:0", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.node_id|nested:str:CASHTOKEN-123456|u64:0": "1", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.info": "u32:1|u32:1|u32:1|u32:1" + "str:deposit|0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60": { + "0-depositor_address": "address:acc1", + "1-esdt_funds": "u32:0", + "2-egld_funds": "biguint:1,000", + "3-valability": "u64:60", + "4-expiration_round": "u64:10", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:1|nested:str:CASHTOKEN-123456|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d": { + "0-depositor_address": "address:acc3", + "1-esdt_funds": "u32:3|nested:str:CASHTOKEN-112233|u64:0|biguint:50|nested:str:CASHTOKEN-445566|u64:0|biguint:50|nested:str:CASHTOKEN-778899|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:3", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1" }, "code": "file:../output/digital-cash.wasm" }, "address:acc1": { - "nonce": "2", - "balance": "0", + "nonce": "4", + "balance": "998,000", "storage": {} }, "address:acc2": { - "nonce": "1", - "balance": "1,000,000", + "nonce": "3", + "balance": "999,000", "esdt": { "str:CASHTOKEN-123456": "50" }, "storage": {} }, + "address:acc3": { + "nonce": "3", + "balance": "999,000", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": {} + }, "address:digital_cash_owner_address": { "nonce": "1", "balance": "0", @@ -82,7 +127,7 @@ }, { "step": "scCall", - "id": "withdraw-egld-2", + "id": "withdraw-egld-fail-2", "tx": { "from": "address:acc1", "to": "sc:the_digital_cash_contract", @@ -114,13 +159,13 @@ }, { "step": "scCall", - "id": "withdraw-egld-3", + "id": "withdraw-egld-success", "tx": { "from": "address:acc1", "to": "sc:the_digital_cash_contract", "function": "withdraw", "arguments": [ - "0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a" + "0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -139,32 +184,77 @@ "accounts": { "sc:the_digital_cash_contract": { "nonce": "0", - "balance": "0", + "balance": "2,000", "esdt": { - "str:CASHTOKEN-123456": "50" + "str:CASHTOKEN-123456": "50", + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" }, "storage": { - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.mapped|nested:str:CASHTOKEN-123456|u64:0": "address:acc2|nested:str:CASHTOKEN-123456|u64:0|biguint:50|u64:16", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.value|u32:1": "nested:str:CASHTOKEN-123456|u64:0", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.node_id|nested:str:CASHTOKEN-123456|u64:0": "1", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.info": "u32:1|u32:1|u32:1|u32:1" + "str:deposit|0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:1|nested:str:CASHTOKEN-123456|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d": { + "0-depositor_address": "address:acc3", + "1-esdt_funds": "u32:3|nested:str:CASHTOKEN-112233|u64:0|biguint:50|nested:str:CASHTOKEN-445566|u64:0|biguint:50|nested:str:CASHTOKEN-778899|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:3", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1" }, "code": "file:../output/digital-cash.wasm" }, "address:acc1": { - "nonce": "4", + "nonce": "6", "balance": "1,000,000", "storage": {} }, "address:acc2": { - "nonce": "1", - "balance": "1,000,000", + "nonce": "3", + "balance": "999,000", "esdt": { "str:CASHTOKEN-123456": "50" }, "storage": {} }, + "address:acc3": { + "nonce": "3", + "balance": "999,000", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": {} + }, "address:digital_cash_owner_address": { "nonce": "1", "balance": "0", diff --git a/test/digital-cash/scenarios/withdraw-esdt.scen.json b/test/digital-cash/scenarios/withdraw-esdt.scen.json index 2a73b3c01..07d7c821e 100644 --- a/test/digital-cash/scenarios/withdraw-esdt.scen.json +++ b/test/digital-cash/scenarios/withdraw-esdt.scen.json @@ -5,25 +5,15 @@ "step": "externalSteps", "path": "fund-egld-and-esdt.scen.json" }, - { - "step": "setState", - "comment": "set block", - "currentBlockInfo": { - "blockTimestamp": "511", - "blockNonce": "15", - "blockRound": "15", - "blockEpoch": "0" - } - }, { "step": "scCall", - "id": "withdraw-esdt-1", + "id": "withdraw-esdt-fail-1", "tx": { "from": "address:acc2", "to": "sc:the_digital_cash_contract", "function": "withdraw", "arguments": [ - "0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8" + "0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -42,37 +32,92 @@ "accounts": { "sc:the_digital_cash_contract": { "nonce": "0", - "balance": "1,000,000", + "balance": "4,000", "esdt": { - "str:CASHTOKEN-123456": "50" + "str:CASHTOKEN-123456": "50", + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" }, "storage": { - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.mapped|nested:str:EGLD|u64:0": "address:acc1|nested:str:EGLD|u64:0|biguint:1,000,000|u64:16", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.value|u32:1": "nested:str:EGLD|u64:0", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.node_id|nested:str:EGLD|u64:0": "1", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.info": "u32:1|u32:1|u32:1|u32:1", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.mapped|nested:str:CASHTOKEN-123456|u64:0": "address:acc2|nested:str:CASHTOKEN-123456|u64:0|biguint:50|u64:16", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.value|u32:1": "nested:str:CASHTOKEN-123456|u64:0", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.node_id|nested:str:CASHTOKEN-123456|u64:0": "1", - "str:deposit|0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8|str:.info": "u32:1|u32:1|u32:1|u32:1" + "str:deposit|0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60": { + "0-depositor_address": "address:acc1", + "1-esdt_funds": "u32:0", + "2-egld_funds": "biguint:1,000", + "3-valability": "u64:60", + "4-expiration_round": "u64:10", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:1|nested:str:CASHTOKEN-123456|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d": { + "0-depositor_address": "address:acc3", + "1-esdt_funds": "u32:3|nested:str:CASHTOKEN-112233|u64:0|biguint:50|nested:str:CASHTOKEN-445566|u64:0|biguint:50|nested:str:CASHTOKEN-778899|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:3", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1" }, "code": "file:../output/digital-cash.wasm" }, "address:acc1": { - "nonce": "1", - "balance": "0", + "nonce": "3", + "balance": "998,000", "storage": {} }, "address:acc2": { - "nonce": "2", - "balance": "1,000,000", + "nonce": "4", + "balance": "999,000", "esdt": { "str:CASHTOKEN-123456": "50" }, "storage": {} }, + "address:acc3": { + "nonce": "3", + "balance": "999,000", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": {} + }, "address:digital_cash_owner_address": { "nonce": "1", "balance": "0", @@ -82,13 +127,13 @@ }, { "step": "scCall", - "id": "withdraw-esdt-2", + "id": "withdraw-esdt-fail-2", "tx": { "from": "address:acc2", "to": "sc:the_digital_cash_contract", "function": "withdraw", "arguments": [ - "0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc7" + "0xe808c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc7" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -114,13 +159,13 @@ }, { "step": "scCall", - "id": "withdraw-esdt-3", + "id": "withdraw-esdt-success", "tx": { "from": "address:acc2", "to": "sc:the_digital_cash_contract", "function": "withdraw", "arguments": [ - "0xe868c2baab2a20b612f1351da5945c52c60f5321c6cde572149db90c9e8fbfc8" + "0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd" ], "gasLimit": "500,000,000", "gasPrice": "0" @@ -139,32 +184,76 @@ "accounts": { "sc:the_digital_cash_contract": { "nonce": "0", - "balance": "1,000,000", + "balance": "3,000", "esdt": { - "str:CASHTOKEN-123456": "0" + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" }, "storage": { - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.mapped|nested:str:EGLD|u64:0": "address:acc1|nested:str:EGLD|u64:0|biguint:1,000,000|u64:16", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.node_links|u32:1": "u32:0|u32:0", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.value|u32:1": "nested:str:EGLD|u64:0", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.node_id|nested:str:EGLD|u64:0": "1", - "str:deposit|0x558fd9b0dd9fed3d3bed883d3b92907743362c56b9728392f84b261f1cc5ae0a|str:.info": "u32:1|u32:1|u32:1|u32:1" + "str:deposit|0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60": { + "0-depositor_address": "address:acc1", + "1-esdt_funds": "u32:0", + "2-egld_funds": "biguint:1,000", + "3-valability": "u64:60", + "4-expiration_round": "u64:10", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d": { + "0-depositor_address": "address:acc3", + "1-esdt_funds": "u32:3|nested:str:CASHTOKEN-112233|u64:0|biguint:50|nested:str:CASHTOKEN-445566|u64:0|biguint:50|nested:str:CASHTOKEN-778899|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:3", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1" }, "code": "file:../output/digital-cash.wasm" }, "address:acc1": { - "nonce": "1", - "balance": "0", + "nonce": "3", + "balance": "998,000", "storage": {} }, "address:acc2": { - "nonce": "4", + "nonce": "6", "balance": "1,000,000", "esdt": { "str:CASHTOKEN-123456": "100" }, "storage": {} }, + "address:acc3": { + "nonce": "3", + "balance": "999,000", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": {} + }, "address:digital_cash_owner_address": { "nonce": "1", "balance": "0", diff --git a/test/digital-cash/scenarios/withdraw-multi-esdt.scen.json b/test/digital-cash/scenarios/withdraw-multi-esdt.scen.json new file mode 100644 index 000000000..fae381c06 --- /dev/null +++ b/test/digital-cash/scenarios/withdraw-multi-esdt.scen.json @@ -0,0 +1,263 @@ +{ + "name": "withdraw-multi-esdt", + "steps": [ + { + "step": "externalSteps", + "path": "fund-egld-and-esdt.scen.json" + }, + { + "step": "scCall", + "id": "withdraw-esdt-1", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "function": "withdraw", + "arguments": [ + "0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:withdrawal has not been available yet", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "checkState", + "accounts": { + "sc:the_digital_cash_contract": { + "nonce": "0", + "balance": "4,000", + "esdt": { + "str:CASHTOKEN-123456": "50", + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": { + "str:deposit|0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60": { + "0-depositor_address": "address:acc1", + "1-esdt_funds": "u32:0", + "2-egld_funds": "biguint:1,000", + "3-valability": "u64:60", + "4-expiration_round": "u64:10", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:1|nested:str:CASHTOKEN-123456|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d": { + "0-depositor_address": "address:acc3", + "1-esdt_funds": "u32:3|nested:str:CASHTOKEN-112233|u64:0|biguint:50|nested:str:CASHTOKEN-445566|u64:0|biguint:50|nested:str:CASHTOKEN-778899|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:3", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1" + }, + "code": "file:../output/digital-cash.wasm" + }, + "address:acc1": { + "nonce": "3", + "balance": "998,000", + "storage": {} + }, + "address:acc2": { + "nonce": "4", + "balance": "999,000", + "esdt": { + "str:CASHTOKEN-123456": "50" + }, + "storage": {} + }, + "address:acc3": { + "nonce": "3", + "balance": "999,000", + "esdt": { + "str:CASHTOKEN-112233": "50", + "str:CASHTOKEN-445566": "50", + "str:CASHTOKEN-778899": "50" + }, + "storage": {} + }, + "address:digital_cash_owner_address": { + "nonce": "1", + "balance": "0", + "storage": {} + } + } + }, + { + "step": "scCall", + "id": "withdraw-esdt-2", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "function": "withdraw", + "arguments": [ + "0x805532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "4", + "message": "str:non-existent key", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "setState", + "comment": "set block", + "currentBlockInfo": { + "blockTimestamp": "511", + "blockNonce": "300", + "blockRound": "300", + "blockEpoch": "1" + } + }, + { + "step": "scCall", + "id": "withdraw-esdt-3", + "tx": { + "from": "address:acc2", + "to": "sc:the_digital_cash_contract", + "function": "withdraw", + "arguments": [ + "0x885532043a061e0c779e4064b85193f72cffd22c5bcc208c209128e60f21bf0d" + ], + "gasLimit": "500,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "checkState", + "accounts": { + "sc:the_digital_cash_contract": { + "nonce": "0", + "balance": "3,000", + "esdt": { + "str:CASHTOKEN-123456": "50" + }, + "storage": { + "str:deposit|0xdb474a3a065d3f0c0a62ae680ef6435e48eb482899d2ae30ff7a3a4b0ef19c60": { + "0-depositor_address": "address:acc1", + "1-esdt_funds": "u32:0", + "2-egld_funds": "biguint:1,000", + "3-valability": "u64:60", + "4-expiration_round": "u64:10", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:deposit|0x487bd4010b50c24a02018345fe5171edf4182e6294325382c75ef4c4409f01bd": { + "0-depositor_address": "address:acc2", + "1-esdt_funds": "u32:1|nested:str:CASHTOKEN-123456|u64:0|biguint:50", + "2-egld_funds": "biguint:0", + "3-valability": "u64:100", + "4-expiration_round": "u64:16", + "5-fees": { + "0-num_token_to_transfer": "u32:1", + "1-value": { + "0-tokenIdentifier": "nested:str:EGLD", + "1-nonce": "u64:0", + "2-amount": "biguint:1,000" + } + } + }, + "str:fee|nested:str:EGLD": "10", + "str:whitelistedFeeTokens|str:.len": "1", + "str:whitelistedFeeTokens|str:.item|u32:1": "str:EGLD", + "str:whitelistedFeeTokens|str:.index|nested:str:EGLD": "1", + "str:allTimeFeeTokens|str:.len": "1", + "str:allTimeFeeTokens|str:.item|u32:1": "str:EGLD", + "str:allTimeFeeTokens|str:.index|nested:str:EGLD": "1" + }, + "code": "file:../output/digital-cash.wasm" + }, + "address:acc1": { + "nonce": "3", + "balance": "998,000", + "storage": {} + }, + "address:acc2": { + "nonce": "6", + "balance": "999,000", + "esdt": { + "str:CASHTOKEN-123456": "50" + }, + "storage": {} + }, + "address:acc3": { + "nonce": "3", + "balance": "1,000,000", + "esdt": { + "str:CASHTOKEN-112233": "100", + "str:CASHTOKEN-445566": "100", + "str:CASHTOKEN-778899": "100" + }, + "storage": {} + }, + "address:digital_cash_owner_address": { + "nonce": "1", + "balance": "0", + "storage": {} + } + } + } + ] +} diff --git a/test/erc20-rust/output/erc20.wasm b/test/erc20-rust/output/erc20.wasm index 3168d8296..2affde6e6 100755 Binary files a/test/erc20-rust/output/erc20.wasm and b/test/erc20-rust/output/erc20.wasm differ diff --git a/test/factorial/output/factorial.wasm b/test/factorial/output/factorial.wasm index 4baa4d292..7672f3d6f 100755 Binary files a/test/factorial/output/factorial.wasm and b/test/factorial/output/factorial.wasm differ diff --git a/test/features/alloc-features/output/alloc-features.wasm b/test/features/alloc-features/output/alloc-features.wasm index b1fe6da18..2aa354fdd 100755 Binary files a/test/features/alloc-features/output/alloc-features.wasm and b/test/features/alloc-features/output/alloc-features.wasm differ diff --git a/test/features/alloc-features/scenarios/crypto_elliptic_curves_legacy.scen.json b/test/features/alloc-features/scenarios/crypto_elliptic_curves_legacy.scen.json deleted file mode 100644 index 0c99dff81..000000000 --- a/test/features/alloc-features/scenarios/crypto_elliptic_curves_legacy.scen.json +++ /dev/null @@ -1,1160 +0,0 @@ -{ - "name": "crypto - elliptic curves", - "steps": [ - { - "step": "setState", - "accounts": { - "sc:features_contract": { - "nonce": "0", - "balance": "0", - "code": "file:../output/alloc-features.wasm" - }, - "address:an_account": { - "nonce": "0", - "balance": "0" - } - } - }, - { - "step": "scCall", - "id": "FAIL-Create-ec", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_create_ec", - "arguments": [ - "str:p22424" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "*", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "Verify-P224", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_create_ec", - "arguments": [ - "str:p224" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "field1": "biguint:26959946667150639794667015087019630673557916260026308143510066298881", - "field2": "biguint:26959946667150639794667015087019625940457807714424391721682722368061", - "field3": "biguint:0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4", - "field4": "biguint:0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21", - "field5": "biguint:0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34", - "field6": "u32:224" - } - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "Verify-P256", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_create_ec", - "arguments": [ - "str:p256" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "field1": "biguint:115792089210356248762697446949407573530086143415290314195533631308867097853951", - "field2": "biguint:115792089210356248762697446949407573529996955224135760342422259061068512044369", - "field3": "biguint:0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", - "field4": "biguint:0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", - "field5": "biguint:0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", - "field6": "u32:256" - } - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "Verify-P384", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_create_ec", - "arguments": [ - "str:p384" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "field1": "biguint:39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112319", - "field2": "biguint:39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942643", - "field3": "biguint:0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef", - "field4": "biguint:0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7", - "field5": "biguint:0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f", - "field6": "u32:384" - } - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "Verify-P521", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_create_ec", - "arguments": [ - "str:p521" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "field1": "biguint:6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151", - "field2": "biguint:6864797660130609714981900799081393217269435300143305409394463459185543183397655394245057746333217197532963996371363321113864768612440380340372808892707005449", - "field3": "biguint:0x51953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00", - "field4": "biguint:0xc6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66", - "field5": "biguint:0x11839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650", - "field6": "u32:521" - } - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "GetValues-P224", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_get_values", - "arguments": [ - "224" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "field1": "biguint:26959946667150639794667015087019630673557916260026308143510066298881", - "field2": "biguint:26959946667150639794667015087019625940457807714424391721682722368061", - "field3": "biguint:0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4", - "field4": "biguint:0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21", - "field5": "biguint:0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34", - "field6": "u32:224" - } - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "GetValues-P256", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_get_values", - "arguments": [ - "256" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "field1": "biguint:115792089210356248762697446949407573530086143415290314195533631308867097853951", - "field2": "biguint:115792089210356248762697446949407573529996955224135760342422259061068512044369", - "field3": "biguint:0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b", - "field4": "biguint:0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", - "field5": "biguint:0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", - "field6": "u32:256" - } - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "GetValues-P384", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_get_values", - "arguments": [ - "384" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "field1": "biguint:39402006196394479212279040100143613805079739270465446667948293404245721771496870329047266088258938001861606973112319", - "field2": "biguint:39402006196394479212279040100143613805079739270465446667946905279627659399113263569398956308152294913554433653942643", - "field3": "biguint:0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef", - "field4": "biguint:0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7", - "field5": "biguint:0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f", - "field6": "u32:384" - } - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "GetValues-P521", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_get_values", - "arguments": [ - "521" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "field1": "biguint:6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057151", - "field2": "biguint:6864797660130609714981900799081393217269435300143305409394463459185543183397655394245057746333217197532963996371363321113864768612440380340372808892707005449", - "field3": "biguint:0x51953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00", - "field4": "biguint:0xc6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66", - "field5": "biguint:0x11839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650", - "field6": "u32:521" - } - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "GetEcLength-P224", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_get_ec_length", - "arguments": [ - "224" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "224" - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "GetEcLength-P256", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_get_ec_length", - "arguments": [ - "256" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "256" - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "GetEcLength-P384", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_get_ec_length", - "arguments": [ - "384" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "384" - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "GetEcLength-P521", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_get_ec_length", - "arguments": [ - "521" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "521" - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "GetPrivKeyLength-P224", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_get_priv_key_byte_length", - "arguments": [ - "224" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "28" - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "GetPrivKeyLength-P256", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_get_priv_key_byte_length", - "arguments": [ - "256" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "32" - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "GetPrivKeyLength-P384", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_get_priv_key_byte_length", - "arguments": [ - "384" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "48" - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "GetPrivKeyLength-P521", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_get_priv_key_byte_length", - "arguments": [ - "521" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "66" - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "P521-IsOnCurve-ReturnTrue-V1", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_is_on_curve_ec", - "arguments": [ - "521", - "0xc6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66", - "0x11839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "1" - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "P521-IsOnCurve-ReturnTrue-V2", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_is_on_curve_ec", - "arguments": [ - "521", - "0xc6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66", - "0x11839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "1" - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "P521-IsOnCurve-ReturnFalse", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_is_on_curve_ec", - "arguments": [ - "521", - "0x1", - "0x2" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0" - ], - "status": "0", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "P256-Add-Fail-OnePointNotOnCurve", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_ec_add", - "arguments": [ - "256", - "0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", - "0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", - "0x2", - "0x3" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "str:point is not on curve", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "P256-Add-Fail-BothPointsNotOnCurve", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_ec_add", - "arguments": [ - "256", - "0x0", - "0x0", - "0x2", - "0x3" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "str:point is not on curve", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "P256-Add-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_ec_add", - "arguments": [ - "256", - "0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", - "0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5", - "0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", - "0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x7cf27b188d034f7e8a52380304b51ac3c08969e277f21b35a60b48fc47669978", - "0x7775510db8ed040293d9ac69f7430dbba7dade63ce982299e04b79d227873d1" - ], - "status": "0", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "P521-Double-Fail-PointNotOnCurve", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_ec_double", - "arguments": [ - "521", - "0x2", - "0x3" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "str:point is not on curve", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "P521-Double-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_ec_double", - "arguments": [ - "521", - "0xc6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66", - "0x11839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x433c219024277e7e682fcb288148c282747403279b1ccc06352c6e5505d769be97b3b204da6ef55507aa104a3a35c5af41cf2fa364d60fd967f43e3933ba6d783d", - "0xf4bb8cc7f86db26700a7f3eceeeed3f0b5c6b5107c4da97740ab21a29906c42dbbb3e377de9f251f6b93937fa99a3248f4eafcbe95edc0f4f71be356d661f41b02" - ], - "status": "0", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "P256-Marshal-FailExecution-BufferTooSmall", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_marshal_ec", - "arguments": [ - "256", - "0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c2963", - "0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f53" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "str:point is not on curve" - } - }, - { - "step": "scCall", - "id": "P256-Marshal-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_marshal_ec", - "arguments": [ - "256", - "0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", - "0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x046b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5" - ], - "status": "0", - "message": "*" - } - }, - { - "step": "scCall", - "id": "P256-Marshal-Fail-Infinity/ZeroPoint", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_marshal_ec", - "arguments": [ - "256", - "0x0", - "0x0" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "str:point is not on curve" - } - }, - { - "step": "scCall", - "id": "P256-Unmarshal-Fail-PointNotOnCurve", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_unmarshal_ec", - "arguments": [ - "256", - "0x0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "str:point is not on curve" - } - }, - { - "step": "scCall", - "id": "P256-Unmarshal-Fail-DataInvalid", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_unmarshal_ec", - "arguments": [ - "256", - "0x04000000000000000000000000000000000000" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "str:length of buffer is not correct" - } - }, - { - "step": "scCall", - "id": "P256-Unmarshal-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_unmarshal_ec", - "arguments": [ - "256", - "0x046b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", - "0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5" - ], - "status": "0", - "message": "*" - } - }, - { - "step": "scCall", - "id": "P256-MarshalCompressed-FailExecution-BufferTooSmall", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_marshal_compressed_ec", - "arguments": [ - "256", - "0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c2963", - "0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f53" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "str:point is not on curve" - } - }, - { - "step": "scCall", - "id": "P256-MarshalCompressed-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_marshal_compressed_ec", - "arguments": [ - "256", - "0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", - "0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x036b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296" - ], - "status": "0", - "message": "*" - } - }, - { - "step": "scCall", - "id": "P256-MarshalCompressed-Fail-Infinity/ZeroPoint", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_marshal_compressed_ec", - "arguments": [ - "256", - "0x0", - "0x0" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "str:point is not on curve" - } - }, - { - "step": "scCall", - "id": "P256-UnmarshalCompressed-Fail-PointNotOnCurve", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_unmarshal_compressed_ec", - "arguments": [ - "256", - "0x036b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a1394000000000" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "str:point is not on curve" - } - }, - { - "step": "scCall", - "id": "P256-UnmarshalCompressed-Fail-DataInvalid", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_unmarshal_compressed_ec", - "arguments": [ - "256", - "0x040000000000000000" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "str:length of buffer is not correct" - } - }, - { - "step": "scCall", - "id": "P256-UnmarshalCompressed-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_unmarshal_compressed_ec", - "arguments": [ - "256", - "0x036b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296", - "0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5" - ], - "status": "0", - "message": "*" - } - }, - { - "step": "scCall", - "id": "P224-GenerateKey-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_generate_key_ec", - "arguments": [ - "224" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "*", - "*", - "*" - ], - "status": "0", - "message": "*" - } - }, - { - "step": "scCall", - "id": "P256-GenerateKey-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_generate_key_ec", - "arguments": [ - "256" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "*", - "*", - "*" - ], - "status": "0", - "message": "*" - } - }, - { - "step": "scCall", - "id": "P384-GenerateKey-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_generate_key_ec", - "arguments": [ - "384" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "*", - "*", - "*" - ], - "status": "0", - "message": "*" - } - }, - { - "step": "scCall", - "id": "P521-GenerateKey-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_generate_key_ec", - "arguments": [ - "521" - ], - "gasLimit": "70,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "*", - "*", - "*" - ], - "status": "0", - "message": "*" - } - }, - { - "step": "scCall", - "id": "P224-ScalarBaseMult-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_scalar_base_mult", - "arguments": [ - "224", - "112233445566778899112233445566778899" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x29895f0af496bfc62b6ef8d8a65c88c613949b03668aab4f0429e35", - "0x3ea6e53f9a841f2019ec24bde1a75677aa9b5902e61081c01064de93" - ], - "status": "0", - "message": "*" - } - }, - { - "step": "scCall", - "id": "P256-ScalarMult-Fail", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_scalar_mult", - "arguments": [ - "256", - "0x2a265f8bcbdcaf94d58519141e578124cb40d64a501fba9c11847b28965bc737", - "0x023819813ac969847059028ea88a1f30dfbcde03fc791d3a252c6b41211882ea", - "0xf93e4ae433cc12cf2a43fc0ef26400c0e125508224cdb649380f25479148a4ad" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "10", - "message": "str:point is not on curve" - } - }, - { - "step": "scCall", - "id": "P224-ScalarMult-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_scalar_mult", - "arguments": [ - "224", - "0x2507b2a1719f88dbe16518d8e719644b9fe2192f4b0e82c6dad005d2", - "0xa2534b3825a715e632b2629f158b9d9135de3a523c78814e5eef25c5", - "0xf93e4ae433cc12cf2a43fc0ef26400c0e125508224cdb649380f25479148a4ad" - ], - "gasLimit": "1,500,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0xa71786c1e0b23c0812fd3feb626edfae5174f739823dd802eab38827", - "0x2ac7327527e4d1db0d8a610c09186fc5cad7806523ac3ae690c27229" - ], - "status": "0", - "message": "*" - } - }, - { - "step": "scCall", - "id": "P256-ScalarMult-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_scalar_mult", - "arguments": [ - "256", - "0x3b5fe724fd14ca9e214b77055d0ab712ded48e87551a49757acf776981f5389b", - "0x60854c6483a8d2b82bf766e3c3bc8ff2f1c261a9b17f2e073a70177bc3781094", - "0xf93e4ae433cc12cf2a43fc0ef26400c0e125508224cdb649380f25479148a4ad" - ], - "gasLimit": "1,500,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0xd49802d2e004b0e393949a5621a9c8bc88da546cd74e836d42967e37ee3d4dac", - "0xfb4de9aa477321be0c2524e68f8a0d601c001c99d311ff899deed3a3016d86b" - ], - "status": "0", - "message": "*" - } - }, - { - "step": "scCall", - "id": "P384-ScalarMult-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_scalar_mult", - "arguments": [ - "384", - "0xf705dc15013b3c76e0dc7f06c425cc9c30d9a216b70c3ba7ab2c42da32bcd16767466f2d5febd7615e04cc225312f565", - "0x953320d0d4e6dffe103f9d2a846fdf8c706d638f9101f04d1e00b2f51e050f7d35e49552fef6eac6c6e2868282636255", - "0xf93e4ae433cc12cf2a43fc0ef26400c0e125508224cdb649380f25479148a4ad" - ], - "gasLimit": "1,500,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x742bf14f0c2840dbdec06691f80dd7e291cc344cd49e5f5e036d9b5a398b4bf8be19ca7cfaf85da37e81cd34c4a2d886", - "0xd1c93b3c7c0afa8a8b4172ed58feeb1583212f45fa9b82af51ab0f22932cfe2dfd48d8d520869c28d9cb1f072003761f" - ], - "status": "0", - "message": "*" - } - }, - { - "step": "scCall", - "id": "P521-ScalarMult-Success", - "tx": { - "from": "address:an_account", - "to": "sc:features_contract", - "function": "compute_scalar_mult", - "arguments": [ - "521", - "0x5390bac258c83dda7bddd0b607353e77b8a1fe6d6b73ed65fcd2927f0febcf000897b8c29c5e7f30a490d6ae6de3a179ab69bcba2c0c1d1a236ca81de940735fe7", - "0x1b6f67ea88bf7506ea8e8ba39005a074426bd96b20022f5e3d2d7855ce9ed8de0de8baf6e85f8a2ceedff2ebd716405fe9d9a00580938b3cbbee66bad3a0cb94ec3", - "0xf93e4ae433cc12cf2a43fc0ef26400c0e125508224cdb649380f25479148a4ad" - ], - "gasLimit": "1,500,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x73e462389a122750193fe319737ce536e72a55c96baacea96e428b85fc71e9e3386051f0b03579218792c4325722d7c523baeb04959e2cbcd75a0c8249a59a3a48", - "0x36b9f6cc3e03dc5726ac86540b15ecf165291b70ada97c17cc52aedc29d5782ca6a246faab599eb3244629eb3617395be738a9f45c7781dcd0bb915bb8a9206776" - ], - "status": "0", - "message": "*" - } - } - ] -} diff --git a/test/features/alloc-features/scenarios/crypto_keccak256_legacy_alloc.scen.json b/test/features/alloc-features/scenarios/crypto_keccak256_legacy_alloc.scen.json deleted file mode 100644 index bc120f36d..000000000 --- a/test/features/alloc-features/scenarios/crypto_keccak256_legacy_alloc.scen.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "crypto", - "steps": [ - { - "step": "setState", - "accounts": { - "sc:alloc-features": { - "nonce": "0", - "balance": "0", - "code": "file:../output/alloc-features.wasm" - }, - "address:an_account": { - "nonce": "0", - "balance": "0" - } - } - }, - { - "step": "scCall", - "id": "1", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "compute_keccak256_legacy_alloc", - "arguments": [ - "0x61" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x3ac225168df54212a25c1c01fd35bebfea408fdac2e31ddd6f80a4bbf9a5f1cb" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "2", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "compute_keccak256_legacy_alloc", - "arguments": [ - "0x0102030405060708" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "keccak256:0x0102030405060708" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/test/features/alloc-features/scenarios/crypto_ripemd160_legacy.scen.json b/test/features/alloc-features/scenarios/crypto_ripemd160_legacy.scen.json deleted file mode 100644 index aa9e88ec6..000000000 --- a/test/features/alloc-features/scenarios/crypto_ripemd160_legacy.scen.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "crypto", - "gasSchedule": "v3", - "steps": [ - { - "step": "setState", - "accounts": { - "sc:alloc-features": { - "nonce": "0", - "balance": "0", - "code": "file:../output/alloc-features.wasm" - }, - "address:an_account": { - "nonce": "0", - "balance": "0" - } - } - }, - { - "step": "scCall", - "id": "1", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "compute_ripemd160_legacy", - "arguments": [ - "0x010203" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x79f901da2609f020adadbf2e5f68a16c8c3f7d57" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "2", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "compute_ripemd160_legacy", - "arguments": [ - "0x0102030405060708" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0xc9883eece7dca619b830dc9d87e82c38478111c0" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/test/features/alloc-features/scenarios/crypto_sha256_legacy_alloc.scen.json b/test/features/alloc-features/scenarios/crypto_sha256_legacy_alloc.scen.json deleted file mode 100644 index 10a462d90..000000000 --- a/test/features/alloc-features/scenarios/crypto_sha256_legacy_alloc.scen.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "crypto", - "gasSchedule": "v3", - "steps": [ - { - "step": "setState", - "accounts": { - "sc:alloc-features": { - "nonce": "0", - "balance": "0", - "code": "file:../output/alloc-features.wasm" - }, - "address:an_account": { - "nonce": "0", - "balance": "0" - } - } - }, - { - "step": "scCall", - "id": "1", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "compute_sha256_legacy_alloc", - "arguments": [ - "0x010203" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x039058c6f2c0cb492c533b0a4d14ef77cc0f78abccced5287d84a1a2011cfb81" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "2", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "compute_sha256_legacy_alloc", - "arguments": [ - "0x0102030405060708" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x66840dda154e8a113c31dd0ad32f7f3a366a80e8136979d8f5a101d3d29d6f72" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/test/features/alloc-features/scenarios/crypto_verify_bls_legacy.scen.json b/test/features/alloc-features/scenarios/crypto_verify_bls_legacy.scen.json deleted file mode 100644 index 2ddbc331b..000000000 --- a/test/features/alloc-features/scenarios/crypto_verify_bls_legacy.scen.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "crypto", - "comment": "does not currently work with scenarios-rs, because verify_bls function is not yet mocked", - "gasSchedule": "v3", - "steps": [ - { - "step": "setState", - "accounts": { - "sc:alloc-features": { - "nonce": "0", - "balance": "0", - "code": "file:../output/alloc-features.wasm" - }, - "address:an_account": { - "nonce": "0", - "balance": "0" - } - } - }, - { - "step": "scCall", - "id": "3", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "verify_bls_signature_legacy", - "arguments": [ - "0xb5823f6e564251cc03ce7bad3da83e72576e92795d3500bba1acb30ec9a94dce87bb8aa794d67b2d61d15c33f28f6c0c23ba1dfcbf21e8f8b46286ff871afabac925303ddcaddce6254fcff6d3155797db40b3d3b5865e8fc0bd770b3d79b381", - "0x6d65737361676520746f206265207369676e6564", - "0xaf32a2ddf341c08d1eb7232f05dc34e4454155e676b58c40fddf9a036562ac2c01533d2d557cb49d73aa9d7a89744696" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x01" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/test/features/alloc-features/scenarios/crypto_verify_ed25519_legacy.scen.json b/test/features/alloc-features/scenarios/crypto_verify_ed25519_legacy.scen.json deleted file mode 100644 index 34bc0c45b..000000000 --- a/test/features/alloc-features/scenarios/crypto_verify_ed25519_legacy.scen.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "crypto", - "gasSchedule": "v3", - "steps": [ - { - "step": "setState", - "accounts": { - "sc:alloc-features": { - "nonce": "0", - "balance": "0", - "code": "file:../output/alloc-features.wasm" - }, - "address:an_account": { - "nonce": "0", - "balance": "0" - } - } - }, - { - "step": "scCall", - "id": "4", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "verify_ed25519_signature_legacy", - "arguments": [ - "0xf2445fdaca6607728fa06e0610062c3468cad6d54f19549916ef577f69c7eb86", - "0x6d65737361676520746f207369676e", - "0xf34eb80f5ef94e0928f42f26b4a14799d52a8f687eb644d6be73a8db3ae85de059002d369be28c8c188b179dcf6286fd009d540953ea932f70aead52d6aa7d09" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x01" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/test/features/alloc-features/scenarios/crypto_verify_secp256k1_legacy.scen.json b/test/features/alloc-features/scenarios/crypto_verify_secp256k1_legacy.scen.json deleted file mode 100644 index 344deca60..000000000 --- a/test/features/alloc-features/scenarios/crypto_verify_secp256k1_legacy.scen.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "name": "crypto", - "comment": "does not currently work with scenarios-rs, because verify_secp256k1 functions are not yet mocked", - "gasSchedule": "v3", - "steps": [ - { - "step": "setState", - "accounts": { - "sc:alloc-features": { - "nonce": "0", - "balance": "0", - "code": "file:../output/alloc-features.wasm" - }, - "address:an_account": { - "nonce": "0", - "balance": "0" - } - } - }, - { - "step": "scCall", - "id": "5 - compressed key", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "verify_secp256k1_signature_legacy", - "arguments": [ - "0x02a673638cb9587cb68ea08dbef685c6f2d2a751a8b3c6f2a7e9a4999e6e4bfaf5", - "0x6d65737361676520746f207369676e", - "0x3045022100fab29dbcb623e7e96f44665f312b89ffdb9e4d2e2f53353236fbbcf57b2f49bf02203d6f9c63df8be43121042970a549a2d3baeca093fd37b726ddcc0924638409f5" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x01" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "6 - uncompressed key", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "verify_secp256k1_signature_legacy", - "arguments": [ - "0x04a673638cb9587cb68ea08dbef685c6f2d2a751a8b3c6f2a7e9a4999e6e4bfaf5ca1d22fe57c6103dbaac10cf15d15c0791cab8bb9a04f800e4d215276cb3e008", - "0x6d65737361676520746f207369676e", - "0x3045022100fab29dbcb623e7e96f44665f312b89ffdb9e4d2e2f53353236fbbcf57b2f49bf02203d6f9c63df8be43121042970a549a2d3baeca093fd37b726ddcc0924638409f5" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x01" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "7 - encode key from r and s", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "compute_secp256k1_der_signature_legacy", - "arguments": [ - "0x90f27b8b488db00b00606796d2987f6a5f59ae62ea05effe84fef5b8b0e54998", - "0x4a691139ad57a3f0b906637673aa2f63d1f55cb1a69199d4009eea23ceaddc93" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x304502210090f27b8b488db00b00606796d2987f6a5f59ae62ea05effe84fef5b8b0e5499802204a691139ad57a3f0b906637673aa2f63d1f55cb1a69199d4009eea23ceaddc93" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "8 - verify custom secp256k1", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "verify_custom_secp256k1_signature_legacy", - "arguments": [ - "0x04e32df42865e97135acfb65f3bae71bdc86f4d49150ad6a440b6f15878109880a0a2b2667f7e725ceea70c673093bf67663e0312623c8e091b13cf2c0f11ef652", - "0xce0677bb30baa8cf067c88db9811f4333d131bf8bcf12fe7065d211dce971008", - "0x304502210090f27b8b488db00b00606796d2987f6a5f59ae62ea05effe84fef5b8b0e5499802204a691139ad57a3f0b906637673aa2f63d1f55cb1a69199d4009eea23ceaddc93", - "0" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x01" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/test/features/alloc-features/scenarios/events_legacy.scen.json b/test/features/alloc-features/scenarios/events_legacy.scen.json deleted file mode 100644 index 574b59ea1..000000000 --- a/test/features/alloc-features/scenarios/events_legacy.scen.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "gasSchedule": "v3", - "steps": [ - { - "step": "setState", - "accounts": { - "sc:alloc-features": { - "nonce": "0", - "balance": "0", - "code": "file:../output/alloc-features.wasm" - }, - "address:an_account": { - "nonce": "0", - "balance": "0" - } - } - }, - { - "step": "scCall", - "id": "A1", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "logLegacyEventA", - "arguments": [ - "0" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "", - "logs": [ - { - "address": "sc:alloc-features", - "endpoint": "str:logLegacyEventA", - "topics": [ - "0x0123456789abcdef0123456789abcdef0123456789abcdef000000000000000a" - ], - "data": [ - "0" - ] - } - ], - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "A2", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "logLegacyEventA", - "arguments": [ - "0x1234abc" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "", - "logs": [ - { - "address": "sc:alloc-features", - "endpoint": "str:logLegacyEventA", - "topics": [ - "0x0123456789abcdef0123456789abcdef0123456789abcdef000000000000000a" - ], - "data": [ - "0x1234abc" - ] - } - ], - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "B1", - "tx": { - "from": "address:an_account", - "to": "sc:alloc-features", - "function": "logLegacyEventB", - "arguments": [ - "0xa1", - "str:arg2_an_address_______________s3", - "0x1234abc" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "", - "logs": [ - { - "address": "sc:alloc-features", - "endpoint": "str:logLegacyEventB", - "topics": [ - "0x0123456789abcdef0123456789abcdef0123456789abcdef000000000000000b", - "0x00000000000000000000000000000000000000000000000000000000000000a1", - "str:arg2_an_address_______________s3" - ], - "data": [ - "0x1234abc" - ] - } - ], - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/test/features/basic-features/output/basic-features-storage-bytes.wasm b/test/features/basic-features/output/basic-features-storage-bytes.wasm new file mode 100755 index 000000000..93731a788 Binary files /dev/null and b/test/features/basic-features/output/basic-features-storage-bytes.wasm differ diff --git a/test/features/basic-features/output/basic-features.wasm b/test/features/basic-features/output/basic-features.wasm index b6095718f..670f45753 100755 Binary files a/test/features/basic-features/output/basic-features.wasm and b/test/features/basic-features/output/basic-features.wasm differ diff --git a/test/features/basic-features/scenarios/crypto_sha256_legacy_managed.scen.json b/test/features/basic-features/scenarios/crypto_sha256_legacy_managed.scen.json deleted file mode 100644 index e842da3eb..000000000 --- a/test/features/basic-features/scenarios/crypto_sha256_legacy_managed.scen.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "crypto", - "gasSchedule": "v3", - "steps": [ - { - "step": "setState", - "accounts": { - "sc:basic-features": { - "nonce": "0", - "balance": "0", - "code": "file:../output/basic-features.wasm" - }, - "address:an_account": { - "nonce": "0", - "balance": "0" - } - } - }, - { - "step": "scCall", - "id": "1", - "tx": { - "from": "address:an_account", - "to": "sc:basic-features", - "function": "compute_sha256_legacy_managed", - "arguments": [ - "0x010203" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x039058c6f2c0cb492c533b0a4d14ef77cc0f78abccced5287d84a1a2011cfb81" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "id": "2", - "tx": { - "from": "address:an_account", - "to": "sc:basic-features", - "function": "compute_sha256_legacy_managed", - "arguments": [ - "0x0102030405060708" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x66840dda154e8a113c31dd0ad32f7f3a366a80e8136979d8f5a101d3d29d6f72" - ], - "status": "", - "logs": "*", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/test/features/basic-features/scenarios/crypto_verify_ed25519.scen.json b/test/features/basic-features/scenarios/crypto_verify_ed25519.scen.json index c6098826c..d6cd54906 100644 --- a/test/features/basic-features/scenarios/crypto_verify_ed25519.scen.json +++ b/test/features/basic-features/scenarios/crypto_verify_ed25519.scen.json @@ -1,6 +1,4 @@ { - "name": "crypto", - "gasSchedule": "v3", "steps": [ { "step": "setState", @@ -18,7 +16,7 @@ }, { "step": "scCall", - "id": "4", + "id": "verify ok", "tx": { "from": "address:an_account", "to": "sc:basic-features", @@ -32,14 +30,36 @@ "gasPrice": "0" }, "expect": { - "out": [ - "0x01" - ], + "out": [], "status": "", "logs": "*", "gas": "*", "refund": "*" } + }, + { + "step": "scCall", + "id": "verify fail", + "tx": { + "from": "address:an_account", + "to": "sc:basic-features", + "function": "verify_ed25519_signature", + "arguments": [ + "0xf2445fdaca6607728fa06e0610062c3468cad6d54f19549916ef577f69c7eb86", + "0x6d65737361676520746f207369676e", + "str:absolutely-invalid-signature" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "10", + "message": "str:invalid signature", + "logs": "*", + "gas": "*", + "refund": "*" + } } ] } diff --git a/test/features/basic-features/scenarios/crypto_keccak256_legacy_managed.scen.json b/test/features/basic-features/scenarios/get_shard_of_address.scen.json similarity index 69% rename from test/features/basic-features/scenarios/crypto_keccak256_legacy_managed.scen.json rename to test/features/basic-features/scenarios/get_shard_of_address.scen.json index 70070ed71..d8177c1aa 100644 --- a/test/features/basic-features/scenarios/crypto_keccak256_legacy_managed.scen.json +++ b/test/features/basic-features/scenarios/get_shard_of_address.scen.json @@ -1,5 +1,5 @@ { - "name": "crypto", + "name": "get caller", "gasSchedule": "v3", "steps": [ { @@ -18,20 +18,20 @@ }, { "step": "scCall", - "id": "1", + "id": "get_shard_of_address", "tx": { "from": "address:an_account", "to": "sc:basic-features", - "function": "compute_keccak256_legacy_managed", + "function": "get_shard_of_address", "arguments": [ - "0x61" + "sc:basic-features" ], "gasLimit": "50,000,000", "gasPrice": "0" }, "expect": { "out": [ - "0x3ac225168df54212a25c1c01fd35bebfea408fdac2e31ddd6f80a4bbf9a5f1cb" + "2" ], "status": "", "logs": "*", @@ -40,21 +40,18 @@ } }, { - "step": "scCall", - "id": "2", + "step": "scQuery", + "id": "get_shard_of_address_query", "tx": { - "from": "address:an_account", "to": "sc:basic-features", - "function": "compute_keccak256_legacy_managed", + "function": "get_shard_of_address", "arguments": [ - "0x0102030405060708" - ], - "gasLimit": "50,000,000", - "gasPrice": "0" + "sc:basic-features" + ] }, "expect": { "out": [ - "keccak256:0x0102030405060708" + "2" ], "status": "", "logs": "*", diff --git a/test/features/basic-features/scenarios/storage_mapper_address_to_id.scen.json b/test/features/basic-features/scenarios/storage_mapper_address_to_id.scen.json new file mode 100644 index 000000000..975534a92 --- /dev/null +++ b/test/features/basic-features/scenarios/storage_mapper_address_to_id.scen.json @@ -0,0 +1,209 @@ +{ + "name": "storage", + "gasSchedule": "v3", + "steps": [ + { + "step": "setState", + "accounts": { + "sc:basic-features": { + "nonce": "0", + "balance": "0", + "code": "file:../output/basic-features.wasm" + }, + "sc:extra-instance": { + "nonce": "0", + "balance": "0", + "code": "file:../output/basic-features.wasm" + }, + "address:an_account": { + "nonce": "0", + "balance": "0" + } + } + }, + { + "step": "scCall", + "id": "get_id_or_insert", + "tx": { + "from": "address:an_account", + "to": "sc:basic-features", + "function": "address_to_id_mapper_get_id_or_insert", + "arguments": [ + "address:an_account" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [ + "1" + ], + "status": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "get_id", + "tx": { + "from": "address:an_account", + "to": "sc:basic-features", + "function": "address_to_id_mapper_get_id", + "arguments": [ + "address:an_account" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [ + "1" + ], + "status": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "get_id_non_zero", + "tx": { + "from": "address:an_account", + "to": "sc:basic-features", + "function": "address_to_id_mapper_get_id_non_zero", + "arguments": [ + "address:an_account" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [ + "1" + ], + "status": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "get_address", + "tx": { + "from": "address:an_account", + "to": "sc:basic-features", + "function": "address_to_id_mapper_get_address", + "arguments": [ + "1" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [ + "1|address:an_account" + ], + "status": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "contains", + "tx": { + "from": "address:an_account", + "to": "sc:basic-features", + "function": "address_to_id_mapper_contains", + "arguments": [ + "1" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [ + "1" + ], + "status": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "remove_by_id", + "tx": { + "from": "address:an_account", + "to": "sc:basic-features", + "function": "address_to_id_mapper_remove_by_id", + "arguments": [ + "1" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [ + "1|address:an_account" + ], + "status": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "set", + "tx": { + "from": "address:an_account", + "to": "sc:basic-features", + "function": "address_to_id_mapper_set", + "arguments": [ + "address:an_account" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [ + "2" + ], + "status": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "remove_by_address", + "tx": { + "from": "address:an_account", + "to": "sc:basic-features", + "function": "address_to_id_mapper_remove_by_address", + "arguments": [ + "address:an_account" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [ + "2" + ], + "status": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + } + ] +} diff --git a/test/features/big-float-features/output/big-float-features.wasm b/test/features/big-float-features/output/big-float-features.wasm index 77368875d..6e3615c4f 100755 Binary files a/test/features/big-float-features/output/big-float-features.wasm and b/test/features/big-float-features/output/big-float-features.wasm differ diff --git a/test/features/big-float-features/scenarios/big_float_operator_checks.scen.json b/test/features/big-float-features/scenarios/big_float_operator_checks.scen.json index 4fca5f02d..a3a9e8e51 100644 --- a/test/features/big-float-features/scenarios/big_float_operator_checks.scen.json +++ b/test/features/big-float-features/scenarios/big_float_operator_checks.scen.json @@ -17,7 +17,7 @@ }, { "step": "scCall", - "id": "BigFloatAdd - 1", + "id": "BigFloatAdd - 3", "tx": { "from": "address:an_account", "to": "sc:basic-features", @@ -37,7 +37,7 @@ }, { "step": "scCall", - "id": "BigFloatAdd - 2", + "id": "BigFloatAdd - 4", "tx": { "from": "address:an_account", "to": "sc:basic-features", diff --git a/test/features/composability/forwarder-queue/output/forwarder-queue-promises.wasm b/test/features/composability/forwarder-queue/output/forwarder-queue-promises.wasm new file mode 100755 index 000000000..c6f641cd2 Binary files /dev/null and b/test/features/composability/forwarder-queue/output/forwarder-queue-promises.wasm differ diff --git a/test/features/composability/forwarder-queue/output/forwarder-queue.wasm b/test/features/composability/forwarder-queue/output/forwarder-queue.wasm new file mode 100755 index 000000000..1f5d9fea7 Binary files /dev/null and b/test/features/composability/forwarder-queue/output/forwarder-queue.wasm differ diff --git a/test/features/composability/forwarder-raw/output/forwarder-raw.wasm b/test/features/composability/forwarder-raw/output/forwarder-raw.wasm index a3bd3052f..73a0b5cb2 100755 Binary files a/test/features/composability/forwarder-raw/output/forwarder-raw.wasm and b/test/features/composability/forwarder-raw/output/forwarder-raw.wasm differ diff --git a/test/features/composability/forwarder/output/forwarder-dbg.wasm b/test/features/composability/forwarder/output/forwarder-dbg.wasm new file mode 100755 index 000000000..b9313b166 Binary files /dev/null and b/test/features/composability/forwarder/output/forwarder-dbg.wasm differ diff --git a/test/features/composability/forwarder/output/forwarder.wasm b/test/features/composability/forwarder/output/forwarder.wasm index 0345789ea..bfec98354 100755 Binary files a/test/features/composability/forwarder/output/forwarder.wasm and b/test/features/composability/forwarder/output/forwarder.wasm differ diff --git a/test/features/composability/promises-features/output/promises-features.wasm b/test/features/composability/promises-features/output/promises-features.wasm index cb7225077..192d3b95b 100755 Binary files a/test/features/composability/promises-features/output/promises-features.wasm and b/test/features/composability/promises-features/output/promises-features.wasm differ diff --git a/test/features/composability/proxy-test-first/output/proxy-test-first.wasm b/test/features/composability/proxy-test-first/output/proxy-test-first.wasm index fb71ecbdc..0c43a7311 100755 Binary files a/test/features/composability/proxy-test-first/output/proxy-test-first.wasm and b/test/features/composability/proxy-test-first/output/proxy-test-first.wasm differ diff --git a/test/features/composability/proxy-test-second/output/proxy-test-second.wasm b/test/features/composability/proxy-test-second/output/proxy-test-second.wasm index 11c01ce68..e90ff6306 100755 Binary files a/test/features/composability/proxy-test-second/output/proxy-test-second.wasm and b/test/features/composability/proxy-test-second/output/proxy-test-second.wasm differ diff --git a/test/features/composability/recursive-caller/output/recursive-caller.wasm b/test/features/composability/recursive-caller/output/recursive-caller.wasm index 58b0a2467..f59f9b5ed 100755 Binary files a/test/features/composability/recursive-caller/output/recursive-caller.wasm and b/test/features/composability/recursive-caller/output/recursive-caller.wasm differ diff --git a/test/features/composability/scenarios/builtin_func_delete_user_name.scen.json b/test/features/composability/scenarios/builtin_func_delete_user_name.scen.json index 7414fa587..b93caef9b 100644 --- a/test/features/composability/scenarios/builtin_func_delete_user_name.scen.json +++ b/test/features/composability/scenarios/builtin_func_delete_user_name.scen.json @@ -33,6 +33,7 @@ "gasPrice": "0" }, "expect": { + "out": [], "status": "0" } }, diff --git a/test/features/composability/scenarios/builtin_func_set_user_name.scen.json b/test/features/composability/scenarios/builtin_func_set_user_name.scen.json index e52de6e93..cebd1d3f1 100644 --- a/test/features/composability/scenarios/builtin_func_set_user_name.scen.json +++ b/test/features/composability/scenarios/builtin_func_set_user_name.scen.json @@ -33,6 +33,7 @@ "gasPrice": "0" }, "expect": { + "out": [], "status": "0" } }, diff --git a/test/features/composability/scenarios/forw_queue_async.scen.json b/test/features/composability/scenarios/forw_queue_async.scen.json new file mode 100644 index 000000000..dbd21b81f --- /dev/null +++ b/test/features/composability/scenarios/forw_queue_async.scen.json @@ -0,0 +1,130 @@ +{ + "steps": [ + { + "step": "setState", + "accounts": { + "address:a_user": { + "nonce": "0", + "balance": "1000" + }, + "sc:vault": { + "nonce": "0", + "balance": "0", + "code": "file:../vault/output/vault.wasm" + }, + "sc:forwarder-queue": { + "nonce": "0", + "balance": "0", + "code": "file:../forwarder-queue/output/forwarder-queue.wasm" + } + } + }, + { + "step": "scCall", + "id": "1", + "tx": { + "from": "address:a_user", + "to": "sc:forwarder-queue", + "egldValue": "1000", + "function": "add_queued_call_legacy_async", + "arguments": [ + "sc:vault", + "str:accept_funds" + ], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0" + } + }, + { + "step": "scCall", + "id": "2", + "tx": { + "from": "address:a_user", + "to": "sc:forwarder-queue", + "function": "forward_queued_calls", + "arguments": [], + "gasLimit": "50,000,000", + "gasPrice": "0" + }, + "expect": { + "out": [], + "status": "0", + "logs": [ + { + "address": "sc:forwarder-queue", + "endpoint": "str:forward_queued_calls", + "topics": [ + "str:forward_queued_call_egld", + "1", + "sc:vault", + "str:accept_funds", + "1000" + ], + "data": "*" + }, + { + "address": "*", + "endpoint": "str:transferValueOnly", + "topics": [ + "1000", + "sc:vault" + ], + "data": "*" + }, + { + "address": "sc:vault", + "endpoint": "str:accept_funds", + "topics": [ + "str:accept_funds", + "0x03e8" + ], + "data": "*" + }, + { + "address": "sc:vault", + "endpoint": "str:transferValueOnly", + "topics": [ + "0", + "sc:forwarder-queue" + ], + "data": [ + "str:AsyncCallback", + "str:callBack", + "0x00" + ] + } + ], + "gas": "*", + "refund": "*" + } + }, + { + "step": "checkState", + "accounts": { + "address:a_user": { + "nonce": "*", + "balance": "0", + "storage": {}, + "code": "" + }, + "sc:vault": { + "nonce": "0", + "balance": "1000", + "storage": { + "str:call_counts|nested:str:accept_funds": "1" + }, + "code": "file:../vault/output/vault.wasm" + }, + "sc:forwarder-queue": { + "nonce": "0", + "balance": "0", + "code": "file:../forwarder-queue/output/forwarder-queue.wasm" + } + } + } + ] +} diff --git a/test/features/composability/scenarios/forw_raw_async_accept_egld.scen.json b/test/features/composability/scenarios/forw_raw_async_accept_egld.scen.json index 6af57a7e6..7ef2d6514 100644 --- a/test/features/composability/scenarios/forw_raw_async_accept_egld.scen.json +++ b/test/features/composability/scenarios/forw_raw_async_accept_egld.scen.json @@ -42,7 +42,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:vault" ], @@ -65,7 +65,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:forwarder" ], diff --git a/test/features/composability/scenarios/forw_raw_async_accept_esdt.scen.json b/test/features/composability/scenarios/forw_raw_async_accept_esdt.scen.json index 7cad96c97..a58e213fc 100644 --- a/test/features/composability/scenarios/forw_raw_async_accept_esdt.scen.json +++ b/test/features/composability/scenarios/forw_raw_async_accept_esdt.scen.json @@ -50,7 +50,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", @@ -81,7 +81,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:forwarder" ], diff --git a/test/features/composability/scenarios/forw_raw_async_echo.scen.json b/test/features/composability/scenarios/forw_raw_async_echo.scen.json index 15f7be6d0..d01e92601 100644 --- a/test/features/composability/scenarios/forw_raw_async_echo.scen.json +++ b/test/features/composability/scenarios/forw_raw_async_echo.scen.json @@ -46,7 +46,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -60,7 +60,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:forwarder" ], diff --git a/test/features/composability/scenarios/forw_raw_direct_esdt.scen.json b/test/features/composability/scenarios/forw_raw_direct_esdt.scen.json index 62b5b00f4..ea3ac729d 100644 --- a/test/features/composability/scenarios/forw_raw_direct_esdt.scen.json +++ b/test/features/composability/scenarios/forw_raw_direct_esdt.scen.json @@ -49,7 +49,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", diff --git a/test/features/composability/scenarios/forw_raw_init_sync_echo.scen.json b/test/features/composability/scenarios/forw_raw_init_sync_echo.scen.json index e5297f945..344180d24 100644 --- a/test/features/composability/scenarios/forw_raw_init_sync_echo.scen.json +++ b/test/features/composability/scenarios/forw_raw_init_sync_echo.scen.json @@ -46,7 +46,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], diff --git a/test/features/composability/scenarios/forw_raw_sync_echo.scen.json b/test/features/composability/scenarios/forw_raw_sync_echo.scen.json index b06a6bc8a..038dbe24f 100644 --- a/test/features/composability/scenarios/forw_raw_sync_echo.scen.json +++ b/test/features/composability/scenarios/forw_raw_sync_echo.scen.json @@ -46,7 +46,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -105,7 +105,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -134,7 +134,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], diff --git a/test/features/composability/scenarios/forw_raw_sync_echo_caller.scen.json b/test/features/composability/scenarios/forw_raw_sync_echo_caller.scen.json index a2e0a7640..a35fe621a 100644 --- a/test/features/composability/scenarios/forw_raw_sync_echo_caller.scen.json +++ b/test/features/composability/scenarios/forw_raw_sync_echo_caller.scen.json @@ -43,7 +43,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -91,7 +91,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -113,7 +113,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], diff --git a/test/features/composability/scenarios/forw_raw_sync_egld.scen.json b/test/features/composability/scenarios/forw_raw_sync_egld.scen.json index 5f5579953..3043b73fa 100644 --- a/test/features/composability/scenarios/forw_raw_sync_egld.scen.json +++ b/test/features/composability/scenarios/forw_raw_sync_egld.scen.json @@ -42,7 +42,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:vault" ], @@ -99,7 +99,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "500", "sc:vault" ], @@ -132,7 +132,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "500", "sc:vault" ], diff --git a/test/features/composability/scenarios/forw_raw_sync_same_context.scen.json b/test/features/composability/scenarios/forw_raw_sync_same_context.scen.json index 7abf87782..c3b7c5ad7 100644 --- a/test/features/composability/scenarios/forw_raw_sync_same_context.scen.json +++ b/test/features/composability/scenarios/forw_raw_sync_same_context.scen.json @@ -47,7 +47,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:forwarder" ], diff --git a/test/features/composability/scenarios/forwarder_call_async_accept_egld.scen.json b/test/features/composability/scenarios/forwarder_call_async_accept_egld.scen.json index fa277fd1e..e98911c2d 100644 --- a/test/features/composability/scenarios/forwarder_call_async_accept_egld.scen.json +++ b/test/features/composability/scenarios/forwarder_call_async_accept_egld.scen.json @@ -64,7 +64,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:forwarder" ], diff --git a/test/features/composability/scenarios/forwarder_call_async_accept_esdt.scen.json b/test/features/composability/scenarios/forwarder_call_async_accept_esdt.scen.json index 717af5faf..db0f77d8f 100644 --- a/test/features/composability/scenarios/forwarder_call_async_accept_esdt.scen.json +++ b/test/features/composability/scenarios/forwarder_call_async_accept_esdt.scen.json @@ -49,7 +49,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", @@ -80,7 +80,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:forwarder" ], diff --git a/test/features/composability/scenarios/forwarder_call_async_accept_nft.scen.json b/test/features/composability/scenarios/forwarder_call_async_accept_nft.scen.json index 243db8723..05eb1adb7 100644 --- a/test/features/composability/scenarios/forwarder_call_async_accept_nft.scen.json +++ b/test/features/composability/scenarios/forwarder_call_async_accept_nft.scen.json @@ -61,7 +61,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTNFTTransfer", - "topics": [ + "topics": [ "str:NFT-000001", "5", "01", @@ -94,7 +94,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:forwarder" ], diff --git a/test/features/composability/scenarios/forwarder_call_async_retrieve_egld.scen.json b/test/features/composability/scenarios/forwarder_call_async_retrieve_egld.scen.json index ee603e98d..4a7ae4278 100644 --- a/test/features/composability/scenarios/forwarder_call_async_retrieve_egld.scen.json +++ b/test/features/composability/scenarios/forwarder_call_async_retrieve_egld.scen.json @@ -43,7 +43,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -71,7 +71,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:forwarder" ], @@ -83,7 +83,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:forwarder" ], diff --git a/test/features/composability/scenarios/forwarder_call_async_retrieve_esdt.scen.json b/test/features/composability/scenarios/forwarder_call_async_retrieve_esdt.scen.json index 0e386ad6d..11ff97be1 100644 --- a/test/features/composability/scenarios/forwarder_call_async_retrieve_esdt.scen.json +++ b/test/features/composability/scenarios/forwarder_call_async_retrieve_esdt.scen.json @@ -46,7 +46,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "", "sc:vault" ], @@ -74,7 +74,7 @@ { "address": "sc:vault", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", diff --git a/test/features/composability/scenarios/forwarder_call_async_retrieve_nft.scen.json b/test/features/composability/scenarios/forwarder_call_async_retrieve_nft.scen.json index 48a326c28..2aaaa97d8 100644 --- a/test/features/composability/scenarios/forwarder_call_async_retrieve_nft.scen.json +++ b/test/features/composability/scenarios/forwarder_call_async_retrieve_nft.scen.json @@ -53,7 +53,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "", "sc:vault" ], @@ -81,7 +81,7 @@ { "address": "sc:vault", "endpoint": "str:ESDTNFTTransfer", - "topics": [ + "topics": [ "str:NFT-000001", "5", "01", diff --git a/test/features/composability/scenarios/forwarder_call_sync_accept_egld.scen.json b/test/features/composability/scenarios/forwarder_call_sync_accept_egld.scen.json index a0648c109..e3c89d657 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_accept_egld.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_accept_egld.scen.json @@ -41,7 +41,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:vault" ], diff --git a/test/features/composability/scenarios/forwarder_call_sync_accept_esdt.scen.json b/test/features/composability/scenarios/forwarder_call_sync_accept_esdt.scen.json index 236d84fbc..5abf06edf 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_accept_esdt.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_accept_esdt.scen.json @@ -79,7 +79,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", diff --git a/test/features/composability/scenarios/forwarder_call_sync_accept_multi_transfer.scen.json b/test/features/composability/scenarios/forwarder_call_sync_accept_multi_transfer.scen.json index f846047f1..667f54c6c 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_accept_multi_transfer.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_accept_multi_transfer.scen.json @@ -76,7 +76,7 @@ { "address": "sc:forwarder", "endpoint": "str:MultiESDTNFTTransfer", - "topics": [ + "topics": [ "str:FWD-TOKEN", "0", "100", diff --git a/test/features/composability/scenarios/forwarder_call_sync_accept_nft.scen.json b/test/features/composability/scenarios/forwarder_call_sync_accept_nft.scen.json index 3b458dc9a..f56f03ab6 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_accept_nft.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_accept_nft.scen.json @@ -61,7 +61,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTNFTTransfer", - "topics": [ + "topics": [ "str:NFT-000001", "5", "01", diff --git a/test/features/composability/scenarios/forwarder_call_sync_accept_then_read_egld.scen.json b/test/features/composability/scenarios/forwarder_call_sync_accept_then_read_egld.scen.json index 20dd786e4..2e1a45d86 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_accept_then_read_egld.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_accept_then_read_egld.scen.json @@ -43,7 +43,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:vault" ], @@ -66,7 +66,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "", "sc:vault" ], diff --git a/test/features/composability/scenarios/forwarder_call_sync_accept_then_read_esdt.scen.json b/test/features/composability/scenarios/forwarder_call_sync_accept_then_read_esdt.scen.json index 0d0ba011d..9d929ce31 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_accept_then_read_esdt.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_accept_then_read_esdt.scen.json @@ -51,7 +51,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", @@ -82,7 +82,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], diff --git a/test/features/composability/scenarios/forwarder_call_sync_accept_then_read_nft.scen.json b/test/features/composability/scenarios/forwarder_call_sync_accept_then_read_nft.scen.json index c7745dc87..b63cef012 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_accept_then_read_nft.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_accept_then_read_nft.scen.json @@ -63,7 +63,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTNFTTransfer", - "topics": [ + "topics": [ "str:NFT-000001", "5", "01", @@ -96,7 +96,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], diff --git a/test/features/composability/scenarios/forwarder_call_sync_retrieve_egld.scen.json b/test/features/composability/scenarios/forwarder_call_sync_retrieve_egld.scen.json index 436b7bf03..fbd135bd1 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_retrieve_egld.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_retrieve_egld.scen.json @@ -1,4 +1,5 @@ { + "gasSchedule": "v3", "steps": [ { "step": "setState", @@ -42,7 +43,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -70,7 +71,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:forwarder" ], diff --git a/test/features/composability/scenarios-promises/forwarder_call_sync_retrieve_egld_bt.scen.json b/test/features/composability/scenarios/forwarder_call_sync_retrieve_egld_bt.scen.json similarity index 96% rename from test/features/composability/scenarios-promises/forwarder_call_sync_retrieve_egld_bt.scen.json rename to test/features/composability/scenarios/forwarder_call_sync_retrieve_egld_bt.scen.json index f552c8d0a..37492054e 100644 --- a/test/features/composability/scenarios-promises/forwarder_call_sync_retrieve_egld_bt.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_retrieve_egld_bt.scen.json @@ -1,4 +1,5 @@ { + "gasSchedule": "v3", "steps": [ { "step": "setState", @@ -42,7 +43,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -70,7 +71,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:forwarder" ], diff --git a/test/features/composability/scenarios/forwarder_call_sync_retrieve_esdt.scen.json b/test/features/composability/scenarios/forwarder_call_sync_retrieve_esdt.scen.json index 86b7aec65..ce3c486d4 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_retrieve_esdt.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_retrieve_esdt.scen.json @@ -1,4 +1,5 @@ { + "gasSchedule": "v3", "steps": [ { "step": "setState", @@ -45,7 +46,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "", "sc:vault" ], @@ -73,7 +74,7 @@ { "address": "sc:vault", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", diff --git a/test/features/composability/scenarios-promises/forwarder_call_sync_retrieve_esdt_bt.scen.json b/test/features/composability/scenarios/forwarder_call_sync_retrieve_esdt_bt.scen.json similarity index 97% rename from test/features/composability/scenarios-promises/forwarder_call_sync_retrieve_esdt_bt.scen.json rename to test/features/composability/scenarios/forwarder_call_sync_retrieve_esdt_bt.scen.json index da71e5375..071238feb 100644 --- a/test/features/composability/scenarios-promises/forwarder_call_sync_retrieve_esdt_bt.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_retrieve_esdt_bt.scen.json @@ -1,4 +1,5 @@ { + "gasSchedule": "v3", "steps": [ { "step": "setState", @@ -45,7 +46,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "", "sc:vault" ], @@ -73,7 +74,7 @@ { "address": "sc:vault", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", diff --git a/test/features/composability/scenarios/forwarder_call_sync_retrieve_nft.scen.json b/test/features/composability/scenarios/forwarder_call_sync_retrieve_nft.scen.json index 0dc97972b..4c5e8d3c0 100644 --- a/test/features/composability/scenarios/forwarder_call_sync_retrieve_nft.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_retrieve_nft.scen.json @@ -1,4 +1,5 @@ { + "gasSchedule": "v3", "steps": [ { "step": "setState", @@ -52,7 +53,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "", "sc:vault" ], @@ -80,7 +81,7 @@ { "address": "sc:vault", "endpoint": "str:ESDTNFTTransfer", - "topics": [ + "topics": [ "str:NFT-000001", "5", "01", diff --git a/test/features/composability/scenarios-promises/forwarder_call_sync_retrieve_nft_bt.scen.json b/test/features/composability/scenarios/forwarder_call_sync_retrieve_nft_bt.scen.json similarity index 97% rename from test/features/composability/scenarios-promises/forwarder_call_sync_retrieve_nft_bt.scen.json rename to test/features/composability/scenarios/forwarder_call_sync_retrieve_nft_bt.scen.json index a994117c0..56621a12d 100644 --- a/test/features/composability/scenarios-promises/forwarder_call_sync_retrieve_nft_bt.scen.json +++ b/test/features/composability/scenarios/forwarder_call_sync_retrieve_nft_bt.scen.json @@ -1,4 +1,5 @@ { + "gasSchedule": "v3", "steps": [ { "step": "setState", @@ -52,7 +53,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "", "sc:vault" ], @@ -80,7 +81,7 @@ { "address": "sc:vault", "endpoint": "str:ESDTNFTTransfer", - "topics": [ + "topics": [ "str:NFT-000001", "5", "01", diff --git a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_egld.scen.json b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_egld.scen.json index cba3a8d45..41d67d650 100644 --- a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_egld.scen.json +++ b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_egld.scen.json @@ -41,7 +41,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:vault" ], diff --git a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_egld_twice.scen.json b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_egld_twice.scen.json index f4e1776e6..c1389b458 100644 --- a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_egld_twice.scen.json +++ b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_egld_twice.scen.json @@ -41,7 +41,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:vault" ], @@ -64,7 +64,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:vault" ], diff --git a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_esdt.scen.json b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_esdt.scen.json index 80f8d48e0..ae2740bdd 100644 --- a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_esdt.scen.json +++ b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_esdt.scen.json @@ -49,7 +49,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", diff --git a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_esdt_twice.scen.json b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_esdt_twice.scen.json index 2bce23a32..392815bb4 100644 --- a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_esdt_twice.scen.json +++ b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_esdt_twice.scen.json @@ -49,7 +49,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", @@ -80,7 +80,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", diff --git a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_multi_transfer.scen.json b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_multi_transfer.scen.json index 2c5afabb3..c735e51a2 100644 --- a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_multi_transfer.scen.json +++ b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_multi_transfer.scen.json @@ -67,7 +67,7 @@ { "address": "sc:forwarder", "endpoint": "str:MultiESDTNFTTransfer", - "topics": [ + "topics": [ "str:FWD-TOKEN", "0", "100", diff --git a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_nft.scen.json b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_nft.scen.json index 50be94968..2764d3ec4 100644 --- a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_nft.scen.json +++ b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_nft.scen.json @@ -57,7 +57,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTNFTTransfer", - "topics": [ + "topics": [ "str:NFT-000001", "5", "01", diff --git a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_return_values.scen.json b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_return_values.scen.json index 48207088b..50e4d8e34 100644 --- a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_return_values.scen.json +++ b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_return_values.scen.json @@ -46,7 +46,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:vault" ], diff --git a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_sft_twice.scen.json b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_sft_twice.scen.json index 9a4ad571d..a76b11559 100644 --- a/test/features/composability/scenarios/forwarder_call_transf_exec_accept_sft_twice.scen.json +++ b/test/features/composability/scenarios/forwarder_call_transf_exec_accept_sft_twice.scen.json @@ -57,7 +57,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTNFTTransfer", - "topics": [ + "topics": [ "str:NFT-000001", "5", "01", @@ -90,7 +90,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTNFTTransfer", - "topics": [ + "topics": [ "str:NFT-000001", "5", "01", diff --git a/test/features/composability/scenarios/forwarder_nft_create_and_send.scen.json b/test/features/composability/scenarios/forwarder_nft_create_and_send.scen.json index 7c5968088..44463b8d2 100644 --- a/test/features/composability/scenarios/forwarder_nft_create_and_send.scen.json +++ b/test/features/composability/scenarios/forwarder_nft_create_and_send.scen.json @@ -90,7 +90,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTNFTTransfer", - "topics": [ + "topics": [ "str:NFT-000001", "2", "01", diff --git a/test/features/composability/scenarios/forwarder_sync_echo.scen.json b/test/features/composability/scenarios/forwarder_sync_echo.scen.json index 93c4d4bc3..f326e6a97 100644 --- a/test/features/composability/scenarios/forwarder_sync_echo.scen.json +++ b/test/features/composability/scenarios/forwarder_sync_echo.scen.json @@ -42,7 +42,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -95,7 +95,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -124,7 +124,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], diff --git a/test/features/composability/scenarios-promises/promises_call_async_accept_egld.scen.json b/test/features/composability/scenarios/promises_call_async_accept_egld.scen.json similarity index 97% rename from test/features/composability/scenarios-promises/promises_call_async_accept_egld.scen.json rename to test/features/composability/scenarios/promises_call_async_accept_egld.scen.json index d1dd53608..2e311e601 100644 --- a/test/features/composability/scenarios-promises/promises_call_async_accept_egld.scen.json +++ b/test/features/composability/scenarios/promises_call_async_accept_egld.scen.json @@ -40,7 +40,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:vault" ], diff --git a/test/features/composability/scenarios-promises/promises_call_async_accept_esdt.scen.json b/test/features/composability/scenarios/promises_call_async_accept_esdt.scen.json similarity index 98% rename from test/features/composability/scenarios-promises/promises_call_async_accept_esdt.scen.json rename to test/features/composability/scenarios/promises_call_async_accept_esdt.scen.json index b5b4fd302..17177f611 100644 --- a/test/features/composability/scenarios-promises/promises_call_async_accept_esdt.scen.json +++ b/test/features/composability/scenarios/promises_call_async_accept_esdt.scen.json @@ -48,7 +48,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", diff --git a/test/features/composability/scenarios-promises/promises_call_async_retrieve_egld.scen.json b/test/features/composability/scenarios/promises_call_async_retrieve_egld.scen.json similarity index 95% rename from test/features/composability/scenarios-promises/promises_call_async_retrieve_egld.scen.json rename to test/features/composability/scenarios/promises_call_async_retrieve_egld.scen.json index de22eeabf..3d8fc1ac7 100644 --- a/test/features/composability/scenarios-promises/promises_call_async_retrieve_egld.scen.json +++ b/test/features/composability/scenarios/promises_call_async_retrieve_egld.scen.json @@ -42,7 +42,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:vault" ], @@ -70,7 +70,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:forwarder" ], @@ -82,7 +82,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1000", "sc:forwarder" ], diff --git a/test/features/composability/scenarios-promises/promises_call_async_retrieve_esdt.scen.json b/test/features/composability/scenarios/promises_call_async_retrieve_esdt.scen.json similarity index 97% rename from test/features/composability/scenarios-promises/promises_call_async_retrieve_esdt.scen.json rename to test/features/composability/scenarios/promises_call_async_retrieve_esdt.scen.json index be292d045..bdc1c59c2 100644 --- a/test/features/composability/scenarios-promises/promises_call_async_retrieve_esdt.scen.json +++ b/test/features/composability/scenarios/promises_call_async_retrieve_esdt.scen.json @@ -45,7 +45,7 @@ { "address": "sc:forwarder", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "", "sc:vault" ], @@ -73,7 +73,7 @@ { "address": "sc:vault", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:TEST-TOKENA", "0", "1000", diff --git a/test/features/composability/scenarios-promises/promises_call_callback_directly.scen.json b/test/features/composability/scenarios/promises_call_callback_directly.scen.json similarity index 100% rename from test/features/composability/scenarios-promises/promises_call_callback_directly.scen.json rename to test/features/composability/scenarios/promises_call_callback_directly.scen.json diff --git a/test/features/composability/scenarios-promises/promises_multi_transfer.scen.json b/test/features/composability/scenarios/promises_multi_transfer.scen.json similarity index 98% rename from test/features/composability/scenarios-promises/promises_multi_transfer.scen.json rename to test/features/composability/scenarios/promises_multi_transfer.scen.json index 2efae80a8..f3ea391b5 100644 --- a/test/features/composability/scenarios-promises/promises_multi_transfer.scen.json +++ b/test/features/composability/scenarios/promises_multi_transfer.scen.json @@ -81,7 +81,7 @@ { "address": "sc:promises", "endpoint": "str:MultiESDTNFTTransfer", - "topics": [ + "topics": [ "str:FWD-TOKEN", "0", "500", @@ -133,7 +133,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "", "sc:promises" ], diff --git a/test/features/composability/scenarios-promises/promises_single_transfer.scen.json b/test/features/composability/scenarios/promises_single_transfer.scen.json similarity index 100% rename from test/features/composability/scenarios-promises/promises_single_transfer.scen.json rename to test/features/composability/scenarios/promises_single_transfer.scen.json diff --git a/test/features/composability/scenarios-promises/promises_single_transfer_gas1.scen.json b/test/features/composability/scenarios/promises_single_transfer_gas1.scen.json similarity index 100% rename from test/features/composability/scenarios-promises/promises_single_transfer_gas1.scen.json rename to test/features/composability/scenarios/promises_single_transfer_gas1.scen.json diff --git a/test/features/composability/scenarios-promises/promises_single_transfer_gas2.scen.json b/test/features/composability/scenarios/promises_single_transfer_gas2.scen.json similarity index 97% rename from test/features/composability/scenarios-promises/promises_single_transfer_gas2.scen.json rename to test/features/composability/scenarios/promises_single_transfer_gas2.scen.json index 7c3321c30..9cbb7681d 100644 --- a/test/features/composability/scenarios-promises/promises_single_transfer_gas2.scen.json +++ b/test/features/composability/scenarios/promises_single_transfer_gas2.scen.json @@ -44,7 +44,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:promises" ], diff --git a/test/features/composability/scenarios/recursive_caller_egld_1.scen.json b/test/features/composability/scenarios/recursive_caller_egld_1.scen.json index 7ebb0314f..781fe0474 100644 --- a/test/features/composability/scenarios/recursive_caller_egld_1.scen.json +++ b/test/features/composability/scenarios/recursive_caller_egld_1.scen.json @@ -57,7 +57,7 @@ { "address": "sc:recursive-caller", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "1", "sc:vault" ], @@ -80,7 +80,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:recursive-caller" ], diff --git a/test/features/composability/scenarios/recursive_caller_esdt_1.scen.json b/test/features/composability/scenarios/recursive_caller_esdt_1.scen.json index c51037575..3d1c5fe96 100644 --- a/test/features/composability/scenarios/recursive_caller_esdt_1.scen.json +++ b/test/features/composability/scenarios/recursive_caller_esdt_1.scen.json @@ -60,7 +60,7 @@ { "address": "sc:recursive-caller", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:REC-TOKEN", "", "1", @@ -91,7 +91,7 @@ { "address": "sc:vault", "endpoint": "str:transferValueOnly", - "topics": [ + "topics": [ "0", "sc:recursive-caller" ], diff --git a/test/features/composability/scenarios/send_esdt.scen.json b/test/features/composability/scenarios/send_esdt.scen.json index 2cb6e9a23..037f85ab2 100644 --- a/test/features/composability/scenarios/send_esdt.scen.json +++ b/test/features/composability/scenarios/send_esdt.scen.json @@ -63,7 +63,7 @@ { "address": "sc:forwarder", "endpoint": "str:ESDTTransfer", - "topics": [ + "topics": [ "str:SENDESDT", "0", "200", diff --git a/test/features/composability/vault/output/vault-promises.wasm b/test/features/composability/vault/output/vault-promises.wasm index 89da5d0a1..0d0cdc465 100755 Binary files a/test/features/composability/vault/output/vault-promises.wasm and b/test/features/composability/vault/output/vault-promises.wasm differ diff --git a/test/features/composability/vault/output/vault.wasm b/test/features/composability/vault/output/vault.wasm index e44652aa7..e8fd6d04e 100755 Binary files a/test/features/composability/vault/output/vault.wasm and b/test/features/composability/vault/output/vault.wasm differ diff --git a/test/features/esdt-system-sc-mock/output/esdt-system-sc-mock.wasm b/test/features/esdt-system-sc-mock/output/esdt-system-sc-mock.wasm index 5623eddd7..cda13bb2c 100755 Binary files a/test/features/esdt-system-sc-mock/output/esdt-system-sc-mock.wasm and b/test/features/esdt-system-sc-mock/output/esdt-system-sc-mock.wasm differ diff --git a/test/features/formatted-message-features/output/formatted-message-features.wasm b/test/features/formatted-message-features/output/formatted-message-features.wasm index f251261a4..574c8a25c 100755 Binary files a/test/features/formatted-message-features/output/formatted-message-features.wasm and b/test/features/formatted-message-features/output/formatted-message-features.wasm differ diff --git a/test/features/formatted-message-features/scenarios/sc_format.scen.json b/test/features/formatted-message-features/scenarios/sc_format.scen.json index fb9e51f40..61b83c5aa 100644 --- a/test/features/formatted-message-features/scenarios/sc_format.scen.json +++ b/test/features/formatted-message-features/scenarios/sc_format.scen.json @@ -110,11 +110,35 @@ }, { "step": "scCall", - "id": "format_message_big_int---negative", + "id": "format_message_i64---positive", "tx": { "from": "address:an_account", "to": "sc:msg-features", - "function": "format_message_big_int", + "function": "format_message_i64", + "arguments": [ + "123456789" + ], + "gasLimit": "1,500,000", + "gasPrice": "0" + }, + "expect": { + "out": [ + "str:i64: 123456789" + ], + "status": "0", + "message": "", + "logs": "*", + "gas": "*", + "refund": "*" + } + }, + { + "step": "scCall", + "id": "format_message_i64---negative", + "tx": { + "from": "address:an_account", + "to": "sc:msg-features", + "function": "format_message_i64", "arguments": [ "-123456789" ], @@ -123,7 +147,7 @@ }, "expect": { "out": [ - "str:BigInt: -123456789" + "str:i64: -123456789" ], "status": "0", "message": "", diff --git a/test/features/payable-features/output/payable-features.wasm b/test/features/payable-features/output/payable-features.wasm index 487d4e069..9cc42557c 100755 Binary files a/test/features/payable-features/output/payable-features.wasm and b/test/features/payable-features/output/payable-features.wasm differ diff --git a/test/multisig/output/multisig-full.wasm b/test/multisig/output/multisig-full.wasm index 1b092f46a..72fecea9d 100755 Binary files a/test/multisig/output/multisig-full.wasm and b/test/multisig/output/multisig-full.wasm differ diff --git a/test/multisig/output/multisig-view.wasm b/test/multisig/output/multisig-view.wasm index 7e83e7cfe..f5e9ea29d 100755 Binary files a/test/multisig/output/multisig-view.wasm and b/test/multisig/output/multisig-view.wasm differ diff --git a/test/multisig/output/multisig.wasm b/test/multisig/output/multisig.wasm index a70731616..21afbc4df 100755 Binary files a/test/multisig/output/multisig.wasm and b/test/multisig/output/multisig.wasm differ diff --git a/test/multisig/scenarios/interactor_nft.scen.json b/test/multisig/scenarios/interactor_nft.scen.json new file mode 100644 index 000000000..f920c34a3 --- /dev/null +++ b/test/multisig/scenarios/interactor_nft.scen.json @@ -0,0 +1,563 @@ +{ + "steps": [ + { + "step": "setState", + "accounts": { + "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60": { + "nonce": "584", + "balance": "101517394731540000003", + "esdt": { + "str:CAN-14dc0a": "1000", + "str:CAN-2abf4b": "1000", + "str:CAN-6d39e6": "1000", + "str:CAN-ac1592": "1000" + }, + "username": "" + } + } + }, + { + "step": "setState", + "accounts": { + "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba": { + "nonce": "239", + "balance": "101639885284140000000", + "esdt": { + "str:TEST-0f54a2": { + "instances": [ + { + "nonce": "1", + "balance": "1" + }, + { + "nonce": "2", + "balance": "1" + } + ] + }, + "str:TEST-48ef66": { + "instances": [ + { + "nonce": "5", + "balance": "1" + }, + { + "nonce": "4", + "balance": "1" + } + ] + }, + "str:TEST-d2b50f": { + "instances": [ + { + "nonce": "1", + "balance": "2" + } + ] + }, + "str:TEST-fb415a": { + "instances": [ + { + "nonce": "3", + "balance": "1" + }, + { + "nonce": "4", + "balance": "1" + }, + { + "nonce": "2", + "balance": "1" + } + ] + } + }, + "username": "" + } + } + }, + { + "step": "setState", + "accounts": { + "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17": { + "nonce": "214", + "balance": "1769165693650000000", + "username": "" + } + } + }, + { + "step": "setState", + "accounts": { + "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033": { + "nonce": "426", + "balance": "62229302086560000000", + "esdt": { + "str:USDC-091bd3": "9997000000000", + "str:XRF-079f0d": "999999805000000000000000000", + "str:XUSDC-929b9b": "1000000000000000000000000" + }, + "username": "" + } + } + }, + { + "step": "setState", + "accounts": { + "0x00000000000000000500c114ee7698050a4d40c092add8c31d25e99a6e1ec2ee": { + "nonce": "0", + "balance": "175064792195269569513", + "esdt": { + "str:WEGLD-6cf38e": { + "instances": [], + "roles": [ + "ESDTRoleLocalBurn", + "ESDTRoleLocalMint" + ] + } + }, + "username": "", + "storage": { + "0x7772617070656445676c64546f6b656e4964": "0x5745474c442d366366333865" + }, + "code": "0x0061736d0100000001661160000060017f0060027f7f017f60027f7f006000017f60017f017f60037f7f7f0060037f7f7f017f60057f7f7e7f7f017f60047f7f7f7f0060067e7f7f7f7f7f017f60047f7f7f7f017f60027f7e0060017e006000017e60057f7f7f7f7f0060037e7f7f0002cc062303656e760b7369676e616c4572726f72000303656e7618626967496e7447657445787465726e616c42616c616e6365000303656e760a6d4275666665724e6577000403656e760d6d427566666572417070656e64000203656e76096d4275666665724571000203656e76106d616e61676564534341646472657373000103656e761b6d616e61676564457865637574654f6e44657374436f6e74657874000a03656e760f636c65616e52657475726e44617461000003656e760d6d616e6167656443616c6c6572000103656e76136d616e616765644f776e657241646472657373000103656e76126d427566666572476574417267756d656e74000203656e760f6765744e756d417267756d656e7473000403656e76126d427566666572417070656e644279746573000703656e760f6d4275666665725365744279746573000703656e76106d4275666665724765744c656e677468000503656e76196d42756666657246726f6d426967496e74556e7369676e6564000203656e76136d42756666657247657442797465536c696365000b03656e76126d42756666657253746f726167654c6f6164000203656e76126d616e616765645369676e616c4572726f72000103656e760e626967496e74536574496e743634000c03656e760a626967496e745369676e000503656e76136d42756666657253746f7261676553746f7265000203656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000103656e760d6d42756666657246696e697368000503656e7614736d616c6c496e7446696e6973685369676e6564000d03656e761c6d616e616765644765744d756c74694553445443616c6c56616c7565000103656e7609626967496e74436d70000203656e760a6765744761734c656674000e03656e761b6d616e616765645472616e7366657256616c756545786563757465000803656e76136765744e756d455344545472616e7366657273000403656e7612626967496e7447657443616c6c56616c7565000103656e7609626967496e74416464000603656e76226d616e616765644d756c74695472616e73666572455344544e465445786563757465000803656e760f6d42756666657247657442797465730002032c2b0f00040405020310010400010303040503020301050509030306060900040501000000000000000000000005030100110619037f01418080c0000b7f0041e5d1c0000b7f0041f0d1c0000b079b010c066d656d6f7279020004696e69740044146765744c6f636b656445676c6442616c616e63650045156765745772617070656445676c64546f6b656e496400460869735061757365640047057061757365004807756e706175736500490a756e7772617045676c64004a087772617045676c64004b0863616c6c4261636b004c0a5f5f646174615f656e6403010b5f5f686561705f6261736503020abc162b2e000240200120024d0440200220044d0d011024000b1024000b2000200220016b3602042000200120036a3602000b05001043000b2301027f10262200100520001026210041c5d1c00010221a41c5d1c0002000100120000b1b01017f41a483c00041a483c00028020041016b220036020020000b0f01017f10022201200010031a20010b0b0020002001100441004a0b0900200020011000000b1f01017f4167100510262203102b20004167200320012002102610061a10070b08002000420010130b0c01017f10262200100820000b1e01017f1026220010092000102c102804400f0b41f082c00041241000000b1500100b20004604400f0b41cb81c00041191000000b4701017f230041106b2202240020022001410874418080fc077120014118747220014108764180fe03712001411876727236020c20002002410c6a4104100c1a200241106a24000b0d0010311a200020011032102f0b1401017f1026220041d482c0004100100d1a20000b0f01017f102622012000100f1a20010b0d0010311a200020011027102f0b1101017f1026220220002001100d1a20020b09002000200110031a0b5501017f20002d00042101200041003a000402402001410171044041a883c00028020022014191ce004f0d01200028020041ac83c0002001100c1a41a883c000410036020041bcd1c00041003a00000b0f0b1024000bae0102027f017e230041106b2202240020024200370308200010382200100e220141094904402002200241086a41082001103920004100200228020422002002280200220110101a027f41002000450d001a034020000440200041016b210020013100002003420886842103200141016a21010c010b0b02402003420158044041002003a741016b0d021a0c010b41f281c0004112103a000b41010b200241106a24000f0b41e481c000410e103a000b0d0020001026220010111a20000b3b01017f230041106b22042400200441086a41002003200120021023200428020c21012000200428020836020020002001360204200441106a24000b1b01017f418482c00041161034220220002001100c1a20021012000bf20101047f230041106b2203240020032000100e22024118742002410874418080fc07717220024108764180fe03712002411876727236020c20012003410c6a4104103c20012d00042102200141003a00040240024002402002410171220204402000100e22054190ce0041a883c00028020022046b4b0d0220032004200420056a2204103d200041002003280204200328020010101a41a883c00020043602000c010b2001280200200010350b200120023a00040c010b2001103620012802002000103520012d0004200120023a0004410171450d0041a883c000410036020041bcd1c00041003a00000b200341106a24000b800101027f230041106b220324000240024020002d000404404190ce0041a883c00028020022046b2002490d01200341086a2004200220046a2200103d2003280208200328020c20012002103e41a883c00020003602000c020b200028020020012002100c1a0c010b20001036200028020020012002100c1a0b200341106a24000b4001017f230041106b22032400200341086a2001200241ac83c0004190ce001023200328020c21012000200328020836020020002001360204200341106a24000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b1043000b1c0041be82c0004113103410374504400f0b419a82c00041121029000b0b0041ac82c000411210340b09002000101441004a0ba60101037f230041106b2201240041be82c00041131034200142808080808080808001420020001b3703080240200045044041d482c00021000c010b4100210003400240024020004108470440200141086a20006a2d00002202450d022002411874411f7520006a220041094f0d01410820006b21022000200141086a6a21000c040b1043000b104d000b200041016a21000c000b000b20002002103410151a200141106a24000b0500104d000b1a01017f10164101102e410010262200100a1a1040200010151a0b0c0010164100102e102510170b0f0010164100102e1040103810181a0b160010164100102e41be82c000411310341037ad10190b0e001016102d4100102e410110420b0e001016102d4100102e410010420bed0302097f017e230041106b220124004100102e103f416b2102024041c4d1c0002d000022000440416b41ffffffff0720001b21020c010b41c4d1c00041013a0000416b101a0b02402002100e4170714110460440410021002002100e2106200141086a2107410121050340200041106a220420064b0d022007420037030020014200370300200220004110200110101a2005044020012902042209423886200942288642808080808080c0ff0083842009421886428080808080e03f8320094208864280808080f01f838484200942088842808080f80f832009421888428080fc07838420094228884280fe038320094238888484842109200128020022004118742000410874418080fc07717220004108764180fe0371200041187672722108200128020c22004118742000410874418080fc07717220004108764180fe037120004118767272210341002105200421000c010b0b1043000b418481c00041221000000b024002400240200950044020081040103822041028450d0120031041450d0220031025101b41004a0d031031220020041033200020031030101c41ea80c000410d10342000102a102c2003420010311031101d1a200141106a24000f0b41d482c000411c1000000b418080c00041101029000b419080c000411c1029000b41ac80c00041231029000beb0301097f230041206b220124000240101e4504404100102e103f41752103024041c0d1c0002d000022000440417541ffffffff0720001b21030c010b41c0d1c00041013a00004175101f0b20031041450d011040103821041031220020041033200020031030101c41f780c000410d10342000102a102c10312107103121081031210520041027210210262200102b20002000200310202001420037020c20012002410874418080fc077120024118747220024108764180fe03712002411876727236020820012000410874418080fc077120004118747220004108764180fe0371200041187672723602142005200141086a4110100c1a200542002007200810211a2001027f41bcd1c0002d0000220045044041bcd1c00041013a000041a883c0004100360200200141ac83c0004190ce00410010392001280200200128020441d482c0004100103e10310c010b41d482c000410010340b360218200120004101733a001c2004200141186a2200103b200142003703082000200141086a22024108103c200310322000103b20012802182100200120012d001c3a000c2001200036020820021036200128020820012d000c044041a883c000410036020041bcd1c00041003a00000b10181a200141206a24000f0b41a681c00041251000000b41cf80c000411b1029000b0300010b0c00419483c000410e1000000b0bb8030200418080c0000ba20357726f6e67206573647420746f6b656e4d75737420706179206d6f7265207468616e203020746f6b656e7321436f6e747261637420646f6573206e6f74206861766520656e6f7567682066756e64735061796d656e74206d757374206265206d6f7265207468616e2030455344544c6f63616c4275726e455344544c6f63616c4d696e74696e636f7272656374206e756d626572206f662045534454207472616e736665727366756e6374696f6e20646f6573206e6f74206163636570742045534454207061796d656e7477726f6e67206e756d626572206f6620617267756d656e7473696e70757420746f6f206c6f6e67696e707574206f7574206f662072616e676573746f72616765206465636f6465206572726f723a20436f6e7472616374206973207061757365647772617070656445676c64546f6b656e496470617573655f6d6f64756c653a70617573656400000066756e6769626c65204553445420746f6b656e206578706563746564456e64706f696e742063616e206f6e6c792062652063616c6c6564206279206f776e657270616e6963206f636375727265640041a483c0000b049cffffff" + } + } + }, + { + "step": "setState", + "newAddresses": [ + { + "creatorAddress": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "creatorNonce": "584", + "newAddress": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60" + } + ] + }, + { + "step": "scDeploy", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "contractCode": "file:../output/multisig.wasm", + "arguments": [ + "0x02", + "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033" + ], + "gasLimit": "70,000,000", + "gasPrice": "" + }, + "expect": { + "status": "0" + } + }, + { + "step": "transfer", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "egldValue": "0,050000000000000000", + "gasLimit": "50,000" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "proposeAsyncCall", + "arguments": [ + "0x000000000000000000010000000000000000000000000000000000000002ffff", + "0xb1a2bc2ec50000", + "0x69737375654e6f6e46756e6769626c65", + "0x54657374436f6c6c656374696f6e31", + "0x54455354434f4c4c31" + ], + "gasLimit": "10,000,000", + "gasPrice": "" + }, + "expect": { + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x01" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x01" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x01" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "setState", + "newTokenIdentifiers": [ + "TESTCOLL1-748f3f" + ] + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "performAction", + "arguments": [ + "0x01" + ], + "gasLimit": "80,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "proposeAsyncCall", + "arguments": [ + "0x000000000000000000010000000000000000000000000000000000000002ffff", + "0x", + "0x7365745370656369616c526f6c65", + "0x54455354434f4c4c312d373438663366", + "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "0x45534454526f6c654e4654437265617465" + ], + "gasLimit": "10,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x02" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x02" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x02" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "performAction", + "arguments": [ + "0x02" + ], + "gasLimit": "80,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "proposeAsyncCall", + "arguments": [ + "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "0x", + "0x455344544e4654437265617465", + "0x54455354434f4c4c312d373438663366", + "0x01", + "0x5465737420636f6c6c656374696f6e206974656d202330", + "0x0bb8", + "0x", + "0x746167733a746573742c727573742d696e7465726163746f72", + "0x68747470733a2f2f697066732e696f2f697066732f516d5979416145663170684a53356d4e3677666f7535646535476270556464427854593156656b4b636a643550432f6e667430302e706e67" + ], + "gasLimit": "10,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "proposeAsyncCall", + "arguments": [ + "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "0x", + "0x455344544e4654437265617465", + "0x54455354434f4c4c312d373438663366", + "0x01", + "0x5465737420636f6c6c656374696f6e206974656d202331", + "0x0bb8", + "0x", + "0x746167733a746573742c727573742d696e7465726163746f72", + "0x68747470733a2f2f697066732e696f2f697066732f516d5979416145663170684a53356d4e3677666f7535646535476270556464427854593156656b4b636a643550432f6e667430312e706e67" + ], + "gasLimit": "10,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "proposeAsyncCall", + "arguments": [ + "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "0x", + "0x455344544e4654437265617465", + "0x54455354434f4c4c312d373438663366", + "0x01", + "0x5465737420636f6c6c656374696f6e206974656d202332", + "0x0bb8", + "0x", + "0x746167733a746573742c727573742d696e7465726163746f72", + "0x68747470733a2f2f697066732e696f2f697066732f516d5979416145663170684a53356d4e3677666f7535646535476270556464427854593156656b4b636a643550432f6e667430322e706e67" + ], + "gasLimit": "10,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x03" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x03" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x03" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x04" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x04" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x04" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x05" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x05" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "sign", + "arguments": [ + "0x05" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "performAction", + "arguments": [ + "0x03" + ], + "gasLimit": "30,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "performAction", + "arguments": [ + "0x04" + ], + "gasLimit": "30,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005000778538f60be51f1363879297a487329bd6fa37fed60", + "function": "performAction", + "arguments": [ + "0x05" + ], + "gasLimit": "30,000,000", + "gasPrice": "" + } + } + ] +} diff --git a/test/multisig/scenarios/interactor_nft_all_roles.scen.json b/test/multisig/scenarios/interactor_nft_all_roles.scen.json new file mode 100644 index 000000000..8746f7fba --- /dev/null +++ b/test/multisig/scenarios/interactor_nft_all_roles.scen.json @@ -0,0 +1,526 @@ +{ + "steps": [ + { + "step": "setState", + "accounts": { + "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60": { + "nonce": "619", + "balance": "101110120254850000003", + "esdt": { + "str:CAN-14dc0a": "1000", + "str:CAN-2abf4b": "1000", + "str:CAN-6d39e6": "1000", + "str:CAN-ac1592": "1000" + }, + "username": "" + } + } + }, + { + "step": "setState", + "accounts": { + "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba": { + "nonce": "251", + "balance": "101558004165010000000", + "esdt": { + "str:CAMP-3bd1c7": { + "instances": [ + { + "nonce": "26", + "balance": "1" + }, + { + "nonce": "23", + "balance": "1" + }, + { + "nonce": "21", + "balance": "1" + }, + { + "nonce": "25", + "balance": "1" + }, + { + "nonce": "24", + "balance": "1" + }, + { + "nonce": "22", + "balance": "1" + } + ] + }, + "str:TEST-0f54a2": { + "instances": [ + { + "nonce": "9", + "balance": "1" + }, + { + "nonce": "1", + "balance": "1" + }, + { + "nonce": "2", + "balance": "1" + }, + { + "nonce": "6", + "balance": "1" + } + ] + }, + "str:TEST-48ef66": { + "instances": [ + { + "nonce": "5", + "balance": "1" + }, + { + "nonce": "4", + "balance": "1" + } + ] + }, + "str:TEST-d2b50f": { + "instances": [ + { + "nonce": "1", + "balance": "2" + } + ] + }, + "str:TEST-fb415a": { + "instances": [ + { + "nonce": "3", + "balance": "1" + }, + { + "nonce": "2", + "balance": "1" + }, + { + "nonce": "4", + "balance": "1" + } + ] + } + }, + "username": "" + } + } + }, + { + "step": "setState", + "accounts": { + "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17": { + "nonce": "222", + "balance": "1767500200900000000", + "username": "" + } + } + }, + { + "step": "setState", + "accounts": { + "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033": { + "nonce": "434", + "balance": "62227641093810000000", + "esdt": { + "str:USDC-091bd3": "9997000000000", + "str:XRF-079f0d": "999999805000000000000000000", + "str:XUSDC-929b9b": "1000000000000000000000000" + }, + "username": "" + } + } + }, + { + "step": "setState", + "accounts": { + "0x00000000000000000500c114ee7698050a4d40c092add8c31d25e99a6e1ec2ee": { + "nonce": "0", + "balance": "175064792195269569513", + "esdt": { + "str:WEGLD-6cf38e": { + "instances": [], + "roles": [ + "ESDTRoleLocalBurn", + "ESDTRoleLocalMint" + ] + } + }, + "username": "", + "storage": { + "0x7772617070656445676c64546f6b656e4964": "0x5745474c442d366366333865" + }, + "code": "0x0061736d0100000001661160000060017f0060027f7f017f60027f7f006000017f60017f017f60037f7f7f0060037f7f7f017f60057f7f7e7f7f017f60047f7f7f7f0060067e7f7f7f7f7f017f60047f7f7f7f017f60027f7e0060017e006000017e60057f7f7f7f7f0060037e7f7f0002cc062303656e760b7369676e616c4572726f72000303656e7618626967496e7447657445787465726e616c42616c616e6365000303656e760a6d4275666665724e6577000403656e760d6d427566666572417070656e64000203656e76096d4275666665724571000203656e76106d616e61676564534341646472657373000103656e761b6d616e61676564457865637574654f6e44657374436f6e74657874000a03656e760f636c65616e52657475726e44617461000003656e760d6d616e6167656443616c6c6572000103656e76136d616e616765644f776e657241646472657373000103656e76126d427566666572476574417267756d656e74000203656e760f6765744e756d417267756d656e7473000403656e76126d427566666572417070656e644279746573000703656e760f6d4275666665725365744279746573000703656e76106d4275666665724765744c656e677468000503656e76196d42756666657246726f6d426967496e74556e7369676e6564000203656e76136d42756666657247657442797465536c696365000b03656e76126d42756666657253746f726167654c6f6164000203656e76126d616e616765645369676e616c4572726f72000103656e760e626967496e74536574496e743634000c03656e760a626967496e745369676e000503656e76136d42756666657253746f7261676553746f7265000203656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000103656e760d6d42756666657246696e697368000503656e7614736d616c6c496e7446696e6973685369676e6564000d03656e761c6d616e616765644765744d756c74694553445443616c6c56616c7565000103656e7609626967496e74436d70000203656e760a6765744761734c656674000e03656e761b6d616e616765645472616e7366657256616c756545786563757465000803656e76136765744e756d455344545472616e7366657273000403656e7612626967496e7447657443616c6c56616c7565000103656e7609626967496e74416464000603656e76226d616e616765644d756c74695472616e73666572455344544e465445786563757465000803656e760f6d42756666657247657442797465730002032c2b0f00040405020310010400010303040503020301050509030306060900040501000000000000000000000005030100110619037f01418080c0000b7f0041e5d1c0000b7f0041f0d1c0000b079b010c066d656d6f7279020004696e69740044146765744c6f636b656445676c6442616c616e63650045156765745772617070656445676c64546f6b656e496400460869735061757365640047057061757365004807756e706175736500490a756e7772617045676c64004a087772617045676c64004b0863616c6c4261636b004c0a5f5f646174615f656e6403010b5f5f686561705f6261736503020abc162b2e000240200120024d0440200220044d0d011024000b1024000b2000200220016b3602042000200120036a3602000b05001043000b2301027f10262200100520001026210041c5d1c00010221a41c5d1c0002000100120000b1b01017f41a483c00041a483c00028020041016b220036020020000b0f01017f10022201200010031a20010b0b0020002001100441004a0b0900200020011000000b1f01017f4167100510262203102b20004167200320012002102610061a10070b08002000420010130b0c01017f10262200100820000b1e01017f1026220010092000102c102804400f0b41f082c00041241000000b1500100b20004604400f0b41cb81c00041191000000b4701017f230041106b2202240020022001410874418080fc077120014118747220014108764180fe03712001411876727236020c20002002410c6a4104100c1a200241106a24000b0d0010311a200020011032102f0b1401017f1026220041d482c0004100100d1a20000b0f01017f102622012000100f1a20010b0d0010311a200020011027102f0b1101017f1026220220002001100d1a20020b09002000200110031a0b5501017f20002d00042101200041003a000402402001410171044041a883c00028020022014191ce004f0d01200028020041ac83c0002001100c1a41a883c000410036020041bcd1c00041003a00000b0f0b1024000bae0102027f017e230041106b2202240020024200370308200010382200100e220141094904402002200241086a41082001103920004100200228020422002002280200220110101a027f41002000450d001a034020000440200041016b210020013100002003420886842103200141016a21010c010b0b02402003420158044041002003a741016b0d021a0c010b41f281c0004112103a000b41010b200241106a24000f0b41e481c000410e103a000b0d0020001026220010111a20000b3b01017f230041106b22042400200441086a41002003200120021023200428020c21012000200428020836020020002001360204200441106a24000b1b01017f418482c00041161034220220002001100c1a20021012000bf20101047f230041106b2203240020032000100e22024118742002410874418080fc07717220024108764180fe03712002411876727236020c20012003410c6a4104103c20012d00042102200141003a00040240024002402002410171220204402000100e22054190ce0041a883c00028020022046b4b0d0220032004200420056a2204103d200041002003280204200328020010101a41a883c00020043602000c010b2001280200200010350b200120023a00040c010b2001103620012802002000103520012d0004200120023a0004410171450d0041a883c000410036020041bcd1c00041003a00000b200341106a24000b800101027f230041106b220324000240024020002d000404404190ce0041a883c00028020022046b2002490d01200341086a2004200220046a2200103d2003280208200328020c20012002103e41a883c00020003602000c020b200028020020012002100c1a0c010b20001036200028020020012002100c1a0b200341106a24000b4001017f230041106b22032400200341086a2001200241ac83c0004190ce001023200328020c21012000200328020836020020002001360204200341106a24000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b1043000b1c0041be82c0004113103410374504400f0b419a82c00041121029000b0b0041ac82c000411210340b09002000101441004a0ba60101037f230041106b2201240041be82c00041131034200142808080808080808001420020001b3703080240200045044041d482c00021000c010b4100210003400240024020004108470440200141086a20006a2d00002202450d022002411874411f7520006a220041094f0d01410820006b21022000200141086a6a21000c040b1043000b104d000b200041016a21000c000b000b20002002103410151a200141106a24000b0500104d000b1a01017f10164101102e410010262200100a1a1040200010151a0b0c0010164100102e102510170b0f0010164100102e1040103810181a0b160010164100102e41be82c000411310341037ad10190b0e001016102d4100102e410110420b0e001016102d4100102e410010420bed0302097f017e230041106b220124004100102e103f416b2102024041c4d1c0002d000022000440416b41ffffffff0720001b21020c010b41c4d1c00041013a0000416b101a0b02402002100e4170714110460440410021002002100e2106200141086a2107410121050340200041106a220420064b0d022007420037030020014200370300200220004110200110101a2005044020012902042209423886200942288642808080808080c0ff0083842009421886428080808080e03f8320094208864280808080f01f838484200942088842808080f80f832009421888428080fc07838420094228884280fe038320094238888484842109200128020022004118742000410874418080fc07717220004108764180fe0371200041187672722108200128020c22004118742000410874418080fc07717220004108764180fe037120004118767272210341002105200421000c010b0b1043000b418481c00041221000000b024002400240200950044020081040103822041028450d0120031041450d0220031025101b41004a0d031031220020041033200020031030101c41ea80c000410d10342000102a102c2003420010311031101d1a200141106a24000f0b41d482c000411c1000000b418080c00041101029000b419080c000411c1029000b41ac80c00041231029000beb0301097f230041206b220124000240101e4504404100102e103f41752103024041c0d1c0002d000022000440417541ffffffff0720001b21030c010b41c0d1c00041013a00004175101f0b20031041450d011040103821041031220020041033200020031030101c41f780c000410d10342000102a102c10312107103121081031210520041027210210262200102b20002000200310202001420037020c20012002410874418080fc077120024118747220024108764180fe03712002411876727236020820012000410874418080fc077120004118747220004108764180fe0371200041187672723602142005200141086a4110100c1a200542002007200810211a2001027f41bcd1c0002d0000220045044041bcd1c00041013a000041a883c0004100360200200141ac83c0004190ce00410010392001280200200128020441d482c0004100103e10310c010b41d482c000410010340b360218200120004101733a001c2004200141186a2200103b200142003703082000200141086a22024108103c200310322000103b20012802182100200120012d001c3a000c2001200036020820021036200128020820012d000c044041a883c000410036020041bcd1c00041003a00000b10181a200141206a24000f0b41a681c00041251000000b41cf80c000411b1029000b0300010b0c00419483c000410e1000000b0bb8030200418080c0000ba20357726f6e67206573647420746f6b656e4d75737420706179206d6f7265207468616e203020746f6b656e7321436f6e747261637420646f6573206e6f74206861766520656e6f7567682066756e64735061796d656e74206d757374206265206d6f7265207468616e2030455344544c6f63616c4275726e455344544c6f63616c4d696e74696e636f7272656374206e756d626572206f662045534454207472616e736665727366756e6374696f6e20646f6573206e6f74206163636570742045534454207061796d656e7477726f6e67206e756d626572206f6620617267756d656e7473696e70757420746f6f206c6f6e67696e707574206f7574206f662072616e676573746f72616765206465636f6465206572726f723a20436f6e7472616374206973207061757365647772617070656445676c64546f6b656e496470617573655f6d6f64756c653a70617573656400000066756e6769626c65204553445420746f6b656e206578706563746564456e64706f696e742063616e206f6e6c792062652063616c6c6564206279206f776e657270616e6963206f636375727265640041a483c0000b049cffffff" + } + } + }, + { + "step": "setState", + "newAddresses": [ + { + "creatorAddress": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "creatorNonce": "619", + "newAddress": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60" + } + ] + }, + { + "step": "scDeploy", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "contractCode": "file:../output/multisig.wasm", + "arguments": [ + "0x02", + "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033" + ], + "gasLimit": "70,000,000", + "gasPrice": "" + }, + "expect": { + "status": "0" + } + }, + { + "step": "transfer", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "egldValue": "0,050000000000000000", + "gasLimit": "50,000" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "proposeAsyncCall", + "arguments": [ + "0x000000000000000000010000000000000000000000000000000000000002ffff", + "0xb1a2bc2ec50000", + "0x7265676973746572416e64536574416c6c526f6c6573", + "0x54657374436f6c6c656374696f6e31", + "0x54455354434f4c4c31", + "0x4e4654", + "0x" + ], + "gasLimit": "10,000,000", + "gasPrice": "" + }, + "expect": { + "status": "0" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "sign", + "arguments": [ + "0x01" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "sign", + "arguments": [ + "0x01" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "sign", + "arguments": [ + "0x01" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "setState", + "newTokenIdentifiers": [ + "TESTCOLL1-636884" + ] + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "performAction", + "arguments": [ + "0x01" + ], + "gasLimit": "80,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "proposeAsyncCall", + "arguments": [ + "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "0x", + "0x455344544e4654437265617465", + "0x54455354434f4c4c312d363336383834", + "0x01", + "0x5465737420636f6c6c656374696f6e206974656d202330", + "0x0bb8", + "0x", + "0x746167733a746573742c727573742d696e7465726163746f72", + "0x68747470733a2f2f697066732e696f2f697066732f516d5979416145663170684a53356d4e3677666f7535646535476270556464427854593156656b4b636a643550432f6e667430302e706e67" + ], + "gasLimit": "10,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "proposeAsyncCall", + "arguments": [ + "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "0x", + "0x455344544e4654437265617465", + "0x54455354434f4c4c312d363336383834", + "0x01", + "0x5465737420636f6c6c656374696f6e206974656d202331", + "0x0bb8", + "0x", + "0x746167733a746573742c727573742d696e7465726163746f72", + "0x68747470733a2f2f697066732e696f2f697066732f516d5979416145663170684a53356d4e3677666f7535646535476270556464427854593156656b4b636a643550432f6e667430312e706e67" + ], + "gasLimit": "10,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "proposeAsyncCall", + "arguments": [ + "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "0x", + "0x455344544e4654437265617465", + "0x54455354434f4c4c312d363336383834", + "0x01", + "0x5465737420636f6c6c656374696f6e206974656d202332", + "0x0bb8", + "0x", + "0x746167733a746573742c727573742d696e7465726163746f72", + "0x68747470733a2f2f697066732e696f2f697066732f516d5979416145663170684a53356d4e3677666f7535646535476270556464427854593156656b4b636a643550432f6e667430322e706e67" + ], + "gasLimit": "10,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "sign", + "arguments": [ + "0x02" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "sign", + "arguments": [ + "0x02" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "sign", + "arguments": [ + "0x02" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "sign", + "arguments": [ + "0x03" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "sign", + "arguments": [ + "0x03" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "sign", + "arguments": [ + "0x03" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "sign", + "arguments": [ + "0x04" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "sign", + "arguments": [ + "0x04" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "sign", + "arguments": [ + "0x04" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "performAction", + "arguments": [ + "0x02" + ], + "gasLimit": "30,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "performAction", + "arguments": [ + "0x03" + ], + "gasLimit": "30,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x000000000000000005008a3621a73196c9a9539f05be7d3c277346cdc989ed60", + "function": "performAction", + "arguments": [ + "0x04" + ], + "gasLimit": "30,000,000", + "gasPrice": "" + } + } + ] +} \ No newline at end of file diff --git a/test/multisig/scenarios/interactor_wegld.scen.json b/test/multisig/scenarios/interactor_wegld.scen.json new file mode 100644 index 000000000..ea9ed6ff6 --- /dev/null +++ b/test/multisig/scenarios/interactor_wegld.scen.json @@ -0,0 +1,275 @@ +{ + "steps": [ + { + "step": "setState", + "accounts": { + "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60": { + "nonce": "495", + "balance": "106119141427130000003", + "esdt": { + "str:CAN-14dc0a": "1000", + "str:CAN-2abf4b": "1000", + "str:CAN-6d39e6": "1000", + "str:CAN-ac1592": "1000" + }, + "username": "" + } + } + }, + { + "step": "setState", + "accounts": { + "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba": { + "nonce": "188", + "balance": "3715283822100000000", + "esdt": { + "str:TEST-d2b50f": { + "instances": [ + { + "nonce": "1", + "balance": "2" + } + ] + } + }, + "username": "" + } + } + }, + { + "step": "setState", + "accounts": { + "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17": { + "nonce": "179", + "balance": "7777023510140000000", + "username": "" + } + } + }, + { + "step": "setState", + "accounts": { + "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033": { + "nonce": "394", + "balance": "62236863377210000000", + "esdt": { + "str:USDC-091bd3": "9997000000000", + "str:XRF-079f0d": "999999805000000000000000000", + "str:XUSDC-929b9b": "1000000000000000000000000" + }, + "username": "" + } + } + }, + { + "step": "setState", + "accounts": { + "0x00000000000000000500c114ee7698050a4d40c092add8c31d25e99a6e1ec2ee": { + "nonce": "0", + "balance": "54039792195269569513", + "esdt": { + "str:WEGLD-6cf38e": { + "instances": [], + "roles": [ + "ESDTRoleLocalBurn", + "ESDTRoleLocalMint" + ] + } + }, + "username": "", + "storage": { + "0x7772617070656445676c64546f6b656e4964": "0x5745474c442d366366333865" + }, + "code": "0x0061736d0100000001661160000060017f0060027f7f017f60027f7f006000017f60017f017f60037f7f7f0060037f7f7f017f60057f7f7e7f7f017f60047f7f7f7f0060067e7f7f7f7f7f017f60047f7f7f7f017f60027f7e0060017e006000017e60057f7f7f7f7f0060037e7f7f0002cc062303656e760b7369676e616c4572726f72000303656e7618626967496e7447657445787465726e616c42616c616e6365000303656e760a6d4275666665724e6577000403656e760d6d427566666572417070656e64000203656e76096d4275666665724571000203656e76106d616e61676564534341646472657373000103656e761b6d616e61676564457865637574654f6e44657374436f6e74657874000a03656e760f636c65616e52657475726e44617461000003656e760d6d616e6167656443616c6c6572000103656e76136d616e616765644f776e657241646472657373000103656e76126d427566666572476574417267756d656e74000203656e760f6765744e756d417267756d656e7473000403656e76126d427566666572417070656e644279746573000703656e760f6d4275666665725365744279746573000703656e76106d4275666665724765744c656e677468000503656e76196d42756666657246726f6d426967496e74556e7369676e6564000203656e76136d42756666657247657442797465536c696365000b03656e76126d42756666657253746f726167654c6f6164000203656e76126d616e616765645369676e616c4572726f72000103656e760e626967496e74536574496e743634000c03656e760a626967496e745369676e000503656e76136d42756666657253746f7261676553746f7265000203656e760e636865636b4e6f5061796d656e74000003656e7614626967496e7446696e697368556e7369676e6564000103656e760d6d42756666657246696e697368000503656e7614736d616c6c496e7446696e6973685369676e6564000d03656e761c6d616e616765644765744d756c74694553445443616c6c56616c7565000103656e7609626967496e74436d70000203656e760a6765744761734c656674000e03656e761b6d616e616765645472616e7366657256616c756545786563757465000803656e76136765744e756d455344545472616e7366657273000403656e7612626967496e7447657443616c6c56616c7565000103656e7609626967496e74416464000603656e76226d616e616765644d756c74695472616e73666572455344544e465445786563757465000803656e760f6d42756666657247657442797465730002032c2b0f00040405020310010400010303040503020301050509030306060900040501000000000000000000000005030100110619037f01418080c0000b7f0041e5d1c0000b7f0041f0d1c0000b079b010c066d656d6f7279020004696e69740044146765744c6f636b656445676c6442616c616e63650045156765745772617070656445676c64546f6b656e496400460869735061757365640047057061757365004807756e706175736500490a756e7772617045676c64004a087772617045676c64004b0863616c6c4261636b004c0a5f5f646174615f656e6403010b5f5f686561705f6261736503020abc162b2e000240200120024d0440200220044d0d011024000b1024000b2000200220016b3602042000200120036a3602000b05001043000b2301027f10262200100520001026210041c5d1c00010221a41c5d1c0002000100120000b1b01017f41a483c00041a483c00028020041016b220036020020000b0f01017f10022201200010031a20010b0b0020002001100441004a0b0900200020011000000b1f01017f4167100510262203102b20004167200320012002102610061a10070b08002000420010130b0c01017f10262200100820000b1e01017f1026220010092000102c102804400f0b41f082c00041241000000b1500100b20004604400f0b41cb81c00041191000000b4701017f230041106b2202240020022001410874418080fc077120014118747220014108764180fe03712001411876727236020c20002002410c6a4104100c1a200241106a24000b0d0010311a200020011032102f0b1401017f1026220041d482c0004100100d1a20000b0f01017f102622012000100f1a20010b0d0010311a200020011027102f0b1101017f1026220220002001100d1a20020b09002000200110031a0b5501017f20002d00042101200041003a000402402001410171044041a883c00028020022014191ce004f0d01200028020041ac83c0002001100c1a41a883c000410036020041bcd1c00041003a00000b0f0b1024000bae0102027f017e230041106b2202240020024200370308200010382200100e220141094904402002200241086a41082001103920004100200228020422002002280200220110101a027f41002000450d001a034020000440200041016b210020013100002003420886842103200141016a21010c010b0b02402003420158044041002003a741016b0d021a0c010b41f281c0004112103a000b41010b200241106a24000f0b41e481c000410e103a000b0d0020001026220010111a20000b3b01017f230041106b22042400200441086a41002003200120021023200428020c21012000200428020836020020002001360204200441106a24000b1b01017f418482c00041161034220220002001100c1a20021012000bf20101047f230041106b2203240020032000100e22024118742002410874418080fc07717220024108764180fe03712002411876727236020c20012003410c6a4104103c20012d00042102200141003a00040240024002402002410171220204402000100e22054190ce0041a883c00028020022046b4b0d0220032004200420056a2204103d200041002003280204200328020010101a41a883c00020043602000c010b2001280200200010350b200120023a00040c010b2001103620012802002000103520012d0004200120023a0004410171450d0041a883c000410036020041bcd1c00041003a00000b200341106a24000b800101027f230041106b220324000240024020002d000404404190ce0041a883c00028020022046b2002490d01200341086a2004200220046a2200103d2003280208200328020c20012002103e41a883c00020003602000c020b200028020020012002100c1a0c010b20001036200028020020012002100c1a0b200341106a24000b4001017f230041106b22032400200341086a2001200241ac83c0004190ce001023200328020c21012000200328020836020020002001360204200341106a24000bb00201067f2001200346044020012203410f4b04402000410020006b41037122056a210420050440200221010340200020012d00003a0000200141016a2101200041016a22002004490d000b0b2004200320056b2203417c7122066a21000240200220056a220541037122010440200641004c0d012005417c71220741046a21024100200141037422086b4118712109200728020021010340200420012008762002280200220120097472360200200241046a2102200441046a22042000490d000b0c010b200641004c0d0020052102034020042002280200360200200241046a2102200441046a22042000490d000b0b20034103712103200520066a21020b20030440200020036a21010340200020022d00003a0000200241016a2102200041016a22002001490d000b0b0f0b1043000b1c0041be82c0004113103410374504400f0b419a82c00041121029000b0b0041ac82c000411210340b09002000101441004a0ba60101037f230041106b2201240041be82c00041131034200142808080808080808001420020001b3703080240200045044041d482c00021000c010b4100210003400240024020004108470440200141086a20006a2d00002202450d022002411874411f7520006a220041094f0d01410820006b21022000200141086a6a21000c040b1043000b104d000b200041016a21000c000b000b20002002103410151a200141106a24000b0500104d000b1a01017f10164101102e410010262200100a1a1040200010151a0b0c0010164100102e102510170b0f0010164100102e1040103810181a0b160010164100102e41be82c000411310341037ad10190b0e001016102d4100102e410110420b0e001016102d4100102e410010420bed0302097f017e230041106b220124004100102e103f416b2102024041c4d1c0002d000022000440416b41ffffffff0720001b21020c010b41c4d1c00041013a0000416b101a0b02402002100e4170714110460440410021002002100e2106200141086a2107410121050340200041106a220420064b0d022007420037030020014200370300200220004110200110101a2005044020012902042209423886200942288642808080808080c0ff0083842009421886428080808080e03f8320094208864280808080f01f838484200942088842808080f80f832009421888428080fc07838420094228884280fe038320094238888484842109200128020022004118742000410874418080fc07717220004108764180fe0371200041187672722108200128020c22004118742000410874418080fc07717220004108764180fe037120004118767272210341002105200421000c010b0b1043000b418481c00041221000000b024002400240200950044020081040103822041028450d0120031041450d0220031025101b41004a0d031031220020041033200020031030101c41ea80c000410d10342000102a102c2003420010311031101d1a200141106a24000f0b41d482c000411c1000000b418080c00041101029000b419080c000411c1029000b41ac80c00041231029000beb0301097f230041206b220124000240101e4504404100102e103f41752103024041c0d1c0002d000022000440417541ffffffff0720001b21030c010b41c0d1c00041013a00004175101f0b20031041450d011040103821041031220020041033200020031030101c41f780c000410d10342000102a102c10312107103121081031210520041027210210262200102b20002000200310202001420037020c20012002410874418080fc077120024118747220024108764180fe03712002411876727236020820012000410874418080fc077120004118747220004108764180fe0371200041187672723602142005200141086a4110100c1a200542002007200810211a2001027f41bcd1c0002d0000220045044041bcd1c00041013a000041a883c0004100360200200141ac83c0004190ce00410010392001280200200128020441d482c0004100103e10310c010b41d482c000410010340b360218200120004101733a001c2004200141186a2200103b200142003703082000200141086a22024108103c200310322000103b20012802182100200120012d001c3a000c2001200036020820021036200128020820012d000c044041a883c000410036020041bcd1c00041003a00000b10181a200141206a24000f0b41a681c00041251000000b41cf80c000411b1029000b0300010b0c00419483c000410e1000000b0bb8030200418080c0000ba20357726f6e67206573647420746f6b656e4d75737420706179206d6f7265207468616e203020746f6b656e7321436f6e747261637420646f6573206e6f74206861766520656e6f7567682066756e64735061796d656e74206d757374206265206d6f7265207468616e2030455344544c6f63616c4275726e455344544c6f63616c4d696e74696e636f7272656374206e756d626572206f662045534454207472616e736665727366756e6374696f6e20646f6573206e6f74206163636570742045534454207061796d656e7477726f6e67206e756d626572206f6620617267756d656e7473696e70757420746f6f206c6f6e67696e707574206f7574206f662072616e676573746f72616765206465636f6465206572726f723a20436f6e7472616374206973207061757365647772617070656445676c64546f6b656e496470617573655f6d6f64756c653a70617573656400000066756e6769626c65204553445420746f6b656e206578706563746564456e64706f696e742063616e206f6e6c792062652063616c6c6564206279206f776e657270616e6963206f636375727265640041a483c0000b049cffffff" + } + } + }, + { + "step": "setState", + "newAddresses": [ + { + "creatorAddress": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "creatorNonce": "495", + "newAddress": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60" + } + ] + }, + { + "step": "scDeploy", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "contractCode": "file:../output/multisig.wasm", + "arguments": [ + "0x02", + "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033" + ], + "gasLimit": "70,000,000", + "gasPrice": "" + }, + "expect": { + "status": "0" + } + }, + { + "step": "transfer", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", + "egldValue": "0,050000000000000000", + "gasLimit": "50,000" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", + "function": "proposeAsyncCall", + "arguments": [ + "0x00000000000000000500c114ee7698050a4d40c092add8c31d25e99a6e1ec2ee", + "0xb1a2bc2ec50000", + "0x7772617045676c64" + ], + "gasLimit": "10,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", + "function": "sign", + "arguments": [ + "0x01" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", + "function": "sign", + "arguments": [ + "0x01" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", + "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", + "function": "sign", + "arguments": [ + "0x01" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", + "function": "performAction", + "arguments": [ + "0x01" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", + "function": "proposeAsyncCall", + "arguments": [ + "0x00000000000000000500c114ee7698050a4d40c092add8c31d25e99a6e1ec2ee", + "0x", + "0x455344545472616e73666572", + "0x5745474c442d366366333865", + "0x58d15e17628000", + "0x756e7772617045676c64" + ], + "gasLimit": "10,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb2a11555ce521e4944e09ab17549d85b487dcd26c84b5017a39e31a3670889ba", + "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", + "function": "sign", + "arguments": [ + "0x02" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xb13a017423c366caff8cecfb77a12610a130f4888134122c7937feae0d6d7d17", + "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", + "function": "sign", + "arguments": [ + "0x02" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0x3af8d9c9423b2577c6252722c1d90212a4111f7203f9744f76fcfa1d0a310033", + "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", + "function": "sign", + "arguments": [ + "0x02" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + }, + { + "step": "scCall", + "id": "", + "tx": { + "from": "0xe32afedc904fe1939746ad973beb383563cf63642ba669b3040f9b9428a5ed60", + "to": "0x0000000000000000050013ee5923031e866a442d3cb543820bf74178bc7fed60", + "function": "performAction", + "arguments": [ + "0x02" + ], + "gasLimit": "15,000,000", + "gasPrice": "" + } + } + ] +} diff --git a/test/multisig/scenarios/sendEsdt.scen.json b/test/multisig/scenarios/sendEsdt.scen.json index 45947d049..e30ae951c 100644 --- a/test/multisig/scenarios/sendEsdt.scen.json +++ b/test/multisig/scenarios/sendEsdt.scen.json @@ -192,14 +192,12 @@ "3", "10" ], - "data": [ - "" - ] + "data": "*" }, { "address": "sc:multisig", "endpoint": "str:MultiESDTNFTTransfer", - "topics": [ + "topics": [ "str:FUNG-TOKEN", "0", "1000", @@ -212,7 +210,7 @@ "address:esdt-owner" ], "data": "*" - }, + }, { "address": "address:esdt-owner", "endpoint": "str:transferValueOnly", @@ -232,9 +230,7 @@ "topics": [ "str:asyncCallSuccess" ], - "data": [ - "" - ] + "data": "*" } ], "gas": "*", diff --git a/test/ping-pong-egld/output/ping-pong-egld.wasm b/test/ping-pong-egld/output/ping-pong-egld.wasm index d233870bc..36e43940d 100755 Binary files a/test/ping-pong-egld/output/ping-pong-egld.wasm and b/test/ping-pong-egld/output/ping-pong-egld.wasm differ diff --git a/test/ping-pong-egld/scenarios/ping-pong-call-pong-all-interrupted-2.scen.json b/test/ping-pong-egld/scenarios/ping-pong-call-pong-all-interrupted-2.scen.json index 8673c8b8b..6b13d9794 100644 --- a/test/ping-pong-egld/scenarios/ping-pong-call-pong-all-interrupted-2.scen.json +++ b/test/ping-pong-egld/scenarios/ping-pong-call-pong-all-interrupted-2.scen.json @@ -21,7 +21,7 @@ "to": "sc:ping-pong", "function": "pongAll", "arguments": [], - "gasLimit": "6,500,000", + "gasLimit": "6,100,000", "gasPrice": "0" }, "expect": { @@ -44,7 +44,7 @@ }, "address:participant1": { "nonce": "2", - "balance": "1,800,000,000,000", + "balance": "1,300,000,000,000", "storage": {} }, "address:participant2": { @@ -54,19 +54,18 @@ }, "sc:ping-pong": { "nonce": "0", - "balance": "500,000,000,000", + "balance": "1,000,000,000,000", "storage": { "str:pingAmount": "500,000,000,000", "str:activationTimestamp": "780", "str:deadline": "123,780", "str:user_address_to_id|address:participant1": "1", "str:user_id_to_address|0x0000001": "address:participant1", - "str:userStatus|0x0000001": "2", + "str:userStatus|0x0000001": "1", "str:user_address_to_id|address:participant2": "2", "str:user_id_to_address|0x0000002": "address:participant2", "str:userStatus|0x0000002": "1", - "str:user_count": "2", - "str:pongAllLastUser": "1" + "str:user_count": "2" }, "code": "file:../output/ping-pong-egld.wasm" } diff --git a/test/wegld-swap/output/multiversx-wegld-swap-sc.wasm b/test/wegld-swap/output/multiversx-wegld-swap-sc.wasm index 2dc8c42f5..6a7b3f42e 100755 Binary files a/test/wegld-swap/output/multiversx-wegld-swap-sc.wasm and b/test/wegld-swap/output/multiversx-wegld-swap-sc.wasm differ