1. Home
  2. /
  3. Move
  4. /
  5. Store Name Module

Store Name Module - Move Typing CST Test

Loading…

Store Name Module — Move Code

A resource storing a user's name on-chain.

module 0x1::NameStore {
	resource struct Name { value: vector<u8> }

	public fun set_name(name: vector<u8>): Name {
		Name { value: name }
	}

	public fun update(n: &mut Name, new_name: vector<u8>) {
		n.value = new_name
	}
}

Move Language Guide

Move is a safe, resource-oriented programming language originally developed for the Libra (now Diem) blockchain. It focuses on correctness, security, and formal verification, particularly for digital assets and smart contracts.

Primary Use Cases

  • ▸Digital assets and token management
  • ▸NFT minting and transfers
  • ▸Safe financial transactions
  • ▸Blockchain governance modules
  • ▸Custom resource-oriented logic

Notable Features

  • ▸Resource types prevent accidental duplication or loss
  • ▸Module-based architecture for composability
  • ▸Formal verification support
  • ▸Strong static typing
  • ▸Explicit transaction scripts

Origin & Creator

Move was created by the Libra (Diem) team at Facebook around 2019. It evolved to provide safe resource management for blockchain assets and has been adopted by several new-generation blockchains.

Industrial Note

Move is highly focused on financial and asset management applications in blockchains, especially where strict ownership rules and resource safety are required. It’s ideal for token systems, NFT platforms, and DeFi primitives.

More Move Typing Exercises

Simple Move Counter ModuleMove Bank Account ModuleMove Owned CounterMove Points Reward ModuleMove Boolean Flag ModuleMove Simple Map ModuleMove Token BalanceMove Access Control ExampleMove Event Emission Example

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher