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.

3

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

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

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.