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 2 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
73 changes: 73 additions & 0 deletions docs/pages/toolchain/sozo/world-commands/account.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import WorldOptions from '../common/world-options.mdx'
import StarknetOptions from '../common/starknet-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).

```
### Options

- `-v, --verbose`: Increase logging verbosity.
- `-q, --quiet`: Decrease logging verbosity.
- `-h, --help`: Print help (see more with '--help').
- `-V, --version`: Print version.

### Subcommands

#### `new`

Create a new account configuration without actually deploying.

- **Options:**
- `signer`: Options for specifying the signer.
- `force`: Overwrite the account config file if it already exists.
- `file`: Path to save the account config file.

#### `deploy`

Deploy account contract with a `DeployAccount` transaction.

- **Options:**
- `starknet`: Options for specifying StarkNet configuration.
- `signer`: Options for specifying the signer.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please add more description for options that are not directly arguments, something like: https://book.dojoengine.org/toolchain/sozo/world-commands/execute#world-options.

so user can know exactly what argument they need to pass in the CLI.

- `transaction`: Options for specifying transaction details.
- `simulate`: Simulate the transaction only.
- `estimate_only`: Only estimate transaction fee without sending transaction.
- `nonce`: Provide transaction nonce manually.
- `poll_interval`: Transaction result poll interval in milliseconds.
- `file`: Path to the account config file.
- `no_confirmation`: Don't wait for user confirmation.

#### `fetch`

Fetch account config from an already deployed account contract.

- **Options:**
- `starknet`: Options for specifying StarkNet configuration.
- `force`: Overwrite the file if it already exists.
- `output`: Path to save the account config file.
- `address`: Contract address.

### Example

#### Create a New Account Configuration

```sh
sozo account new --signer <signer_options> --file path/to/config/file --force

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