> 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/react-sdk/perform-a-multicall.md).

# Perform a Multicall

## **Setup Requirements**

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

## Performing the Multicall

We will demonstrate the multicall mutation hook with the aid of `useWorkflow` since we need some bytecode to batch into the multicall.&#x20;

**Parameters**

* `kind` **(optional)**:\
  This parameter is to select return type 'write' | 'simulate' (default 'write').

{% code overflow="wrap" %}

```typescript
'use client'

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

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

// Defined the modules to be used in the workflow 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 workflow = useWorkflow({
    orchestratorAddress: '<your_orchestrator_address>',
    requestedModules,
  })
  
  const { mutate, data, isPending } = useModuleMulticall({
    kind: 'write',
    orchestratorAddress: workflow.data!.orchestrator.address,
  })
  
  const { returnDatas, statuses, transactionHash } = data || {
    returnDatas: [],
    statuses: [],
    transactionHash: '',
  }

  // 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={async (e) => {
        e.preventDefault()
        runDeployment.mutate({
          calls: [
            {
              address: workflow.data!.fundingManager.address,
              allowFailure: false,
              callData: await workflow.data!.fundingManager.bytecode.deposit.run('500'),
            },
            {
              address: workflow.fundingManager.address,
              allowFailure: false,
              callData: await workflow.data!.fundingManager.bytecode.deposit.run('500'),
            },
          ],
        })
      }}
    >
      <h1>Transaction Hash: {transactionHash}</h1>
    
      <h1>Statuses: {statuses.join(', ')}</h1>
      
      <h1>Return Datas: {returnDatas.map((i) => i.slice(0, 100)).join(', ')}</h1>

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

{% 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/react-sdk/perform-a-multicall.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.
