Move Book and Move Language Reference

repository·main·Indexed 42 days ago

https://github.com/mystenlabs/move-book

Comprehensive documentation and language reference for the Move language on Sui. Includes guides on Move abilities, object states, transfer functions, reserved addresses, and environment setup for IDEs like VSCode, IntelliJ IDEA, Emacs, and Zed.

Tokens
132.2K
Snippets
414
Records
632
Agent score
51%

What's inside Move Book

  1. Overview of Move language fundamentals

    main

    The Move Basics chapter provides a foundation in the Move language syntax, type system, and core concepts. This knowledge is applicable to any Move program, though specific Sui storage and object models are covered in subsequent chapters.

    Key areas covered include:

    • Code Organization: Modules, comments, primitive types, the address type, expressions, and functions.
    • Custom Types: Structs and the Ability system (e.g., drop).
    • Code Reuse: Importing modules and using the Standard Library (e.g., vector, Option, String).
    • Logic & Control: Control flow, enums with pattern matching, struct methods, and visibility modifiers.
    • Safety & Ownership: Ownership and scope, the copy ability, constants, aborting execution (assert and abort), and references.
    • Abstraction: Generics, macro functions, internal permits, type reflection, and testing.
  2. Overview of the Sui Framework

    main
    The Sui Framework is a default dependency set provided in the Sui Package Manifest. It builds upon the Standard Library to provide Sui-specific functionality, including storage operations, native types, and core modules required for building on the Sui network. It is categorized into Core, Collections, Coins and Assets, and Utilities.
  3. Overview of Advanced Sui Programmability

    main

    Advanced Sui programmability involves several distinct functional areas required for building sophisticated decentralized applications. These areas include:

    • The Execution Environment: Understanding the transaction context, module initializers, epoch/time, events, and Binary Canonical Serialization (BCS).
    • Storage at Scale: Moving beyond simple vectors to use Dynamic Fields, Dynamic Object Fields, and Dynamic Collections to attach arbitrary data to objects without static type or size limits.
    • Patterns of Authority (Access Control): Implementing permission systems using Capabilities, Witnesses (including One-Time Witnesses), Publishers, Display, and the 'Hot Potato' pattern.
    • Assets and Funds: Managing fungible value through two primary methods: using Coin objects or using Balance attached to an address.
    • Code Evolution: Managing the lifecycle of published code through Package Upgrades and data migration strategies.
  4. What is the Move language reference?

    main
    The Move Reference is the official, comprehensive language specification for the Move programming language. It covers syntax, types, abilities, functions, and all language features. While Move is a next-generation language for secure asset programming primarily used in blockchain environments (like Sui) to manage and transfer assets, it is designed with use cases outside of blockchain in mind as well.
  5. Overview of Advanced Move Usage

    main

    Advanced Move usage covers features that extend beyond the language fundamentals, including advanced programming techniques, extended build configurations, and specific language modifiers. Key areas of focus include:

    • Compilation Modes: Managing different build modes, such as including unpublishable code in named build modes.
    • Entry Functions: Using the entry modifier and understanding the static hot-potato guarantee, which ensures safe transaction boundaries.
  6. Overview of The Move Book

    main

    The Move Book is a comprehensive guide designed for developers interested in learning the Move programming language and building smart contracts on the Sui blockchain. It covers a spectrum of topics ranging from introductory concepts to advanced patterns, storage, and programmability.

    Note that Move and the Sui framework are evolving; the book is updated continuously to reflect new features. For technical specifications and language details, users should refer to The Move Reference.

  7. Summary of Hello, Sui! Guide

    main

    This guide provides a foundational workflow for interacting with the Sui blockchain using the Sui CLI. It covers the end-to-end process of:

    1. Creating and Building: Initializing a new Move package and compiling it.
    2. Account Management: Setting up a Sui account and requesting testnet coins.
    3. Publishing: Deploying a Move package to the blockchain.
    4. Interacting: Using the CLI to create objects (e.g., a list), modify them (add/remove items), and execute multiple commands within a single transaction block.
    5. Observing: Inspecting transaction data and transaction effects to verify execution.
  8. Core Sui and Move concepts overview

    main

    The Move Book provides an overview of the fundamental building blocks required to write Move programs on the Sui blockchain. Key concepts include:

    • Packages: The primary units of code organization in Move.
    • Move.toml: The manifest file used to define package metadata and dependencies.
    • Addresses and Accounts: The model for identity and ownership on Sui.
    • Transactions: The mechanism for interacting with the blockchain and executing code.
    • Data Storage: How data is persisted and managed on the Sui blockchain.

    For a complete technical reference, developers should consult the official Sui Documentation.

  9. Available Sui Move development guides

    main

    The Move Book provides practical guides for common Sui Move development tasks, focusing on practical challenges and solutions. Available topics include:

    • Token Creation: Creating fungible tokens.
    • Marketplaces: Building NFT marketplaces.
    • Package Management: Handling package upgrades.
    • Security & Control: Implementing access control.
    • Transactions: Working with programmable transactions.
    • Best Practices: Error handling, code quality, and open-source best practices.
  10. Understand the Move Book repository structure

    main

    The repository is organized into the following directories:

    • book/: Contains the main Move Book content.
    • reference/: Contains the Move Language Reference content.
    • packages/: Contains the code samples used throughout both books.
    • site/: Contains the Docusaurus configuration and custom plugins used to build the website.
  11. Overview of the Move Standard Library

    main
    The Move Standard Library provides fundamental functionality for native types and data manipulation. It consists of a collection of modules that do not interact with storage directly but provide essential tools for working with data. It is the primary dependency of the Sui Framework and is typically imported alongside it. The library is located at the exported address std = 0x1.