A quick reference guide for all the terms you'll encounter in this challenge.
Capabilities that tell Move what operations are allowed on a type.
The four abilities:
copy- Value can be copieddrop- Value can be discarded/deletedstore- Value can be stored inside other structskey- Value can be a object (needsid: UID)
Example:
public struct MyStruct has copy, drop, store {
field: u64
}Where you'll use it: Day 3 (structs), Day 16 (objects)
A type representing a blockchain address (like an account ID).
Format: 0x followed by hexadecimal digits (0-9, a-f)
Example:
let owner: address = @0x1;
let user: address = @0xA1B2C3D4;Where you'll use it: Day 11 (TaskBoard)
A way to check conditions in tests. If the condition is false, the test fails.
Examples:
assert!(x > 0, error_code); // Check condition
assert_eq!(result, expected); // Check equalityWhere you'll use it: Day 2 (first test), Day 7 (comprehensive tests)
Temporarily accessing a value without taking ownership.
Two types:
&T- Immutable borrow (read-only)&mut T- Mutable borrow (can modify)
Example:
add_habit(&mut list, habit); // Borrow list mutably
let len = length(&list); // Borrow list immutablyWhere you'll use it: Day 4 (ownership), used throughout
Compiling your Move code into bytecode that Sui can execute.
Command: sui move build
What it does: Checks syntax, type safety, and generates executable code.
A function that creates a new instance of a struct.
Convention: Usually named new_* or create_*
Example:
public fun new_habit(name: String): Habit {
Habit {
name,
completed: false,
}
}Where you'll use it: Day 3 (Habit constructor), used throughout
An ability that allows a value to be discarded or destroyed.
Without drop: Values must be explicitly consumed or returned. With drop: Values can be ignored or go out of scope.
Example:
public struct CanDrop has drop {
value: u64
}
fun example() {
let x = CanDrop { value: 5 };
// x is dropped automatically at end of function
}Where you'll use it: Day 3 onwards (most structs need this)
A function that can be called directly from transactions/explorers.
Requirements:
- Marked with
entrykeyword - Can only be at module level
- Often takes
&mut TxContextas last parameter
Example:
entry fun create_farm(ctx: &mut TxContext) {
let farm = Farm { id: object::new(ctx), ... };
transfer::transfer(farm, ctx.sender());
}Where you'll use it: Day 17-21 (Sui objects and transactions)
A type that can be one of several variants.
Example:
public enum TaskStatus has copy, drop {
Open,
Completed,
}Where you'll use it: Day 9 (TaskStatus)
A message emitted during execution that can be queried later.
Example:
public struct PlantEvent has copy, drop {
planted_after: u64
}
// Emit the event
event::emit(PlantEvent { planted_after: 5 });Where you'll use it: Day 20 (events)
A named block of code that performs a specific task.
Types:
fun- Private (module only)public fun- Can be called from other modulesentry fun- Can be called from explorers
Example:
public fun add(a: u64, b: u64): u64 {
a + b
}Where you'll use it: Day 2 onwards (everywhere!)
An ability that allows a struct to be a Sui object.
Requirements:
- Must have
id: UIDfield - Can be owned and transferred
- Can be stored on-chain
Example:
public struct Farm has key {
id: UID,
counters: FarmCounters,
}Where you'll use it: Day 16 (first Sui object)
A container for Move code. Like a file or package in other languages.
Structure:
module package_name::module_name {
// structs, functions, etc.
}Example:
module challenge::day_01 {
// Your code here
}Where you'll use it: Day 1 onwards (every day has a module)
The programming language you're learning! Designed for safe asset management on blockchain.
Key features:
- Object-centric
- Type-safe
Can be changed/modified.
Usage:
- Variables:
let mut x = 5;(can be reassigned) - References:
&mut T(can modify the borrowed value)
Example:
let mut counter = 0;
counter = counter + 1; // OK, counter is mutable
add_habit(&mut list, habit); // Mutable borrowIn Sui, a struct with key ability and a UID field.
Properties:
- Stored on-chain
- Can be owned by addresses (or other ownership models)
- Can be transferred
- Has a unique ID
Example:
public struct Farm has key {
id: UID,
planted: u64,
}Where you'll use it: Day 15-21 (Sui objects)
A type that represents "maybe has a value, maybe doesn't".
Variants:
Some(value)- Has a valueNone- No value
Example:
let maybe_index: Option<u64> = option::some(5);
let nothing: Option<u64> = option::none();Where you'll use it: Day 12 (finding tasks)
Every value in Move has exactly one owner. When ownership transfers (moves), the original owner can't use it anymore.
Example:
let habit = new_habit(b"Run");
add_habit(&mut list, habit); // habit moves into list
// Can't use habit here anymore!Where you'll use it: Day 4 (explicitly taught), used everywhere
Built-in basic types in Move.
Common primitives:
u8,u64,u128,u256- Unsigned integersbool- Boolean (true/false)address- Blockchain address
Example:
let count: u64 = 42;
let flag: bool = true;
let owner: address = @0x1;Where you'll use it: Day 1 (introduction), used everywhere
Visible and callable from outside the module.
Usage:
public fun- Function can be called from other modules and addresses
Example:
public fun get_count(counter: &Counter): u64 {
counter.value
}Where you'll use it: Day 10 (visibility)
A way to access a value without taking ownership.
Types:
&T- Immutable reference (read-only)&mut T- Mutable reference (can modify)
Example:
fun read_value(x: &u64): u64 { *x } // Read only
fun increment(x: &mut u64) { *x = *x + 1 } // Can modifyWhere you'll use it: Day 4 onwards (everywhere!)
The type of value a function returns.
Syntax: fun name(params): ReturnType { ... }
Example:
public fun sum(a: u64, b: u64): u64 { // Returns u64
a + b
}Note: In Move, the last expression is automatically returned (no return keyword needed).
Note: In Move, when you're returning any variable you shoudlnt put ; at the end
A custom data type that groups related fields together.
Example:
public struct Habit has copy, drop {
name: String,
completed: bool,
}Where you'll use it: Day 3 onwards (core concept)
The blockchain platform you're building for(it's basically the Ferrari of other blockchains). Known for high performance and object-centric design.
A function that verifies your code works correctly.
Marked with: #[test] attribute
Example:
#[test]
fun test_sum() {
let result = sum(1, 2);
assert_eq!(result, 3);
}Run with: sui move test
Where you'll use it: Day 2 onwards (testing your code)
Information about the current transaction (who sent it, when, etc.).
Common uses:
object::new(ctx)- Create a UIDctx.sender()- Get sender's addressctx.epoch()- Get current epoch
Example:
entry fun create_something(ctx: &mut TxContext) {
let id = object::new(ctx);
let owner = ctx.sender();
// ...
}Where you'll use it: Day 16-21 (objects and entry functions)
Explicitly specifying the type of a variable or expression.
Example:
let x: u64 = 5; // Type annotation
let name: String = b"Alice".to_string();Where you'll use it: Day 1 onwards (Move requires types)
Unique Identifier - what makes a struct a Sui object.
Created with: object::new(ctx)
Example:
public struct Farm has key {
id: UID, // Required for objects
value: u64,
}
fun create_farm(ctx: &mut TxContext): Farm {
Farm {
id: object::new(ctx),
value: 0,
}
}Where you'll use it: Day 16 onwards (Sui objects)
A dynamic array - a list that can grow or shrink.
Common operations:
vector::empty<T>()- Create empty vectorvector::push_back(&mut vec, item)- Add to endvector::length(&vec)- Get sizevector::borrow(&vec, index)- Read elementvector::borrow_mut(&mut vec, index)- Modify element
Example:
let mut numbers: vector<u64> = vector::empty();
vector::push_back(&mut numbers, 1);
vector::push_back(&mut numbers, 2);Where you'll use it: Day 4 (vectors and lists)
Controls who can access/call functions or structs.
Levels:
fun- Private (module only)public fun- Other modules & addresses can callentry fun- Can be called from explorers
Where you'll use it: Day 10 (explicitly taught)
| Ability | Meaning | Common Use |
|---|---|---|
copy |
Can be duplicated | Simple data types |
drop |
Can be discarded | Most structs |
store |
Can be in other structs | Nested data |
key |
Can be an object | Top-level objects |
| Type | Range | Example |
|---|---|---|
u8 |
0 to 255 | let x: u8 = 200; |
u64 |
0 to 2^64-1 | let x: u64 = 1000; |
u128 |
0 to 2^128-1 | let x: u128 = 1000000; |
bool |
true/false | let x: bool = true; |
address |
Blockchain address | let x: address = @0x1; |
| Type | Meaning | Can Modify? |
|---|---|---|
&T |
Immutable reference | No (read-only) |
&mut T |
Mutable reference | Yes |
T |
By value (move) | Transfer ownership |
Using This Glossary:
- Press
Ctrl+F/Cmd+Fto search for terms - Bookmark this page for quick reference
- Terms are linked to the days where you'll learn them
Learning Tip: Don't try to memorize everything! Refer back to this glossary as you encounter new terms during the challenge.