1. Home
  2. /
  3. Move Typing Test
  4. /
  5. Simple Move Counter Module

Simple Move Counter Module - Move Typing CST Test

Skip to main content
CodeSpeedTest
Languages
Start TypingJump into a test — pick any languageAdaptive TrainingUnlock chars as you master themPractice DrillsFocused sessions targeting weak spotsDaily ChallengesNew coding challenges every dayRace ModeCompete against others in real timeAI OpponentRace against an AI at your WPM levelTournamentsLive coding speed tournamentsArcade GamesZType, Overkill Survival, Glyphica & moreGamificationXP, coins, badges & quests
LeaderboardGlobal rankings for every languageCertificatesEarn verifiable Bronze / Silver / Gold certsActivityDaily streaks & historical analyticsProfileYour stats, badges & achievements
Browse Languages500+ languages with real code examplesBlogTips, guides & deep divesFree ToolsWPM calculator, typing speed report & moreFAQCommon questions answeredGetting StartedNew to CodeSpeedTest?AboutOur story & missionSupportGet help — Pro users get priorityContactGet in touch with the team
Pricing
Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module 0x1::Counter {
resource struct Counter { value: u64 }

public fun create(): Counter {
Counter { value: 0 }
}

public fun increment(counter: &mut Counter) {
counter.value = counter.value + 1
}

public fun reset(counter: &mut Counter) {
counter.value = 0
}
}
Coding works best on desktop or with an external keyboard.
CodeSpeedTest

Improve your coding speed, code accuracy, and programming syntax WPM with practice sessions across 500+ programming languages.

Quick Links

HomeAboutFeaturesGetting StartedLanguages

Legal & Support

Pro ⚡ PricingContactPrivacy PolicyTerms of Service

Connect

CodeSpeedTest on GitHubCodeSpeedTest on TwitterEmail CodeSpeedTest

© 2026 CodeSpeedTest. All rights reserved.

Simple Move Counter Module — Move Code

Basic counter resource with increment and reset.

module 0x1::Counter {
	resource struct Counter { value: u64 }

	public fun create(): Counter {
		Counter { value: 0 }
	}

	public fun increment(counter: &mut Counter) {
		counter.value = counter.value + 1
	}

	public fun reset(counter: &mut Counter) {
		counter.value = 0
	}
}

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.

Quick Explain

  • ▸Move enforces resource types - assets cannot be copied or lost unintentionally.
  • ▸It has strong static typing and a formal verification model.
  • ▸Designed to manage digital assets safely on blockchain networks.
  • ▸Supports modules and scripts for reusable and composable logic.
  • ▸Used by Diem, Aptos, Sui, and other blockchain ecosystems.

Core Features

  • ▸Modules and scripts
  • ▸Structs as first-class resources
  • ▸Typed references and borrowing
  • ▸Access control for resources
  • ▸Compatibility with Move Virtual Machine (MVM)

Learning Path

  • ▸Learn Rust basics
  • ▸Understand blockchain & VM concepts
  • ▸Learn Move syntax and modules
  • ▸Write and test resource modules
  • ▸Practice formal verification and transactions

Practical Examples

  • ▸Simple token module
  • ▸NFT minting and transfer
  • ▸Payment channels
  • ▸Multi-signature wallets
  • ▸Resource-based DeFi primitives

Comparisons

  • ▸Move vs Solidity: Move is resource-safe; Solidity is feature-rich
  • ▸Move vs Vyper: Move has ownership semantics; Vyper emphasizes simplicity
  • ▸Move vs Rust: Move is resource-focused for blockchain; Rust is general-purpose
  • ▸Move vs Cairo: Move targets asset-safe chains; Cairo targets STARK proofs
  • ▸Move vs JavaScript: Move is strongly typed and blockchain-safe

Strengths

  • ▸Safe resource handling
  • ▸Formal verification friendly
  • ▸Explicit ownership semantics
  • ▸Predictable execution
  • ▸Suitable for asset-heavy applications

Limitations

  • ▸Smaller developer ecosystem than Solidity
  • ▸Limited tooling and libraries
  • ▸Ecosystem mainly centered on Aptos and Sui
  • ▸Learning curve for resource-oriented programming
  • ▸Less general-purpose than other languages

When NOT to Use

  • ▸General-purpose programming outside blockchain
  • ▸Projects without resource/asset management
  • ▸Ecosystems not supporting Move VM
  • ▸Highly interactive front-end logic
  • ▸Complex multi-chain systems not using Aptos/Sui

Cheat Sheet

  • ▸resource struct Coin { ... }
  • ▸module Token { ... }
  • ▸public(script) fun transfer(...) { ... }
  • ▸let r = &mut resource_var;
  • ▸move_to(account, resource_var)

FAQ

  • ▸Is Move safe for digital assets?
  • ▸Yes - ownership semantics prevent accidental loss.
  • ▸Can Move be used outside Aptos/Sui?
  • ▸Limited - requires Move VM-compatible chain.
  • ▸Does Move support inheritance?
  • ▸No - uses modules and resource composition.
  • ▸Is Move faster than Solidity?
  • ▸Execution is predictable; speed depends on VM.
  • ▸Can Move interact with Solidity contracts?
  • ▸Directly no; requires cross-chain bridges or wrappers.

30-Day Skill Plan

  • ▸Week 1: Move syntax & types
  • ▸Week 2: Modules & scripts
  • ▸Week 3: Resources & references
  • ▸Week 4: Testing & prover
  • ▸Week 5: Deploy and integrate on Aptos/Sui

Final Summary

  • ▸Move is a resource-oriented blockchain language.
  • ▸Safe, formal-verifiable, and asset-focused.
  • ▸Modules and scripts encapsulate logic.
  • ▸Strong static typing and ownership rules.
  • ▸Ideal for token, NFT, and DeFi applications.

Project Structure

  • ▸sources/ - Move modules
  • ▸tests/ - unit and prover tests
  • ▸scripts/ - transaction scripts
  • ▸build/ - compiled bytecode
  • ▸Move.toml - project config

Monetization

  • ▸Deploy token modules
  • ▸Build NFT platforms
  • ▸Offer Move auditing services
  • ▸Consult on DeFi Move designs
  • ▸Sell resource-safe smart contracts

Productivity Tips

  • ▸Keep modules small
  • ▸Use Move Prover frequently
  • ▸Write composable scripts
  • ▸Document ownership flows
  • ▸Leverage testnet sandboxes

Basic Concepts

  • ▸Resources - cannot be copied or discarded
  • ▸Modules - reusable code units
  • ▸Scripts - executable transactions
  • ▸Structs with resource semantics
  • ▸Functions with strict type safety

Official Docs

  • ▸https://move-lang.dev
  • ▸https://github.com/move-language/move

More Move Typing Exercises

Move Bank Account ModuleMove Store Name 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