Sui by Example
Welcome to the companion book to docs.sui.io. There we describe the Sui Move variant of the Move programming language and explain how to use it to write smart contracts and programming with objects.
Instead, this site builds upon the smart contract 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 Sui Move, 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.