# Deploy a Workflow

## **Setup Requirements**

1. **Set up Inverter Network SDK**: Refer to the[ Quick Start](https://docs.inverter.network/sdk/react-sdk) Guide for detailed instructions.

{% 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
```

***

## Deploying the Workflow

All we have to do is decide on the `requestedModules` retrieve the `runDeployment` mutation and fill in the typesafe `arg` then we can run the mutation in our UI.

**Parameters**

* **`requestedModules` (required)**:\
  This parameter defines the modules which will be deployed.
* `useTags` **(optional):**\
  This parameter is to optionally disable auto format parse for inputs and outputs (default true).

{% code overflow="wrap" %}

```typescript
'use client'

import { useDeployWorkflow } from '@inverter-network/react/client'
import type {
  MixedRequestedModules,
  GetDeployWorkflowArgs,
} from '@inverter-network/sdk'

import { Button } from '@/components/ui/button'
import { useAccount } from 'wagmi'

// Defined the modules to be deployed in typesafe manner
const requestedModules = {
  fundingManager: 'FM_DepositVault_v1',
  paymentProcessor: 'PP_Simple_v1',
  authorizer: 'AUT_Roles_v1',
  optionalModules: ['LM_PC_Bounties_v1'],
} as const satisfies MixedRequestedModules

export default function Page() {
  const { address } = useAccount()

  const { runDeployment } = useDeployWorkflow({ requestedModules })

  // Define the args for the modules in typesafe manner
  const args = {
    fundingManager: {
      orchestratorTokenAddress: '<your_funding_token_address>',
    },
    authorizer: {
      initialAdmin: address,
    },
  } as const satisfies GetDeployWorkflowArgs<typeof requestedModules>

  // Return a simple ui to trigger the flow
  return (
    <form
      className="w-screen h-screen flex flex-col items-center justify-center gap-3"
      onSubmit={(e) => {
        e.preventDefault()
        runDeployment.mutate(args)
      }}
    >
      <h1>Orchestrator Address: {runDeployment.data?.orchestratorAddress}</h1>

      <h1>Transaction Hash: {runDeployment.data?.transactionHash}</h1>

      <Button type="submit" loading={runDeployment.isPending}>
        Deploy
      </Button>
    </form>
  )
}
```

{% endcode %}
