You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need both the previous and the current value of an arbitrary table in a hook
Then I either form the updated value in onBefore using hook arguments, which can get very complex with splices and all the different hooks
Or I pass the previous value from onBefore to onAfter using some storage stack, which can get gas intensive (and possibly leaky?)
I think having onBefore return a memory blob, and onAfter accept it as an argument would significantly improve this issue.
It's simple enough and I can PR it if you agree with the idea
On the other hand it's not a significant issue, especially if you think this solution would cause more problems
Perhaps this could apply to system hook too, but I don't have a use-case in mind
The text was updated successfully, but these errors were encountered:
I need both the previous and the current value of an arbitrary table in a hook
onBefore
using hook arguments, which can get very complex with splices and all the different hooksonBefore
toonAfter
using some storage stack, which can get gas intensive (and possibly leaky?)I think having
onBefore
return a memory blob, andonAfter
accept it as an argument would significantly improve this issue.It's simple enough and I can PR it if you agree with the idea
On the other hand it's not a significant issue, especially if you think this solution would cause more problems
Perhaps this could apply to system hook too, but I don't have a use-case in mind
The text was updated successfully, but these errors were encountered: