An Introduction to Sui Move for Developers

Samantha Lee
2024-07-18
Person coding on a laptop

Sui Move is an object-centric smart contract language derived from the original Move language developed for the Diem blockchain. It's designed with a strong emphasis on safety, security, and performance, making it an excellent choice for building applications on the Sui blockchain.

Key Features of Sui Move

What sets Sui Move apart from other smart contract languages like Solidity?

  • Object-Centric Model: In Sui, everything is an object. This includes tokens, NFTs, and custom smart contract data. This model allows for parallel transaction processing, leading to high throughput and low latency.
  • Ownership and Capabilities: Move has a robust type system that enforces ownership rules at the language level. An object can be owned by an address, another object, be shared, or be immutable. This prevents common bugs and vulnerabilities like re-entrancy attacks.
  • Resource Safety: Move's "resource" types ensure that digital assets (like coins) cannot be accidentally duplicated or destroyed. They must be explicitly moved between owners, just like physical assets.

Getting Started

To start writing Sui Move, you'll need the Sui CLI. The basic structure of a Move module involves defining structs (your objects) and functions that operate on them. Our app, Contract Clarity, is a great tool for analyzing existing Sui Move contracts, allowing you to see how functions interact and what they do through easy-to-understand UML diagrams.