Move by Example

This book is being deprecated in favor of the Move Book, which is a more comprehensive and up-to-date resource for learning Move. The Move Book not only features a more in-depth explanation of Move's concepts, but also includes a more extensive set of examples and exercises. We recommend that you use the Move Book as your primary resource for learning Move.

Welcome to the companion book to docs.sui.io. There we describe the Move on Sui and explain how to use it to write smart contracts.

Instead, this site builds upon the application examples already highlighted with component-by-component examples you may reference at any time. What is more expressive in the world of code than the code itself? In this book, you'll find examples for most of the features of Sui Move as well as a number of advanced patterns that can be used right away to improve your modules.

All code samples in this book are written with the assumption that you use Move on Sui, which can installed with this command:

$ cargo install --locked --git https://github.com/MystenLabs/sui.git --branch "main" sui

Keep in mind that the branch is set to main. If you're developing with our devnet, instead follow the instructions to install Sui.