0%
SupportWallet Services
How to Get the initCode of a Smart Contract Account

How to Get the initCode of a Smart Contract Account

Written by Author headshotLiang
Published on August 1, 20241 min read

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

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

Simply use the following command:

js-templates
Copied
await provider.account.getInitCode()

If you choose not to use our AccountKit SDK, you can still retrieve the initCode by following the ERC-4337 Specification.

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.

Was this article helpful?
Share:
Banner background image

Not finding what you need?