diff options
author | Dimitry <dimitry@ethereum.org> | 2018-08-28 22:14:59 +0800 |
---|---|---|
committer | Dimitry <dimitry@ethereum.org> | 2018-08-28 22:14:59 +0800 |
commit | e4433658bd7521066a49fd3bf1d8c86e61e393a7 (patch) | |
tree | 18408183d0b1770c67e2f9adbe22d7846e247476 /src/GeneralStateTestsFiller | |
parent | 980b4771fbe8ed4a5429e0feeadf4ae07a2b8929 (diff) | |
download | tangerine-tests-e4433658bd7521066a49fd3bf1d8c86e61e393a7.tar tangerine-tests-e4433658bd7521066a49fd3bf1d8c86e61e393a7.tar.gz tangerine-tests-e4433658bd7521066a49fd3bf1d8c86e61e393a7.tar.bz2 tangerine-tests-e4433658bd7521066a49fd3bf1d8c86e61e393a7.tar.lz tangerine-tests-e4433658bd7521066a49fd3bf1d8c86e61e393a7.tar.xz tangerine-tests-e4433658bd7521066a49fd3bf1d8c86e61e393a7.tar.zst tangerine-tests-e4433658bd7521066a49fd3bf1d8c86e61e393a7.zip |
create2 init code tests
Diffstat (limited to 'src/GeneralStateTestsFiller')
-rw-r--r-- | src/GeneralStateTestsFiller/stCreate2/create2InitCodesFiller.json | 193 | ||||
-rw-r--r-- | src/GeneralStateTestsFiller/stCreate2/create2noCashFiller.json | 103 |
2 files changed, 296 insertions, 0 deletions
diff --git a/src/GeneralStateTestsFiller/stCreate2/create2InitCodesFiller.json b/src/GeneralStateTestsFiller/stCreate2/create2InitCodesFiller.json new file mode 100644 index 000000000..fb8031b85 --- /dev/null +++ b/src/GeneralStateTestsFiller/stCreate2/create2InitCodesFiller.json @@ -0,0 +1,193 @@ +{ + "create2InitCodes" : { + "_info" : { + "comment" : "testing different byte opcodes inside create2 init code" + }, + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "1000000", + "currentNumber" : "1", + "currentTimestamp" : "1000", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : 0, + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "9ccb06046c674d1a423c968d7998235bc33d40c1" : { + "nonce" : "1" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "storage" : { + "0x00" : "0x9ccb06046c674d1a423c968d7998235bc33d40c1" + } + } + } + }, + { + "indexes" : { + "data" : [1,2,3], + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "shouldnotexist" : "1" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + } + } + }, + { + "indexes" : { + "data" : [4], + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "d46f8d2a93844fb23d8a2803a615f3d00849b8ab" : { + "storage" : { + "0x01" : "0x01", + "0x02" : "0x01" + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + } + } + }, + { + "indexes" : { + "data" : [5], + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "adf52aafb61364f699f9b15ee605ef82dca7f53d" : { + "shouldnotexist" : "1" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "storage" : { + "0x00" : "0xadf52aafb61364f699f9b15ee605ef82dca7f53d" + } + } + } + }, + { + "indexes" : { + "data" : [6], + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "adf52aafb61364f699f9b15ee605ef82dca7f53d" : { + "shouldnotexist" : "1" + }, + "0000000000000000000000000000000000000001" : { + "balance" : "1" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "storage" : { + "0x00" : "0xadf52aafb61364f699f9b15ee605ef82dca7f53d" + } + } + } + }, + { + "indexes" : { + "data" : [7], + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "0x52b620d9a3fd03486496061138825a08b4da501f" : { + "nonce" : "1" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "storage" : { + "0x00" : "0x52b620d9a3fd03486496061138825a08b4da501f" + } + } + } + }, + { + "indexes" : { + "data" : [8], + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "5210981ae8161a02a1b7e37452ae142aedc66ea3" : { + "nonce" : "1", + "balance" : "1" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "storage" : { + "0x00" : "0x5210981ae8161a02a1b7e37452ae142aedc66ea3" + } + } + } + } + ], + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "", + "nonce" : "0", + "storage" : { + } + } + }, + "transaction" : { + "data" : [ + "{ (MSTORE8 0 0x00 ) (SSTORE 0 (CREATE2 0 0 1 0)) }", + "{ (MSTORE8 0 0x56 ) (SSTORE 0 (CREATE2 0 0 1 0)) }", + "{ (MSTORE8 0 0x01 ) (SSTORE 0 (CREATE2 0 0 1 0)) }", + "{ (MSTORE8 0 0xf4 ) (SSTORE 0 (CREATE2 0 0 1 0)) }", + "{ (MSTORE 0 0x6001600155600154600255 ) (SSTORE 0 (CREATE2 0 21 11 0)) }", + "{ (MSTORE 0 0x6001ff ) (SSTORE 0 (CREATE2 0 29 3 0)) }", + "{ (MSTORE 0 0x6001ff ) (SSTORE 0 (CREATE2 1 29 3 0)) }", + "{ (SSTORE 0 (CREATE2 0 29 3 0)) }", + "{ (MSTORE 0 0x60a9 ) (SSTORE 0 (CREATE2 1 30 2 0)) }" + ], + "gasLimit" : [ + "400000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : [ + "1" + ] + } + } +} diff --git a/src/GeneralStateTestsFiller/stCreate2/create2noCashFiller.json b/src/GeneralStateTestsFiller/stCreate2/create2noCashFiller.json new file mode 100644 index 000000000..f5c06fb27 --- /dev/null +++ b/src/GeneralStateTestsFiller/stCreate2/create2noCashFiller.json @@ -0,0 +1,103 @@ +{ + "create2noCash" : { + "_info" : { + "comment" : "create2 fails with not enough cash (endowment of a new account) + inside staticcall" + }, + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x20000", + "currentGasLimit" : "1000000", + "currentNumber" : "1", + "currentTimestamp" : "1000", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "expect" : [ + { + "indexes" : { + "data" : -1, + "gas" : -1, + "value" : -1 + }, + "network" : ["Byzantium"], + "result" : { + "12aaefbc0350a026228076e5369e6ce148ce67be" : { + "shouldnotexist" : "1" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + } + } + }, + { + "indexes" : { + "data" : [0,2], + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "e2b35478fdd26477cc576dd906e6277761246a3c" : { + "balance" : "100" + }, + "12aaefbc0350a026228076e5369e6ce148ce67be" : { + "shouldnotexist" : "1" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + } + } + }, + { + "indexes" : { + "data" : 1, + "gas" : -1, + "value" : -1 + }, + "network" : [">=Constantinople"], + "result" : { + "e2b35478fdd26477cc576dd906e6277761246a3c" : { + "balance" : "0" + }, + "12aaefbc0350a026228076e5369e6ce148ce67be" : { + "balance" : "101" + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "nonce" : "1" + } + } + } + ], + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "1000000000000000000", + "code" : "0x", + "nonce" : "0", + "storage" : { + } + }, + "e2b35478fdd26477cc576dd906e6277761246a3c" : { + "balance" : "100", + "code" : "{ (CREATE2 101 0 0 0) }", + "nonce" : "0", + "storage" : {} + } + }, + "transaction" : { + "data" : [ + "{ (CALL 150000 0xe2b35478fdd26477cc576dd906e6277761246a3c 0 0 0 0 0) }", + "{ (CALL 150000 0xe2b35478fdd26477cc576dd906e6277761246a3c 1 0 0 0 0) }", + "{ (STATICCALL 150000 0xe2b35478fdd26477cc576dd906e6277761246a3c 0 0 0 0) }" + ], + "gasLimit" : [ + "400000" + ], + "gasPrice" : "1", + "nonce" : "0", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : [ + "1" + ] + } + } +} |