-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(protocol): use 35000 as gas limit for sending Ether in Brdge #16666
Conversation
feat(protocol): use 35000 as gas limit for sending Ether in Brdge
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
As far as I understand, the cost for most ETH transfer related costs is charged on the call itself, not inside the call. So the gas passed into I think could be set much lower. There's also already an automatic stipend of 2300 gas. My feeling is that 60k gas is quite high, on the other hand it's also quite critical that people can count on the refund to work even if the refund address is a smart contract that may contain some fancy logic. Taking that into account I think 60k is reasonable. I think we shouldn't make it a general gas limit though for all ETH transfers everywhere, if a limit makes sense for the refund I think we should just specify a gas limit there. |
I read it as: we don't need to adopt this change. I'm ok without this PR merged. |
Adding this limit to the refund ETH transfer I think makes sense because something the relayer does have to pay the cost for so a risk (depending on how sophisticated the relayer is). I'm just not sure about adding this limit to all ETH transfers because those transfers mostly do not have the same concern. But I'm not against it to keep things simple and uniform. |
I changed to use the 35K gas limit only in Bridge. |
This is based on OZ's feedback:
BTW, according to ChatGPT:
@Brechtpd do you think 60000 is a good number?