aptos-labs/daily-move

Daily Move Snippets

36

stars

66

commits

Move

primary language

Aug 23, 2026

updated

README

Aptos Move Examples

A curated collection of Move language examples for the Aptos blockchain. Each snippet demonstrates a specific concept, design pattern, or feature of Move on Aptos, written using Move 2 syntax.

Originally created by @gregnazario as a series of educational tweets on learning Move piece by piece.

Coding agents: start at AGENTS.md (commands, named addresses, non-interactive CLI). Doc index: llms.txt.


Table of Contents


Overview

This repository contains standalone Move snippets that each focus on a specific topic. The examples progress from basic language features (error codes, structs, objects) through intermediate patterns (NFT minting, storage data structures) to advanced use cases (composable NFTs, liquid tokens, formal verification).

All examples use Move 2 syntax, including:

  • Receiver-style function calls (vector.length() instead of vector::length(&vector))
  • Index notation for resource access (Resource[address] instead of borrow_global<Resource>(address))
  • Enum types
  • Pattern matching with match
  • for loops

Prerequisites

  • Aptos CLI installed
  • Basic familiarity with Move language concepts (modules, structs, resources, signers)
  • An Aptos account only if you publish (not required to compile or test)

Quick Start

Run these from the repository root. Replace <example-dir> with a path from the example index. Most packages use the named address deploy_addr; exceptions are listed under Named Addresses.

Compile (no account)

aptos move compile --dev --package-dir snippets/<example-dir>

snippets/fractional-token cannot use --dev. Compile it with:

aptos move compile --named-addresses fraction_addr=0x1337,minter=0x2337 --package-dir snippets/fractional-token

Test

aptos move test --dev --package-dir snippets/<example-dir>

Not every package has tests. See the Tests column in the example index or the catalog in AGENTS.md.

Deploy

Publishing needs a CLI profile and prompts for confirmation unless you pass --assume-yes.

aptos init --network devnet --assume-yes
aptos move publish --assume-yes --named-addresses deploy_addr=default --package-dir snippets/<example-dir>

Using an explicit address instead of a profile name:

MY_ADDR=0x12345
aptos move publish --assume-yes --named-addresses deploy_addr=$MY_ADDR --package-dir snippets/<example-dir>

snippets/snipe-prevention must be deployed as a code object:

aptos move deploy-object --assume-yes --named-addresses antisnipe=default --package-dir snippets/snipe-prevention

After deploying, interact with your contract via the Aptos Explorer.


For coding agents

ResourceUse it for
AGENTS.mdNon-interactive CLI flags, per-package compile/test commands, Move 2 conventions, CI coverage, gotchas
llms.txtShort index of every example README
snippets/<example>/README.mdModule name, source file, entry/view functions, exact commands

Practical rules:

  • Compile and test locally; do not publish to mainnet.
  • Never run aptos init without --network and --assume-yes (it will prompt or hang).
  • Named addresses are not all deploy_addr. Check Move.toml or the catalog before compiling.
  • Prefer --package-dir snippets/... from the repo root so commands match the READMEs.

Example Documentation

Every example has a README.md in its package directory. Each follows the same structure so you (or an agent) can scan any example quickly:

SectionDescription
OverviewWhat the example demonstrates and when to use it
DifficultyBeginner, Intermediate, or Advanced
Concepts DemonstratedMove language and Aptos framework topics covered
Key Structs / Key FunctionsTables summarizing the main types and entry points
Deploy & RunPackage path, fully qualified module, source file, named address, then Compile, Deploy, Tests, and Prover when they apply
Related ExamplesCross-links to similar or prerequisite examples

See Named Addresses below for the address placeholder each package expects at compile/deploy time.

For a summary of Move 2 features used across examples, see snippets/move-2/README.md.


Examples by Category

Beginner

ExampleDirectoryREADMEDescription
Error Codessnippets/error-codes/READMEHow to define and use error codes with doc comments for readable error messages
Objects (Sticky Notes)snippets/objects/READMEIntroduction to the Aptos Object model, comparing resources vs objects
Private vs Public Functionssnippets/private-vs-public/READMEFunction visibility and why it matters for security (with a cheater example)

Intermediate

ExampleDirectoryREADMEDescription
Controlled Mintsnippets/controlled-mint/READMECreator-controlled NFT minting with royalty support
Data Structures (Min Heap)snippets/data-structures/heap/READMEMin heap implementation with formal verification specs
Design Patterns: Autonomous Objectssnippets/design-patterns/autonomous-objects/READMECreating objects that can act autonomously via extend refs
Modifying NFTssnippets/modifying-nfts/READMEHow to modify NFT properties, URIs, and extend collections with custom data
Parallel NFT Mintingsnippets/parallel-nfts/READMEParallelized NFT minting using object-owned collections
Snipe Preventionsnippets/snipe-prevention/READMEAnti-snipe protection for token launches using dispatchable fungible assets
Storage Patternssnippets/storage/READMEComparison of Vector, SimpleMap, Table, SmartTable, and SmartVector with gas benchmarks
Struct Capabilities (Mailbox)snippets/struct-capabilities/READMEUsing structs for capability-based access control in a mailbox system

Advanced

ExampleDirectoryREADMEDescription
Composable NFTssnippets/composable-nfts/READMEDynamic composable NFTs where a Face can equip/unequip a Hat, changing the token image
FA Lockup / Escrowsnippets/fa-lockup-example/READMETime-locked fungible asset escrow with dispatchable transfers
Fractional Tokensnippets/fractional-token/READMEFractionalizing a digital asset into fungible tokens and recombining them
Liquid NFTssnippets/liquid-nfts/READMENFT liquidity pools using Coin, Legacy Token, and Fungible Asset standards
Lootbox / Mystery Boxsnippets/lootbox/READMEOn-chain mystery boxes using Aptos randomness, supporting coins, FAs, and NFTs
Prover (Payment Escrow)snippets/prover/READMEFormal verification with the Move Prover on a payment escrow contract

Example Index

#ExampleDifficultyKey ConceptsMove 2 Features UsedTests
1error-codesBeginnerError codes, doc comments, abort, assert!Receiver styleYes
2objectsBeginnerObject model, resources vs objects, ExtendRef, DeleteRef, TransferRefReceiver style, index notation
3private-vs-publicBeginnerFunction visibility (public, public entry, entry, private), securityReceiver style, index notation
4controlled-mintIntermediateToken V2 minting, collections, royalties, named objectsReceiver style, index notation, for loopsYes
5data-structures/heapIntermediateMin heap, heap sort, formal verification specsReceiver style, for loopsYes + Prover
6design-patterns/autonomous-objectsIntermediateAutonomous object pattern, ownership permission patternReceiver style, index notation
7modifying-nftsIntermediateMutable NFTs, MutatorRef, BurnRef, extending objectsReceiver style, index notation
8parallel-nftsIntermediateParallelized minting, object-owned collections, numbered tokensReceiver style, index notation
9snipe-preventionIntermediateDispatchable FA hooks, anti-snipe, allowlists, enum typesReceiver style, index notation, enums, matchYes
10storageIntermediateVector, SimpleMap, Table, SmartTable, SmartVector, gas comparisonReceiver style, index notation, for loops
11struct-capabilitiesIntermediateCapability pattern, SmartTable, SmartVector, envelopesReceiver style, index notation
12composable-nftsAdvancedComposable tokens, dynamic URIs, transfer lockingReceiver style, index notationYes
13fa-lockup-exampleAdvancedFungible asset escrow, time locks, enum types, matchReceiver style, index notation, enums, match, for loopsYes
14fractional-tokenAdvancedFractionalization, fungible assets, primary storesReceiver style, index notationYes
15liquid-nftsAdvancedLiquidity pools, Coin vs FA, legacy tokens, pseudorandomReceiver style, index notation, for loopsYes
16lootboxAdvancedRandomness API, multi-asset boxes, soulbound ticketsReceiver style, index notation, for loops
17proverAdvancedMove Prover, formal specs, invariants, schemasReceiver style, index notationProver

Concepts Covered

Language Features

  • Error Codes: Named constants with doc comments for readable abort messages
  • Function Visibility: public, public entry, entry, private, public(friend), inline
  • Structs & Resources: has key, has store, has copy, has drop abilities
  • Generics & Phantom Types: phantom type parameters for type-safe wrappers
  • Enum Types: Move 2 enum declarations with variant matching
  • Pattern Matching: match expressions for enums and destructuring

Aptos Framework

  • Object Model: ConstructorRef, ExtendRef, DeleteRef, TransferRef, object creation, named/sticky objects
  • Token V2 (Token Objects): Collections, tokens, MutatorRef, BurnRef, numbered tokens
  • Fungible Assets: Metadata, FungibleStore, primary stores, mint/burn/transfer
  • Coin (Legacy): coin::initialize, mint/burn capabilities, CoinStore
  • Randomness: randomness::u64_range for on-chain random number generation
  • Timestamps: timestamp::now_seconds(), timestamp::now_microseconds()

Design Patterns

  • Autonomous Objects: Objects that can act as signers via ExtendRef for programmatic actions
  • Object Ownership Permission: Checking object::is_owner or object::owns before granting access
  • Capability Pattern: Using structs as capabilities to gate access to privileged operations
  • Named Objects: Deterministic object addresses via object::create_named_object
  • Collection-Owned Minting: Object-owned collections that allow parallelized or public minting
  • Dynamic NFTs: Changing token metadata (URI, description) based on state changes
  • Composable NFTs: Nesting objects (equipping items) and reflecting changes in metadata
  • Fractionalization: Converting a single NFT into fungible shares and back
  • Escrow Patterns: Time-locked and simple escrow using objects and fungible stores

Storage & Data Structures

  • Vector: O(1) append, O(n) lookup by value; best for small datasets
  • SimpleMap: O(n) operations; stored as unsorted vector of key-value pairs
  • Table: O(1) operations; no iteration; each entry stored separately on-chain
  • SmartTable: O(bucket_size) operations; hybrid of vector and table with bucketing
  • SmartVector: O(1) append; scales past vector limits using table-backed buckets
  • Min Heap: Priority queue with O(n log n) sort, O(log n) insert/pop

Formal Verification

  • Move Prover: spec blocks, ensures, requires, aborts_if, aborts_with
  • Invariants: Struct invariants that must always hold
  • Schemas: Reusable specification patterns

Project Structure

snippets/
├── composable-nfts/          # Dynamic composable Face + Hat NFTs
│   ├── Move.toml
│   └── sources/
│       └── composable_nfts.move
├── controlled-mint/          # Creator-controlled batch NFT minting
│   ├── Move.toml
│   └── sources/
│       └── controlled_mint.move
├── data-structures/
│   └── heap/                 # Min heap with formal verification
│       ├── Move.toml
│       ├── sources/
│       │   └── min_heap_u64.move
│       └── tests/
│           └── min_heap_u64_tests.move
├── design-patterns/
│   └── autonomous-objects/   # Autonomous object design pattern
│       ├── Move.toml
│       └── sources/
│           └── base.move
├── error-codes/              # Error code best practices
│   ├── Move.toml
│   └── sources/
│       └── error_codes.move
├── fa-lockup-example/        # Fungible asset time-locked escrow
│   ├── Move.toml
│   └── sources/
│       └── lockup.move
├── fractional-token/         # NFT fractionalization into fungible tokens
│   ├── Move.toml
│   ├── sources/
│   │   └── fractional_token.move
│   └── tests/
│       ├── common_tests.move
│       └── fractional_token_tests.move
├── liquid-nfts/              # NFT liquidity pools (3 implementations)
│   ├── Move.toml
│   └── sources/
│       ├── common.move
│       ├── liquid_coin.move
│       ├── liquid_coin_legacy.move
│       └── liquid_fungible_asset.move
├── lootbox/                  # On-chain mystery boxes with randomness
│   ├── Move.toml
│   └── sources/
│       └── mystery_box.move
├── modifying-nfts/           # Mutable NFT properties and extension
│   ├── Move.toml
│   └── sources/
│       └── modify_nfts.move
├── move-2/                   # Move 2 feature reference (redirects to examples)
│   └── README.md
├── parallel-nfts/            # Parallelized public NFT minting
│   ├── Move.toml
│   └── sources/
│       └── parallel_mint.move
├── private-vs-public/        # Function visibility & security
│   ├── cheater/
│   │   ├── Move.toml
│   │   └── sources/
│   │       └── cheater.move
│   └── dice_roll/
│       ├── Move.toml
│       └── sources/
│           └── dice_roll.move
├── prover/                   # Formal verification with Move Prover
│   ├── Move.toml
│   └── sources/
│       └── payment_escrow.move
├── snipe-prevention/         # Anti-snipe protection for token launches
│   ├── Move.toml
│   └── sources/
│       └── antisnipe_token.move
├── storage/                  # Data structure comparison with gas benchmarks
│   ├── Move.toml
│   └── sources/
│       ├── allowlist_simple_map.move
│       ├── allowlist_smart_table.move
│       ├── allowlist_smart_vector.move
│       ├── allowlist_table.move
│       ├── allowlist_vector.move
│       └── object_management.move
└── struct-capabilities/      # Capability-based mailbox system
    ├── Move.toml
    └── sources/
        └── mailbox.move

Named Addresses

Different examples use different named addresses in their Move.toml. When compiling without --dev, or when deploying, substitute the appropriate address. Agents: copy the compile line from the package README or from AGENTS.md rather than assuming deploy_addr.

Named AddressUsed By
deploy_addrMost examples (error-codes, composable-nfts, controlled-mint, modifying-nfts, parallel-nfts, storage, struct-capabilities, private-vs-public, data-structures/heap)
deploy_addressdesign-patterns/autonomous-objects
fraction_addrfractional-token, liquid-nfts
minterfractional-token (required together with fraction_addr; do not compile this package with --dev)
mystery_addrlootbox
lockup_deployerfa-lockup-example
deployerprover
antisnipesnipe-prevention
(none)objects — the module is 0x42::sticky_note (numeric address, not a named address)

License

See LICENSE for details.

Contributors

gregnazario

54 commits

cursoragent

10 commits

JohnChangUK

1 commits

mkurnikov

1 commits

aptos-labs/daily-move

Daily Move Snippets

36

stars

66

commits

Move

primary language

Aug 23, 2026

updated

README

Aptos Move Examples

A curated collection of Move language examples for the Aptos blockchain. Each snippet demonstrates a specific concept, design pattern, or feature of Move on Aptos, written using Move 2 syntax.

Originally created by @gregnazario as a series of educational tweets on learning Move piece by piece.

Coding agents: start at AGENTS.md (commands, named addresses, non-interactive CLI). Doc index: llms.txt.


Table of Contents


Overview

This repository contains standalone Move snippets that each focus on a specific topic. The examples progress from basic language features (error codes, structs, objects) through intermediate patterns (NFT minting, storage data structures) to advanced use cases (composable NFTs, liquid tokens, formal verification).

All examples use Move 2 syntax, including:

  • Receiver-style function calls (vector.length() instead of vector::length(&vector))
  • Index notation for resource access (Resource[address] instead of borrow_global<Resource>(address))
  • Enum types
  • Pattern matching with match
  • for loops

Prerequisites

  • Aptos CLI installed
  • Basic familiarity with Move language concepts (modules, structs, resources, signers)
  • An Aptos account only if you publish (not required to compile or test)

Quick Start

Run these from the repository root. Replace <example-dir> with a path from the example index. Most packages use the named address deploy_addr; exceptions are listed under Named Addresses.

Compile (no account)

aptos move compile --dev --package-dir snippets/<example-dir>

snippets/fractional-token cannot use --dev. Compile it with:

aptos move compile --named-addresses fraction_addr=0x1337,minter=0x2337 --package-dir snippets/fractional-token

Test

aptos move test --dev --package-dir snippets/<example-dir>

Not every package has tests. See the Tests column in the example index or the catalog in AGENTS.md.

Deploy

Publishing needs a CLI profile and prompts for confirmation unless you pass --assume-yes.

aptos init --network devnet --assume-yes
aptos move publish --assume-yes --named-addresses deploy_addr=default --package-dir snippets/<example-dir>

Using an explicit address instead of a profile name:

MY_ADDR=0x12345
aptos move publish --assume-yes --named-addresses deploy_addr=$MY_ADDR --package-dir snippets/<example-dir>

snippets/snipe-prevention must be deployed as a code object:

aptos move deploy-object --assume-yes --named-addresses antisnipe=default --package-dir snippets/snipe-prevention

After deploying, interact with your contract via the Aptos Explorer.


For coding agents

ResourceUse it for
AGENTS.mdNon-interactive CLI flags, per-package compile/test commands, Move 2 conventions, CI coverage, gotchas
llms.txtShort index of every example README
snippets/<example>/README.mdModule name, source file, entry/view functions, exact commands

Practical rules:

  • Compile and test locally; do not publish to mainnet.
  • Never run aptos init without --network and --assume-yes (it will prompt or hang).
  • Named addresses are not all deploy_addr. Check Move.toml or the catalog before compiling.
  • Prefer --package-dir snippets/... from the repo root so commands match the READMEs.

Example Documentation

Every example has a README.md in its package directory. Each follows the same structure so you (or an agent) can scan any example quickly:

SectionDescription
OverviewWhat the example demonstrates and when to use it
DifficultyBeginner, Intermediate, or Advanced
Concepts DemonstratedMove language and Aptos framework topics covered
Key Structs / Key FunctionsTables summarizing the main types and entry points
Deploy & RunPackage path, fully qualified module, source file, named address, then Compile, Deploy, Tests, and Prover when they apply
Related ExamplesCross-links to similar or prerequisite examples

See Named Addresses below for the address placeholder each package expects at compile/deploy time.

For a summary of Move 2 features used across examples, see snippets/move-2/README.md.


Examples by Category

Beginner

ExampleDirectoryREADMEDescription
Error Codessnippets/error-codes/READMEHow to define and use error codes with doc comments for readable error messages
Objects (Sticky Notes)snippets/objects/READMEIntroduction to the Aptos Object model, comparing resources vs objects
Private vs Public Functionssnippets/private-vs-public/READMEFunction visibility and why it matters for security (with a cheater example)

Intermediate

ExampleDirectoryREADMEDescription
Controlled Mintsnippets/controlled-mint/READMECreator-controlled NFT minting with royalty support
Data Structures (Min Heap)snippets/data-structures/heap/READMEMin heap implementation with formal verification specs
Design Patterns: Autonomous Objectssnippets/design-patterns/autonomous-objects/READMECreating objects that can act autonomously via extend refs
Modifying NFTssnippets/modifying-nfts/READMEHow to modify NFT properties, URIs, and extend collections with custom data
Parallel NFT Mintingsnippets/parallel-nfts/READMEParallelized NFT minting using object-owned collections
Snipe Preventionsnippets/snipe-prevention/READMEAnti-snipe protection for token launches using dispatchable fungible assets
Storage Patternssnippets/storage/READMEComparison of Vector, SimpleMap, Table, SmartTable, and SmartVector with gas benchmarks
Struct Capabilities (Mailbox)snippets/struct-capabilities/READMEUsing structs for capability-based access control in a mailbox system

Advanced

ExampleDirectoryREADMEDescription
Composable NFTssnippets/composable-nfts/READMEDynamic composable NFTs where a Face can equip/unequip a Hat, changing the token image
FA Lockup / Escrowsnippets/fa-lockup-example/READMETime-locked fungible asset escrow with dispatchable transfers
Fractional Tokensnippets/fractional-token/READMEFractionalizing a digital asset into fungible tokens and recombining them
Liquid NFTssnippets/liquid-nfts/READMENFT liquidity pools using Coin, Legacy Token, and Fungible Asset standards
Lootbox / Mystery Boxsnippets/lootbox/READMEOn-chain mystery boxes using Aptos randomness, supporting coins, FAs, and NFTs
Prover (Payment Escrow)snippets/prover/READMEFormal verification with the Move Prover on a payment escrow contract

Example Index

#ExampleDifficultyKey ConceptsMove 2 Features UsedTests
1error-codesBeginnerError codes, doc comments, abort, assert!Receiver styleYes
2objectsBeginnerObject model, resources vs objects, ExtendRef, DeleteRef, TransferRefReceiver style, index notation
3private-vs-publicBeginnerFunction visibility (public, public entry, entry, private), securityReceiver style, index notation
4controlled-mintIntermediateToken V2 minting, collections, royalties, named objectsReceiver style, index notation, for loopsYes
5data-structures/heapIntermediateMin heap, heap sort, formal verification specsReceiver style, for loopsYes + Prover
6design-patterns/autonomous-objectsIntermediateAutonomous object pattern, ownership permission patternReceiver style, index notation
7modifying-nftsIntermediateMutable NFTs, MutatorRef, BurnRef, extending objectsReceiver style, index notation
8parallel-nftsIntermediateParallelized minting, object-owned collections, numbered tokensReceiver style, index notation
9snipe-preventionIntermediateDispatchable FA hooks, anti-snipe, allowlists, enum typesReceiver style, index notation, enums, matchYes
10storageIntermediateVector, SimpleMap, Table, SmartTable, SmartVector, gas comparisonReceiver style, index notation, for loops
11struct-capabilitiesIntermediateCapability pattern, SmartTable, SmartVector, envelopesReceiver style, index notation
12composable-nftsAdvancedComposable tokens, dynamic URIs, transfer lockingReceiver style, index notationYes
13fa-lockup-exampleAdvancedFungible asset escrow, time locks, enum types, matchReceiver style, index notation, enums, match, for loopsYes
14fractional-tokenAdvancedFractionalization, fungible assets, primary storesReceiver style, index notationYes
15liquid-nftsAdvancedLiquidity pools, Coin vs FA, legacy tokens, pseudorandomReceiver style, index notation, for loopsYes
16lootboxAdvancedRandomness API, multi-asset boxes, soulbound ticketsReceiver style, index notation, for loops
17proverAdvancedMove Prover, formal specs, invariants, schemasReceiver style, index notationProver

Concepts Covered

Language Features

  • Error Codes: Named constants with doc comments for readable abort messages
  • Function Visibility: public, public entry, entry, private, public(friend), inline
  • Structs & Resources: has key, has store, has copy, has drop abilities
  • Generics & Phantom Types: phantom type parameters for type-safe wrappers
  • Enum Types: Move 2 enum declarations with variant matching
  • Pattern Matching: match expressions for enums and destructuring

Aptos Framework

  • Object Model: ConstructorRef, ExtendRef, DeleteRef, TransferRef, object creation, named/sticky objects
  • Token V2 (Token Objects): Collections, tokens, MutatorRef, BurnRef, numbered tokens
  • Fungible Assets: Metadata, FungibleStore, primary stores, mint/burn/transfer
  • Coin (Legacy): coin::initialize, mint/burn capabilities, CoinStore
  • Randomness: randomness::u64_range for on-chain random number generation
  • Timestamps: timestamp::now_seconds(), timestamp::now_microseconds()

Design Patterns

  • Autonomous Objects: Objects that can act as signers via ExtendRef for programmatic actions
  • Object Ownership Permission: Checking object::is_owner or object::owns before granting access
  • Capability Pattern: Using structs as capabilities to gate access to privileged operations
  • Named Objects: Deterministic object addresses via object::create_named_object
  • Collection-Owned Minting: Object-owned collections that allow parallelized or public minting
  • Dynamic NFTs: Changing token metadata (URI, description) based on state changes
  • Composable NFTs: Nesting objects (equipping items) and reflecting changes in metadata
  • Fractionalization: Converting a single NFT into fungible shares and back
  • Escrow Patterns: Time-locked and simple escrow using objects and fungible stores

Storage & Data Structures

  • Vector: O(1) append, O(n) lookup by value; best for small datasets
  • SimpleMap: O(n) operations; stored as unsorted vector of key-value pairs
  • Table: O(1) operations; no iteration; each entry stored separately on-chain
  • SmartTable: O(bucket_size) operations; hybrid of vector and table with bucketing
  • SmartVector: O(1) append; scales past vector limits using table-backed buckets
  • Min Heap: Priority queue with O(n log n) sort, O(log n) insert/pop

Formal Verification

  • Move Prover: spec blocks, ensures, requires, aborts_if, aborts_with
  • Invariants: Struct invariants that must always hold
  • Schemas: Reusable specification patterns

Project Structure

snippets/
├── composable-nfts/          # Dynamic composable Face + Hat NFTs
│   ├── Move.toml
│   └── sources/
│       └── composable_nfts.move
├── controlled-mint/          # Creator-controlled batch NFT minting
│   ├── Move.toml
│   └── sources/
│       └── controlled_mint.move
├── data-structures/
│   └── heap/                 # Min heap with formal verification
│       ├── Move.toml
│       ├── sources/
│       │   └── min_heap_u64.move
│       └── tests/
│           └── min_heap_u64_tests.move
├── design-patterns/
│   └── autonomous-objects/   # Autonomous object design pattern
│       ├── Move.toml
│       └── sources/
│           └── base.move
├── error-codes/              # Error code best practices
│   ├── Move.toml
│   └── sources/
│       └── error_codes.move
├── fa-lockup-example/        # Fungible asset time-locked escrow
│   ├── Move.toml
│   └── sources/
│       └── lockup.move
├── fractional-token/         # NFT fractionalization into fungible tokens
│   ├── Move.toml
│   ├── sources/
│   │   └── fractional_token.move
│   └── tests/
│       ├── common_tests.move
│       └── fractional_token_tests.move
├── liquid-nfts/              # NFT liquidity pools (3 implementations)
│   ├── Move.toml
│   └── sources/
│       ├── common.move
│       ├── liquid_coin.move
│       ├── liquid_coin_legacy.move
│       └── liquid_fungible_asset.move
├── lootbox/                  # On-chain mystery boxes with randomness
│   ├── Move.toml
│   └── sources/
│       └── mystery_box.move
├── modifying-nfts/           # Mutable NFT properties and extension
│   ├── Move.toml
│   └── sources/
│       └── modify_nfts.move
├── move-2/                   # Move 2 feature reference (redirects to examples)
│   └── README.md
├── parallel-nfts/            # Parallelized public NFT minting
│   ├── Move.toml
│   └── sources/
│       └── parallel_mint.move
├── private-vs-public/        # Function visibility & security
│   ├── cheater/
│   │   ├── Move.toml
│   │   └── sources/
│   │       └── cheater.move
│   └── dice_roll/
│       ├── Move.toml
│       └── sources/
│           └── dice_roll.move
├── prover/                   # Formal verification with Move Prover
│   ├── Move.toml
│   └── sources/
│       └── payment_escrow.move
├── snipe-prevention/         # Anti-snipe protection for token launches
│   ├── Move.toml
│   └── sources/
│       └── antisnipe_token.move
├── storage/                  # Data structure comparison with gas benchmarks
│   ├── Move.toml
│   └── sources/
│       ├── allowlist_simple_map.move
│       ├── allowlist_smart_table.move
│       ├── allowlist_smart_vector.move
│       ├── allowlist_table.move
│       ├── allowlist_vector.move
│       └── object_management.move
└── struct-capabilities/      # Capability-based mailbox system
    ├── Move.toml
    └── sources/
        └── mailbox.move

Named Addresses

Different examples use different named addresses in their Move.toml. When compiling without --dev, or when deploying, substitute the appropriate address. Agents: copy the compile line from the package README or from AGENTS.md rather than assuming deploy_addr.

Named AddressUsed By
deploy_addrMost examples (error-codes, composable-nfts, controlled-mint, modifying-nfts, parallel-nfts, storage, struct-capabilities, private-vs-public, data-structures/heap)
deploy_addressdesign-patterns/autonomous-objects
fraction_addrfractional-token, liquid-nfts
minterfractional-token (required together with fraction_addr; do not compile this package with --dev)
mystery_addrlootbox
lockup_deployerfa-lockup-example
deployerprover
antisnipesnipe-prevention
(none)objects — the module is 0x42::sticky_note (numeric address, not a named address)

License

See LICENSE for details.

Contributors

gregnazario

54 commits

cursoragent

10 commits

JohnChangUK

1 commits

mkurnikov

1 commits

Languages

Move

100.0%