-
Notifications
You must be signed in to change notification settings - Fork 445
Description
In OnAcknowledgementPacket
and OnTimeoutPacket
, an error causes the entire tx to revert.
In the multipayload case, this means that a single payload returning an error will cause all payloads to never complete.
One simple solution to this is to call each payload individually. IF there's an error, we revert just that payload call but then continue executing the other payloads. This ensures that if transfer is coupled with another application, then transfer can still succeed and refund tokens even if the other application fails in its callback.
Another side benefit is that the core changes are also committed so commitment is cleared and prevents resubmissions that will be rejected anyway. This is a benefit even for the single payload case.
cc: @srdtrk