|
| 1 | +doubleSelfdestructTest2: |
| 2 | + _info: |
| 3 | + comment: | |
| 4 | + The second test case requested here https://github.com/ethereum/tests/issues/431#issue-306081539 . |
| 5 | + Invoked Solidity 0.4.21 with solc --bin-runtime --optimize |
| 6 | + contract DoubleSelfdestructTest2 { |
| 7 | + address constant B = 0x3; |
| 8 | + function remoteSelfdestruct() external { |
| 9 | + selfdestruct(this); |
| 10 | + } |
| 11 | + function() external payable { |
| 12 | + this.remoteSelfdestruct(); |
| 13 | + selfdestruct(B); |
| 14 | + } |
| 15 | + } |
| 16 | + The version of Solidity emits code that always enter OOG for Homestead and Frontier. So no new accounts |
| 17 | + are created for Homestead and Frontier. EIP158 changes the behavior of zero-amount transfer so that no new accounts are created. |
| 18 | + This leaves EIP150 as a special case. |
| 19 | + env: |
| 20 | + currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba |
| 21 | + currentDifficulty: '0x20000' |
| 22 | + currentGasLimit: '10000000000' |
| 23 | + currentNumber: '1' |
| 24 | + currentTimestamp: '1000' |
| 25 | + previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6 |
| 26 | + expect: |
| 27 | + - indexes: |
| 28 | + data: !!int -1 |
| 29 | + gas: !!int -1 |
| 30 | + value: !!int -1 |
| 31 | + network: |
| 32 | + - '<EIP150' |
| 33 | + - '>EIP150' |
| 34 | + result: |
| 35 | + '0000000000000000000000000000000000000003': |
| 36 | + shouldnotexist: '1' |
| 37 | + - indexes: |
| 38 | + data: !!int -1 |
| 39 | + gas: !!int -1 |
| 40 | + value: !!int -1 |
| 41 | + network: |
| 42 | + - 'EIP150' |
| 43 | + result: |
| 44 | + '0000000000000000000000000000000000000003': |
| 45 | + balance: '0' |
| 46 | + pre: |
| 47 | + 095e7baea6a6c7c4c2dfeb977efac326af552d87: |
| 48 | + balance: '1000000000000000000' |
| 49 | + code: '0x606060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632c3f2bf3811460b4575b3073ffffffffffffffffffffffffffffffffffffffff16632c3f2bf36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b151560a057600080fd5b5af1151560ac57600080fd5b506003915050ff5b341560be57600080fd5b60c460c6565b005b3073ffffffffffffffffffffffffffffffffffffffff16ff00a165627a7a7230582004c215a78ad0add6ec7f9e2488a74efe60734d3dfe25da652ef8ac9dae892c4a0029' |
| 50 | + nonce: '0' |
| 51 | + storage: {} |
| 52 | + a94f5374fce5edbc8e2a8697c15331677e6ebf0b: |
| 53 | + balance: '1000000000000000000' |
| 54 | + code: '' |
| 55 | + nonce: '0' |
| 56 | + storage: {} |
| 57 | + transaction: |
| 58 | + data: |
| 59 | + - '' |
| 60 | + gasLimit: |
| 61 | + - '1000000000' |
| 62 | + gasPrice: '0' |
| 63 | + nonce: '0' |
| 64 | + secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8 |
| 65 | + to: 095e7baea6a6c7c4c2dfeb977efac326af552d87 |
| 66 | + value: |
| 67 | + - '100000' |
0 commit comments