Skip to content

Commit e511976

Browse files
authored
Command structure (ignite#1330)
1 parent f3b3c6a commit e511976

File tree

16 files changed

+53
-54
lines changed

16 files changed

+53
-54
lines changed

docs/configure/reference.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,13 @@ client:
8181

8282
The faucet service sends tokens to addresses. The default address for the web user interface is <http://localhost:4500>.
8383

84-
| Key | Required | Type | Description |
85-
| --------- | -------- | --------------- | ----------------------------------------------------------- |
86-
| name | Y | String | Name of a key pair. `name` must be in `accounts` |
87-
| coins | Y | List of Strings | One or more coins with denominations sent per request |
88-
| coins_max | N | List of Strings | One or more maximum amounts of tokens sent for each address |
89-
| host | N | String | Host and port number. Default: `:4500` |
84+
| Key | Required | Type | Description |
85+
| ----------------- | -------- | --------------- | ----------------------------------------------------------- |
86+
| name | Y | String | Name of a key pair. `name` must be in `accounts` |
87+
| coins | Y | List of Strings | One or more coins with denominations sent per request |
88+
| coins_max | N | List of Strings | One or more maximum amounts of tokens sent for each address |
89+
| host | N | String | Host and port number. Default: `:4500` |
90+
| rate_limit_window | N | String | Time after which the token limit is reset (in seconds) |
9091

9192
**faucet example**
9293

docs/extra/cosmwasm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ The `wasm` module allows using WebAssembly code (Wasm) on a Cosmos SDK blockchai
1212
With Starport, add the wasm module very conveniently with:
1313

1414
```bash
15-
starport module import wasm
15+
starport scaffold wasm
1616
```

docs/frontend/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ By default, the filesystem is watched and the clients are regenerated automatica
3232

3333
To regenerate all clients for custom and standard Cosmos SDK modules, run this command:
3434

35-
`starport serve --reset-once --rebuild-proto-once`
35+
`starport chain serve --reset-once --rebuild-proto-once`

docs/getting-started/index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ This command will fetch the `starport` binary and install it into `/usr/local/bi
3535

3636
### Creating a Blog-Chain
3737

38-
Starport comes with a number of scaffolding commands that are designed to make development easier by creating everything that's necessary to start working on a particular task. One of these tasks is a `scaffold app` command which provides you with a foundation of a fresh Cosmos SDK blockchain so that you don't have to write it yourself.
38+
Starport comes with a number of scaffolding commands that are designed to make development easier by creating everything that's necessary to start working on a particular task. One of these tasks is a `scaffold scaffold chain` command which provides you with a foundation of a fresh Cosmos SDK blockchain so that you don't have to write it yourself.
3939

4040
To use this command, open a terminal, navigate to a directory where you have permissions to create files, and run:
4141

4242
```
43-
starport app github.com/alice/blog
43+
starport scaffold chain github.com/alice/blog
4444
```
4545

4646
This will create a new Cosmos SDK blockchain called Blog in a `blog` directory. The source code inside the `blog` directory contains a fully functional ready-to-use blockchain. This new blockchain imports standard Cosmos SDK modules, such as [`staking`](https://docs.cosmos.network/v0.42/modules/staking/) (for delegated proof of stake), [`bank`](https://docs.cosmos.network/v0.42/modules/bank/) (for fungible token transfers between accounts), [`gov`](https://docs.cosmos.network/v0.42/modules/gov/) (for on-chain governance) and [other modules](https://docs.cosmos.network/v0.42/modules/).
4747

48-
Note: You can see all the command line options that Starport provides by running `starport app --help`.
48+
Note: You can see all the command line options that Starport provides by running `starport scaffold chain --help`.
4949

5050
After you create the blockchain, switch to its directory:
5151

@@ -76,7 +76,7 @@ To get started, let's get our blockchain up and running locally on a single node
7676
You actually have a fully-functional blockchain already. To start it on your development machine, run the following command in the `blog` directory
7777

7878
```
79-
starport serve
79+
starport chain serve
8080
```
8181

8282
This will download dependencies, compile the source code into a binary called `blogd` (by default Starport uses the name of the repo + `d`), use this binary to initialize a single validator node, and start the node.
@@ -96,7 +96,7 @@ In terms of workflow, developers usually work with proto files first to define C
9696
Let's start by creating a `posts` query:
9797

9898
```
99-
starport query posts --response title,body
99+
starport scaffold query posts --response title,body
100100
```
101101

102102
`query` accepts a name of the query (in our case, `posts`), an optional list of request parameters (in our case, empty), and an optional comma-separated list of response fields with a `--response` flag (in our case, `body,title`).
@@ -178,7 +178,7 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r
178178
Now we're ready to start our blockchain:
179179

180180
```go
181-
starport serve
181+
starport chain serve
182182
```
183183

184184
Once the chain has been started, visit [http://localhost:1317/alice/blog/blog/posts](http://localhost:1317/alice/blog/blog/posts) and see our text displayed!
@@ -209,7 +209,7 @@ A Cosmos SDK message contains information that can trigger changes in the state
209209
To create a message type and its handler, use the `message` command:
210210

211211
```go
212-
starport message createPost title body
212+
starport scaffold message createPost title body
213213
```
214214

215215
The `message` command accepts message name (`createPost`) and a list of fields (`title` and `body`) as arguments.
@@ -410,7 +410,7 @@ func (k Keeper) AppendPost(ctx sdk.Context, post types.Post) uint64 {
410410

411411
We've implemented all the code necessary to create new posts and store them on chain. Now, when a transaction containing a message of type `MsgCreatePost` is broadcasted, Cosmos SDK will route the message to our blog module. `x/blog/handler.go` calls `k.CreatePost`, which in turn calls `AppendPost`. `AppendPost` gets the number of posts from the store, adds a post using the count as an ID, increments the count, and returns the ID.
412412

413-
Let's try it out! If the chain is yet not started, run `starport serve`. Create a post:
413+
Let's try it out! If the chain is yet not started, run `starport chain serve`. Create a post:
414414

415415
```
416416
blogd tx blog createPost foo bar --from alice

docs/ibc/scaffold.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ Starport supports IBC-specific scaffolding.
1212
To create a Cosmos SDK module with IBC logic:
1313

1414
```
15-
starport module create ibcdex --ibc
15+
starport scaffold module create ibcdex --ibc
1616
```
1717

1818
## Custom Packet
1919

2020
To create a custom packet:
2121

2222
```
23-
starport packet buyOrder amountDenom amount:int priceDenom price:int --ack remainingAmount:int,purchase:int --module ibcdex
23+
starport scaffold packet buyOrder amountDenom amount:int priceDenom price:int --ack remainingAmount:int,purchase:int --module ibcdex
2424
```

docs/intro/docker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ After you scaffold and start a chain in your Docker container, all Starport comm
2323

2424
```bash
2525
docker run -ti starport/cli -h
26-
docker run -ti starport/cli app github.com/test/planet
27-
docker run -ti starport/cli serve
26+
docker run -ti starport/cli scaffold chain github.com/test/planet
27+
docker run -ti starport/cli chain serve
2828
```
2929

3030
## Scaffolding a Chain

docs/intro/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Use these three commands to build, start, and add features to your first blockch
1515
To create a blockchain:
1616

1717
```
18-
starport app github.com/username/myapp && cd myapp
18+
starport scaffold chain github.com/username/myapp && cd myapp
1919
```
2020

2121
The `app` command creates the blockchain directory `myapp` and scaffolds a [Cosmos SDK](https://docs.cosmos.network/) blockchain.
@@ -25,7 +25,7 @@ The `app` command creates the blockchain directory `myapp` and scaffolds a [Cosm
2525
To run a blockchain in your development environment:
2626

2727
```
28-
starport serve
28+
starport chain serve
2929
```
3030

3131
The `serve` command installs dependencies, builds, initializes, and starts the blockchain.
@@ -35,7 +35,7 @@ The `serve` command installs dependencies, builds, initializes, and starts the b
3535
To add a custom type with create, read, update, and delete (CRUD) functionality:
3636

3737
```
38-
starport type post title body
38+
starport scaffold type post title body
3939
```
4040

4141
The `type` command scaffolds functionality a custom type.

docs/intro/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Before you install a new version of Starport, remove all existing Starport insta
2222

2323
To remove the current Starport installation:
2424

25-
1. On your terminal window, press `Ctrl+C` to stop the chain that you started with `starport serve`.
25+
1. On your terminal window, press `Ctrl+C` to stop the chain that you started with `starport chain serve`.
2626
1. Remove the Starport binary with `rm $(which starport)`.
2727
Depending on your user permissions, run the command with or without `sudo`.
2828
1. Repeat this step until all `starport` installations are removed from your system.

docs/proto/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Protocol buffer files define the data structures used by Cosmos SDK modules.
1414

1515
Inside the `proto` directory, a directory for each custom module contains `query.proto`, `tx.proto`, `genesis.proto`, and other files.
1616

17-
The `starport serve` command automatically generates Go code from proto files on every file change.
17+
The `starport chain serve` command automatically generates Go code from proto files on every file change.
1818

1919
## Third-Party Proto Files
2020

docs/run/index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ Blockchains are decentralized applications.
1818
Switch to the directory that contains a blockchain that was scaffolded with Starport. To start the blockchain node, run the following command:
1919

2020
```
21-
starport serve
21+
starport chain serve
2222
```
2323

2424
This command initializes a chain, builds the code, starts a single validator node, and starts watching for file changes.
2525

2626
Whenever a file is changed, the chain is automatically reinitialized, rebuilt, and started again. The chain's state is preserved if the changes to the source code are compatible with the previous state. This state preservation is beneficial for development purposes.
2727

28-
Because the `starport serve` command is a development tool, it should not be used in a production environment. Read on to learn the process of running a blockchain in production.
28+
Because the `starport chain serve` command is a development tool, it should not be used in a production environment. Read on to learn the process of running a blockchain in production.
2929

30-
## The Magic of `starport serve`
31-
The `starport serve` command starts a fully operational blockchain.
30+
## The Magic of `starport chain serve`
31+
The `starport chain serve` command starts a fully operational blockchain.
3232

33-
The `starport serve` command performs the following tasks:
33+
The `starport chain serve` command performs the following tasks:
3434

3535
- Installs dependencies
3636
- Imports state, if possible
@@ -50,7 +50,7 @@ You can use flags to configure how the blockchain runs.
5050

5151
## Define How Your Blockchain Starts
5252

53-
Flags for the `starport serve` command determine how your blockchain starts. All flags are optional.
53+
Flags for the `starport chain serve` command determine how your blockchain starts. All flags are optional.
5454

5555
`--config`, default is `config.yml`
5656

@@ -78,7 +78,7 @@ Specify a custom home directory.
7878

7979
## Start a Blockchain Node in Production
8080

81-
The `starport serve` and `starport build` commands compile the source code of the chain in a binary file and install the binary in `~/go/bin`. By default, the binary name is the name of the repository appended with `d`. For example, if you scaffold a chain using `starport app github.com/alice/chain`, then the binary is named `chaind`.
81+
The `starport chain serve` and `starport chain build` commands compile the source code of the chain in a binary file and install the binary in `~/go/bin`. By default, the binary name is the name of the repository appended with `d`. For example, if you scaffold a chain using `starport scaffold chain github.com/alice/chain`, then the binary is named `chaind`.
8282

8383
You can customize the binary name in `config.yml`:
8484

0 commit comments

Comments
 (0)