-
Notifications
You must be signed in to change notification settings - Fork 969
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
Emit Event for initializer
and saltNonce
data
#849
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- How much additional guess does it consume? In other words, does the difference justify an extra function?
- Personal opinion: Our previous
L2
naming created a lot of confusion for the developers, who thought that such contracts should be used exclusively on L2s. I'd suggest the naming to be more descriptive of what's actually happening: e.g.,createProxyWithNonceEmitExtraEvent
I haven't checked, but the gas cost will be dynamic based on the
The extra function is to keep the backward compatibility with the previous method and for networks which doesn't require this extra event for decoding the safe creation.
I followed the same convention as we used |
I suggested the
I think there is a non-trivial amount of gas to emit an additional event (we don't want to replace the event for compatibility reasons). This event is only needed on chains without tracing support (i.e. same compatibility concerns with @remedcu - can you exactly quantify the difference in gas units for calling |
In my opinion, I would not stick to this convention as it confuses people and is just incorrect. We use SafeL2 on gnosis chain, polygon, aurora, bnb, avalanche, but they're not L2s. But I also see the argument for sticking to the convention, so it's not a blocker. |
Based on some changes to the benchmark test, these are the results:
So, 2470 gas per creation extra without setup call (initializer as |
So, I was wondering about a different benchmark 😅:
And compare this with the current cost of a |
Current
New
|
Thanks for the detailed analysis! Personally, I like how it was implemented here (with the double event emitted for extra compatibility!). |
As part of improving the capabilities for indexing safe creation data, a new set of functions is introduced which emits an extra event named
ProxyCreationL2
which also emits theinitializer
andsaltNonce
. The previous function remains the same for backward compatibility.