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
  • Input
  • Output

Was this helpful?

Edit on GitHub
  1. Reference
  2. Core
  3. Pipelines

Simulate Transaction

PreviousSoroban AuthNextSoroban Get Transaction

Last updated 1 year ago

Was this helpful?

Given a transaction object, the Simulate Transaction pipeline will communicate with the RPC server to simulate the transaction execution and receive the simulation parameters. The pipeline will throw an error in case any issues arise when communicating with the RPC server or in case the simulation wasn't successful.

It is important to note that in case any underlying state for this invocation is expired and a restore is required, the simulation will still come back as successful and move forward with the pipeline. In these cases, the output response will be of type SorobanRpc.Api.SimulateTransactionRestoreResponse. An plugin can be used to automatically perform the restore transaction before exiting the Simulate Transaction pipeline.

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

Input

type SimulateTransactionPipelineInput = {
  transaction: Transaction
  rpcHandler: RpcHandler
}
  • transaction: Transaction to be simulated with the RPC server.

  • rpcHandler: The RPC handler to be used when communicating with the RPC. Refer to the RPCsection for further details.

Output

type SimulateTransactionPipelineOutput = {
  response: SorobanRpc.Api.SimulateTransactionSuccessResponse | SorobanRpc.Api.SimulateTransactionRestoreResponse
  output?: SimulatedInvocationOutput & ResourcesOutput
  assembledTransaction: Transaction
}
  • output: Optional output to be included by different plugins, attaching specific information to the pipeline output.

response: The successful simulation response from the RPC server. This response might be either of type SorobanRpc.Api.SimulateTransactionSuccessResponse or SorobanRpc.Api.SimulateTransactionRestoreResponse from.

📄
js-stellar-sdk
AutoRestore
State Archival