testnet
GitHub

How to Mint OKRW with the CLI

quickstart beginner

A practical guide to minting OKRW tokens using the marood command-line interface, assuming a minter address has already been configured.

Prerequisites

  • The `minter_address` parameter for the `x/okrw` module must be set.
  • You must have the private key for the authorized minter address imported into `marood`.
  • The minter account must have a small amount of `aokrw` to pay for gas fees.

Command Structure

The command for minting is marood tx okrw mint. It takes two positional arguments: [recipient] and [amount]. You must also specify the signer with the --from flag, which must be the authorized minter.
marood tx okrw mint [recipient_address] [amount][denom] --from [minter_key_name] [flags]

Example: Minting 100 OKRW

Let's mint 100 OKRW to a new recipient. Note that 100 OKRW is represented as 100000000000000000000aokrw since aokrw is the base denomination with 18 decimal places (1 OKRW = 10^18 aokrw, the same convention as Ethereum's wei).
# The recipient address
RECIPIENT="maroo1..."

# The key name for the authorized minter
MINTER_KEY="okrw-minter"

# The amount to mint (100 OKRW = 100 * 10^18 aokrw)
AMOUNT="100000000000000000000aokrw"

marood tx okrw mint $RECIPIENT $AMOUNT --from $MINTER_KEY --chain-id maroo-testnet -y
Tip: Always double-check the number of zeros in the amount. `1 OKRW = 10^18 aokrw` (eighteen zeros).

Verifying the Mint

After the transaction is confirmed, you can verify that the recipient's balance has increased by the minted amount.
marood query bank balances $RECIPIENT

# Expected output should include:
# - amount: "100000000000000000000"
#   denom: aokrw
Source: maroo
ESC
Type to search