From 1f9a25fdc7c68ab9e0d9b6587f90c2d62b820a67 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Mon, 26 Jun 2017 14:54:34 +0200 Subject: Add a test about STATICCALL not inheriting the callvalue This test failw on cpp-ethereum:develop but succeeds on cpp-ethereum:fix-staticcall --- .../static_call_value_inheritFiller.json | 70 ++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 src/GeneralStateTestsFiller/stStaticCall/static_call_value_inheritFiller.json (limited to 'src/GeneralStateTestsFiller') diff --git a/src/GeneralStateTestsFiller/stStaticCall/static_call_value_inheritFiller.json b/src/GeneralStateTestsFiller/stStaticCall/static_call_value_inheritFiller.json new file mode 100644 index 000000000..09c9a9748 --- /dev/null +++ b/src/GeneralStateTestsFiller/stStaticCall/static_call_value_inheritFiller.json @@ -0,0 +1,70 @@ +{ + "static_call_value_inherit" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x020000", + "currentGasLimit" : "10000000", + "currentNumber" : "1", + "currentTimestamp" : "1000", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Metropolis"], + "result" : { + "094f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "storage" : { + "0x0" : "0x1", + "0x1" : "0x0" + } + } + } + } + ], + "pre" : + { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + }, + "094f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1", + "code" : "{ [[0]] (STATICCALL 50000 0xc94f5374fce5edbc8e2a8697c15331677e6ebf0b 0 0 0 32) [[1]] (MLOAD 0) }", + "nonce" : "0", + "storage" : { + "0x1": "1" + } + }, + "c94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1", + "code" : "{ (MSTORE 0 (CALLVALUE)) (RETURN 0 32) }", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "" + ], + "gasLimit" : [ + "460000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "094f5374fce5edbc8e2a8697c15331677e6ebf0b", + "value" : [ + "10" + ] + } + } +} -- cgit