Welcome to this repository! This project introduces the core concepts of the Move language on the Aptos blockchain through three modules:
basic_concepts.movecounter.moveprimitive.move
These examples are designed to help you learn and teach Move development in a clear, modular way โ with real code you can deploy and test.
This file introduces:
- Structs (custom data types)
- Resources (unique assets)
- Functions for creating, moving, and storing resources
Itโs meant to show the fundamentals of how data is structured and handled in Move.
This file is a practical example of:
- Defining a resource called
Counter - Creating and storing a
Counterper user - Incrementing and reading the counter value
Youโll learn how to write reusable modules and safely mutate on-chain data.
This file explores:
- Moveโs primitive types like
u8,u64,bool, andaddress - How to use these types inside structs and functions
- Example logic around math, comparisons, and conditionals
- Aptos CLI installed: https://aptos.dev/guides/aptos_cli/
- Aptos account created:
aptos init - Fund your devnet account (via faucet):
aptos account fund --account <your-address>
Open Move.toml and define your address like this:
[addresses]
my_address = "_"
_is a placeholder that youโll replace at build/deploy time.
aptos move compile --named-addresses my_address=0xYourAccountAddressThis builds the Move code and replaces the placeholder address with yours.
aptos move deploy-object --named-addresses my_address=0xYourAccountAddressYouโll see something like:
"Do you want to publish this package at object address 0xObjectAddress?"
Say yes. This creates a new object (a special address that holds your module) and publishes your smart contract code to it.
Using deploy-object is the modern way to:
- Dynamically deploy logic
- Enable upgradeability
- Separate contract code from your main account
This keeps your blockchain interactions modular and future-proof.
Once deployed, try calling:
counter::create()counter::increment()counter::get_value()
Use the Aptos CLI or a frontend (e.g. Aptos Explorer or Typescript SDK) to interact.
Feel free to fork, clone, and build on top of these examples. PRs are welcome if you want to contribute more teaching examples!
This repo is intentionally beginner-friendly, and ideal for:
- Developer workshops
- Bootcamp sessions
- Personal learning
Happy building with Move! ๐