# setChain | @account-kit/core

> Overview of the setChain function from @account-kit/core

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

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

```ts
function setChain(config, chain): Promise<void>;
```

Defined in: [account-kit/core/src/actions/setChain.ts:23](https://github.com/alchemyplatform/aa-sdk/blob/main/account-kit/core/src/actions/setChain.ts#L23)

Allows you to change the current chain in the core store. Note, this chain
must be one of the chains configured in your original createConfig call.

## Example

```ts
import { setChain } from "@account-kit/core";
import { config } from "./config";
import { sepolia } from "@account-kit/infra";

await setChain(config, sepolia);
```

## Parameters

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

  <tbody>
    <tr>
      <td>
        `config`
      </td>

      <td>
        [`AlchemyAccountsConfig`](../type-aliases/AlchemyAccountsConfig)
      </td>

      <td>
        the accounts config object
      </td>
    </tr>

    <tr>
      <td>
        `chain`
      </td>

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

      <td>
        the chain to change to. It must be present in the connections config object
      </td>
    </tr>

  </tbody>
</table>

## Returns

`Promise`\<`void`>