You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Standardize example documentation across all READMEs
- Add Example Documentation section to main README describing the shared
README structure (Overview, Difficulty, Concepts, Deploy & Run, etc.)
- Add README column to category tables and link Example Index to README files
- Fix Example Index: add Difficulty column, correct test coverage, move
snipe-prevention to Intermediate to match its content level
- Standardize all snippet READMEs on a Deploy & Run section with package
path, named address table, and consistent Deploy/Tests/Prover subsections
- Update move-2 README with cross-links and expanded feature table
- Add snipe-prevention and move-2 to project structure tree
Co-authored-by: Greg Nazario <greg@gnazar.io>
Copy file name to clipboardExpand all lines: README.md
+67-42Lines changed: 67 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,15 @@ A curated collection of Move language examples for the [Aptos](https://aptos.dev
11
11
-[Overview](#overview)
12
12
-[Prerequisites](#prerequisites)
13
13
-[Quick Start](#quick-start)
14
+
-[Example Documentation](#example-documentation)
14
15
-[Examples by Category](#examples-by-category)
15
16
-[Beginner](#beginner)
16
17
-[Intermediate](#intermediate)
17
18
-[Advanced](#advanced)
18
19
-[Example Index](#example-index)
19
20
-[Concepts Covered](#concepts-covered)
20
21
-[Project Structure](#project-structure)
22
+
-[Named Addresses](#named-addresses)
21
23
22
24
---
23
25
@@ -76,63 +78,82 @@ After deploying, interact with your contract via the [Aptos Explorer](https://ex
76
78
77
79
---
78
80
81
+
## Example Documentation
82
+
83
+
Every example has a `README.md` in its package directory. Each follows the same structure so you can scan any example quickly:
84
+
85
+
| Section | Description |
86
+
|---------|-------------|
87
+
|**Overview**| What the example demonstrates and when to use it |
88
+
|**Difficulty**|`Beginner`, `Intermediate`, or `Advanced`|
89
+
|**Concepts Demonstrated**| Move language and Aptos framework topics covered |
90
+
|**Key Structs / Key Functions**| Tables summarizing the main types and entry points |
91
+
|**Deploy & Run**| Package path, named address, and commands to deploy, test, or run the prover |
92
+
|**Related Examples**| Cross-links to similar or prerequisite examples |
93
+
94
+
See [Named Addresses](#named-addresses) below for the address placeholder each package expects at deploy time.
95
+
96
+
For a summary of Move 2 features used across examples, see [snippets/move-2/README.md](snippets/move-2/README.md).
97
+
98
+
---
99
+
79
100
## Examples by Category
80
101
81
102
### Beginner
82
103
83
-
| Example | Directory | Description |
84
-
|---------|-----------|-------------|
85
-
|[Error Codes](snippets/error-codes/)|`snippets/error-codes/`| How to define and use error codes with doc comments for readable error messages |
86
-
|[Objects (Sticky Notes)](snippets/objects/)|`snippets/objects/`| Introduction to the Aptos Object model, comparing resources vs objects |
87
-
|[Private vs Public Functions](snippets/private-vs-public/)|`snippets/private-vs-public/`| Function visibility and why it matters for security (with a cheater example) |
104
+
| Example | Directory |README |Description |
105
+
|---------|-----------|--------|-------------|
106
+
|[Error Codes](snippets/error-codes/)|`snippets/error-codes/`|[README](snippets/error-codes/README.md)|How to define and use error codes with doc comments for readable error messages |
107
+
|[Objects (Sticky Notes)](snippets/objects/)|`snippets/objects/`|[README](snippets/objects/README.md)|Introduction to the Aptos Object model, comparing resources vs objects |
108
+
|[Private vs Public Functions](snippets/private-vs-public/)|`snippets/private-vs-public/`|[README](snippets/private-vs-public/README.md)|Function visibility and why it matters for security (with a cheater example) |
88
109
89
110
### Intermediate
90
111
91
-
| Example | Directory | Description |
92
-
|---------|-----------|-------------|
93
-
|[Controlled Mint](snippets/controlled-mint/)|`snippets/controlled-mint/`| Creator-controlled NFT minting with royalty support |
94
-
|[Data Structures (Min Heap)](snippets/data-structures/heap/)|`snippets/data-structures/heap/`| Min heap implementation with formal verification specs |
95
-
|[Design Patterns: Autonomous Objects](snippets/design-patterns/autonomous-objects/)|`snippets/design-patterns/autonomous-objects/`| Creating objects that can act autonomously via extend refs |
96
-
|[Modifying NFTs](snippets/modifying-nfts/)|`snippets/modifying-nfts/`| How to modify NFT properties, URIs, and extend collections with custom data |
97
-
|[Parallel NFT Minting](snippets/parallel-nfts/)|`snippets/parallel-nfts/`| Parallelized NFT minting using object-owned collections |
98
-
|[Storage Patterns](snippets/storage/)|`snippets/storage/`| Comparison of Vector, SimpleMap, Table, SmartTable, and SmartVector with gas benchmarks |
99
-
|[Struct Capabilities (Mailbox)](snippets/struct-capabilities/)|`snippets/struct-capabilities/`| Using structs for capability-based access control in a mailbox system |
112
+
| Example | Directory | README | Description |
113
+
|---------|-----------|--------|-------------|
114
+
|[Controlled Mint](snippets/controlled-mint/)|`snippets/controlled-mint/`|[README](snippets/controlled-mint/README.md)| Creator-controlled NFT minting with royalty support |
115
+
|[Data Structures (Min Heap)](snippets/data-structures/heap/)|`snippets/data-structures/heap/`|[README](snippets/data-structures/heap/README.md)| Min heap implementation with formal verification specs |
116
+
|[Design Patterns: Autonomous Objects](snippets/design-patterns/autonomous-objects/)|`snippets/design-patterns/autonomous-objects/`|[README](snippets/design-patterns/autonomous-objects/README.md)| Creating objects that can act autonomously via extend refs |
117
+
|[Modifying NFTs](snippets/modifying-nfts/)|`snippets/modifying-nfts/`|[README](snippets/modifying-nfts/README.md)| How to modify NFT properties, URIs, and extend collections with custom data |
118
+
|[Parallel NFT Minting](snippets/parallel-nfts/)|`snippets/parallel-nfts/`|[README](snippets/parallel-nfts/README.md)| Parallelized NFT minting using object-owned collections |
119
+
|[Snipe Prevention](snippets/snipe-prevention/)|`snippets/snipe-prevention/`|[README](snippets/snipe-prevention/README.md)| Anti-snipe protection for token launches using dispatchable fungible assets |
120
+
|[Storage Patterns](snippets/storage/)|`snippets/storage/`|[README](snippets/storage/README.md)| Comparison of Vector, SimpleMap, Table, SmartTable, and SmartVector with gas benchmarks |
121
+
|[Struct Capabilities (Mailbox)](snippets/struct-capabilities/)|`snippets/struct-capabilities/`|[README](snippets/struct-capabilities/README.md)| Using structs for capability-based access control in a mailbox system |
100
122
101
123
### Advanced
102
124
103
-
| Example | Directory | Description |
104
-
|---------|-----------|-------------|
105
-
|[Composable NFTs](snippets/composable-nfts/)|`snippets/composable-nfts/`| Dynamic composable NFTs where a Face can equip/unequip a Hat, changing the token image |
|[Fractional Token](snippets/fractional-token/)|`snippets/fractional-token/`| Fractionalizing a digital asset into fungible tokens and recombining them |
108
-
|[Liquid NFTs](snippets/liquid-nfts/)|`snippets/liquid-nfts/`| NFT liquidity pools using Coin, Legacy Token, and Fungible Asset standards |
109
-
|[Lootbox / Mystery Box](snippets/lootbox/)|`snippets/lootbox/`| On-chain mystery boxes using Aptos randomness, supporting coins, FAs, and NFTs |
110
-
|[Prover (Payment Escrow)](snippets/prover/)|`snippets/prover/`| Formal verification with the Move Prover on a payment escrow contract |
111
-
|[Snipe Prevention](snippets/snipe-prevention/)|`snippets/snipe-prevention/`| Anti-snipe protection for token launches using dispatchable fungible assets |
125
+
| Example | Directory | README | Description |
126
+
|---------|-----------|--------|-------------|
127
+
|[Composable NFTs](snippets/composable-nfts/)|`snippets/composable-nfts/`|[README](snippets/composable-nfts/README.md)| Dynamic composable NFTs where a Face can equip/unequip a Hat, changing the token image |
|[Fractional Token](snippets/fractional-token/)|`snippets/fractional-token/`|[README](snippets/fractional-token/README.md)| Fractionalizing a digital asset into fungible tokens and recombining them |
130
+
|[Liquid NFTs](snippets/liquid-nfts/)|`snippets/liquid-nfts/`|[README](snippets/liquid-nfts/README.md)| NFT liquidity pools using Coin, Legacy Token, and Fungible Asset standards |
131
+
|[Lootbox / Mystery Box](snippets/lootbox/)|`snippets/lootbox/`|[README](snippets/lootbox/README.md)| On-chain mystery boxes using Aptos randomness, supporting coins, FAs, and NFTs |
132
+
|[Prover (Payment Escrow)](snippets/prover/)|`snippets/prover/`|[README](snippets/prover/README.md)| Formal verification with the Move Prover on a payment escrow contract |
112
133
113
134
---
114
135
115
136
## Example Index
116
137
117
-
| # | Example | Key Concepts | Move 2 Features Used | Has Tests |
0 commit comments