Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advantages of anynomous events. #6791

Merged
merged 1 commit into from
May 20, 2019
Merged

Advantages of anynomous events. #6791

merged 1 commit into from
May 20, 2019

Conversation

chriseth
Copy link
Contributor

Fixes #6785

@chriseth chriseth merged commit c2c44ff into develop May 20, 2019
@guylando
Copy link
Contributor

@chriseth

  1. when you say that they are cheaper to deploy and call, is that by a significant margin? is it worth the loss of ability of searching the event by name?
  2. if such events are used then how will it be possible to analyze those events data if there is more than one anonymous event? by the parameters?
  3. maybe it could be recommended to always make one of the events anonymous and then it will be easy to distinguish the logs emmited by it compared to the named events?

For me personally it is still unclear when to consider changing an event to be anonymous and how to be able to analyze this event logs.
I don't think I saw anonymous events anywhere in OpenZeppelin contracts or anywhere else. So maybe other people don't fully understand those aspects too.

@chriseth
Copy link
Contributor Author

@guylando the gas costs always vary. It also depends on whether deploy-time cost is more valuable to you or whether run-time gas is more important.

Nobody said anonymous events are very useful. I would say the documentation contains all the facts, but it should not draw any conclusions if the conclusions are not easy to draw. If you only have a single event in your contract, then it probably makes sense to make it anonymous.

@guylando
Copy link
Contributor

That is a great use case, thanks

@axic axic deleted the anonymousEvents branch May 20, 2019 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing documentation for the purpose of using anonymous events (not the what but the why)
3 participants