---
title: "How to get the initCode of a smart contract account"
description: "How to retrieve Smart Contract Account's initCode using AccountKit SDK"
---

# How to get the initCode of a smart contract account

Here are two ways to get the initCode of a smart contract account using our Account Kit SDK

## Option 1: using AccountKit SDK

With our AccountKit SDK, obtaining the account `initCode` is straightforward.

Simply use the following command:

```js-templates

await provider.account.getInitCode()
```

## Option 2: not using the AccountKit SDK

If you choose not to use our AccountKit SDK, you can still retrieve the `initCode` by following the [ERC-4337 Specification](https://github.com/eth-infinitism/account-abstraction/blob/v0.7.0/erc/ERCS/erc-4337.md).

**Key Points from the specification:**

- The definition of `initCode` is detailed in the linked document.
- `initCode` is described as the "concatenation of factory address and factoryData \(or empty\)."
- If the account is not yet deployed, you must create the `initCode` according to this specification.
