> **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.

# spawnConduit

Deploys a new conduit 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 the vehicle's asset first, and hold
at least that much — this action sends no approval of its own.
:::

## Import

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

## Usage

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

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

const hash = await spawnConduit(walletClient, {
  factory: '0x1234...',
  name: 'My Conduit',
  symbol: 'COND',
  vehicle: '0x5678...',
  initialExpectedSupply: 1000000000000000000n,
  transferEnabled: true,
  accessControl: '0x...',
  feeManager: '0x...',
  accountList: '0x...',
  ownerRegistry: '0x...',
  account: '0xd2135CfB216b74109775236E36d4b433F1DF507B',
})
```

## Returns

`Hash`

The transaction hash.

:::info
Use [`extractConduitAddress`](/utilities/receiptHelpers#extractconduitaddress) to extract the deployed conduit address from the transaction receipt.
:::

## Parameters

### factory

* **Type:** `Address`

The address of the conduit factory contract.

### name

* **Type:** `string`

The name of the conduit.

### symbol

* **Type:** `string`

The symbol of the conduit token.

### vehicle

* **Type:** `Address`

The address of the vehicle contract.

### initialExpectedSupply

* **Type:** `bigint`

The initial expected supply.

### transferEnabled

* **Type:** `boolean`

Whether transfers are enabled for the conduit.

### accessControl

* **Type:** `Address`

The address of the access control contract.

### feeManager

* **Type:** `Address`

The address of the fee manager contract.

### accountList

* **Type:** `Address`

The address of the account list contract.

### ownerRegistry

* **Type:** `Address`

The address of the owner registry contract.

### account

* **Type:** `Address`

The address of the account executing the transaction.

### initialInterceptions (optional)

* **Type:** [`Interception[]`](/types/Interception)

Optional initial reward interception routes for the conduit. Defaults to `[]`.

### querySalt

* **Type:** `Hex`

Salt for the spawn's initial query. Generate it with [`randomSalt`](/utilities/randomSalt).

### deploymentSalt

* **Type:** `Hex`

Fixes the deployed address. Generate it with [`randomSalt`](/utilities/randomSalt) and keep the value.
