> For the complete documentation index, see [llms.txt](https://docs.inverter.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inverter.network/sdk/typescript-sdk/simulate-a-workflow.md).

# Simulate a Workflow

## **Setup Requirements**

* **Set up Inverter Network SDK**: Refer to the[ Quick Start](/sdk/typescript-sdk.md) guide for detailed instructions.

As we support multicall functionality there is a case for simulating a workflow deployment which enables us to retreive certain addresses before they exist.

{% hint style="info" %}
*( optional )* You can pass in a ModuleData typed object into the `requestedModules` constant's fields, this makes it so that you can work with your self managed inverter modules
{% endhint %}

```typescript
// EXEMPLE MixedRequestedModules USAGE
import type { ModuleData, MixedRequestedModules } from '@inverter-network/sdk'

const AUT_Roles_v1 = {'<your_module_data>'} as const satisifies ModuleData

const requestedModules = {
    fundingManager: 'FM_DepositVault_v1',
    paymentProcessor: 'PP_Simple_v1',
    authorizer: AUT_Roles_v1,
} as const satisfies MixedRequestedModules
```

***

## Simulating the Workflow Deployment

**Parameters**

* **`requestedModules` (required)**:\
  This parameter defines the modules which will be simulated.
* `args` **(required)**:\
  This parameter is used to tell the simulations what the modules arguments are.
* `tagConfig` **(optional)**:\
  This parameter is to tell the arg's parser how to parse the arguments.
* `useTags` **(optional):**\
  This parameter is to optionally disable auto format parse for inputs and outputs (default true).

{% code overflow="wrap" %}

```typescript
import { sdk } from '<your_sdk_export>'
import type { GetDeployWorkflowArgs } from '@inverter-network/sdk'

const { getSimulatedWorkflow } = sdk

// Should either be `as const` or be passed dirrectly in the `requestedModules`
const requestedModules = {
    fundingManager: 'FM_DepositVault_v1',
    paymentProcessor: 'PP_Simple_v1',
    authorizer: 'AUT_Roles_v1'
} as const satisfies MixedRequestedModules

// Should either be `as const` or be passed dirrectly in to `args`
const args = {
    fundingManager: {
        orchestratorTokenAddress: "0x5eb14c2e7D0cD925327d74ae4ce3fC692ff8ABEF",
    },
    authorizer: {
        initialAdmin: "0x7AcaF5360474b8E40f619770c7e8803cf3ED1053",
    }
} as const satisfies GetDeployWorkflowArgs<typeof requestedModules>

const {
      orchestratorAddress,
      logicModuleAddresses,
      fundingManagerAddress,
      authorizerAddress,
      paymentProcessorAddress,
      bytecode,
      factoryAddress,
      trustedForwarderAddress,
    } = await sdk.getSimulatedWorkflow({
      requestedModules,
      args,
      tagConfig: {
        decimals: 18,
        issuanceTokenDecimals: 18,
      }
    })
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.inverter.network/sdk/typescript-sdk/simulate-a-workflow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
