github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/docs/how-to-guides/interact-with-gnoland.md (about)

     1  ---
     2  id: interact-with-gnoland
     3  ---
     4  
     5  # Interact with Gno.land
     6  
     7  This tutorial will teach you how to interact with the gno.land blockchain by creating an account and calling various realms to send transactions on the network.
     8  
     9  ## Prerequisites
    10  
    11  - [Installation](../getting-started/local-setup/local-setup.md)
    12  
    13  ## Create an Account
    14  
    15  In order to interact with Gnoland, you need an account that you will use to sign and send transactions. You may create a new account with `gnokey generate` or recover an existing one with `gnokey add`. Confirm that your account was successfully added with `gnokey list` to display all accounts registered in the key base of your device.
    16  
    17  ```bash
    18  gnokey generate # create a new seed phrase (mnemonic)
    19  
    20  gnokey add -recover {your_account_name} # registers a key with the name set as the value you put in {your_account_name} with a seed phrase
    21  
    22  gnokey list # check the list of keys
    23  ```
    24  
    25  ## Register As a User
    26  
    27  ```bash
    28  gnokey maketx call \
    29      -gas-fee="1ugnot" \
    30      -gas-wanted="5000000" \
    31      -broadcast="true" \
    32      -remote="staging.gno.land:36657" \
    33      -chainid="test3" \
    34      -pkgpath="gno.land/r/demo/users" \
    35      -func="Register" \
    36      -args="" \
    37      -args="my_account" \ # (must be at least 6 characters, lowercase alphanumeric with underscore)
    38      -args="" \
    39      -send="200000000ugnot" \
    40      my-account
    41  
    42  # username: must be at least 6 characters, lowercase alphanumeric with underscore
    43  ```
    44  
    45  > **Note:** With a user registration fee of 200 GNOT and a gas fee that ranges up to 2 GNOT, you must have around 202 GNOT to complete this transaction. After registering as a user, you may replace your address with your `username` when developing or publishing a realm package.
    46  
    47  ## Get Account Information
    48  
    49  ```bash
    50  # Get account information
    51  gnokey query -remote="staging.gno.land:36657" "auth/accounts/{address}"
    52  
    53  # Get account balance
    54  gnokey query -remote="staging.gno.land:36657" "bank/balances/{address}"
    55  
    56  # Get /r/demo/boards user information
    57  gnokey query -remote="staging.gno.land:36657" -data "gno.land/r/demo/users
    58  my_account" "vm/qrender"
    59  ```
    60  
    61  ## Send Tokens
    62  
    63  The following command will send 1,000,000 ugnot (= 1 GNOT) to the address specified in the `to` argument.
    64  
    65  ```bash
    66  # Creates and broadcast a token transfer transaction
    67  gnokey maketx send \
    68      -gas-fee="1ugnot" \
    69      -gas-wanted="5000000" \
    70      -broadcast="true" \
    71      -remote="staging.gno.land:36657" \
    72      -chainid="test3" \
    73      -to="{address}" \ # g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5
    74      -send="{amount}{denom}" \ # 1234ugnot
    75      my-account
    76  ```
    77  
    78  ## Create a Board
    79  
    80  Try creating a board called `my_board` on the `gno.land/r/demo/boards` realm with the following command:
    81  
    82  ```bash
    83  # Calls the CreateBoard function of gno.land/r/demo/boards
    84  gnokey maketx call \
    85      -gas-fee="1ugnot" \
    86      -gas-wanted="5000000" \
    87      -broadcast="true" \
    88      -remote "staging.gno.land:36657" \
    89      -chainid="test3" \
    90      -pkgpath="gno.land/r/demo/boards" \
    91      -func="CreateBoard" \
    92      -args="my_board" \
    93      my-account
    94  ```