Deleted smart contract can be called successfully
Closed this issue · 3 comments
Description
A Discord member reported that he can called a deleted smart contract successfully. I can also reproduce the problem. Is this an expected behavior?
This is the transaction that deleted the contract
https://hashscan.io/testnet/transaction/1707474184.595911029
This is the transaction that call a smart contract function
https://hashscan.io/testnet/transaction/1707474281.929755003
Note: the transaction will only succeed if I call a function to change state. Querying a smart contract returns CONTRACT_DELETED
as expected.
Steps to reproduce
- Create a smart contract
- Delete the smart contract
- Call the smart contract function
Additional context
No response
Hedera network
testnet
Version
latest
Operating system
None
@pathornteng Can you please attach the smart contract code you used to reproduce this issue? I can reproduce this partially, in that I am seeing what maybe an issue with selfdestruct
, but I see in hashscan and the mirror node that your contract is in a deleted state and mine is not. More information will be helpful here.
Related issue in services hashgraph/hedera-services#11664 is closed with a fix that went in to 0.49. Consider whether this issue is now closed? Also, remember that with Cancun changes - in 0.50 - selfdestruct no longer deletes contracts! (unless they were created in the exact same transaction that self destructs them)