3

Is it beneficial to use events to store data when possible. I'd like to avoid storing excess data, as the data is only a reference for the outside world and has no functionality within that contract.

1 Answer 1

4

Yes, you can save gas by using events instead of permanent storage. If the data is not needed in the contract itself, this makes a lot of sense.

See https://media.consensys.net/technical-introduction-to-events-and-logs-in-ethereum-a074d65dd61e for a description of this use case.

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.