diff --git a/test/functional/contracts/Suicide.sol b/test/functional/contracts/SelfDestruct.sol similarity index 92% rename from test/functional/contracts/Suicide.sol rename to test/functional/contracts/SelfDestruct.sol index 84a0581375..996a7cf8eb 100644 --- a/test/functional/contracts/Suicide.sol +++ b/test/functional/contracts/SelfDestruct.sol @@ -2,7 +2,7 @@ pragma solidity >=0.7.0 <0.9.0; -contract SuicideContract { +contract SelfDestructContract { address public owner; constructor() { diff --git a/test/functional/feature_evm.py b/test/functional/feature_evm.py index d9ea8ad6e1..2704cb3211 100755 --- a/test/functional/feature_evm.py +++ b/test/functional/feature_evm.py @@ -1393,7 +1393,7 @@ def delete_account_from_trie(self): ) # Touch addressB and trigger deletion as empty account self.nodes[0].generate(1) - # Deploy Suicide contract to trigger deletion via Suicide opcode + # Deploy SelfDestruct contract to trigger deletion via SELFDESTRUCT opcode self.nodes[0].transferdomain( [ { @@ -1408,8 +1408,10 @@ def delete_account_from_trie(self): ) self.nodes[0].generate(1) - self.contract = EVMContract.from_file("Suicide.sol", "SuicideContract") - abi, bytecode, _ = self.contract.compile() + self.contract = EVMContract.from_file( + "SelfDestruct.sol", "SelfDestructContract" + ) + abi, bytecode, deployedBytecode = self.contract.compile() compiled = self.nodes[0].w3.eth.contract(abi=abi, bytecode=bytecode) tx = compiled.constructor().build_transaction( @@ -1438,8 +1440,8 @@ def delete_account_from_trie(self): codeBefore = self.nodes[0].eth_getCode(self.contract_address) assert_equal( - codeBefore, - "0x608060405234801561000f575f80fd5b5060043610610034575f3560e01c80638da5cb5b14610038578063bcea363d14610056575b5f80fd5b610040610072565b60405161004d919061017a565b60405180910390f35b610070600480360381019061006b91906101d2565b610095565b005b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f8054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610122576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101199061027d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16ff5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6101648261013b565b9050919050565b6101748161015a565b82525050565b5f60208201905061018d5f83018461016b565b92915050565b5f80fd5b5f6101a18261013b565b9050919050565b6101b181610197565b81146101bb575f80fd5b50565b5f813590506101cc816101a8565b92915050565b5f602082840312156101e7576101e6610193565b5b5f6101f4848285016101be565b91505092915050565b5f82825260208201905092915050565b7f4f6e6c7920746865206f776e65722063616e2063616c6c20746869732066756e5f8201527f6374696f6e000000000000000000000000000000000000000000000000000000602082015250565b5f6102676025836101fd565b91506102728261020d565b604082019050919050565b5f6020820190508181035f8301526102948161025b565b905091905056fea26469706673582212205b57b3041b7e5425acf700e1f8f9234843547f79875ac6a6f66417bc1329c3ce64736f6c63430008140033", + codeBefore[2:], + deployedBytecode, ) storageBefore = self.nodes[0].eth_getStorageAt(self.contract_address, "0x0") assert_equal( @@ -1463,16 +1465,16 @@ def delete_account_from_trie(self): hash = self.nodes[0].w3.eth.send_raw_transaction(signed.rawTransaction) self.nodes[0].generate(1) - codeAfterSuicide = self.nodes[0].eth_getCode(self.contract_address) + codeAfterSelfDestruct = self.nodes[0].eth_getCode(self.contract_address) assert_equal( - codeAfterSuicide, + codeAfterSelfDestruct, "0x", ) - storageAfterSuicide = self.nodes[0].eth_getStorageAt( + storageAfterSelfDestruct = self.nodes[0].eth_getStorageAt( self.contract_address, "0x0" ) assert_equal( - storageAfterSuicide, + storageAfterSelfDestruct, "0x0000000000000000000000000000000000000000000000000000000000000000", )