Setup & Run
After installing Scaf, you can scaffold a sample project with:
npx scaf initThis will create a sample project with the following structure on the current directory:
.├── packages/├── scripts/├── genesis.yaml└── scaf.config.js- The
packages/directory includes sample Sui Move packages. This is where the package build and deploy function will look for your packages. - The
scripts/directory is where your scripts for interracting with the Sui blockchain will be. Initially, it includes a sample script that:- Starts a local, project-specific Sui blockchain.
- Publishes the
packages/fungible_tokenpackage on a local Sui blockchain. - Interracts with the published package by minting tokens.
genesis.yamlis the file used byNetwork.resetNetwork()to configure the initial state of the local blockchain. You need to update the file with your public addresses underaccounts:. If you comment out theNetwork.resetNetwork()forscaf.config.jsselects against which network the script actions will run. The options aremainnet,testnet,devnet, andlocalnet.
You can delete any of the files under packages/ and scripts/ and customize
the genesis.yaml and scaf.config.js based on your needs.