From 51272a6443a403f3e7d0a4d3e5a817aa11c11c36 Mon Sep 17 00:00:00 2001
From: Manfred Touron <94029+moul@users.noreply.github.com>
Date: Sat, 22 Jul 2023 17:33:36 +0200
Subject: [PATCH 1/5] feat: add 002-gnokey
Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>
---
.gitpod.yml | 6 ++++
002-gnokey/README.md | 66 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 72 insertions(+)
diff --git a/.gitpod.yml b/.gitpod.yml
index 904aa72..8854e9c 100644
--- a/.gitpod.yml
+++ b/.gitpod.yml
@@ -11,6 +11,12 @@ tasks:
go install github.com/gnolang/gno/gnovm/cmd/gno
command: gno --help
+ - name: Gnokey CLI
+ init: |
+ go mod download
+ go install github.com/gnolang/gno/gno.land/cmd/gnokey
+ command: gnokey --help
+
- name: Gnoland
before: cd ../gno/gno.land/
init: go install ./cmd/gnoland
diff --git a/002-gnokey/README.md b/002-gnokey/README.md
index e69de29..a6db150 100644
--- a/002-gnokey/README.md
+++ b/002-gnokey/README.md
@@ -0,0 +1,66 @@
+# Learn to use Gnokey
+
+`gnokey` allows you to manage accounts and interact with gno.land instances, including a local devnet.
+
+## Import the `test1` wallet
+
+The `test1` wallet already has tokens on devnet and staging.
+
+
+
+ gnokey add test1 --recover
+
+Use this mnemonic:
+
+ source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast
+
+Check:
+
+ gnokey list
+
+
+ Example...
+
+```console
+gitpod /workspace/getting-started (main) $ gnokey list
+
+gitpod /workspace/getting-started (main) $ gnokey add test1 --recover
+Enter a passphrase to encrypt your key to disk:
+Repeat the passphrase:
+Enter your bip39 mnemonic
+source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast
+
+* test1 (local) - addr: g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 pub: gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pq0skzdkmzu0r9h6gny6eg8c9dc303xrrudee6z4he4y7cs5rnjwmyf40yaj, path:
+
+gitpod /workspace/getting-started (main) $ gnokey list
+0. test1 (local) - addr: g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 pub: gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pq0skzdkmzu0r9h6gny6eg8c9dc303xrrudee6z4he4y7cs5rnjwmyf40yaj, path:
+```
+
+
+## Create a new personal wallet
+
+Let's create a completely new account now.
+
+Come with your 24 keywords, or create ones using:
+
+ gnokey generate
+
+Follow instructions for `test1`, but use your own name, i.e., `bob`.
+
+```console
+gitpod /workspace/getting-started (main) $ gnokey generate
+meat middle doctor gasp axis drastic flower song test public hire title ivory walnut pledge violin mechanic hedgehog rapid satisfy measure autumn front blind
+
+gitpod /workspace/getting-started (main) $ gnokey add bob --recover
+Enter a passphrase to encrypt your key to disk:
+Repeat the passphrase:
+Enter your bip39 mnemonic
+meat middle doctor gasp axis drastic flower song test public hire title ivory walnut pledge violin mechanic hedgehog rapid satisfy measure autumn front blind
+
+* bob (local) - addr: g1h5tap94s8k0dhwhkldf39vavucvnjhrhepmt8a pub: gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pqdzdqdzjre7nfvtd7ge3gsenxsdf0ww2fcazt957q76glapsrxgeg774qj2, path:
+
+gitpod /workspace/getting-started (main) $ gnokey list
+0. bob (local) - addr: g1h5tap94s8k0dhwhkldf39vavucvnjhrhepmt8a pub: gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pqdzdqdzjre7nfvtd7ge3gsenxsdf0ww2fcazt957q76glapsrxgeg774qj2, path:
+1. test1 (local) - addr: g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 pub: gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pq0skzdkmzu0r9h6gny6eg8c9dc303xrrudee6z4he4y7cs5rnjwmyf40yaj, path:
+```
+
From 81dbd072e03f2270ca360b59fc4fc51781bd37f1 Mon Sep 17 00:00:00 2001
From: Manfred Touron <94029+moul@users.noreply.github.com>
Date: Sat, 22 Jul 2023 17:39:56 +0200
Subject: [PATCH 2/5] chore: fixup
Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>
---
002-gnokey/README.md | 39 ++++++++++++++++++++++-----------------
1 file changed, 22 insertions(+), 17 deletions(-)
diff --git a/002-gnokey/README.md b/002-gnokey/README.md
index a6db150..1651e2e 100644
--- a/002-gnokey/README.md
+++ b/002-gnokey/README.md
@@ -1,26 +1,28 @@
-# Learn to use Gnokey
+# Learn to Use Gnokey
-`gnokey` allows you to manage accounts and interact with gno.land instances, including a local devnet.
-
-## Import the `test1` wallet
-
-The `test1` wallet already has tokens on devnet and staging.
+## Import the `test1` Wallet
+To import the `test1` wallet, use the following command:
+```console
+gnokey add test1 --recover
+```
- gnokey add test1 --recover
+Mnemonic:
-Use this mnemonic:
+```console
+source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast
+```
- source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast
-
Check:
- gnokey list
+```console
+gnokey list
+```
Example...
-
+
```console
gitpod /workspace/getting-started (main) $ gnokey list
@@ -37,15 +39,18 @@ gitpod /workspace/getting-started (main) $ gnokey list
```
-## Create a new personal wallet
+## Create a New Personal Wallet
-Let's create a completely new account now.
+To create a new personal wallet, generate your 24 keywords with the command:
-Come with your 24 keywords, or create ones using:
+```console
+gnokey generate
+```
- gnokey generate
+Then follow the instructions for `test1`, but use your chosen name, e.g., `bob`.
-Follow instructions for `test1`, but use your own name, i.e., `bob`.
+
+ Example...
```console
gitpod /workspace/getting-started (main) $ gnokey generate
From 06bfc579cacedffc903d012807567aac4e49db27 Mon Sep 17 00:00:00 2001
From: Manfred Touron <94029+moul@users.noreply.github.com>
Date: Sat, 22 Jul 2023 17:41:44 +0200
Subject: [PATCH 3/5] Update README.md
---
002-gnokey/README.md | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/002-gnokey/README.md b/002-gnokey/README.md
index 1651e2e..946c859 100644
--- a/002-gnokey/README.md
+++ b/002-gnokey/README.md
@@ -24,9 +24,9 @@ gnokey list
Example...
```console
-gitpod /workspace/getting-started (main) $ gnokey list
+$ gnokey list
-gitpod /workspace/getting-started (main) $ gnokey add test1 --recover
+$ gnokey add test1 --recover
Enter a passphrase to encrypt your key to disk:
Repeat the passphrase:
Enter your bip39 mnemonic
@@ -34,7 +34,7 @@ source bonus chronic canvas draft south burst lottery vacant surface solve popul
* test1 (local) - addr: g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 pub: gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pq0skzdkmzu0r9h6gny6eg8c9dc303xrrudee6z4he4y7cs5rnjwmyf40yaj, path:
-gitpod /workspace/getting-started (main) $ gnokey list
+$ gnokey list
0. test1 (local) - addr: g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 pub: gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pq0skzdkmzu0r9h6gny6eg8c9dc303xrrudee6z4he4y7cs5rnjwmyf40yaj, path:
```
@@ -53,10 +53,10 @@ Then follow the instructions for `test1`, but use your chosen name, e.g., `bob`.
Example...
```console
-gitpod /workspace/getting-started (main) $ gnokey generate
+$ gnokey generate
meat middle doctor gasp axis drastic flower song test public hire title ivory walnut pledge violin mechanic hedgehog rapid satisfy measure autumn front blind
-gitpod /workspace/getting-started (main) $ gnokey add bob --recover
+$ gnokey add bob --recover
Enter a passphrase to encrypt your key to disk:
Repeat the passphrase:
Enter your bip39 mnemonic
@@ -64,7 +64,7 @@ meat middle doctor gasp axis drastic flower song test public hire title ivory wa
* bob (local) - addr: g1h5tap94s8k0dhwhkldf39vavucvnjhrhepmt8a pub: gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pqdzdqdzjre7nfvtd7ge3gsenxsdf0ww2fcazt957q76glapsrxgeg774qj2, path:
-gitpod /workspace/getting-started (main) $ gnokey list
+$ gnokey list
0. bob (local) - addr: g1h5tap94s8k0dhwhkldf39vavucvnjhrhepmt8a pub: gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pqdzdqdzjre7nfvtd7ge3gsenxsdf0ww2fcazt957q76glapsrxgeg774qj2, path:
1. test1 (local) - addr: g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 pub: gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pq0skzdkmzu0r9h6gny6eg8c9dc303xrrudee6z4he4y7cs5rnjwmyf40yaj, path:
```
From 28885c4df09600189187880cff95c374a051c458 Mon Sep 17 00:00:00 2001
From: Manfred Touron <94029+moul@users.noreply.github.com>
Date: Sat, 22 Jul 2023 18:07:39 +0200
Subject: [PATCH 4/5] chore: fixup
Signed-off-by: Manfred Touron <94029+moul@users.noreply.github.com>
---
002-gnokey/README.md | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/002-gnokey/README.md b/002-gnokey/README.md
index 946c859..2e9bebe 100644
--- a/002-gnokey/README.md
+++ b/002-gnokey/README.md
@@ -69,3 +69,22 @@ $ gnokey list
1. test1 (local) - addr: g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 pub: gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pq0skzdkmzu0r9h6gny6eg8c9dc303xrrudee6z4he4y7cs5rnjwmyf40yaj, path:
```
+
+## Interact with the `r/demo/boards` Realm
+
+TODO: improve and explain
+
+gitpod /workspace/gno/misc/devdeps (dev/moul/002-gnokey) $ gnokey maketx call -pkgpath "gno.land/r/demo/boards" -func "CreateReply" -gas-fee 1000000ugnot -gas-wanted 2000000 -send "100000000ugnot" -broadcast -chainid "dev" -args "1" -args "5" -args "5" -args "Hello 👋" -remote "localhost:26657
+" test1
+Enter password.
+(6 gno.land/r/demo/boards.PostID)
+OK!
+GAS WANTED: 2000000
+GAS USED: 979800
+
+
+TODO: explain that it works on staging
+
+TODO: explain faucet on staging
+
+TODO: another example like banker
From f00c90ae72113ed6087787e2f568471d8eb10caf Mon Sep 17 00:00:00 2001
From: Manfred Touron <94029+moul@users.noreply.github.com>
Date: Sun, 23 Jul 2023 13:35:14 +0200
Subject: [PATCH 5/5] Update 002-gnokey/README.md
h/t @thehowl
---
002-gnokey/README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/002-gnokey/README.md b/002-gnokey/README.md
index 2e9bebe..bea71ec 100644
--- a/002-gnokey/README.md
+++ b/002-gnokey/README.md
@@ -2,7 +2,7 @@
## Import the `test1` Wallet
-To import the `test1` wallet, use the following command:
+To import the `test1` wallet (10^13ugnot in genesis), use the following command:
```console
gnokey add test1 --recover