Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit eb7e140

Browse files
committed
fix use TIA for gas
1 parent 5b4ca47 commit eb7e140

File tree

1 file changed

+8
-85
lines changed

1 file changed

+8
-85
lines changed

guides/use-tia-for-gas.md

Lines changed: 8 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
1-
---
2-
description: Build a sovereign rollup using Rollkit CLI and a local DA network, with TIA as the gas token.
3-
---
4-
51
# How to use IBC token (TIA) as gas token in your rollup
62

73
## 🌞 Introduction {#introduction}
84

95
This tutorial will guide you through building a sovereign `gm-world` rollup using Rollkit, with TIA as the gas token. Unlike the [quick start guide](/guides/quick-start.md), which uses a native rollup token for gas, this tutorial demonstrates how to integrate an IBC-enabled token, TIA, as the gas token within the rollup, providing a deeper exploration of sovereign rollup development.
106

11-
We will cover:
7+
No prior understanding of the build process is required, just that it utilizes the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) for blockchain applications.
128

13-
- Building and configuring a Cosmos-SDK application-specific rollup blockchain.
14-
- Posting rollup data to a Data Availability (DA) network.
15-
- Executing transactions using TIA as the gas token (the end goal).
9+
## Requirements {#requirements}
1610

17-
No prior understanding of the build process is required, just that it utilizes the [Cosmos SDK](https://github.com/cosmos/cosmos-sdk) for blockchain applications.
11+
Before proceeding, ensure that you have completed the [build a chain](/guides/gm-world.md) tutorial, which covers setting-up, building and running your chain.
1812

1913
<!-- markdownlint-disable MD033 -->
2014
<script setup>
@@ -28,91 +22,20 @@ import constants from '../.vitepress/constants/constants.js'
2822

2923
<!-- markdownlint-enable MD033 -->
3024

31-
## 🛠️ Dependencies {#dependencies}
32-
33-
Rollkit uses the [Go programming language](https://go.dev/dl/). Here's how to install it:
34-
35-
- **Linux or macOS**: Run the provided script:
36-
37-
```bash-vue
38-
curl -sSL https://rollkit.dev/install-go.sh | bash -s {{constants.golangVersion}}
39-
```
40-
41-
<!-- markdownlint-disable MD033 -->
42-
43-
- **Windows**: Download and execute the <a :href="`https://go.dev/dl/go${constants.golangVersion}.windows-amd64.msi`">installer</a>.
44-
<!-- markdownlint-enable MD033 -->
45-
46-
## 📦 Install Rollkit (CLI) {#install-rollkit}
47-
48-
To install Rollkit, run the following command in your terminal:
49-
50-
```bash-vue
51-
curl -sSL https://rollkit.dev/install.sh | sh -s {{constants.rollkitLatestTag}}
52-
```
53-
54-
Verify the installation by checking the Rollkit version:
55-
56-
```bash
57-
rollkit version
58-
```
59-
60-
A successful installation will display the version number and its associated git commit hash.
61-
62-
## 🌐 Running a Local DA Network {#running-local-da}
25+
## Setup your local DA network {#setup-local-da}
6326

64-
Learn to run a local DA network, designed for educational purposes, on your machine.
65-
66-
To set up a local DA network node:
67-
68-
```bash-vue
69-
(cd /tmp && curl -sSL https://rollkit.dev/install-local-da.sh | bash -s {{constants.localDALatestTag}})
70-
```
71-
72-
This script builds and runs the node, now listening on port `7980`.
73-
74-
## 🏗️ Building Your Sovereign Rollup {#building-your-sovereign-rollup}
75-
76-
With the local DA network running, let’s prepare your rollup blockchain.
77-
78-
To make it simple, we will download a repository with a `gm-world` rollup that includes an `init.sh` script to handle all the setup for you.
79-
80-
Download and build a `gm-world` rollup with an interactive script in a new terminal:
81-
82-
::: warning
83-
Ensure the `jq` command line tool is installed before proceeding. Install it using `sudo apt-get install jq` on Ubuntu or `brew install jq` on macOS.
84-
:::
85-
::: tip
86-
If you get errors of `gmd` not found, you may need to add the `go/bin` directory to your PATH. You can do this by running `export PATH=$PATH:$HOME/go/bin` and then running the `init.sh` script manually again.
87-
:::
88-
89-
```bash
90-
curl -sSL https://rollkit.dev/install-gm-rollup.sh | sh
91-
```
92-
93-
## 🛠️ Initialize Rollkit TOML Configuration {#initialize-rollkit-configuration}
94-
95-
Change to the `gm` directory and initialize the rollkit toml configuration:
27+
Your local DA network is already running if you followed the [quick start guide](/guides/quick-start.md) or the [build a chain](/guides/gm-world.md). If not, you can start it with the following command:
9628

9729
```bash
98-
cd ./gm && rollkit toml init
99-
```
100-
101-
Edit the `rollkit.toml` file to include the following configuration:
102-
103-
```toml
104-
entrypoint = "/root/gm/cmd/gmd/main.go"
105-
106-
[chain]
107-
config_dir = "./.gm"
30+
curl -sSL https://rollkit.dev/install-local-da.sh | bash -s {{constants.rollkitLatestTag}}
10831
```
10932

11033
## 🚀 Starting your rollup {#start-your-rollup}
11134

11235
Start the rollup, posting to the local DA network:
11336

11437
```bash
115-
rollkit start --rollkit.aggregator --rollkit.da.address http://localhost:7980 --minimum-gas-prices="0.02ibc/C3E53D20BC7A4CC993B17C7971F8ECD06A433C10B6A96F4C4C3714F0624C56DA,0.025stake"
38+
gmd start --rollkit.aggregator --rollkit.da.address http://localhost:7980 --minimum-gas-prices="0.02ibc/C3E53D20BC7A4CC993B17C7971F8ECD06A433C10B6A96F4C4C3714F0624C56DA,0.025stake"
11639
```
11740

11841
Note that we specified the gas token to be IBC TIA. We still haven't made an IBC connection to Celestia's Mocha testnet, however, if we assume our first channel will be an ICS-20 transfer channel to Celestia, we can already calculate the token denom using this formula:
@@ -307,7 +230,7 @@ rly tx transfer mocha gm_rollup 1000000utia "$ACCOUNT_ON_ROLLUP" "$CHANNEL_ID_ON
307230
Verify the account on our rollup is funded with IBC TIA:
308231

309232
```bash
310-
rollkit q bank balances "$(rollkit keys show -a --keyring-backend test gm-key-2)"
233+
gmd query bank balances "$(rollkit keys show -a --keyring-backend test gm-key-2)"
311234
# =>
312235
# balances:
313236
# - amount: "1000000"

0 commit comments

Comments
 (0)