Recover an ICRC-1 transfer after losing its response

A ledger that supports time-based deduplication can identify a repeated transfer when the caller preserves the original transfer arguments.

Persist the request before sending

Store the sending account, ledger, destination, amount, fee choice, memo and created_at_time in nanoseconds. Following a lost reply, retry under the same caller with the same request within the ledger's permitted window. A new timestamp can describe another transfer even when the business invoice is unchanged.

attempt 1: destination D, amount 100, memo M, created_at_time T
retry:     destination D, amount 100, memo M, created_at_time T
Duplicate { duplicate_of = 746 }

Interpret duplicate and expired outcomes

In the example, duplicate_of points to the existing transaction at index 746. Attach that index to the invoice and reconcile the transfer details. A TooOld result on a later attempt does not reveal whether the earlier transfer succeeded. Inspect ledger history before creating a fresh payment.

Sources