Skip to content

Commit db6787b

Browse files
authored
chore: release v0.22.0 (#2576)
chore: release v0.22.0
2 parents 83cee38 + 0e495d2 commit db6787b

File tree

134 files changed

+2667
-964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+2667
-964
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Ignite CLI bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: report
6+
assignees: ''
7+
---
8+
9+
**Describe the bug**
10+
Tell us what you were doing and provide a clear and concise description of issue you encountered.
11+
12+
**To reproduce**
13+
Steps to reproduce the behavior:
14+
1.
15+
16+
**What version are you using?**
17+
18+
Provide the output of the `ignite version` command.
19+

.github/ISSUE_TEMPLATE/starport-feature-request.md renamed to .github/ISSUE_TEMPLATE/feature-request.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ assignees: ''
77

88
---
99

10-
**Is your feature request related to a problem? Please describe.**
10+
**Is your feature request related to a problem or issue you encountered? Please describe.**
1111
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1212

1313
**Describe the solution you'd like**
1414
A clear and concise description of what you want to happen.
1515

1616
**Describe alternatives you've considered**
1717
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
Include other useful information that helps us understand your request.
20+

.github/ISSUE_TEMPLATE/starport-bug-report.md

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
Please make sure to check the following for your PR:
12

3+
- [ ] This PR complies with the [contributing](../../contributing.md) guidelines.
4+
- [ ] Reviewed "Files changed" and left comments if necessary
5+
- [ ] Included relevant documentation changes.
26

3-
---
7+
Ignite CLI team only:
48

5-
Please make sure to check the following for your PR — Ignite CLI Team:
6-
7-
- [ ] I comply with the contributing.md.
89
- [ ] I have updated the _Unreleased_ section in the changelog.md for my changes.

.github/workflows/stats.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: run-ghrs
14-
uses: jgehrcke/github-repo-stats@v1.1.0
14+
uses: jgehrcke/github-repo-stats@v1.4.0
1515
with:
1616
ghtoken: ${{ secrets.ghrs_github_api_token }}
1717

.goreleaser.nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ changelog:
1313
skip: true
1414
release:
1515
prerelease: true
16+
name_template: nightly

changelog.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## [`v0.22.0`](https://github.com/ignite-hq/cli/releases/tag/v0.22.0)
4+
5+
### Features
6+
7+
- Optimized the build system. The `c serve`, `chain build`, `chain generate` commands and other variants are way faster now
8+
- Upgraded CLI and templates to use IBC v3
9+
10+
### Fixes
11+
12+
- Add a fix in code generation to avoid user's NodeJS configs to break TS client generation routine
13+
314
## [`v0.21.2`](https://github.com/ignite-hq/cli/releases/tag/v0.21.2)
415

516
### Fixes

docs/guide/hello.md

Lines changed: 59 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In the previous chapter you've learned how to install [Ignite CLI](https://githu
1414
This series of tutorials is based on a specific version of Ignite CLI, so be sure to install the correct version. For example, to install Ignite CLI v0.20.0 use the following command:
1515

1616
```bash
17-
curl https://get.ignite.com/cli@v0.20.0! | bash
17+
curl https://get.ignite.com/cli@v0.21.2! | bash
1818
```
1919

2020
Ignite CLI comes with a number of scaffolding commands that are designed to make development easier by creating everything that's required to start working on a particular task.
@@ -26,7 +26,7 @@ Are you ready? Open a terminal window and navigate to a directory where you have
2626
To create your blockchain with the default directory structure, run this command:
2727

2828
```bash
29-
ignite scaffold chain github.com/username/hello
29+
ignite scaffold chain hello
3030
```
3131

3232
This command creates a Cosmos SDK blockchain called hello in a `hello` directory. The source code inside the `hello` directory contains a fully functional ready-to-use blockchain.
@@ -60,13 +60,13 @@ The `hello` directory contains a number of generated files and directories that
6060
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
6161
| app/ | Files that wire together the blockchain. The most important file is `app.go` that contains type definition of the blockchain and functions to create and initialize it. |
6262
| cmd/ | The main package responsible for the CLI of compiled binary. |
63-
| docs/ | Directory for project documentation. By default, an OpenAPI spec is generated. |
63+
| docs/ | Directory for project documentation. By default, an OpenAPI spec is generated. |
6464
| proto/ | Protocol buffer files describing the data structure. |
6565
| testutil/ | Helper functions for testing. |
6666
| vue/ | A Vue 3 web app template. |
6767
| x/ | Cosmos SDK modules and custom modules. |
6868
| config.yml | A configuration file for customizing a chain in development. |
69-
| readme.md | A readme file for your sovereign application-specific blockchain project. |
69+
| readme.md | A readme file for your sovereign application-specific blockchain project. |
7070

7171
Now you can get your blockchain up and running locally on a single node.
7272

@@ -124,98 +124,110 @@ For all subsequent commands, use a terminal window that is different from the wi
124124

125125
In a different terminal window, run the commands in your `hello` directory.
126126

127-
Create a `posts` query:
127+
Create a `hello` query:
128128

129129
```bash
130-
ignite scaffold query posts --response title,body
130+
ignite scaffold query hello --response text
131131
```
132132

133-
`query` accepts a name of the query (in this case, `posts`), an optional list of request parameters (in this case, empty), and an optional comma-separated list of response fields with a `--response` flag (in this case, `body,title`).
133+
`query` accepts a name of the query (in this case, `hello`), an optional list of request parameters (in this case, empty), and an optional comma-separated list of response fields with a `--response` flag (in this case, `text`).
134134

135135
The `query` command has created and modified several files:
136136

137-
- modified `proto/hello/query.proto`
138-
- created `x/hello/keeper/grpc_query_posts.go`
139-
- modified `x/hello/client/cli/query.go`
140-
- created `x/hello/client/cli/query_posts.go`
137+
```
138+
modify proto/hello/query.proto
139+
modify x/hello/client/cli/query.go
140+
create x/hello/client/cli/query_hello.go
141+
create x/hello/keeper/grpc_query_hello.go
142+
```
141143

142144
Let's examine some of these changes. For clarity, the following code blocks do not show the placeholder comments that Ignite CLI uses to scaffold code. Don't delete these placeholders since they are required to continue using Ignite CLI's scaffolding functionality.
143145

146+
Note: it's recommended to commit changes to a version control system (for example, Git) after scaffolding. This allows others to easily distinguish between code generated by Ignite and the code writen by hand.
147+
148+
```
149+
git add .
150+
git commit -am "Scaffolded a hello query with Ignite CLI"
151+
```
152+
144153
### Updates to the query service
145154

146-
In the `proto/hello/query.proto` file, the `Posts` rpc has been added to the `Query` service.
155+
In the `proto/hello/query.proto` file, the `Hello` rpc has been added to the `Query` service.
147156

148157
```proto
149158
service Query {
150-
rpc Posts(QueryPostsRequest) returns (QueryPostsResponse) {
151-
option (google.api.http).get = "/username/hello/hello/posts";
152-
}
159+
rpc Hello(QueryHelloRequest) returns (QueryHelloResponse) {
160+
option (google.api.http).get = "/hello/hello/hello";
161+
}
153162
}
154163
```
155164

156-
Here's how the `Posts` rpc for the `Query` service works:
165+
Here's how the `Hello` rpc for the `Query` service works:
157166

158-
- Is responsible for returning a list of all the posts on chain
159-
- Accepts request parameters (`QueryPostsRequest`)
160-
- Returns response of type `QueryPostsResponse`
167+
- Is responsible for returning a `text` string
168+
- Accepts request parameters (`QueryHelloRequest`)
169+
- Returns response of type `QueryHelloResponse`
161170
- The `option` defines the endpoint that is used by gRPC to generate an HTTP API
162171

163172
### Request and reponse types
164173

165174
Now, take a look at the following request and response types:
166175

167176
```proto
168-
message QueryPostsRequest {
177+
message QueryHelloRequest {
169178
}
170179
171-
message QueryPostsResponse {
172-
string title = 1;
173-
string body = 2;
180+
message QueryHelloResponse {
181+
string text = 1;
174182
}
175183
```
176184

177-
- The `QueryPostsRequest` message is empty because requesting all posts doesn't require parameters.
178-
- The `QueryPostsResponse` message contains `title` and `body` that is returned from the chain.
185+
- The `QueryHelloRequest` message is empty because this request does not require parameters.
186+
- The `QueryHelloResponse` message contains `text` that is returned from the chain.
179187

180-
## Posts keeper function
188+
## Hello keeper function
181189

182-
The `x/hello/keeper/grpc_query_posts.go` file contains the `Posts` keeper function that handles the query and returns data.
190+
The `x/hello/keeper/grpc_query_hello.go` file contains the `Hello` keeper function that handles the query and returns data.
183191

184192
```go
185-
func (k Keeper) Posts(c context.Context, req *types.QueryPostsRequest) (*types.QueryPostsResponse, error) {
186-
if req == nil {
187-
return nil, status.Error(codes.InvalidArgument, "invalid request")
188-
}
189-
ctx := sdk.UnwrapSDKContext(c)
190-
_ = ctx
191-
return &types.QueryPostsResponse{}, nil
193+
func (k Keeper) Hello(goCtx context.Context, req *types.QueryHelloRequest) (*types.QueryHelloResponse, error) {
194+
if req == nil {
195+
return nil, status.Error(codes.InvalidArgument, "invalid request")
196+
}
197+
ctx := sdk.UnwrapSDKContext(goCtx)
198+
_ = ctx
199+
return &types.QueryHelloResponse{}, nil
192200
}
193201
```
194202

195-
The `Posts` function performs these actions:
203+
The `Hello` function performs these actions:
196204

197205
- Makes a basic check on the request and throws an error if it's `nil`
198206
- Stores context in a `ctx` variable that contains information about the environment of the request
199-
- Returns a response of type `QueryPostsResponse`
207+
- Returns a response of type `QueryHelloResponse`
200208

201209
Right now the response is empty.
202210

203211
### Update keeper function
204212

205-
In the `query.proto` file, the response accepts `title` and `body`.
213+
In the `query.proto` file, the response accepts `text`.
206214

207-
- Use a text editor to modify the `x/hello/keeper/grpc_query_posts.go` file that contains the keeper function.
208-
- On the last line of the keeper function, change the line to return a "Hello!":
215+
- Use a text editor to modify the `x/hello/keeper/grpc_query_hello.go` file that contains the keeper function.
216+
- On the last line of the keeper function, change the line to return "Hello, Ignite CLI!":
209217

210218
```go
211-
func (k Keeper) Posts(c context.Context, req *types.QueryPostsRequest) (*types.QueryPostsResponse, error) {
212-
//...
213-
return &types.QueryPostsResponse{Title: "Hello!", Body: "Ignite CLI"}, nil
219+
func (k Keeper) Hello(c context.Context, req *types.QueryHelloRequest) (*types.QueryHelloResponse, error) {
220+
if req == nil {
221+
return nil, status.Error(codes.InvalidArgument, "invalid request")
222+
}
223+
ctx := sdk.UnwrapSDKContext(goCtx)
224+
_ = ctx
225+
return &types.QueryHelloResponse{Text: "Hello, Ignite CLI!"}, nil // <--
214226
}
215227
```
216228

217229
- Save the file to restart your chain.
218-
- In a web browser, visit the posts endpoint [http://localhost:1317/username/hello/hello/posts](http://localhost:1317/username/hello/hello/posts).
230+
- In a web browser, visit the `hello` endpoint [http://localhost:1317/hello/hello/hello](http://localhost:1317/hello/hello/hello).
219231

220232
Because the query handlers are not yet registered with gRPC, you see a not implemented or localhost cannot connect error. This error is expected behavior, because you still need to register the query handlers.
221233

@@ -245,19 +257,18 @@ Make the required changes to the `x/hello/module.go` file.
245257
}
246258
```
247259

248-
1. After the chain has been started, visit [http://localhost:1317/username/hello/hello/posts](http://localhost:1317/username/hello/hello/posts) and see your text displayed:
260+
2. After the chain has been started, visit [http://localhost:1317/hello/hello/hello](http://localhost:1317/hello/hello/hello) and see your text displayed:
249261

250262
```go
251263
{
252-
"title": "Hello!",
253-
"body": "Ignite CLI"
264+
"text": "Hello, Ignite CLI!",
254265
}
255266
```
256267

257-
The `query` command has also scaffolded `x/hello/client/cli/query_posts.go` that implements a CLI equivalent of the posts query and mounted this command in `x/hello/client/cli/query.go` . Run the following command and get the same JSON response:
268+
The `query` command has also scaffolded `x/hello/client/cli/query_hello.go` that implements a CLI equivalent of the hello query and mounted this command in `x/hello/client/cli/query.go` . Run the following command and get the same JSON response:
258269

259270
```go
260-
hellod q hello posts
271+
hellod q hello hello
261272
```
262273

263274
Congratulations, you have built your first blockchain and your first Cosmos SDK module. Continue the journey to learn more about scaffolding Cosmos SDK messages, types in protocol buffer files, the keeper, and more.

0 commit comments

Comments
 (0)