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

By [google](https://paragraph.com/@google-3) · 2022-08-28

---

转发自[jackmusk.eth](https://mirror.xyz/jackmusk.eth)

尊重知识！

[https://mirror.xyz/jackmusk.eth/T0Q088lYSmp5UBBjOD7CGcHs\_scEcS2IfVG8KdiK0iU](https://mirror.xyz/jackmusk.eth/T0Q088lYSmp5UBBjOD7CGcHs_scEcS2IfVG8KdiK0iU)

[rainight-雨夜](https://mirror.xyz/jackmusk.eth)

jackmusk.eth

Subscribe

Collect

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

[0xb741](https://mirror.xyz/jackmusk.eth)

an hour ago

[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` 回车确认

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

运行成功结果

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

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

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

**3、安转GO环境**

更新服务器现有环境

    apt update && apt upgrade -y 
    

安装必须的软件

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

安装GO1.8

国内可以使用替代地址 [https://studygolang.com/dl/golang/go1.18.4.linux-amd64.tar.gz](https://studygolang.com/dl/golang/go1.18.4.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
    

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

    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
    

测试GO安装是否成功

    go version
    

安装GNO
-----

**1、安装gno**

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

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

    ./build/gnokey generate
    

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

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

    ./build/gnokey add rainight --recover
    

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

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

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

    ./build/gnokey list
    

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

余额要250000000

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

注册用户
----

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

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

**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
    

**4、广播上链**

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

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

`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
    

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

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

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

**2、发布帖子**

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

    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://test2.gno.land/r/boards:testboard/4](https://test2.gno.land/r/boards:testboard/4)

**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://test2.gno.land/r/boards:testboard/4](https://test2.gno.land/r/boards:testboard/4) 查询到你发布的内容

好了任务完成了。

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

Subscribe to rainight-雨夜

Receive new entries directly to your inbox.

Subscribe

#1

Become the first collector

Support the creator of this entry… and get all the bragging rights, too.

Collect

This entry has been permanently stored on-chain and signed by its creator.

[ARWEAVE TRANSACTION](https://viewblock.io/arweave/tx/Vbe-QB7QOY8sAaZ1ZIhdNq5Ih0S2EKOu6Bv-4yrMgUQ)

[Vbe-QB7QOY8sAaZ…EKOu6Bv-4yrMgUQ](https://viewblock.io/arweave/tx/Vbe-QB7QOY8sAaZ1ZIhdNq5Ih0S2EKOu6Bv-4yrMgUQ)

[AUTHOR ADDRESS](https://etherscan.io/address/0xb741C62df43B6A1D3ee212992B8491A9E4fC641A)

[0xb741C62df43B6…B8491A9E4fC641A](https://etherscan.io/address/0xb741C62df43B6A1D3ee212992B8491A9E4fC641A)

CONTENT DIGEST

T0Q088lYSmp5UBB…cS2IfVG8KdiK0iU

WEB3 PAYMENTS MADE SIMPLE

We connect & empower people by bringing WEB3 to their lives.

PIP TAGS

Create your unique PIP tag and share anywhere for easy payments

SOCIAL PAYMENTS

Send and Receive money on your favorite social platform

SkipNext

SOL

$0.1

NaN

$0.5

NaN

$1

NaN

$3

NaN

$5

NaN

$10

NaN

$50

NaN

...

Processing fee: NaN%

Continue

Pipped byTotal Received$0

Be the first to PIP

---

*Originally published on [google](https://paragraph.com/@google-3/gnoland-cosmos)*
