# 【教程-gnoland】弥补cosmos，可扩展的可互操作的智能合约平台

By [rainight-雨夜](https://paragraph.com/@jackmusk) · 2022-08-27

---

**Gno Test3已发布，先领水** [Gnoland](https://twitter.com/_gnoland)是cosmos创始人[jae](https://twitter.com/jaekwon)的又一力作，补充了cosmos部署智能合约的生态，目前项目还在开发状态，明确会有空投。现在人不多，进[dc](https://discord.gg/Dc3dY4uwja)活跃起来

前置条件
----

开始今天的教程之前，需要有一定的前置条件：

\====================================

本次教程不涉及服务提供，可以使用自己的电脑，如果你的电脑是win10，可以参考

[https://zhuanlan.zhihu.com/p/62658094](https://zhuanlan.zhihu.com/p/62658094) 在win10下安装Ubuntu系统。

如果不是win10，只能想办法获取一台Ubuntu的电脑或服务器了

\====================================

一台ubuntu服务器(最好是国外的服务器，问题会少很多)，最低配置如下

*   CPUs: 2
    
*   RAM: 2GB
    
*   Storage: 50GB
    
*   OS：Ubuntu 22.04
    

**1、使用ssh登录服务器（mac、linux系统下操作**）

    ssh root@服务器ip 
    

回车确认，如果出现提示”Are you sure you want to continue connecting (yes/no/\[fingerprint\])?“

输入 `yes` 回车确认

窗口等待输入服务器密码，回车确认。进入服务器

![运行成功结果](https://storage.googleapis.com/papyrus_images/dc9e70afcfa2bce4cb609a6ac5f54cf4397039ccd3fc5c30cce47c423bf53301.png)

运行成功结果

**2、确认当前用户是root，(如果已经是root用户请略过)**

开启root用户，为root用户创建密码，输入两次密码

![](https://storage.googleapis.com/papyrus_images/df107eb284a26e6493e047cd83dafb13f300ce5e069e5faa7439dcdf5b19a709.png)

切换到root用户，在输入刚才创建的密码

![](https://storage.googleapis.com/papyrus_images/0be886687df51451e6cd96d194441c9b650f8c8f40833a4ab40a6e0f2d30e4ff.png)

**3、安转GO环境**

更新服务器现有环境

    apt update && apt upgrade -y 
    

![](https://storage.googleapis.com/papyrus_images/019c08f15b41465f1d65dc712b0c7df7fe5a31ec582932ebb9f044227813a4f8.png)

安装必须的软件

    apt install build-essential git curl gcc make jq -y
    

![](https://storage.googleapis.com/papyrus_images/36d5c15a1fa79a40f40e7ec83b6b4113cf3888586cfa4562c6887213fb93438d.png)

安装GO1.8

国内可以使用替代地址 [https://studygolang.com/dl/golang/go1.18.3.linux-amd64.tar.gz](https://studygolang.com/dl/golang/go1.18.3.linux-amd64.tar.gz)

    wget -c https://go.dev/dl/go1.18.3.linux-amd64.tar.gz && rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.3.linux-amd64.tar.gz && rm -rf go1.18.3.linux-amd64.tar.gz
    

![](https://storage.googleapis.com/papyrus_images/f29dfcc04220d7e10f5aa7692832016e6e52ce3539fbf0711ee9f1a1dfed4b70.png)

设置本地环境变量（方便操作）

    echo 'export GOROOT=/usr/local/go' >> $HOME/.bash_profile
    echo 'export GOPATH=$HOME/go' >> $HOME/.bash_profile
    echo 'export GO111MODULE=on' >> $HOME/.bash_profile
    echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile && . $HOME/.bash_profile
    

![](https://storage.googleapis.com/papyrus_images/138f4940c99218cb48b385a729962c1e33d060bbef30e1b8532307f8c328bf7f.png)

测试GO安装是否成功

    go version
    

![](https://storage.googleapis.com/papyrus_images/e3de526dbe3ca4cbb35f7ec3309a4eea4ce4a6fcd38d54349f72d77c2cfabc4d.png)

安装GNO
-----

**1、安装gno**

    git clone https://github.com/gnolang/gno.git
    cd ./gno
    make
    

**2、生成种子（助记词）**，助记词一定要记住

    ./build/gnokey generate
    

![](https://storage.googleapis.com/papyrus_images/c107f2d5d6cae26fcf4cd796997d573f0883010f2d18407e3984c53ce2f49cda.png)

**3、生成账号** `rainight`可以改成你自己的信息

需要创建密码（输入两次）、输入刚才生成的助记词，会生成自己的账户地址

    ./build/gnokey add rainight --recover
    

![](https://storage.googleapis.com/papyrus_images/57c3dda121dd254848c105f53d329cec7813d13c2da852fe44ab351af10a45dc.png)

**4、领水**（需要领5次）

访问地址 [https://test3.gno.land/faucet](https://test3.gno.land/faucet)，领完一次重新回到这个页面，更换ip，在领取

![](https://storage.googleapis.com/papyrus_images/ba49c3a7b2df8c28a47ca9b85f9a7dba96384c8cdff74d532d9589a0274b644c.png)

**5、查看本地账号**

    ./build/gnokey list
    

**6、查看账号余额** `g18an6agz9q8xn8psxla6qmcv9y4t9u0jpmaxpmx`改成你的账户地址

余额要250000000

    ./build/gnokey query auth/accounts/g18an6agz9q8xn8psxla6qmcv9y4t9u0jpmaxpmx --remote test2.gno.land:36657
    

![](https://storage.googleapis.com/papyrus_images/ec34a4c5a44bbc96871d7fb58bf7f07257b0edbf883b62a939f9c9f703208069.png)

简单领水方法
------

[![User Avatar](https://storage.googleapis.com/papyrus_images/8060dbb5f4eb0135081815130a55c694bdd74708562894b2f0aaf51ab54f6ea2.jpg)](https://twitter.com/0xrainight)

[rainight-雨夜](https://twitter.com/0xrainight)

[@0xrainight](https://twitter.com/0xrainight)

[![Twitter Logo](https://paragraph.com/editor/twitter/logo.png)](https://twitter.com/0xrainight/status/1588913357964611584)

[@\_gnoland](https://twitter.com/_gnoland) 测试网Test3已经可用了  
！！！先领水！！！！！  
使用 [@adenaapp](https://twitter.com/adenaapp) 钱包 创建账号  
在[test3.gno.land/faucet](https://t.co/Op8rDEu4IS) 领水  
[#gno](https://twitter.com/hashtag/gno) [#Test3](https://twitter.com/hashtag/Test3) [#faucet](https://twitter.com/hashtag/faucet)[

![](https://storage.googleapis.com/papyrus_images/e2d5f6870406dc5d9d749417fa436427e3f5195b52a91ff9cb0cc7c3e4a89017.jpg)

chromewebstore.google.com

Adena - Chrome Web Store
------------------------

Adena is a friendly browser extension wallet for the gno.land blockchain.





](https://t.co/jO8iHgOqPb)

 [![Like Icon](https://paragraph.com/editor/twitter/heart.png) 14](https://twitter.com/0xrainight/status/1588913357964611584)[

10:17 AM • Nov 5, 2022

](https://twitter.com/0xrainight/status/1588913357964611584)

以下是Test2的任务，Test3还未发布任务，请等待更新
-----------------------------

注册用户
----

**1、查询账户信息**

    ./build/gnokey query auth/accounts/g18an6agz9q8xn8psxla6qmcv9y4t9u0jpmaxpmx --remote "test2.gno.land:36657"
    

![](https://storage.googleapis.com/papyrus_images/a91dc7b6b30d5af45f1ba8710dd849a612a9780a3ade8cda945f8328e284d6e5.png)

**2、生成未签名的交易信息**`unsigned.tx`

`g18an6agz9q8xn8psxla6qmcv9y4t9u0jpmaxpmx`改成你的账户地址，`rainight` 改成你的昵称，`@0xrainight`改成你的信息

    ./build/gnokey maketx call g18an6agz9q8xn8psxla6qmcv9y4t9u0jpmaxpmx --pkgpath "gno.land/r/users" --func "Register" --gas-fee 1000000ugnot --gas-wanted 2000000 --send "200000000ugnot" --args "" --args "rainight" --args "@0xrainight" > unsigned.tx
    

**3、签名交易信息**，`ACCOUNTNUMBER` `SEQUENCENUMBER` 需要改成账户信息中的值（红框）

    ./build/gnokey sign g18an6agz9q8xn8psxla6qmcv9y4t9u0jpmaxpmx --txpath unsigned.tx --chainid "test2" --number ACCOUNTNUMBER --sequence SEQUENCENUMBER > signed.tx
    

![](https://storage.googleapis.com/papyrus_images/dc73fef7753d4497a50bd3cddd30c8753cae81a382fa525067b289f0639e3cf9.png)

**4、广播上链**

    ./build/gnokey broadcast signed.tx --remote "test2.gno.land:36657"
    

![](https://storage.googleapis.com/papyrus_images/6e0288f343914bb610ced2a2e3d8e61bd3e0d14238055addc84d4c2427aa6b72.png)

创建一个带有智能合约调用的板块
---------------

`g18an6agz9q8xn8psxla6qmcv9y4t9u0jpmaxpmx` 改成你的账户地址，`rainight`改成你的板块名称（英文）

会让输入密码。成功后返回**boardId（板块id）**，后面会用

    ./build/gnokey maketx call g18an6agz9q8xn8psxla6qmcv9y4t9u0jpmaxpmx --pkgpath "gno.land/r/boards" --func "CreateBoard" --gas-fee 1000000ugnot --gas-wanted 10000000 --send 1000000ugnot --broadcast true --chainid test2 --args "rainight" --remote test2.gno.land:36657
    

![](https://storage.googleapis.com/papyrus_images/48edd2ac63d338aae0a900f3e2cd15d2a1bdaa9149bed72cd2886027f3f6ce8e.png)

在自己的板块里发布帖子
-----------

**1、创建一个文件**

    cat <<'EOF' >> ./rainight.md
    Hello,GNO!
    EOF
    

![](https://storage.googleapis.com/papyrus_images/1e475948f133edf8b39e772642072ad0164ece1636550a226cef928e21e96ee2.png)

**2、发布帖子**

`g18an6agz9q8xn8psxla6qmcv9y4t9u0jpmaxpmx` 改成你的账户地址，`rainight.md`改成你的文件名称，`134`改成你的板块id

    ./build/gnokey maketx call g18an6agz9q8xn8psxla6qmcv9y4t9u0jpmaxpmx --pkgpath "gno.land/r/boards" --func CreateThread --args 134 --args "rainight1" --args#file "rainight.md" --gas-fee 1000000ugnot --gas-wanted 2000000 --chainid test2   --broadcast true  --remote test2.gno.land:36657
    

![](https://storage.googleapis.com/papyrus_images/93ac088436b8b3fd279266f44f28b60ea3c98ee219bf749187dd8d0c0a4e024b.png)

做任务
---

任务地址 [https://test2.gno.land/r/boards:testboard/4](https://test2.gno.land/r/boards:testboard/4)

![](https://storage.googleapis.com/papyrus_images/db8c36a9ee3947a940aac52d55eb01a5c832f79e0547b3f7a04db0747a00515a.png)

**1、在推特上发布一篇对gno的推文或者其他平台，将链接回复到 boardId 1 的板块**

`g18an6agz9q8xn8psxla6qmcv9y4t9u0jpmaxpmx` 改成你的账户地址，

`https://mirror.xyz/jackmusk.eth/T0Q088lYSmp5UBBjOD7CGcHs_scEcS2IfVG8KdiK0iU`改成你的链接

    ./build/gnokey maketx call g18an6agz9q8xn8psxla6qmcv9y4t9u0jpmaxpmx --pkgpath "gno.land/r/boards" --func "CreateReply" --gas-fee 1000000ugnot --gas-wanted 2000000 --send "2000000ugnot" --broadcast true --chainid "test2" --args "1" --args "4" --args "4" --args "https://mirror.xyz/jackmusk.eth/T0Q088lYSmp5UBBjOD7CGcHs_scEcS2IfVG8KdiK0iU" --remote "test2.gno.land:36657"
    

![](https://storage.googleapis.com/papyrus_images/8f57e2a8a494165efd919bb9e6788015aa76e579c5738bc564958e761f12ca6e.png)

你会在这里 [https://test2.gno.land/r/boards:testboard/4](https://test2.gno.land/r/boards:testboard/4) 查询到你发布的内容

![](https://storage.googleapis.com/papyrus_images/41ced617ac1309e28a3d71be62c862d27b35bd5d485a2842d93cffc8630146a6.png)

好了任务完成了。

我是[雨夜](https://twitter.com/0xrainight) ，专注早期项目交互，不定期发布优质项目的交互教程，欢迎[关注我](https://twitter.com/0xrainight)。

---

*Originally published on [rainight-雨夜](https://paragraph.com/@jackmusk/gnoland-cosmos)*
