# toSmartContractAccount | @aa-sdk/core

> Converts an account to a smart contract account and sets up various account-related methods using the provided parameters like transport, chain, entry point, and other utilities.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
function toSmartContractAccount<Name, TTransport, TChain, TEntryPointVersion>(
  params,
): Promise<SmartContractAccount<Name, TEntryPointVersion>>;
```

Defined in: [aa-sdk/core/src/account/smartContractAccount.ts:266](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/account/smartContractAccount.ts#L266)

## Type Parameters

<table>
  <thead>
    <tr>
      <th align="left">Type Parameter</th>
      <th align="left">Default type</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `Name` *extends* `string`
      </td>

      <td>
        `string`
      </td>
    </tr>

    <tr>
      <td>
        `TTransport` *extends* [`Transport`](https://viem.sh)
      </td>

      <td>
        [`Transport`](https://viem.sh)
      </td>
    </tr>

    <tr>
      <td>
        `TChain` *extends* [`Chain`](https://viem.sh)
      </td>

      <td>
        [`Chain`](https://viem.sh)
      </td>
    </tr>

    <tr>
      <td>
        `TEntryPointVersion` *extends* keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>
      </td>

      <td>
        keyof [`EntryPointRegistryBase`](../interfaces/EntryPointRegistryBase)\<`unknown`>
      </td>
    </tr>

  </tbody>
</table>

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `params`
      </td>

      <td>
        [`ToSmartContractAccountParams`](../type-aliases/ToSmartContractAccountParams)\<`Name`, `TTransport`, `TChain`, `TEntryPointVersion`>
      </td>

      <td>
        the parameters required for converting to a smart contract account
      </td>
    </tr>

  </tbody>
</table>

## Returns

`Promise`\<[`SmartContractAccount`](../type-aliases/SmartContractAccount)\<`Name`, `TEntryPointVersion`>>

a promise that resolves to a SmartContractAccount object with methods and properties for interacting with the smart contract account