diff options
author | Adrian Sutton <adrian.sutton@consensys.net> | 2018-11-12 07:50:39 +0800 |
---|---|---|
committer | Adrian Sutton <adrian.sutton@consensys.net> | 2018-11-12 07:50:39 +0800 |
commit | bd72064a878503191819b562ce0454f583fc0c81 (patch) | |
tree | a4995c66d0adb8b554e88f63cffb64636dcfada0 /src/GeneralStateTestsFiller | |
parent | e98f0866a20839581ec3d3c79d8d6c2e81a2d1a4 (diff) | |
download | tangerine-tests-bd72064a878503191819b562ce0454f583fc0c81.tar tangerine-tests-bd72064a878503191819b562ce0454f583fc0c81.tar.gz tangerine-tests-bd72064a878503191819b562ce0454f583fc0c81.tar.bz2 tangerine-tests-bd72064a878503191819b562ce0454f583fc0c81.tar.lz tangerine-tests-bd72064a878503191819b562ce0454f583fc0c81.tar.xz tangerine-tests-bd72064a878503191819b562ce0454f583fc0c81.tar.zst tangerine-tests-bd72064a878503191819b562ce0454f583fc0c81.zip |
Add test case for a contract executing EXTCODEHASH with a dynamic argument.
Diffstat (limited to 'src/GeneralStateTestsFiller')
-rw-r--r-- | src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDynamicArgumentFiller.json | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDynamicArgumentFiller.json b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDynamicArgumentFiller.json new file mode 100644 index 000000000..5ae89827e --- /dev/null +++ b/src/GeneralStateTestsFiller/stExtCodeHash/extCodeHashDynamicArgumentFiller.json @@ -0,0 +1,93 @@ +{ + "extCodeHashDynamicArgument" : { + "_info" : { + "comment": "EXTCODEHASH/EXTCODESIZE with address from a dynamic argument" + }, + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "1000000", + "currentNumber" : "1", + "currentTimestamp" : "1000", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect": [ + { + "indexes": { + "data": -1, + "gas": -1, + "value": -1 + }, + "network": [ + ">Byzantium" + ], + "result": { + "deadbeef00000000000000000000000000000000": { + "balance": "1000000000000000001", + "storage": { + "0x00": "0x56570de287d73cd1cb6092bb8fdee6173974955fdef345ae579ee9f475ea7432", + "0x01": "0x02" + } + } + } + }, + { + "indexes": { + "data": -1, + "gas": -1, + "value": -1 + }, + "network": [ + "<=Byzantium" + ], + "result": { + "deadbeef00000000000000000000000000000000": { + "balance": "1000000000000000000", + "storage": { + "0x00": "0xdeadbeef" + } + } + } + } + ], + "pre": { + "deadbeef00000000000000000000000000000000": { + "balance": "1000000000000000000", + "code": "{ [[0]] (EXTCODEHASH (CALLDATALOAD 0)) [[1]] (EXTCODESIZE (CALLDATALOAD 0)) }", + "nonce": "0", + "storage": { + "0x00": "0xdeadbeef" + } + }, + "deadbeef00000000000000000000000000000001" : { + "balance" : "1000000000000000000", + "code" : "0x1234", + "nonce" : "0", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b": { + "balance": "1000000000000000000", + "code": "0x", + "nonce": "0", + "storage": { + } + } + }, + "transaction": { + "data": [ + "0x000000000000000000000000deadbeef00000000000000000000000000000001" + ], + "gasLimit": [ + "400000" + ], + "gasPrice": "1", + "nonce": "0", + "secretKey": "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to": "deadbeef00000000000000000000000000000000", + "value": [ + "1" + ] + } + } +} |