# Gno.land <> Slashbin ## First 2 hours impressions ### Testnet There is a lack of documentation for `./gnoland` : network seems to connect but no help to connect to network testnet2. I've launch `./gnoland` as it is, I'm a height #12 but I don't find the right testnet2. Can't wait to hold my own testnet to be my own RPC provider. ### ABCI (RPC) I didn't found api documentation for ABCI queries and txs. I think it is inherited from Cosmos to be compatible with Keplr ? Found a [proxy](https://github.com/disperze/gno-api) meanwhile, so I can dig into it to find useful informations for when I'll help creating modules in reactjs. Found a [Cosmos Gitbook](https://cosmos-network.gitbooks.io/cosmos-academy/content/cosmos-for-developers/tendermint/abci-protocol.html) ### Smartcontracts CosmWasm smartcontracts are developed in Rust. I don't read yet Rust so It could take a bit more than my fluent golang :) Found CW20 : https://github.com/TERITORI/teritori-chain/blob/main/CW20.md Found CosmosWasm contracts (Rust) here : https://github.com/deus-labs/cw-contracts/blob/main/contracts/ This doesn't seems unfeasible with some time and help if needed. ### Testing & implementations Didn't found a suitable documentation or examples to test and develop in gnolang. So going to take these two tutorials and repository as examples: * Gnolang-101 : https://github.com/onbloc/gnolang-101 * Gno basics : https://github.com/moul/gno-basics * Gnoland Repo : ./tests/files2/* For golang examples, I've found this folder in the gnolang/gno repository: * Gnolang examples : https://github.com/gnolang/gno/blob/master/tests/files2 * Unit tests example in gnolang : https://github.com/gnolang/gno/blob/master/tests/files2/extern/m1/main_test.gno ### Deployment Far way easier than in solidity : a game changer! Testing and code validation can be done through github and gitlab automations. ``` $ ./build/gnokey maketx call "compte" --gas-fee 1ugnot --broadcast true --chainid "test2" --remote "test2.gno.land:36657" --gas-wanted 500000 --pkgpath gno.land/r/moul_basics_args_v1 --func Hello --args Slashbin ("Hello Slashbin!" string) OK! GAS WANTED: 500000 GAS USED: 70123 ``` ### Inputs and outputs Just my personal advice after trying to use command lines. Gnokey queries to *vm/qrender* and *vm/qeval* needs an invisible newline `\n` for transmitting data concerning the board... We cannot type this newline in terminal so had to use copy paste. ``` $ ./build/gnokey query "vm/qrender" --data "gno.land/r/boards testboard" --remote test2.gno.land:36657 height: 0 data: \[[post](/r/boards?help&__func=CreateThread&bid=71&body.type=textarea)]... ``` I tried this but didn't work ``` $ ./build/gnokey query "vm/qrender" --data "gno.land/r/boards\ntestboard" --remote test2.gno.land:36657 ``` this works well and could be used ``` $ cat datafile gno.land/r/boards testboard $ ./build/gnokey query "vm/qrender" --data "$(< datafile)" --remote test2.gno.land:36657 ``` I've encountered the same problem when I make queries : we use `--args` as a parameter to the maketx method used to call a func. (eg) ``` ./build/gnokey maketx call g1ah79e3txw2kd2e8dscr2y2ucr888lm3qwm3v6e --pkgpath "gno.land/r/users" --func "Register" --gas-fee 1000000ugnot --gas-wanted 2000000 --send "200000000ugnot" --broadcast true --chainid test2 --args "undefined" --args "slashbin" --args "@slashbin_fr on Twitter :)" --remote test2.gno.land:36657 ``` Unused args are noted as a string "undefined" `--args "undefined"` but we should use a standardized and unified input type for both `vm/qeval` and `vm/qrender`, for example : ``` ./build/gnokey query "vm/qeval" --args "gno.land/r/boards" --args "GetBoardIDFromName(\"testboard\")" --remote test2.gno.land:36657 ./build/gnokey query "vm/qrender" --args "gno.land/r/boards" --args="testboard" --remote test2.gno.land:36657 ```