A concise boilerplate for building and testing a .move contract system against local network. (Current code purposefully minimal: no custom events, no shared metadata object, and no public entry mint wrapper yet.)
- Install the rust tools
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh- Install node version manager
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bashBefore applying the following, run nvm install 24 && nvm use 24
- Install yarn package manager
npm install -g yarn- Install mprocs
npm install -g mprocs- Install the sui tools manager
cargo install --git https://github.com/Mystenlabs/suiup.git --locked- Install the latest sui tools
suiup install sui@testnet- Install watchexec tool
cargo install --locked watchexec-cli- Install Packages
yarn
cd packages/contracts && yarn- Start Local network + fund address from local faucet + build contracts + deploy contracts.
yarn start:local# 1. Install deps
yarn
# 2. Start a local network
yarn start:local
# 3. Fund / import account
yarn fund # imports key (see .env) + faucet funding loop
# 4. Build the Move package
yarn --cwd packages/contracts build:watch
# 5. Publish to localnet (from repo root OR pass '.' if inside package)
yarn --cwd packages/contracts deploy:watch
# 6. Run `.move` tests
yarn --cwd packages/contracts testAfter publish, .env.local (written where you run the script) contains at least:
PACKAGE_ID
- Rust (https://rust-lang.org/tools/install/)
- Sui CLI (https://docs.sui.io) in
PATH bash,jq- nodejs (tested with
v20.19) &&yarn(Corepack / Node.js) - Optional:
docker,mprocs,watchexec
Install Node dependencies:
yarn
cd packages/contracts && yarnbuild_scripts/ # Root helper scripts (start, fund, mint placeholder, etc.)
packages/contracts/ # Move package root
packages/contracts/sources/ # Location for `.move` files
packages/contracts/tests/token_tests.move
packages/contracts/build_scripts/ # Build & publish tooling
mprocs.yaml # Dev process orchestration