3

Let's say there is a Smart Contract and different participants of the network interact with it. Under certain conditions (e.g. a certain method has been executed) there shall be no way to further interact with the Smart Contract anymore but the Smart Contract itself shall still exist ("sealing").

I could define a global variable like "_complete" and set it to true, but I literally want to avoid the ability to interact with it except for retrieving the actual code.

Question 1: is there a way to achieve that?

Question 2: if I use selfdestruct -> what actually remains of the Smart Contract and the interactions respectively the data (like variable values)? Does the address still exist and are there any references left in terms of the Smart Contract?

Thanks

1

Q1: You can have an emergency stop to "freeze" contract functions. Example: https://github.com/ConsenSys/smart-contract-best-practices/#circuit-breakers-pause-contract-functionality

Q2: My understanding is the ByteCode of the contract is zeroed out in the current state. It can't run. What remains is the original transaction that deployed the contract, which still includes the contract ByteCode, the contract address which still accepts ETH (unrecoverable/burned) and the blockchain history that shows the complete evolution and history of the contract up to and including the transaction that triggered self-destruction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.