Skip to main content
The manual operation (RestoreFootprintOp) is, for the most part, no longer needed starting in Protocol 23, as archived entries are automatically restored during InvokeHostFunctionOp when simulation includes them in the transaction’s restore list. RestoreFootprintOp can be used in rare use cases described in this section.
This is a pretty likely occurrence: my piece of persistent data is archived because I haven’t interacted with my contract in a while. How do I make it accessible again? If you find that a piece of persistent data is archived, it can be restored using a Stellar transaction containing a RestoreFootprintOp operation. We’ll make two assumptions for the sake of this guide:
  • The contract instance itself is still live (i.e., others have been extending its TTL while you’ve been away).
  • You don’t know how your archived data is represented on the ledger.
The restoration process we’ll use involves three discrete steps:
  1. Simulate our transaction as we normally would.
  2. If the simulation indicated it, we perform restoration with a RestoreFootprintOp operation using the hints we got from the simulation.
  3. We retry running our initial transaction.
Here’s a function called submitOrRestoreAndRetry() that will take care of all those steps for us:
This guide makes use of the (aptly named) submitTx function we created in another guide.