Skip to content

Sozo Account

The sozo account command allows managing account contracts. It provides functionalities to create new account configurations, deploying them, and fetch account configuration for already existing account.

Note that we currently only support the OpenZeppelin account variant. For more advanced use cases, consider using starkli.

Usage

sozo account [OPTIONS] <COMMAND>
 
Commands:
  new     Create a new account configuration without actually deploying.
  deploy  Deploy account contract with a DeployAccount transaction.
  fetch   Fetch account config from an already deployed account contract.
  help    Print this message or the help of the given subcommand(s).

Subcommands

new

Create a new account configuration without actually deploying.

deploy

Deploy account contract

fetch

Fetch account config from an already deployed account contract.

OPTIONS

Starknet Options

--rpc-url URL
    The Starknet RPC endpoint. [default: http://localhost:5050]
    ENV: STARKNET_RPC_URL

Signer Options - Raw

--private-key PRIVATE_KEY
    The raw private key associated with the account contract.
    ENV: DOJO_PRIVATE_KEY

Signer Options - Keystore

--keystore PATH
    Use the keystore in the given folder or file.

--password PASSWORD
    The keystore password. Used with --keystore.
    ENV: DOJO_KEYSTORE_PASSWORD

Transaction Options

--fee-estimate-multiplier MULTIPLIER
    The multiplier to use for the fee estimate. This value will be used on the estimated fee which will be used as the max fee for the transaction (max_fee = estimated_fee * multiplier).

--wait [-w]
    Wait until the transaction is accepted by the sequencer, returning the status and the hash. This will poll the transaction status until it gets accepted or rejected by the sequencer.

--receipt [-r]
    If --wait is set, returns the full transaction receipt. Otherwise, it does nothing.

Specific Options:

--simulate: Simulate the transaction without sending it.

--estimate_only: Only estimate the transaction fee without sending the transaction.

--nonce: Manually provide a nonce for the transaction.

--poll_interval: Set the interval (in milliseconds) for polling the transaction result. [default: 1000]

--file: Path to the account config file.

--no_confirmation: Skip the user confirmation step.

Example

Create a New Keystore file

sozo keystore new <keystore>.json

Create a New Account Configuration

sozo account new --keystore <keystore>.json <account_name>.json