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
12 changes: 2 additions & 10 deletions docs/docs/01-welcome/01-index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
slug: /
slug: /welcome
---

import ProjectsTable from '@site/src/components/ProjectsTable';
Expand All @@ -19,18 +19,10 @@ Beyond these, Ignite has been instrumental in a wide array of blockchain applica
- **CometBFT Integration:** Built with the CometBFT consensus engine (formerly Tendermint), ensuring robust consensus mechanisms in your blockchain solutions.
- **Cross-Domain Applications:** Ignite is perfectly suited for developing a diverse array of use cases across various sectors. These include DeFi, NFTs, supply chain management, smart contracts (both EVM and WASM), and decentralized exchanges (DEXes).

## Install Ignite CLI

Get started with Ignite CLI by running this simple installation command:

```
curl https://get.ignite.com/cli! | bash
```

## Embracing the Cosmos Ecosystem

Ignite CLI is your entry point into the vibrant Cosmos ecosystem, a hub of innovation where you can explore a range of applications, from wallets and explorers to smart contracts and DEXes, all powered by CometBFT and the Cosmos SDK.
This ecosystem is home to over [$50 billion worth of blockchain projects](https://cosmos.network/ecosystem/tokens/), showcasing the scalability and versatility of the technologies at play.
This ecosystem is home to over [$100 billion worth of blockchain projects](https://cosmos.network/ecosystem/tokens/), showcasing the scalability and versatility of the technologies at play.

## Projects using Tendermint and Cosmos SDK

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/01-welcome/02-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Ignite CLI is supported for the following operating systems:

Ignite CLI is written in the Go programming language. To use Ignite CLI on a local system:

- Install [Go](https://golang.org/doc/install) (**version 1.23** or higher)
- Install [Go](https://golang.org/doc/install) (**version 1.24** or higher)
- Ensure the Go environment variables are [set properly](https://golang.org/doc/gopath_code#GOPATH) on your system

## Verify your Ignite CLI version
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/02-guide/02-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 2

# Introduction

In this tutorial, we will be using Ignite CLI to create a new blockchain. Ignite
In this guide, we will be using Ignite CLI to create a new blockchain. Ignite
CLI is a command line interface that allows users to quickly and easily create
blockchain networks. By using Ignite CLI, we can quickly create a new blockchain
without having to manually set up all the necessary components.
Expand All @@ -14,7 +14,7 @@ directory structure and files that were created. This will give us an
understanding of how the blockchain is organized and how the different
components of the blockchain interact with each other.

By the end of this tutorial, you will have a basic understanding of how to use
By the end of this guide, you will have a basic understanding of how to use
Ignite CLI to create a new blockchain, and you will have a high-level
understanding of the directory structure and files that make up a blockchain.
This knowledge will be useful as you continue to explore the world of blockchain
Expand Down Expand Up @@ -115,7 +115,7 @@ automatically build and release a blockchain binary. GitHub Actions is a tool
that allows developers to automate their software development workflows,
including building, testing, and deploying their projects. The workflow in the
`.github` directory is used to automate the process of building the blockchain
binary and releasing it, which can save time and effort for developers.
binary and releasing it, which can save time and effort for developers.

The `readme.md` file is a readme file that provides an overview of the
blockchain project. This file typically includes information such as the
Expand All @@ -140,7 +140,7 @@ starts the node locally and enables automatic code reloading so that changes to
the code can be reflected in the running blockchain without having to restart
the node. This allows for faster development and testing of the blockchain.

Congratulations! 🥳 You have successfully created a brand-new Cosmos blockchain
**Congratulations!** 🥳 You have successfully created a brand-new Cosmos blockchain
using the Ignite CLI. This blockchain uses the delegated proof of stake (DPoS)
consensus algorithm, and comes with a set of standard modules for token
transfers, governance, and inflation. Now that you have a basic understanding of
Expand Down
55 changes: 27 additions & 28 deletions docs/docs/02-guide/03-hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ title: Hello World

**Introduction**

In this tutorial, you'll build a simple blockchain using Ignite CLI that responds to a custom query with "Hello %s!", where "%s" is a name passed in the query.
In this tutorial, you'll build a simple blockchain using Ignite CLI that responds to a custom query with `Hello %s!`, where `%s` is a name passed in the query.
This will enhance your understanding of creating custom queries in a Cosmos SDK blockchain.

## Setup and Scaffold

1. **Create a New Blockchain:**

```bash
ignite scaffold chain hello
```
```bash
ignite scaffold chain hello
```

2. **Navigate to the Blockchain Directory:**

```bash
cd hello
```
```bash
cd hello
```

## Adding a Custom Query

Expand All @@ -36,14 +36,13 @@ This command generates code for a new query, `say-hello`, which accepts a name,

- **Understanding the Scaffolded Code:**

- `proto/hello/hello/query.proto`: Defines the request and response structure.
- `x/hello/client/cli/query_say_hello.go`: Contains the CLI commands for the query.
- `x/hello/keeper/query_say_hello.go`: Houses the logic for the query response.

- `proto/hello/hello/query.proto`: Defines the request and response structure.
- `x/hello/client/cli/query_say_hello.go`: Contains the CLI commands for the query.
- `x/hello/keeper/query_say_hello.go`: Houses the logic for the query response.

## Customizing the Query Response

In the Cosmos SDK, queries are requests for information from the blockchain, used to access data like the ledger's current state or transaction details. While the SDK offers several built-in query methods, developers can also craft custom queries for specific data retrieval or complex operations.
In the Cosmos SDK, queries are requests for information from the blockchain, used to access data like the ledger's current state or transaction details. While the SDK offers several built-in query methods, developers can also craft custom queries for specific data retrieval or complex operations.

- **Modify `query_say_hello.go`:**

Expand All @@ -53,27 +52,27 @@ Update the `SayHello` function in `x/hello/keeper/query_say_hello.go` to return
package keeper

import (
"context"
"fmt"
"context"
"fmt"

"hello/x/hello/types"
"hello/x/hello/types"

sdk "github.com/cosmos/cosmos-sdk/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
sdk "github.com/cosmos/cosmos-sdk/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)

func (q queryServer) SayHello(ctx context.Context, req *types.QuerySayHelloRequest) (*types.QuerySayHelloResponse, error) {
if req == nil {
return nil, status.Error(codes.InvalidArgument, "invalid request")
}
if req == nil {
return nil, status.Error(codes.InvalidArgument, "invalid request")
}

// Validation and Context unwrapping
sdkCtx := sdk.UnwrapSDKContext(ctx)
// Validation and Context unwrapping
sdkCtx := sdk.UnwrapSDKContext(ctx)

_ = sdkCtx
// Custom Response
return &types.QuerySayHelloResponse{Name: fmt.Sprintf("Hello %s!", req.Name)}, nil
_ = sdkCtx
// Custom Response
return &types.QuerySayHelloResponse{Name: fmt.Sprintf("Hello %s!", req.Name)}, nil
}
```

Expand All @@ -86,7 +85,7 @@ ignite chain serve
```

2. **Test the Query:**

Use the command-line interface to submit a query.

```
Expand All @@ -97,4 +96,4 @@ Expect a response: `Hello world!`

## Conclusion

Congratulations! 🎉 You've successfully created a blockchain module with a custom query using Ignite CLI. Through this tutorial, you've learned how to scaffold a chain, add a custom query, and modify the logic for personalized responses. This experience illustrates the power of Ignite CLI in streamlining blockchain development and the importance of understanding the underlying code for customization.
Congratulations! 🎉 You've successfully created a blockchain module with a custom query using Ignite CLI. Through this tutorial, you've learned how to scaffold a chain, add a custom query, and modify the logic for personalized responses. This experience illustrates the power of Ignite CLI in streamlining blockchain development and the importance of understanding the underlying code for customization.
61 changes: 0 additions & 61 deletions docs/docs/02-guide/07-simapp.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,64 +101,3 @@ After the parameters are scaffolded, change the
`x/<module>/module_simulation.go` file to set the random parameters into the
`RandomizedParams` method. The simulation will change the params randomly
according to call the function.

## Invariants

Simulating a chain can help you prevent [chain invariants
errors](https://docs.cosmos.network/main/building-modules/invariants). An
invariant is a function called by the chain to check if something broke,
invalidating the chain data. To create a new invariant and check the chain
integrity, you must create a method to validate the invariants and register all
invariants.


For example, in `x/earth/keeper/invariants.go`:

```go title="x/earth/keeper/invariants.go"
package keeper

import (
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/tendermint/spn/x/launch/types"
)

const zeroLaunchTimestampRoute = "zero-launch-timestamp"

// RegisterInvariants registers all module invariants
func RegisterInvariants(ir sdk.InvariantRegistry, k Keeper) {
ir.RegisterRoute(types.ModuleName, zeroLaunchTimestampRoute,
ZeroLaunchTimestampInvariant(k))
}

// ZeroLaunchTimestampInvariant invariant that checks if the
// `LaunchTimestamp is zero
func ZeroLaunchTimestampInvariant(k Keeper) sdk.Invariant {
return func(ctx sdk.Context) (string, bool) {
all := k.GetAllChain(ctx)
for _, chain := range all {
if chain.LaunchTimestamp == 0 {
return sdk.FormatInvariant(
types.ModuleName, zeroLaunchTimestampRoute,
"LaunchTimestamp is not set while LaunchTriggered is set",
), true
}
}
return "", false
}
}
```

Now, register the keeper invariants into the `x/earth/module.go` file:

```go
package earth

// ...

// RegisterInvariants registers the capability module's invariants.
func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) {
keeper.RegisterInvariants(ir, am.keeper)
}
```
31 changes: 18 additions & 13 deletions docs/docs/04-clients/02-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ description: Information about the generated TypeScript client code.

# TypeScript frontend

:::warning
The TypeScript client is being reworked and is not yet stable.
In the meantime, refer to the [Ignite CCA App](https://ignite.com/marketplace/cca).
:::

Ignite offers powerful functionality for generating client-side code for your
blockchain. Think of this as a one-click client SDK generation tailored
specifically for your blockchain.
Expand Down Expand Up @@ -43,7 +48,7 @@ ignite chain serve -r

## Setting up a TypeScript frontend client

The best way to get started building with the TypeScript client is by using
The best way to get started building with the TypeScript client is by using
[Vite](https://vitejs.dev). Vite provides boilerplate code for
vanilla TS projects as well as React, Vue, Lit, Svelte and Preact frameworks.
You can find additional information at the [Vite Getting Started
Expand Down Expand Up @@ -365,10 +370,10 @@ transacting via Keplr like so:
import { Client } from '../../ts-client';

const client = new Client({
apiURL: "http://localhost:1317",
rpcURL: "http://localhost:26657",
prefix: "cosmos"
}
apiURL: "http://localhost:1317",
rpcURL: "http://localhost:26657",
prefix: "cosmos"
}
);
await client.useKeplr();
```
Expand All @@ -386,10 +391,10 @@ something like:
import { Client } from '../../ts-client';

const client = new Client({
apiURL: "http://localhost:1317",
rpcURL: "http://localhost:26657",
prefix: "cosmos"
}
apiURL: "http://localhost:1317",
rpcURL: "http://localhost:26657",
prefix: "cosmos"
}
);
await client.useKeplr({
chainName: 'My Great Chain',
Expand All @@ -415,10 +420,10 @@ const mnemonic =
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(mnemonic);

const client = new Client({
apiURL: "http://localhost:1317",
rpcURL: "http://localhost:26657",
prefix: "cosmos"
}
apiURL: "http://localhost:1317",
rpcURL: "http://localhost:26657",
prefix: "cosmos"
}
);
await client.useKeplr();

Expand Down
5 changes: 5 additions & 0 deletions docs/docs/04-clients/03-vue.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Vue frontend

:::warning
The Vue frontend is being reworked and is not yet stable.
In the meantime, refer to the [Ignite CCA App](https://ignite.com/marketplace/cca).
:::

Welcome to this tutorial on using Ignite to develop a web application for your
blockchain with Vue 3. Ignite is a tool that simplifies the process of building
a blockchain application by providing a set of templates and generators that can
Expand Down
5 changes: 5 additions & 0 deletions docs/docs/04-clients/04-react.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# React frontend

:::warning
The React frontend is being reworked and is not yet stable.
In the meantime, refer to the [Ignite CCA App](https://ignite.com/marketplace/cca).
:::

Welcome to this tutorial on using Ignite to develop a web application for your
blockchain with React. Ignite is a tool that simplifies the process of building
a blockchain application by providing a set of templates and generators that can
Expand Down
Loading
Loading