diff --git a/members/Al17er/journal.md b/members/Al17er/journal.md index 09d1902..18719fb 100644 --- a/members/Al17er/journal.md +++ b/members/Al17er/journal.md @@ -6,4 +6,9 @@ bitcoind -daemon 查看交易信息: bitcoin-cli getblockhash 高度 -bitcoin-cli getblock hash值 \ No newline at end of file +bitcoin-cli getblock hash值 + +rooch account balance 查看余额 +rooch account switch 切换账户 +rooch env list 查看当前有哪些环境 +rooch env switch --alias 环境名称 切换环境 \ No newline at end of file diff --git a/members/Al17er/readme.md b/members/Al17er/readme.md index 6abe588..9404a2a 100644 --- a/members/Al17er/readme.md +++ b/members/Al17er/readme.md @@ -21,6 +21,6 @@ 1.学会了bitcoin的命令的使用,明白了区块链的一些基础知识。 -2. +2.学会了如何领水,和发布简单的合约,能够使用rooch cli的基本命令。 3. diff --git a/members/Al17er/summary.md b/members/Al17er/summary.md index 0d646c4..7d30f60 100644 --- a/members/Al17er/summary.md +++ b/members/Al17er/summary.md @@ -1,4 +1,7 @@ # 学习成果 ### 第一次作业(完成本地部署bitcore全节点并同步数据) -![alt text](image.png) \ No newline at end of file +![alt text](image.png) + +## 第二次作业 (部署hello_rooch合约) +1.学会如何领取水,与发布合约 \ No newline at end of file diff --git a/members/Al17er/image.png b/members/Al17er/task01/image.png similarity index 100% rename from members/Al17er/image.png rename to members/Al17er/task01/image.png diff --git a/members/Al17er/task02/hello_rooch/Move.toml b/members/Al17er/task02/hello_rooch/Move.toml new file mode 100644 index 0000000..57880fb --- /dev/null +++ b/members/Al17er/task02/hello_rooch/Move.toml @@ -0,0 +1,14 @@ +[package] +name = "hello_rooch" +version = "0.0.1" + +[dependencies] +MoveStdlib = { git = "https://github.com/rooch-network/rooch.git", subdir = "frameworks/move-stdlib", rev = "main" } +MoveosStdlib = { git = "https://github.com/rooch-network/rooch.git", subdir = "frameworks/moveos-stdlib", rev = "main" } +RoochFramework = { git = "https://github.com/rooch-network/rooch.git", subdir = "frameworks/rooch-framework", rev = "main" } + +[addresses] +hello_rooch = "0xe5566e5c7c6a210da0cfcf802ced3d72010a1293568bccea398fb59325f4e237" +std = "0x1" +moveos_std = "0x2" +rooch_framework = "0x3" diff --git a/members/Al17er/task02/hello_rooch/sources/hello_rooch.move b/members/Al17er/task02/hello_rooch/sources/hello_rooch.move new file mode 100644 index 0000000..9336018 --- /dev/null +++ b/members/Al17er/task02/hello_rooch/sources/hello_rooch.move @@ -0,0 +1,11 @@ +module hello_rooch::hello_rooch { + use moveos_std::account; + use std::string; + struct HelloMessage has key { + text: string::String + } + entry fun say_hello(owner: &signer) { + let hello = HelloMessage { text: string::utf8(b"Hello Rooch!") }; + account::move_resource_to(owner, hello); + } +} diff --git a/members/Al17er/task02/publish.PNG b/members/Al17er/task02/publish.PNG new file mode 100644 index 0000000..98158be Binary files /dev/null and b/members/Al17er/task02/publish.PNG differ