Important adjustments to the batch function #1124
Labels
effort: medium
Default level of effort.
priority: 1
This is important. It should be dealt with shortly.
type: feature
New feature or request.
type: refactor
Change that neither fixes a bug nor adds a feature.
work: clear
Sense-categorize-respond. The relationship between cause and effect is clear.
Context
I've recently tweeted about our batch function, and it turned out to be a productive exercise, as we have received a lot of great feedback in the replies.
Changes
I've parsed through all replies, and I would like us to make the following changes to
batch
:msg.value
; quote this articleRationale
Why return the results?
batch
is used.I've made a gas comparison:
So it's only 4422 extra gas for creating two streams, i.e., extra ~2.2k gas per created streams. Small price to pay.
Resources
Check out PRBProxy for inspiration on how to bubble up the revert, as well as this StackExchange Q&A.
Note: unlike in PRBProxy, let's NOT revert with a custom error when the revert
response
is empty. Let's just bubble it up empty, as is.The text was updated successfully, but these errors were encountered: