Interact with CLI
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.
$ initiad move build --path ./move/managed_coin --devUnit Test
The initiad CLI can also be used to run uint tests locally.
$ initiad move test --path ./move/managed_coin --devThe above command will generate the following terminal output:
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: 0Test Coverage
The initiad can be used to generate test coverage report.
The output contains the result for each test case followed by a basic coverage summary resembling.
Deploying a Move Package
Create account and get a faucet fund to do on-chain operations.
After you create the account, you can run deploy command to deploy a package to the network.
Executing an Entry Function
The following command will try to mint managed coin to the acc0 account.
Executing a View Function
Retrieve the coin Metadata address.
Query minted coin balance with the Metadata.
Last updated