Sending Move Coin

Overview

This tutorial will guide you through the process of sending coins on the Initia blockchain, covering both Initia (Layer 1) and Minitias (Layer 2). Whether you're testing out transactions in a development environment or preparing to deploy your application, understanding how to manage and transfer tokens is essential.

Tutorial

Step 1: Acquire Coins from the Faucet (Optional)

If your account doesn't already hold tokens, you'll need to obtain some Testnet INIT tokens from the Initia Faucet. This step is crucial for testing transactions without using real assets.

Step 2: Check Balances

Before initiating a transaction, it's good practice to check the account balances. This verification ensures that the account has sufficient funds for the transaction and the associated gas fees.

> initiad query bank balances [addr] \
    --node [rpc-url]:[rpc-port]

Example Response:

balances:
- amount: "100000000"
  denom: uinit
pagination:
  next_key: null
  total: "0"

In the Cosmos ecosystem, the prefix u in the token denom (uinit) stands for micro (μ), equivalent to 0.000001. Therefore, 100,000,000 uinit translates to 100 INIT.

Step 3: Execute a Send Transaction

To send coins to another address, use the following command, adjusting the parameters as needed for your specific transaction:

> initiad tx bank send [key-name] [addr] 100000uinit \
    --gas auto --gas-adjustment 1.5 --gas-prices 0.15uinit \
    --node [rpc-url]:[rpc-port] --chain-id [chain-id]

The CLI will provide a gas estimate and transaction details. Review these carefully before confirming the transaction.

gas estimate: 909531
auth_info:
  fee:
    amount:
    - amount: "136430"
      denom: uinit
    ...
txhash: A33D7F2E8472506FCC8C1C480817C040B19D0340766B861781D5A822AD55D882

Step 4: Verify Balances Post-Transaction

After sending the coin, verify both the sender's and receiver's balances to confirm the transaction's success.

> initiad query bank balances [addr] \
    --node [rpc-url]:[rpc-port]

Example Response:

balances:
- amount: "99763570"
  denom: uinit
pagination:
  next_key: null
  total: "0"

The sender's balance will decrease by the amount sent plus the transaction fee, while the receiver's balance will increase by the sent amount.

Last updated

Logo

© 2024 Initia Foundation, All rights reserved.