# Gno.land 测试网2任务中文教程

By [NodeStake](https://paragraph.com/@nodestake) · 2022-08-26

---

主要完成两个任务：
---------

1.链上注册用户 2.链上发布信息 ​ **系统要求(可以Ubuntu虚拟机上完成)：** Ubuntu 18.04+ (推荐20.04+) 1GB RAM, 1v CPU 20 GB SSD

安装基础环境
------

    sudo apt-get install git curl build-essential make jq gcc snapd chrony -y
    

**安装Go18+**

    rm -rf $HOME/go
    rm -rf /usr/local/go
    cd ~
    curl https://dl.google.com/go/go1.18.5.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
    cat <<'EOF' >>$HOME/.profile
    export GOROOT=/usr/local/go
    export GOPATH=$HOME/go
    export GO111MODULE=on
    export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
    EOF
    source $HOME/.profile
    go version
    

**编译gnokey执行文件**

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

**创建新钱包或者恢复原有钱包**

    # 创建新钱包
    gnokey add mykey
    
    # 或者恢复原有钱包
    gnokey add mykey --recover
    

注册用户
----

1.从Faucet获取测试币，大概需要205个GNOT，每次能获取50个.

[https://test2.gno.land/faucet](https://test2.gno.land/faucet)

​​2.查询账户余额(将YOUR\_ACCOUNT\_ADDRESS替换为你的地址)

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

得到类似以下结果

    height: 0
    data: {
    "BaseAccount": {
    "address": "g1z0fyvylcz3x8yqanu2th2f9s8vljf83p494gkh",
    "coins": "201557898ugnot",
    "public_key": {
    "@type": "/tm.PubKeySecp256k1",
    "value": "Aj6gEVJLm885yDjmvRW6qII6otW7YSSL12po8QQ5McOg"
    },
    "account_number": "201919",
    "sequence": "26"
    }
    }
    

记下account\_number:201919，和sequence:26

3.创建用户

替换YOUR\_USERNAME为你的用户名，用户名只能是小写的字母和下划线，并且至少6个字母

替换ACCOUNT\_NUM为account\_number数，如上是201919

替换SEQ\_NUM为sequence数，如上是26

    gnokey maketx call mykey --pkgpath "gno.land/r/users" --func "Register" --gas-fee 1000000ugnot --gas-wanted 2000000 --send 200000000ugnot --args "" --args "YOUR_USERNAME" --args "" > unsigned.tx gnokey sign mykey --txpath unsigned.tx --chainid test2 --number ACCOUNT_NUM --sequence SEQ_NUM > signed.tx gnokey broadcast signed.tx --remote test2.gno.land:36657 
    

执行完上步将会输出

    OK!
    GAS WANTED: 2000000
    GAS USED:   1638275
    

4.查看是否创建成功 ​

[https://test2.gno.land/r/users](https://test2.gno.land/r/users) 在此能找到你的用户名，则创建成功.

任务：发表你对Gno.land的兴趣
------------------

(原文:[https://test2.gno.land/r/boards:testboard/4](https://test2.gno.land/r/boards:testboard/4))

写一篇文章（大于250 字），在您最喜欢的媒体上描述您对 gno.land 和 gnolang 感兴趣的原因。 在链上回复您文章的 URL 链接作为评论，以获得奖励。

替换`文章URL`为你的链接

    gnokey maketx call mykey --pkgpath "gno.land/r/boards" --func "CreateReply" --gas-fee 1000000ugnot --gas-wanted 2000000 --send "" --broadcast true --chainid test2 --args "1" --args "4" --args "4" --args "文章URL" --remote test2.gno.land:36657 
    

查看是否创建成功 ​

[https://test2.gno.land/r/boards:testboard/4](https://test2.gno.land/r/boards:testboard/4) 在此能找到你的回贴，则表示成功 ​ Gno的测试网会维持一段时间，我们也将持续更新新任务。

* * *

获取资讯和教程:

NodeStake推特: ​[https://twitter.com/NodeStake\_top](https://twitter.com/NodeStake_top)

NodeStake社区Discord: [https://discord.gg/puGTkXvkE8](https://discord.gg/puGTkXvkE8)

---

*Originally published on [NodeStake](https://paragraph.com/@nodestake/gno-land-2)*
