Move development on Aptos
Move is a safe, resource-oriented programming language for smart contracts on the Aptos blockchain. It uses a linear type system to enforce ownership and prevent double-spending at compile time.
Key concepts: modules, structs, resources, abilities (key, store, copy, drop),
entry functions, and the global storage model.
Use the {{ tool(name="move_package_status") }} MCP tool to check for compilation errors and warnings.
{{ tool(name="move_package_status") }} with package_path set to the package directory.Notice that like with a build system, the tool is idempotent, and does not cause recompilation if the compilation result and sources are up-to-date.
When fixing compilation errors, follow this iterative loop:
{{ tool(name="move_package_status") }} with the package path.Use the {{ tool(name="move_package_manifest") }} MCP tool to discover source files and dependencies
of a Move package:
{{ tool(name="move_package_manifest") }} with package_path set to the package directory.source_paths (target modules) and dep_paths (dependencies).Use the {{ tool(name="move_package_verify") }} MCP tool to run the Move Prover on a package and
formally verify its specifications:
{{ tool(name="move_package_verify") }} with package_path set to the package directory.Verification of a full package can be slow. Use the filter parameter to restrict the prover
to only the code you are working on:
filter to module_name::function_name to verify one function.filter to module_name to verify all functions in one module.A good workflow when writing or editing specs is:
The timeout parameter controls the solver timeout per verification condition (default: 40
seconds). Useful strategies:
If a verification timeout cannot be resolved, then as a last resort, the verification
of the related function can be disabled by adding pragma verify = false; to the spec block.
When writing or fixing specifications, follow this iterative loop:
{{ tool(name="move_package_verify") }} with the package path. Use a filter for the
function or module you are working on and a short timeout (5–10 s) for fast feedback.pragma verify = false; to its spec
block and move on.pragma aborts_if_is_partial. Do not weaken
specifications.