Skip to main content

Creating account

Overview

In order to create a new account, you need to deploy an account contract. Starknet expects a certain interface from an account contract. OpenZeppelin and ArgentX provide account contract implementations that you can use.

There are three ways of deploying a new account contract:

Sending DEPLOY_ACCOUNT transaction

Protostar allows you to send the DEPLOY_ACCOUNT transaction from the CLI by calling the deploy-account command. However, before you send such transaction you need to:

  1. Find the class hash of the account contract compatible with DEPLOY_ACCOUNT transaction. The entity that declared the account contract should make the class hash easily available. It's recommended to check the README.md in the repository with the source of the account contract:

  2. Calculate an account contract address with protostar calculate-account-address command

  3. Prefund the account contract.

    NetworkRecommended method
    devnetLocal Faucet
    testnetStarknet Faucet
    mainnetToken Bridge