-
-
Save humantraffic/f062d580a389e8eeca9e1d48582ed75f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ apt update | |
$ apt install -y curl make git wget build-essential cmake gcc jq clang pkg-config libssl-dev screen | |
$ . <(wget -qO- https://raw.githubusercontent.com/SecorD0/utils/main/installers/golang.sh) | |
$ go version | |
Output: go version go1.17.2 linux/amd64 | |
$ adduser gno | |
$ usermod -aG sudo gno | |
$ su -l gno | |
$ git clone https://github.com/gnolang/gno | |
$ cd ./gno | |
$ make | |
$ ./build/gnokey add test1 --recover | |
Input: your password (2 times) | |
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 | |
$ ./build/gnokey add *your wallet name* | |
Input: your password (2 times) | |
!SAVE YOUR MNEMONIC! | |
Copy your addr: g1lhpx2... | |
$ screen -S main | |
$ ./build/gnoland | |
Exit: Ctrl + A + D | |
Come back: screen -r main | |
Go ahead and click Fork (top right): https://github.com/gnolang/gno/pulls | |
We're thrown to another page and create a new file: Add file => Create new file | |
In the name of the file, we indicate: addresses/*Your validator name*.txt | |
Paste the previously copied addr | |
Click on the 'Commit new file' button and create a pull request | |
Sign an addpkg (add avl package) transaction. | |
$ ./build/gnokey maketx addpkg test1 --pkgpath "gno.land/p/avl" --pkgdir "examples/gno.land/p/avl" --deposit 100gnot --gas-fee 1gnot --gas-wanted 2000000 > addpkg.avl.unsigned.txt | |
$ ./build/gnokey query "auth/accounts/g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5" | |
$ ./build/gnokey sign test1 --txpath addpkg.avl.unsigned.txt --chainid "testchain" --number 0 --sequence 0 > addpkg.avl.signed.txt | |
$ ./build/gnokey broadcast addpkg.avl.signed.txt | |
Sign an addpkg (add "gno.land/r/boards" package) transaction. | |
$ ./build/gnokey maketx addpkg test1 --pkgpath "gno.land/r/boards" --pkgdir "examples/gno.land/r/boards" --deposit 100gnot --gas-fee 1gnot --gas-wanted 300000000 > addpkg.boards.unsigned.txt | |
$ ./build/gnokey sign test1 --txpath addpkg.boards.unsigned.txt --chainid "testchain" --number 0 --sequence 1 > addpkg.boards.signed.txt | |
$ ./build/gnokey broadcast addpkg.boards.signed.txt | |
Sign a (contract) function call transaction -- create board. | |
$ ./build/gnokey maketx call test1 --pkgpath "gno.land/r/boards" --func CreateBoard --args "gnolang" --gas-fee 1gnot --gas-wanted 2000000 > createboard.unsigned.txt | |
$ ./build/gnokey sign test1 --txpath createboard.unsigned.txt --chainid "testchain" --number 0 --sequence 2 > createboard.signed.txt | |
$ ./build/gnokey broadcast createboard.signed.txt | |
Next, query for the permanent board ID by querying (you need this to create a new post): | |
$ ./build/gnokey query "vm/qeval" --data "gno.land/r/boards | |
Input: GetBoardIDFromName(\"gnolang\")" | |
Sign a (contract) function call transaction -- create post. | |
$ ./build/gnokey maketx call test1 --pkgpath "gno.land/r/boards" --func CreatePost --args 1 --args "Hello World" --args#file "./examples/gno.land/r/boards/README.md" --gas-fee 1gnot --gas-wanted 2000000 > createpost.unsigned.txt | |
$ ./build/gnokey sign test1 --txpath createpost.unsigned.txt --chainid "testchain" --number 0 --sequence 3 > createpost.signed.txt | |
$ ./build/gnokey broadcast createpost.signed.txt | |
Render page with ABCI query (evalquery). | |
$ ./build/gnokey query "vm/qeval" --data "gno.land/r/boards | |
Input: Render(\"gnolang\")" | |
Add a comment to a post. | |
$ ./build/gnokey maketx call test1 --pkgpath "gno.land/r/boards" --func CreateReply --args 1 --args 1 --args "A reply" --gas-fee 1gnot --gas-wanted 2000000 > createreply.unsigned.txt | |
$ ./build/gnokey sign test1 --txpath createreply.unsigned.txt --chainid "testchain" --number 0 --sequence 4 > createreply.signed.txt | |
$ ./build/gnokey broadcast createreply.signed.txt | |
$ ./build/gnokey query "vm/qeval" --data "gno.land/r/boards | |
Input: Render(\"gnolang/1\")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment