Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Account Documentation #273

Merged
merged 6 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions docs/pages/toolchain/sozo/world-commands/account.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
import WorldOptions from '../common/world-options.mdx'
import StarknetOptions from '../common/starknet-options.mdx'
import AccountOptions from '../common/account-options.mdx'
import SignerOptionsRaw from '../common/signer-options-raw.mdx'
import SignerOptionsKeystore from '../common/signer-options-keystore.mdx'
import TransactionOptions from '../common/transaction-options.mdx'

## 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](https://book.starkli.rs/accounts).

## Usage

```bash
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

<StarknetOptions/>

#### Signer Options - Raw

<SignerOptionsRaw/>

#### Signer Options - Keystore

<SignerOptionsKeystore/>

#### Transaction Options

<TransactionOptions/>

#### 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

```sh
sozo keystore new <keystore>.json
```

#### Create a New Account Configuration

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

4 changes: 4 additions & 0 deletions vocs.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@ export default defineConfig({
text: "auth",
link: "/toolchain/sozo/world-commands/auth",
},
{
text: "account",
link: "/toolchain/sozo/world-commands/account",
},
{
text: "configruations",
link: "/toolchain/sozo/common-options/configurations",
Expand Down