Skip to content
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
13 changes: 7 additions & 6 deletions docs/configure/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,13 @@ client:

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

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

**faucet example**

Expand Down
2 changes: 1 addition & 1 deletion docs/extra/cosmwasm.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ The `wasm` module allows using WebAssembly code (Wasm) on a Cosmos SDK blockchai
With Starport, add the wasm module very conveniently with:

```bash
starport module import wasm
starport scaffold wasm
```
2 changes: 1 addition & 1 deletion docs/frontend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ By default, the filesystem is watched and the clients are regenerated automatica

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

`starport serve --reset-once --rebuild-proto-once`
`starport chain serve --reset-once --rebuild-proto-once`
16 changes: 8 additions & 8 deletions docs/getting-started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ This command will fetch the `starport` binary and install it into `/usr/local/bi

### Creating a Blog-Chain

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

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

```
starport app github.com/alice/blog
starport scaffold chain github.com/alice/blog
```

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/).

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

After you create the blockchain, switch to its directory:

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

```
starport serve
starport chain serve
```

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.
Expand All @@ -96,7 +96,7 @@ In terms of workflow, developers usually work with proto files first to define C
Let's start by creating a `posts` query:

```
starport query posts --response title,body
starport scaffold query posts --response title,body
```

`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`).
Expand Down Expand Up @@ -178,7 +178,7 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r
Now we're ready to start our blockchain:

```go
starport serve
starport chain serve
```

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!
Expand Down Expand Up @@ -209,7 +209,7 @@ A Cosmos SDK message contains information that can trigger changes in the state
To create a message type and its handler, use the `message` command:

```go
starport message createPost title body
starport scaffold message createPost title body
```

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

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.

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

```
blogd tx blog createPost foo bar --from alice
Expand Down
4 changes: 2 additions & 2 deletions docs/ibc/scaffold.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ Starport supports IBC-specific scaffolding.
To create a Cosmos SDK module with IBC logic:

```
starport module create ibcdex --ibc
starport scaffold module create ibcdex --ibc
```

## Custom Packet

To create a custom packet:

```
starport packet buyOrder amountDenom amount:int priceDenom price:int --ack remainingAmount:int,purchase:int --module ibcdex
starport scaffold packet buyOrder amountDenom amount:int priceDenom price:int --ack remainingAmount:int,purchase:int --module ibcdex
```
4 changes: 2 additions & 2 deletions docs/intro/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ After you scaffold and start a chain in your Docker container, all Starport comm

```bash
docker run -ti starport/cli -h
docker run -ti starport/cli app github.com/test/planet
docker run -ti starport/cli serve
docker run -ti starport/cli scaffold chain github.com/test/planet
docker run -ti starport/cli chain serve
```

## Scaffolding a Chain
Expand Down
6 changes: 3 additions & 3 deletions docs/intro/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Use these three commands to build, start, and add features to your first blockch
To create a blockchain:

```
starport app github.com/username/myapp && cd myapp
starport scaffold chain github.com/username/myapp && cd myapp
```

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

```
starport serve
starport chain serve
```

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

```
starport type post title body
starport scaffold type post title body
```

The `type` command scaffolds functionality a custom type.
Expand Down
2 changes: 1 addition & 1 deletion docs/intro/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Before you install a new version of Starport, remove all existing Starport insta

To remove the current Starport installation:

1. On your terminal window, press `Ctrl+C` to stop the chain that you started with `starport serve`.
1. On your terminal window, press `Ctrl+C` to stop the chain that you started with `starport chain serve`.
1. Remove the Starport binary with `rm $(which starport)`.
Depending on your user permissions, run the command with or without `sudo`.
1. Repeat this step until all `starport` installations are removed from your system.
Expand Down
2 changes: 1 addition & 1 deletion docs/proto/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Protocol buffer files define the data structures used by Cosmos SDK modules.

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

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

## Third-Party Proto Files

Expand Down
14 changes: 7 additions & 7 deletions docs/run/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ Blockchains are decentralized applications.
Switch to the directory that contains a blockchain that was scaffolded with Starport. To start the blockchain node, run the following command:

```
starport serve
starport chain serve
```

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

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.

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

## The Magic of `starport serve`
The `starport serve` command starts a fully operational blockchain.
## The Magic of `starport chain serve`
The `starport chain serve` command starts a fully operational blockchain.

The `starport serve` command performs the following tasks:
The `starport chain serve` command performs the following tasks:

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

## Define How Your Blockchain Starts

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

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

Expand Down Expand Up @@ -78,7 +78,7 @@ Specify a custom home directory.

## Start a Blockchain Node in Production

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

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

Expand Down
8 changes: 4 additions & 4 deletions docs/scaffold/type.md → docs/scaffold/crud.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
order: 3
description: Generate the files that implement create, read, update, and delete (CRUD) functionality for a custom new type.
description: Generate the files that implement create, read, update, and delete (CRUD) functionality.
---

# Type Scaffold Reference

The `starport type` command scaffolds files that implement create, read, update, and delete (CRUD) functionality for a custom new type.
The `starport scaffold list` command scaffolds files that implement create, read, update, and delete (CRUD) functionality for a custom new type.

## Command Overview

```
starport type [typeName] [field1] [field2] ... [flags]
starport scaffold list [typeName] [field1] [field2] ... [flags]
```

`typeName` string
Expand Down Expand Up @@ -62,6 +62,6 @@ appd q blog show-post [id]
This example command creates a `post` type with four fields: `title` and `body` strings, boolean `comments` and integer `count`. This type is created in a module called blog.

```
starport type post title body comments:bool count:int32 --module blog
starport scaffold list post title body comments:bool count:int32 --module blog
```

8 changes: 3 additions & 5 deletions docs/scaffold/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ One of the core features of Starport CLI is code scaffolding.
To create a blockchain from scratch, run the following command:

```
starport app github.com/hello/planet
starport scaffold chain github.com/hello/planet
```

This command creates a directory called `planet` that contains all of the files for your project.
Expand All @@ -29,15 +29,13 @@ This command creates a directory called `planet` that contains all of the files
## Generate Code for New Types

```
starport type post title body
starport scaffold list post title body
```

The `starport type` command scaffolds all the necessary files for create, read, update and delete (CRUD) actions for a specific new type.
The `starport scaffold list` command scaffolds all the necessary files for create, read, update and delete (CRUD) actions for a specific new type.

In this example, the type is `post`. The list of arguments that follow specify fields of the type, in this example: `title` and `body`. There can be any number of fields and fields can have specific types. By default, fields are strings.

Starport CLI has replaced the deprecated `scaffold` program.

## Step-by-Step Learning

To learn new skills by using step-by-step processes, head over to the [Cosmos SDK Tutorials](https://tutorials.cosmos.network/). These tutorials get you started with Starport and the Cosmos SDK.
Expand Down
6 changes: 3 additions & 3 deletions docs/scaffold/message.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ While `type` constructs a message for each CRUD action and implements CRUD logic

## Construct Cosmos SDK Messages

Use the `starport message` command to scaffold Cosmos SDK messages. See [Cosmos SDK messages](https://docs.cosmos.network/v0.42/building-modules/messages-and-queries.html).
Use the `starport scaffold message` command to scaffold Cosmos SDK messages. See [Cosmos SDK messages](https://docs.cosmos.network/v0.42/building-modules/messages-and-queries.html).

```
starport message [name] [field1] [field2] ... [flags]
starport scaffold message [name] [field1] [field2] ... [flags]
```

## Files and Directories
Expand Down Expand Up @@ -44,5 +44,5 @@ Comma-separated list (no spaces) of fields that describe the response fields of
This example command creates the `cancelSellOrder` message with two fields

```
starport message cancelSellOrder port channel amountDenom priceDenom orderID:int --desc "Cancel a sell order" --response id,amount --module ibcdex
starport scaffold message cancelSellOrder port channel amountDenom priceDenom orderID:int --desc "Cancel a sell order" --response id,amount --module ibcdex
```
4 changes: 2 additions & 2 deletions docs/scaffold/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Modules are the building blocks of Cosmos SDK blockchains. Modules encapsulate l
Starport supports scaffolding Cosmos SDK modules.

```
starport module create [name] [flags]
starport scaffold module create [name] [flags]
```

The `name` parameter is the name of your new module. The module name must be unique within a project.
Expand All @@ -36,6 +36,6 @@ To include all the logic for the scaffolded IBC modules, use `--ibc` flag.
This example command scaffolds an -IBC-enable module named blog.

```bash
starport module create blog --ibc
starport scaffold module create blog --ibc
```

4 changes: 2 additions & 2 deletions docs/scaffold/packet.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Packets can be be scaffolded only in IBC modules.
To scaffold a packet:

```
starport packet [packetName] [field1] [field2] --module [module_name] [flags]
starport scaffold packet [packetName] [field1] [field2] --module [module_name] [flags]
```

### Custom acknowledgement types
Expand All @@ -35,5 +35,5 @@ When you scaffold a packet, the following files and directories are created and
The following command scaffolds the IBC-enabled `buyOrder` packet for the `amountDenom` and `remainingAmount` fields with custom acknowledgements for the `remainingAmount:int` and `purchase:int` fields.

```
starport packet buyOrder amountDenom amount:int priceDenom price:int --ack remainingAmount:int,purchase:int --module ibcdex
starport scaffold packet buyOrder amountDenom amount:int priceDenom price:int --ack remainingAmount:int,purchase:int --module ibcdex
```
12 changes: 6 additions & 6 deletions docs/scaffold/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ description: Overview of a new Cosmos SDK blockchain project built with Starport

# Project Scaffold Reference

The `starport app` command scaffolds a new Cosmos SDK blockchain project.
The `starport scaffold chain` command scaffolds a new Cosmos SDK blockchain project.

## Build a Blockchain App

To build the planet application:

```bash
starport app github.com/hello/planet
starport scaffold chain github.com/hello/planet
```

## Directory Structure
Expand All @@ -30,7 +30,7 @@ The project directory structure:

### Application-Specific Logic

Most of the logic of your application-specific blockchain is written in custom modules. Each module effectively encapsulates an independent piece of functionality. Custom modules are stored inside the `x` directory. By default, `starport app` scaffolds a module with a name that matches the name of the project. In our example, the module name is `x/planet`.
Most of the logic of your application-specific blockchain is written in custom modules. Each module effectively encapsulates an independent piece of functionality. Custom modules are stored inside the `x` directory. By default, `starport scaffold chain` scaffolds a module with a name that matches the name of the project. In our example, the module name is `x/planet`.

### Proto Files

Expand All @@ -53,7 +53,7 @@ Account addresses on Cosmos SDK-based blockchains have string prefixes. For exam
When creating a new blockchain, pass a prefix as a value to the `--address-prefix` flag:

```bash
starport app github.com/hello/planet --address-prefix moonlight
starport scaffold chain github.com/hello/planet --address-prefix moonlight
```

Using the `moonlight` prefix, account addresses on your blockchain look like this: `moonlight12fjzdtqfrrve7zyg9sv8j25azw2ua6tvu07ypf`.
Expand All @@ -67,8 +67,8 @@ To change the prefix after the blockchain has been scaffolded, modify the `Accou

## Cosmos SDK Version

By default, the `starport app` command creates a Cosmos SDK blockchain using the latest stable version of the SDK.
By default, the `starport scaffold chain` command creates a Cosmos SDK blockchain using the latest stable version of the SDK.

<!-- is it time to delete this launchpad option?
It is possible to use the legacy Cosmos SDK v0.39.2 (Launchpad). This legacy version has no active feature development and does not support IBC. You probably don't want to create a Launchpad blockchain, but if you do, use the `--sdk-version` flag with the value `launchpad`. ``` starport app github.com/hello/planet --sdk-version launchpad ``` -->
It is possible to use the legacy Cosmos SDK v0.39.2 (Launchpad). This legacy version has no active feature development and does not support IBC. You probably don't want to create a Launchpad blockchain, but if you do, use the `--sdk-version` flag with the value `launchpad`. ``` starport scaffold chain github.com/hello/planet --sdk-version launchpad ``` -->