aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2018-04-19 21:14:47 +0800
committerYoichi Hirai <i@yoichihirai.com>2018-04-24 18:11:30 +0800
commiteac5309bd928de097c4c956ab062c3a0de7d1340 (patch)
tree99520c1869cd1c06083f4f97db727c0eed409090 /src
parent93d8efee5da17e95d88f816e40666c04a8bff636 (diff)
downloadtangerine-tests-eac5309bd928de097c4c956ab062c3a0de7d1340.tar
tangerine-tests-eac5309bd928de097c4c956ab062c3a0de7d1340.tar.gz
tangerine-tests-eac5309bd928de097c4c956ab062c3a0de7d1340.tar.bz2
tangerine-tests-eac5309bd928de097c4c956ab062c3a0de7d1340.tar.lz
tangerine-tests-eac5309bd928de097c4c956ab062c3a0de7d1340.tar.xz
tangerine-tests-eac5309bd928de097c4c956ab062c3a0de7d1340.tar.zst
tangerine-tests-eac5309bd928de097c4c956ab062c3a0de7d1340.zip
Add a test case where the same contract performs selfdestruct twice
with different addresses as the inheritor.
Diffstat (limited to 'src')
-rw-r--r--src/GeneralStateTestsFiller/stSystemOperationsTest/doubleSelfdestructTestFiller.yml64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/GeneralStateTestsFiller/stSystemOperationsTest/doubleSelfdestructTestFiller.yml b/src/GeneralStateTestsFiller/stSystemOperationsTest/doubleSelfdestructTestFiller.yml
new file mode 100644
index 000000000..acb52984a
--- /dev/null
+++ b/src/GeneralStateTestsFiller/stSystemOperationsTest/doubleSelfdestructTestFiller.yml
@@ -0,0 +1,64 @@
+doubleSelfdestructTest:
+ _info:
+ comment: |
+ The first test case required here https://github.com/ethereum/tests/issues/431#issue-306081539 .
+ Invoked Solidity 0.4.21 with solc --bin-runtime --optimize
+ contract DoubleSelfdestructTest {
+ address constant B1 = 0x1;
+ address constant B2 = 0x2;
+ function remoteSelfdestruct() external {
+ selfdestruct(B2);
+ }
+ function() external payable {
+ this.remoteSelfdestruct();
+ selfdestruct(B1);
+ }
+ }
+ env:
+ currentCoinbase: 2adc25665018aa1fe0e6bc666dac8fc2697ff9ba
+ currentDifficulty: '0x20000'
+ currentGasLimit: '10000000000'
+ currentNumber: '1'
+ currentTimestamp: '1000'
+ previousHash: 5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6
+ expect:
+ - indexes:
+ data: !!int -1
+ gas: !!int -1
+ value: !!int -1
+ network:
+ - <EIP150
+ result:
+ '0000000000000000000000000000000000000002':
+ shouldnotexist: '1'
+ - indexes:
+ data: !!int -1
+ gas: !!int -1
+ value: !!int -1
+ network:
+ - '>=EIP150'
+ result:
+ '0000000000000000000000000000000000000002':
+ balance: '1000000000000100000'
+ pre:
+ 095e7baea6a6c7c4c2dfeb977efac326af552d87:
+ balance: '1000000000000000000'
+ code: '0x606060405260043610603e5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416632c3f2bf3811460b4575b3073ffffffffffffffffffffffffffffffffffffffff16632c3f2bf36040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b151560a057600080fd5b5af1151560ac57600080fd5b506001915050ff5b341560be57600080fd5b60c460c6565b005b6002ff00a165627a7a7230582050afafcb56c38a6100bd690c100a940b5fd73919053a82fbe14e6cf89dce4c430029'
+ nonce: '0'
+ storage: {}
+ a94f5374fce5edbc8e2a8697c15331677e6ebf0b:
+ balance: '1000000000000000000'
+ code: ''
+ nonce: '0'
+ storage: {}
+ transaction:
+ data:
+ - ''
+ gasLimit:
+ - '1000000000'
+ gasPrice: '0'
+ nonce: '0'
+ secretKey: 45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8
+ to: 095e7baea6a6c7c4c2dfeb977efac326af552d87
+ value:
+ - '100000'