An open API service indexing awesome lists of open source software.

https://github.com/hashfx/learn-move

Move language for Aptos Blockchain ecosystem
https://github.com/hashfx/learn-move

Last synced: 4 months ago
JSON representation

Move language for Aptos Blockchain ecosystem

Awesome Lists containing this project

README

          

# Move Langauge for Aptos Blockchain Ecosystem

## Setup Guide
+ Make sure python 3.6+ is installed
+ Run in terminal
+ for Linux/WSL:
```shell
curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3
```
+ with wget:
```powershell
wget -qO- "https://aptos.dev/scripts/install_cli.py" | python3
```
+ for WindowsNT in Powershell:
```powershell
iwr "https://aptos.dev/scripts/install_cli.py" -useb | Select-Object -ExpandProperty Content | python3
```
+ on MacOS:
```shell
brew install aptos
```
+ update Aptos CLI:
```powershell
aptos update
```

## Initial Setup
Navigate to your project directory and create a new move directory

+ create and change current directory to your dapp: ```cd YOUR_DIR_NAME```
+ create **move** directory: ```mkdir move```
+ select move as current directory: ```cd move```
+ init move: ```aptos move init --name YOUR_DAPP_NAME```
+ This command creates a Move.toml file and a sources/ directory inside the move directory.

## Create move module
+ In move directory, run:
```shell
aptos init --network devnet
```
+ press enter when prompted
+ copy the address string in ```account```
+ open the ```Move.toml``` file.
+ add the following code to move.toml, substituting your actual default profile account address from aptos/config.yaml:
```move
[addresses]
todolist_addr=''
```
+ Create a new ```.move``` file within the sources directory and add your **smart contract** code in it