🏃♂️ Quickstart
Requirements
Before you begin, you need to install the following tools:
- Node (>= v18.17)
- Yarn (v1 or v2+)
- Git
- Aptos CLI
Quickstart
To get started with Scaffold-Move, follow the steps below:
- Clone this repo & install dependencies
git clone https://github.com/arjanjohan/scaffold-move.git
cd scaffold-move
yarn install
- Run a local network in the first terminal:
yarn chain
If you are deploying to devnet or testnet, you can skip this step.
- On a second terminal, initialize a new account.
yarn account
This command overwrites packages/move/.aptos/config.yaml
with a new Aptos account. The new address is copied over to the first address in the Move.toml file. If no address exists in this file, it is added on a new line.
- Deploy the test modules:
yarn deploy
This command deploys the move modules to the selected network. The modules are located in packages/move/sources
and can be modified to suit your needs. The yarn deploy
command uses aptos move publish
to publish the modules to the network. After this is executes the script located in scripts/loadContracts.js
to make the new modules available in the nextjs frontend.
- On a third terminal, start your NextJS app:
yarn start
Visit your app on: http://localhost:3000
. You can interact with your Move modules using the Debug Modules
page. You can tweak the app config in packages/nextjs/scaffold.config.ts
.
What's next:
- Edit your Move module
OnchainBio.move
inpackages/move/sources
- Edit your frontend homepage at
packages/nextjs/app/page.tsx
. For guidance on routing and configuring pages/layouts checkout the Next.js documentation.