Simple Map Module - Move Typing CST Test
Loading…
Simple Map Module — Move Code
Stores a pair of u64 values.
module 0x1::PairStore {
resource struct Pair { a: u64, b: u64 }
public fun create(a: u64, b: u64): Pair {
Pair { a, b }
}
public fun update(p: &mut Pair, a: u64, b: u64) {
p.a = a
p.b = b
}
}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.