CLI
Move Development
Manage Move packages, tools, and smart contracts on Kanari Network.
Move Development
Manage Move packages and tools directly from the Kanari CLI.
Usage
kanari move <COMMAND>Commands
build
Build the current Move package in the working directory.
Usage:
kanari move buildnew
Create a new Move package skeleton.
Usage:
kanari move new <NAME>Arguments:
<NAME>: The name of the package to be created.
test
Run unit tests for the Move package.
Usage:
kanari move test [OPTIONS] [filter]Arguments:
[filter]: An optional filter string to determine which unit tests to run. A unit test will be run only if it contains this string in its fully qualified (<addr>::<module_name>::<fn_name>) name.
Options:
-i, --gas-limit <gas-limit>: Bound the amount of gas used by any one test.-l, --list: List all tests.-t, --threads <num-threads>: Number of threads to use for running tests [default: 8].-s, --statistics [<report-statistics>]: Report test statistics at the end of testing. CSV report generated if 'csv' passed.--stackless: Use the stackless bytecode interpreter to run the tests and cross check its results with the execution result from Move VM.--verbose: Verbose mode.--coverage: Collect coverage information for later use with the variousmove coveragesubcommands. Currently supported only in debug builds.
docgen
Generate documentation for the Move package.
Usage:
kanari move docgenpublish
Publish the Move module to the blockchain.
Usage:
kanari move publish [OPTIONS] --sender <SENDER>Options:
--package-path <PACKAGE_PATH>: Path to the Move package (defaults to current directory).--gas-limit <GAS_LIMIT>: Gas limit for the transaction [default: 100000].--gas-price <GAS_PRICE>: Gas price in Mist [default: 100].--sender <SENDER>: Account address publishing the module (from wallet).--password <PASSWORD>: Wallet password (required for signing).--rpc <RPC_ENDPOINT>: RPC endpoint.
verify
Verify Move module bytecode locally using an RPC endpoint.
Usage:
kanari move verifycall
Call a specific Move function on the blockchain.
Usage:
kanari move call [OPTIONS] --package <PACKAGE> --module <MODULE> --function <FUNCTION> --sender <SENDER>Options:
--package <PACKAGE>: Package address (hex). Example:0x840512ff...--module <MODULE>: Module name (required).--function <FUNCTION>: Function name in module.--type-args <TYPE_ARGS>: Type arguments to the generic function being called. All must be specified. Example:0x1::coin::KANARI--args [<ARGS>...]: Simplified ordered args. ObjectIDs, Addresses must be hex strings. Example:0x123 1000 true--sender <SENDER>: Sender/Caller address (from wallet).--password <PASSWORD>: Wallet password (required for signing).--gas-limit <GAS_LIMIT>: Gas limit for the transaction [default: 100000].--gas-price <GAS_PRICE>: Gas price in Mist [default: 100].--rpc <RPC_ENDPOINT>: RPC endpoint.
Examples:
kanari move call --package 0x1 --module coin --function transfer --args "address:0x2" "u64:1000" --sender 0x1
kanari move call --package 0x1 --module game --function start --args "[\"0x1\",\"0x2\"]" --sender 0x1 --password mypassOptions
-h, --help: Print help information for themovecommand or a specific subcommand.