Skip to content

Commit

Permalink
Fix tuts discrepancies (#403)
Browse files Browse the repository at this point in the history
  • Loading branch information
yarikbratashchuk authored Jun 25, 2024
1 parent 0b18c93 commit ffc8644
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 28 deletions.
34 changes: 15 additions & 19 deletions tutorials/gm-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,31 +134,27 @@ rollkit keys list --keyring-backend test
You should see an output like the following

```bash
- address: gm18k57hn42ujcccyn0n5v7r6ydpacycn2wkt7uh9
name: gm-key-2
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Al92dlOeLpuAiOUSIaJapkIveiwlhlEdz/O5CrniMdwH"}'
- address: gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
name: alice
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A5WPM5WzfNIPrGyha/TlHt0okdlzS1O4Gb1d1kU+xuG+"}'
type: local
- address: gm1e4fqspwdsy0dzkmzsdhkadfcrd0udngw0f88pw
name: gm-key
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AwdsLY+2US2VV+rbyfi60GB4/Ir/FeTIkLJ3CWVhUF6b"}'
type: local
- address: gm1vvl79phavqruppr6f5zy4ypxy7znshrqam48qy
name: gm-relay
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AlnSEnBUv5GO86fMWe11qth1+R76g2e1lv8c1FWhLpqP"}'
- address: gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3
name: bob
pubkey: '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A+jOX/CWInFer2IkqgXGo0da9j7Ubq+e1LJWzTMDjwdt"}'
type: local
```

For convenience we export two of our keys like this:

```bash
export KEY1=gm18k57hn42ujcccyn0n5v7r6ydpacycn2wkt7uh9
export KEY2=gm1e4fqspwdsy0dzkmzsdhkadfcrd0udngw0f88pw
export KEY1=gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
export KEY2=gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3
```

Now let's submit a transaction that sends coins from one account to another (don't worry about all the flags, for now, we just want to submit transaction from a high-level perspective):

```bash
rollkit tx bank send $KEY1 $KEY2 42069stake --keyring-backend test --chain-id gm --fees 5000stake
rollkit tx bank send $KEY2 $KEY1 42069stake --keyring-backend test --chain-id gm --fees 5000stake
```

You'll be prompted to accept the transaction:
Expand All @@ -180,8 +176,8 @@ body:
amount:
- amount: "42069"
denom: stake
from_address: gm18k57hn42ujcccyn0n5v7r6ydpacycn2wkt7uh9
to_address: gm1e4fqspwdsy0dzkmzsdhkadfcrd0udngw0f88pw
from_address: gm1r2udsh4za7r7sxvzy496qfazvjp04j4zgytve3
to_address: gm17rpwv7lnk96ka00v93rphhvcqqztpn896q0dxx
non_critical_extension_options: []
timeout_height: "0"
signatures: []
Expand All @@ -201,14 +197,14 @@ txhash: 677CAF6C80B85ACEF6F9EC7906FB3CB021322AAC78B015FA07D5112F2F824BFF
Query balances after the transaction:

```bash
rollkit query bank balances $KEY2
rollkit query bank balances $KEY1
```

The receiver’s balance should show an increase.

```bash
balances: // [!code focus]
- amount: "10000000000000000000042069" // [!code focus]
- amount: "42069" // [!code focus]
denom: stake
pagination:
next_key: null
Expand All @@ -218,14 +214,14 @@ pagination:
For the sender’s balance:

```bash
rollkit query bank balances $KEY1
rollkit query bank balances $KEY2
```

Output:

```bash
balances: // [!code focus]
- amount: "9999999999999999999957931" // [!code focus]
- amount: "99957931" // [!code focus]
denom: stake
pagination:
next_key: null
Expand Down
16 changes: 7 additions & 9 deletions tutorials/wordle.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,6 @@ Next, add Rollkit to your project by running:
ignite rollkit add
```

Initialize the Rollkit chain configuration for a local DA network with this command:

```bash
ignite rollkit init --local-da
```

This will create a `~/.wordle` directory with all the necessary files to run a rollup on a local DA network.
With these steps, Rollkit is now added. Let's build the Wordle app!

## ✨ Creating the wordle module {#creating-wordle-module}

For the Wordle module, we can add dependencies offered by Cosmos-SDK.
Expand Down Expand Up @@ -569,6 +560,13 @@ running on your machine, you're ready to build, test, and launch your own sovere

### 🟢 Building and running wordle chain {#build-and-run-wordle-chain}

Initialize the Rollkit chain configuration for a local DA network with this command:

```bash
ignite chain build && ignite rollkit init --local-da
```

This will create a `~/.wordle` directory with all the necessary files to run a rollup on a local DA network.

Now let's initialize a `rollkit.toml` file in the `worldle` directory by running:

Expand Down

0 comments on commit ffc8644

Please sign in to comment.