Skip to content

Algorithmic-Warfare/ef-scaffold

Repository files navigation

Sui Move Contract Local Dev Environment Scaffold

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.)

Note: This has only been tested in MacOS & Linux so far

Installing depedencies and requirements

  1. Install the rust tools
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Install node version manager
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

Node dependencies

Before applying the following, run nvm install 24 && nvm use 24

  1. Install yarn package manager
npm install -g yarn
  1. Install mprocs
npm install -g mprocs

Rust dependencies

  1. Install the sui tools manager
cargo install --git https://github.com/Mystenlabs/suiup.git --locked
  1. Install the latest sui tools
suiup install sui@testnet
  1. Install watchexec tool
cargo install --locked watchexec-cli

How to set up local network dev env

  1. Install Packages
yarn
cd packages/contracts && yarn
  1. Start Local network + fund address from local faucet + build contracts + deploy contracts.
yarn start:local

TL;DR of Local Build & Publish Workflow

# 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 test

After publish, .env.local (written where you run the script) contains at least:

  • PACKAGE_ID

Prerequisites

Install Node dependencies:

yarn
cd packages/contracts && yarn

Directory Layout (Relevant)

build_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

About

A scaffold for building SUI Move contracts + client for integration

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors