Skip to content

Commit

Permalink
Update cli command in getting started guide and closes #1138
Browse files Browse the repository at this point in the history
  • Loading branch information
janewang committed Jan 6, 2025
1 parent 00bde5a commit 7f181f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/build/smart-contracts/getting-started/storing-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ This tutorial assumes that you've already completed the previous steps in Gettin

## Adding the increment contract

The `stellar contract init` command allows us to initialize a new project with any of the example contracts from the [soroban-examples](https://github.com/stellar/soroban-examples) repo, using the `--with-example` (or `-w`) flag.
The `stellar contract init` command allows us to initialize a new project with any of the example contracts from the [soroban-examples](https://github.com/stellar/soroban-examples) repo, using the `--name` flag, to specify a new contract's name.

It will not overwrite existing files, so we can also use this command to add a new contract to an existing project. Run the command again with a `--with-example` flag to add an `increment` contract to our project. From inside our `soroban-hello-world` directory, run:
It will not overwrite existing files unless we explicily pass in `--ovewrite` flag. Run the command with a `--name` flag to add an `increment` contract to our project. From inside our `soroban-hello-world` directory, run:

```sh
stellar contract init ./ --with-example increment
stellar contract init . --name increment
```

This will create a new `contracts/increment` directory with the following files:
Expand Down

0 comments on commit 7f181f2

Please sign in to comment.