hoh-zone的movelings-00_intro

遂烂 发布于 2025-08-19 阅读 1239

教程目标通过一系列循序渐进的练习,掌握Move语言的核心概念和Sui区块链开发技能。run第一个00_intro入门。

教程目标

  • 通过一系列循序渐进的练习,掌握 Move 语言的核心概念和 Sui 区块链开发技能。
  • run第一个00_intro入门。

学习资源链接

  1. github代码库
  2. rust官网

运行截图

  1. 在movelings根目录的地址栏输入
powershell
  1. 在窗口中输入命令,如图:

image.png

  1. 源码分析, 00_intro/sources/intro.move 功能调用时,返回”Hello, Move!”字符串
module intro::intro {
    public fun hello_move(): vector<u8> {
        b"Hello, Move!"
    }
}

00_intro/tests/intro_tests.move,这是测试文件,对返回的字符串进行校验

    fun test_hello_world() {
        let result = hello_move();//调用hello_move方法
        assert!(result == b"Hello, Move!", 0);//进行断言判断
    }
}

成功截图

image.png 祝各位玩的开心。

相关文章

0 条评论