Stellar Plus
  • Welcome
  • Quick Start
  • Welcome
  • Quick Start
  • 🎓Tutorials
    • Issuing your first asset
    • Bulk Payments
    • E2E Certificate of Deposit demo
    • Creating a new contract client
  • 📄Reference
    • Account
      • Base
      • Default Account Handler
      • Freighter Account Handler
    • Asset
      • Classic Asset Handler
      • Stellar Asset Contract Handler
      • Soroban Token Handler
    • Network
    • Contract Clients
      • Certificate of Deposit Client
    • Core
      • Contract Engine
      • Pipelines
        • Build Transaction
        • Classic Signing Requirements
        • Fee Bump
        • Sign Transaction
        • Soroban Auth
        • Simulate Transaction
        • Soroban Get Transaction
        • Submit Transaction
        • Soroban Transaction
        • Classic Transaction
    • Utils
      • Plugins
        • Fee Bump Plugin
        • Channel Accounts Plugin
        • Auto Restore Plugin
        • Profiler Plugin
      • Pipeline
        • Conveyor Belt
        • Multi-belt Pipeline
    • RPC
      • Default RPC Handler
      • Validation Cloud RPC Handler
    • Horizon Handler
Powered by GitBook
On this page
  • Setup
  • postProcess

Was this helpful?

Edit on GitHub
  1. Reference
  2. Utils
  3. Plugins

Auto Restore Plugin

PreviousChannel Accounts PluginNextProfiler Plugin

Last updated 1 year ago

Was this helpful?

The Auto Restore plugin can be used to automatically perform a restore transaction whenever a soroban transaction simulation identifies archived states that would interfere with the transaction execution.

For further details on this scenario, refer to Soroban's official documentation on .

  • Pipeline Type: Simulate Transaction

  • Supported Pipelines:

    • Simulate Transaction

    • Soroban Transaction - Targets its inner pipeline.

    • Classic Transaction- Targets its inner pipeline.

Setup

Constructor arguments:

  • networkConfig: A network configuration. Refer to Network

  • customRpcHandler: An optional custom RPC handler to be used for this transaction.

postProcess

During the postProcess of the Simulate Transaction pipeline, the Auto Restore plugin will verify if the response of the simulation indicates a restore is required. In case yes, it will perform the following steps:

  1. Extract the restorePreamble from the simulation

  2. Build a restore transaction with its parameters and the restorePreamble

  3. Execute the transaction

  4. Verify if the original transaction's source was the same as the restore transaction and bumps its sequence number if necessary.

Afterward, the Simulation Pipeline will proceed with the postProcess step before exiting.

restoreTxInvocation: An object of a Transaction Invocation to parametrize the restore transaction. If a Fee Bump header is present, the transaction will use the to wrap the transaction with this header.

📄
Fee Bump plugin
State Archival