Before you begin, install the following:
- Sui prerequisites (Sui prerequisites only)
- Suibase
- Docker
- Node (>= 20)
- pnpm (>= 9)
pnpm create sui-dapp@latest
[package] name = "greeting" edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move
[dependencies] Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/devnet" }
For remote import, use the { git = "...", subdir = "...", rev = "..." }
.
Revision can be a branch, a tag, and a commit hash.
MyRemotePackage = { git = "https://some.remote/host.git", subdir = "remote/path", rev = "main" }
For local dependencies use local = path
. Path is relative to the package root
Local = { local = "../path/to" }
To resolve a version conflict and force a specific version for dependency
override use override = true
Override = { local = "../conflicting/version", override = true }
[addresses] greeting = "0x0"
Named addresses will be accessible in Move as @name
. They're also exported:
for example, std = "0x1"
is exported by the Standard Library.
alice = "0xA11CE"
[dev-dependencies]
The dev-dependencies section allows overriding dependencies for --test
and
--dev
modes. You can introduce test-only dependencies here.
Local = { local = "../path/to/dev-build" }
[dev-addresses]
The dev-addresses section allows overwriting named addresses for the --test
and --dev
modes.
alice = "0xB0B"
pnpm localnet:start
Local Sui Explorer will be available on localhost:9001
pnpm localnet:deploy
pnpm localnet:faucet 0xYOURADDRESS
pnpm start
Follow this guide to deploy the frontend app to Firebase.
To deploy the frontend part, do the following:
- Install Firebase Tools
pnpm add -g firebase-tools
- Create a new project on Firebase
Login to Firebase Console and create a new empty project.
- Init your project
pnpm frontend:deploy:init
- You will be asked to Login to Firebase.
- Then select your newly created Firebase project from the list.
- Once you're asked for a project alias, enter default.
- Deploy to Firebase
pnpm frontend:deploy
pnpm test
Currently we have blockchain tests only.
The project documentation can be found here.