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

Set log handlers as internal virtual instead of private #138

Open
fastackl opened this issue May 18, 2024 · 2 comments
Open

Set log handlers as internal virtual instead of private #138

fastackl opened this issue May 18, 2024 · 2 comments

Comments

@fastackl
Copy link

fastackl commented May 18, 2024

image

These helpers are very useful and would be great to be able to inherit and optionally override instead of having to rewrite in derived contracts. That contract size limit can sneak up on you.

Unless there's a reason these are set to private instead of internal virtual 🤔

@fastackl fastackl changed the title Set log handlers as internal instead of private Set log handlers as internal virtual instead of private May 18, 2024
@Vectorized
Copy link
Owner

These stuff use some extremely dangerous memory tricks tho. It’s like handling super sharp knifes.

@fastackl
Copy link
Author

Yup I agree. My use case is I want to fire off mirror transfer events in a derived contract. I don't need to modify the packed log handlers, just access them.

But if I can't inherit these beautiful handlers then the only way to fire these events (other than rewrite something myself) is to copy paste the packed log handlers in my derived contract.

I.e. setting as private doesn't stop devs from handling knives anyway just forces devs to duplicate code 😅

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

No branches or pull requests

2 participants