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
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.
In
OnAcknowledgementPacket
andOnTimeoutPacket
, 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
The text was updated successfully, but these errors were encountered: