How to Use Ignite to Create a Rollkit App
This guide will walk you through the process of using Ignite to create a Rollkit app.
Install Ignite
You can read more about Ignite here.
To install Ignite, you can run this command in your terminal:
curl https://get.ignite.com/cli@v28.5.3! | bash
Once Ignite is installed, scaffold a new blockchain with the following command:
ignite scaffold chain gm --address-prefix gm --minimal --skip-proto
This will create the gm
blockchain. Navigate to the blockchain directory:
cd gm
Install Ignite App Rollkit
In a new terminal window, you'll now install and run the Ignite App Rollkit.
Run the following command to install the Rollkit App:
ignite app install github.com/ignite/apps/rollkit@rollkit/v0.2.1
This installs the Rollkit application, which will be integrated into your blockchain.
Add Rollkit Features
Enhance your blockchain by adding Rollkit features. Use the following command:
ignite rollkit add
Build your chain
Build your chain using the following command:
ignite chain build
Initialize Your Blockchain
Before starting your blockchain, you need to initialize it with Rollkit support. Initialize the blockchain with Local DA as follows:
ignite rollkit init
Initialize Rollkit CLI Configuration
To initialize the Rollkit CLI configuration, generate the rollkit.toml
file by running the following command:
rollkit toml init
This will set up the Rollkit configuration file rollkit.toml, allowing you to use the Rollkit CLI for managing and running your blockchain.
Start your chain
Now you are ready to start your chain. We need to include 2 flags:
--rollkit.aggregator
to signal that this node is the block producer--rollkit.sequencer_rollup_id gm
to share the chain ID with the sequencer.
Start your chain using the following command:
rollkit start --rollkit.aggregator --rollkit.sequencer_rollup_id gm
Your rollkit chain is now up and running.
Summary
By following these steps, you've successfully installed Ignite, integrated Rollkit features into your blockchain, and configured the Rollkit CLI to run your chain against a mock DA and mock sequencer.