-
Notifications
You must be signed in to change notification settings - Fork 79
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
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4fc089b
add Account Documentation
jancris100 8baec50
[update] the description
jancris100 fa71f38
update the documentation of account
jancris100 7aa114f
clean up
lambda-0x 95f8447
fix examples
lambda-0x d4f87e7
Merge branch 'main' into pr/jancris100/273
lambda-0x File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
- `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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.