> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://sdk.railnet.org/api/mcp` to find what you need.

# spawnMultiVehicle

Deploys a new MultiVehicle ecosystem via the factory contract. Requires a `WalletClient` to sign and send the transaction.

:::warning
The factory pulls an initial deposit from the caller. Approve the factory for at least
[`getInitialDepositAmount`](/actions/getInitialDepositAmount) of `asset` first, and hold at least
that much — this action sends no approval of its own. The
[`deployMultiVehicle`](/workflows/deployMultiVehicle) workflow does it for you.
:::

## Import

```ts
import { spawnMultiVehicle } from '@railnetorg/railnet-sdk'
```

## Usage

```ts
import { createWalletClient, http } from 'viem'
import { base } from 'viem/chains'
import { spawnMultiVehicle } from '@railnetorg/railnet-sdk'

const walletClient = createWalletClient({
  chain: base,
  transport: http(),
})

const hash = await spawnMultiVehicle(walletClient, {
  factory: '0x1234...',
  asset: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
  name: 'My MultiVehicle',
  symbol: 'MMV',
  accessControl: '0x...',
  queryRegistry: '0x...',
  account: '0xd2135CfB216b74109775236E36d4b433F1DF507B',
})
```

## Returns

`Hash`

The transaction hash.

:::info
Use [`extractMultiVehicleContracts`](/utilities/receiptHelpers#extractmultivehiclecontracts) to extract the deployed MultiVehicle contract addresses from the transaction receipt.
:::

## Parameters

### factory

* **Type:** `Address`

The address of the MultiVehicle factory contract.

### asset

* **Type:** `Address`

The address of the underlying asset.

### name

* **Type:** `string`

The name of the MultiVehicle.

### symbol

* **Type:** `string`

The symbol of the MultiVehicle token.

### accessControl

* **Type:** `Address`

The address of the access control contract.

### queryRegistry

* **Type:** `Address`

The address of the query registry contract.

### feeManager (optional)

* **Type:** `Address`

The address of the fee manager contract. Defaults to `zeroAddress`.

### modulesManager (optional)

* **Type:** `Address`

The address of the modules manager contract. Defaults to `zeroAddress`.

### forbiddenAddresses (optional)

* **Type:** `Address[]`

Optional list of addresses forbidden from interacting with the MultiVehicle.

### salts

* **Type:** `MultiVehicleSalts`

The seven deployment salts, one per contract. They fix seven addresses at once — generate each with
[`randomSalt`](/utilities/randomSalt) and keep them.

```ts
type MultiVehicleSalts = {
  multiVehicle: Hex
  queryRedeemQueue: Hex
  queueStrategyEngine: Hex
  sectorAccountingEngine: Hex
  subQueryEngine: Hex
  vehicleManager: Hex
  initialDepositQuery: Hex
}
```

### initialInterceptions (optional)

* **Type:** [`Interception[]`](/types/Interception) (same shape, declared inline on this action)

Optional initial interception rules for reward distribution. Defaults to `[]`.

### account

* **Type:** `Address`

The address of the account executing the transaction.
