Documentation
Kanari DocsDeveloper documentation
Kanari Documentation
Move Development
Build, test, publish, verify, and call Move packages on Kanari Network.
Last updated
Move Development
The move command group wraps Move package tooling and on-chain Kanari RPC flows.
kanari move <COMMAND>
Local package commands
build
Build the current Move package.
kanari move build
The command reroots to the nearest Move package root before compiling.
new
Create a new Move package skeleton.
kanari move new <NAME>
test
Run Move unit tests.
kanari move test [OPTIONS] [FILTER]
Common options:
-i, --gas-limit <GAS_LIMIT>: maximum gas used by one test.-l, --list: list tests.-t, --threads <THREADS>: test runner threads; default is8.-s, --statistics [<MODE>]: report test statistics;csvwrites CSV output.--stackless: cross-check with the stackless bytecode interpreter.--verbose: verbose output.--coverage: collect coverage in debug builds.
Kanari registers both Move stdlib natives and Kanari system natives for tests.
docgen
Generate Move package documentation.
kanari move docgen
RPC-backed commands
These commands talk to a node. They accept --rpc <RPC_ENDPOINT>; if omitted, the active CLI environment is used.
publish
Build and publish modules whose module address matches the selected sender wallet.
kanari move publish --package-path <PACKAGE_PATH>
Options:
--package-path <PATH>: package path. Defaults to the current package root.--gas-limit <GAS_LIMIT>: override default transaction gas limit.--gas-price <GAS_PRICE>: override default transaction gas price.--rpc <RPC_ENDPOINT>: RPC endpoint override.
The sender is the selected wallet. If no password is passed through the command, the CLI prompts for the wallet password.
verify
Verify Move module bytecode through the RPC verification path.
kanari move verify --file <MODULE_BYTECODE_PATH>
kanari move verify --package-path <PACKAGE_PATH>
Options:
--file <PATH>: compiled.mvmodule file.--package-path <PATH>: build a Move package and verify the first compiled module.--rpc <RPC_ENDPOINT>: RPC endpoint override.
Either --file or --package-path is required.
call
Submit an on-chain Move function call.
kanari move call \
--package <PACKAGE_ADDRESS> \
--module <MODULE> \
--function <FUNCTION> \
--type-args <TYPE_ARG> \
--args <ARG_1> <ARG_2>
Options:
--package <ADDRESS>: package address only. The combinedaddress::moduleform is rejected.--module <MODULE>: module name.--function <FUNCTION>: function name.--type-args <TYPE_ARGS>: repeatable generic type arguments.--args [<ARGS>...]: simplified ordered arguments.--gas-limit <GAS_LIMIT>: override default transaction gas limit.--gas-price <GAS_PRICE>: override default transaction gas price.--rpc <RPC_ENDPOINT>: RPC endpoint override.
The sender is the selected wallet. The CLI prompts for the wallet password when signing is required.
Example:
kanari move call \
--package 0x2 \
--module coin \
--function transfer \
--args 0xRECIPIENT 1000