Skip to main content
As you can imagine, if your deployed contract instance or the code that backs it is archived, it can’t be loaded to execute your invocations. Remember, there’s a distinct, one-to-many relationship on the chain between a contract’s code and deployed instances of that contract: We need both to be live for our contract calls to work. Let’s work through how these can be recovered. The recovery process is slightly different for a convenient reason: we don’t need simulation to figure out the footprints. Instead, we can leverage Contract.getFootprint(), which prepares a footprint with the ledger keys used by a given contract instance (including its backing WASM code). Unfortunately, we still need simulation to figure out the fees for our restoration. This, however, can be easily covered by the SDK’s Server.prepareTransaction() helper, which will do simulation and assembly for us.
This guide makes use of the (aptly named) submitTx function we created in another guide.