3

Are event logs still retrievable for a contract after selfdestruct? Does fast sync or full sync in geth have any effect on this?

Basically, it looks like it would be useful to Ethereum if my contracts self-destructed after use(to remove them from the current state) but I still need to be sure I can access the logs for these contracts.

1 Answer 1

4

Logs are stored in transaction receipts. They are not removed, which means you still can access them after the selfdestruct.

2
  • Does this also hold for the events emitted in the same transaction that destructed the contract? Jun 14, 2018 at 14:16
  • Yes. You‘ll have the events in the transaction log.
    – ivicaa
    Jun 14, 2018 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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