Initia (Closed Testnet)
  • Reminder
    • ⛔Confidentiality Disclaimer
  • WELCOME TO CLOSED TESTNET
    • Welcome to Closed Testnet
  • About Initia
    • What is the Initia Platform?
      • Architecture
        • Layer 1
        • Layer 2
      • Aligning Initia (coming soon!)
    • InitiaDEX
    • Enshrined Liquidity and Staking
  • Developers
    • Initiad
      • Download Initiad
      • Using Initiad
    • Get INIT token
    • Build your own Minitia
      • Simple Minitia Setup
      • Connect Minitia to L1
        • OPinit Stack
          • OPinit Module
          • OPinit Bots
        • Relayer
          • Fetching Oracle Prices
    • Virtual Machines
      • MoveVM
        • Interact with CLI
      • WasmVM
    • Contracts
      • Move Contracts
      • CosmWasm Contracts
      • EVM Contracts (Coming Soon)
    • Oracles
  • Initia Developer Tutorials
    • 1. Create account
    • 2. Send Move coin
    • 3. Interchain Message
    • 4. Create your own Move coin
    • 5. Create your own Move NFT
    • 6. Build and Publish Contracts
      • Move Module
      • CosmWasm Contract
  • Core Applications
    • Core Applications
      • Wallet
      • Initia App
      • Usernames
      • Initia Scan
  • Node Operators
    • Running Initia Node
      • Prerequisites
      • Oracle
      • Boot an Initia Node
      • Connect to Initia Network
      • Cosmovisor Guide
    • Configuring Initia Validator
  • References and Tools
    • Move Language
    • Rust Language (CosmWasm)
    • Closed Testnet Chain Information
    • Chain Parameters
    • Initia.js
    • API Docs
    • API Docs (minimove)
    • API Docs (miniwasm)
    • Whitelisted Tokens and Pairs
Powered by GitBook
On this page
  • Install Initiad
  • Access a Full Node
  • Configuring Initiad
  • Keys
  • Querying
  • Transactions
  • Fees
  • Setting Fees
  • Fee Estimation
  1. Developers
  2. Initiad

Using Initiad

PreviousDownload InitiadNextGet INIT token

Last updated 1 year ago

This guide covers the usage of Initiad , a client facing command line interface to interact with the Initia blockchain. Initiad can operate as full node, validator node and client, and when used as a client, it must connect with full node as a RPC. You can query chain state and change chain state by sending a transaction using initiad. By running initiad -h , you can find more information on how to use initiad. For more information about full node operators, refer to  section.

Install Initiad

Installing Initiad is the first step to having access to Initia blockchain. Refer to Download Initiad section for how to install Initiad.

Access a Full Node

Initiad must be connected to a full node to connect to a running network to send queries and transactions through Initiad. Refer to section to run your own full node.

If yoiu are not running your own full node, you can still interact with Initia blockchain by using the publicly shared . All query and transaction commands on Initiad have --node flag, and by inputting port and public RPC addresses, you can get remote full node access.

Configuring Initiad

You may enter option for every command execution on Initiad, but you can also save pre-set configuration values to skip entering option for every command execution.

# init initiad with default setting
initiad init local --chain-id testnet

# modify node section to the remote full node rpc address.
vim ~/.initia/config/client.toml

Keys

initiad keys command is used to saving and managing private keys on a local device keyring, where the saved keys can be used to execute transaction commands.

initiad keys add <your-key-name> [flags]

Querying

initiad query command provides an interface for chain state query, and each of Cosmos modules and CometBFT (prev. Tendermint) provide client facing query interface.

initiad query [module-name] [query-name] ... [flags]
# ex) initiad query bank balances [address]

Transactions

initiad tx command is an operation to update chain state by sending a transaction, and each of Cosmos modules provide a client facing tx interface.

initiad tx [module-name] [tx-name] ... [flags]
# ex) initiad tx bank send [from-addr] [to-addr] [amount] [flags]

Fees

Transactions on Initia blockchain require users to pay a transaction fee with INIT, where the amount is calculated based on gas_limit. INIT fee amount is calculated by the product of gas_limit and base_min_gas_price from Move Params.

base_fee = gas_limit * base_min_gas_price

Initia blockchain has a native DEX which can be utilized for users to choose various token denoms to pay transaction fee. When a user selects a denom from the list of whitelisted tokens to pay transaction fee, Initia blockchain swaps the selected token into INIT on the native DEX and runs a fee check.

Setting Fees

Set with fees flag

User can directly set the final fee amount.

initiad tx bank send ... \
  --fees=10000uinit

Set with gas-prices flag

Or, the user can set the gas-prices which is multiplied to gas_limit to send transaction.

initiad tx bank send ... \
  --gas-prices=0.15uinit

Fee Estimation

By using initiad, users can estimate the gas amount which is the measurement of how much resource a certain transaction will spend, and set the final fee amount using the estimated gas amount. By applying --gas=auto to the transaction command you can get the estimated gas amount. A --gas-adjustment flag can be used to adjust the originally estimated gas amount to make sure the transaction is broadcasted successfully.

initiad tx bank send [sender] [to] [amount] \
  --chain-id [chain-id]                     \
  --gas-prices 0.15uinit                    \
  --gas-adjustment 1.4.                     \
  --gas auto

There are 2 ways to set fees on initiad. Unlike other Cosmos chains, when user is setting fees on Initia blockchain, user must check base_min_gas_price and base_denom which are on-chain Move parameters. On-chain parameters can be checked on section.

Running Initia Node
Running Initia Node
RPC endpoints
Chain Parameters