dn404 icon indicating copy to clipboard operation
dn404 copied to clipboard

Set log handlers as internal virtual instead of private

Open fastackl opened this issue 1 year ago • 2 comments

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 avatar May 18 '24 07:05 fastackl

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

Vectorized avatar May 19 '24 21:05 Vectorized

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 😅

fastackl avatar May 20 '24 04:05 fastackl