← Back to Blog

Ignite CLI v0.19

A mobile app wallet template, scaffolding models with array and coin types, module parameters, and simulation testing

Denis Fadeev 3 min read

Ignite continues a strong commitment to growth and innovation to enable more blockchain developers to build sovereign application-specific blockchains.

Mobile apps are transforming blockchain technology, and with this first iteration of a Ignite mobile app template, we are transforming how to build a blockchain-based crypto app. Data structure support is expanded to include arrays, one of the most common forms to store data. Because tokens are the heart of crypto apps, support for Cosmos SDK coins with coin and array.coin (coins) improves the developer experience and reduces development time. This version provides simulation testing to ensure you can develop production-ready networks in record time. Simulation is an important step in moving your blockchain from development to production. Ignite CLI v0.19 scaffolds simulation code by default.

These features and more improve the usability and user experience of Ignite CLI so that you can build and iterate your chains with less friction.

Mobile Wallet

Ignite is now fully equipped to help you build a custom cross-platform mobile app for your blockchain. Mobile development functionality is comprised of three components:

  • Flutter-based app template
  • Dart client code generation
  • Library of reusable components and libraries

The template is a cross-platform Dart app built using the Flutter framework. The template is designed to be extensible and is configured out-of-the-box to communicate with the blockchain you're building. The Dart app includes a wallet for managing accounts and sending tokens and interfaces for viewing balances and transaction history. This Flutter project can act as a template for your blockchain-based crypto app.

To create an app, simply scaffold your app with Ignite CLI:

ignite scaffold flutter

A client-side app wouldn't be complete without a library for interacting with your blockchain. Ignite CLI comes bundled with a protocol buffer compiler that generates an up-to-date Dart client for both standard and custom Cosmos SDK modules.

Generate a client with a single command:

ignite generate dart

With both a template and a client you're now ready to start hacking away on your new crypto app! We've prepared a manual to help you get started on your journey.

The source code for the template and the component library is available in the ignite/flutter repo. v0.19 introduces the first iteration of a Ignite mobile app template. We welcome feedback and code contributions.

Creating Models With Array Fields

Scaffolding has been the essential feature of Ignite CLI since the very first version. Automatic code generation is incredibly useful both for quick prototyping as well as generating code that will go into production. Ignite CLI can scaffold many features, including CRUD models, packets, queries, and messages. Every feature accepts a list of fields that describe the entity being scaffolded. For example, a product may have a price as an integer and a description as a string. In this version, we've added syntax to specify field types as an array of primitive types. For example, use an array to describe a field for a list of tags.

ignite scaffold list product price:int desc:string tags:array.string

Arrays are supported for the following basic types:

  • array.string (or strings for short)
  • array.int (ints)
  • array.uint (uints

We've also added support for Cosmos SDK coins with coin and array.coin (coins). This is extremely useful because many models deal with tokens and not having to parse coins from strings (or having to replace the type throughout the code) is a huge time-saver. Ignite is capable of using custom types when describing fields.

Built-in Simulation Testing

Cosmos SDK comes with a valuable testing mechanism for simulating the execution of a blockchain by generating and sending randomized messages. The goal of the simulation is to detect and debug failures that could halt the chain in production.

The goal of Ignite CLI is to make the lives of all blockchain developers easier by providing all of the tools to build production-ready networks in record time. Simulation is an important part of any production blockchain. Ignite CLI scaffolds simulation code by default.

We've also simplified the process of running a simulation. All it takes now is just one command:

ignite chain simulate

Scaffolding Modules With Parameters

Module parameters are an important concept in Cosmos SDK. Parameters allow the module's behavior to be customized and changed through governance after a blockchain is live. Starting with v0.19 you'll be able to customize parameters for a module:

ignite scaffold module exchange --params inflation:int

More Fixes and Improvements

  • cointype for accounts can be set in the config.yml
  • Allow using a creator field when scaffolding a model with a --no-message flag
  • Improved error handling when generating code
  • Ensure account has funds after faucet transfer when using cosmosclient
  • Move from io/ioutil to io and os package (refactoring)
Dec 24, 2021 - Last edited Dec 9, 2024