In this tutorial, initiad and minitiad both can be used
The both initia and minitia have a command line interface (CLI) for developing on the Initia ecosystem. This document describes how to use the initia CLI tool. To download or build the CLI , follow Download Initiad.
Building Move
The initia CLI can be used to build a Move package. The below example uses the managed_coin in initia-tutorials.
$initiadmovebuild--path./move/managed_coin--dev
Unit Test
The initiad CLI can also be used to run uint tests locally.
$initiadmovetest--path./move/managed_coin--dev
The above command will generate the following terminal output:
In Move.toml there are two types of address lists which are addresses and dev-addresses. If a value exists on addresses the same value cannot exist on dev-addresses simutaneously. If you want to enter the same values for both locations, addresses must have "_" for the move CLI to work.
$ initiad move test --path ./move/managed_coin --dev --coverage
INCLUDING DEPENDENCY InitiaStdlib
INCLUDING DEPENDENCY MoveNursery
INCLUDING DEPENDENCY MoveStdlib
BUILDING basic_coin
Running Move unit tests
[ PASS ] 0x2::managed_coin::test_create_and_mint
Test result: OK. Total tests: 1; passed: 1; failed: 0
+-------------------------+
| Move Coverage Summary |
+-------------------------+
Module 0000000000000000000000000000000000000000000000000000000000000002::managed_coin
>>> % Module coverage: 100.00
+-------------------------+
| % Move Coverage: 100.00 |
+-------------------------+
Please use `initiad move coverage -h` for more detailed source or bytecode test coverage of this package
$ initiad keys add acc0
$ initiad keys parse $(initiad keys show acc0 --address)
# update your_address in ./move/managed_coin/Move.toml to 0x address
# get token from the faucet https://faucet.initia.tech/