Skip to content

Commit

Permalink
Merge pull request #5 from vbi-academy/feat/sui-move-analyzer
Browse files Browse the repository at this point in the history
docs: sui mover analyzer
  • Loading branch information
hien-p authored Nov 20, 2024
2 parents f59ea8c + aa5e271 commit 4b0c691
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 0 deletions.
Binary file added pages/assets/hello_move_image/Hover_infor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/assets/hello_move_image/MSL_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pages/assets/hello_move_image/autocomplete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions pages/hello_move/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"move_environment" : "Setting up the Move environment",
"move_analyzer": "Setting up the Sui Move Analyzer(optional)",
"sui_cli" : "Introduction to SUI CLI",
"hello_world_move" : "Create the first hello move project",
"introduction_to_suiscan": "Introduction to Suiscan"
Expand Down
54 changes: 54 additions & 0 deletions pages/hello_move/move_analyzer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

# Sử dụng Sui Move Analyzer (Thêm công cụ cho move coding)

Nếu bạn là người dùng vscode để code Sui move thì đây là một extension hữu ích cho việc cung cấp definitions của các package để mọi người hiểu ý nghĩa của nó


![](../assets/hello_move_image/sui_move_analyzer.png)



# Cài đặt [sui-move-analyzer](https://marketplace.visualstudio.com/items?itemName=MoveBit.sui-move-analyzer&ref=blog.sui.io)
Các cách tải sui-move-analyzer:

A. Tải từ file các binaries file bằng cách truy cập vào đây: [sui-move-analyzer](https://github.com/movebit/sui-move-analyzer/releases)<br/>
B. Sử dụng Cargo:

```bash
cargo install --git http://github.com/movebit/sui-move-analyzer --branch master sui-move-analyzer
```


![](../assets/hello_move_image/sui_command_line_analyzer.png)

C. Cài đặt trực tiếp trên Visual Studio Code extension

![](../assets/hello_move_image/sui_move_anlyzer_extension.png)


# Cách sử dụng sui-move-analyzer

* Trả các definition trong Sui Move

Ví dụ bạn có thể click chuột vào module "sui::transfer" để jump to definition của nó.

![](../assets/hello_move_image/go_to_definition.png)

* Hover các infor về các functions():

![](../assets/hello_move_image/Hover_infor.png)

* Auto complete các modules, functions, fields, structs, etc:

![](../assets/hello_move_image/autocomplete.png)


* Create Sui template
![](../assets/hello_move_image/Sui_move_commands.png)

* Coding với MSL


Sui move analyzer còn hỗ trợ generate [Move Specification Language (MSL)](https://github.com/move-language/move/blob/main/language/move-prover/doc/user/spec-lang.md?ref=blog.sui.io). MSL được coi là một phần của Move prover, một tool quan trọng cho hỗ trợ các builder trong việc code move chính xác hơn. CÁc builder muốn làm việc trên quy tắc MSL sẽ thấy đây là tool bổ ích

![](../assets/hello_move_image/MSL_image.png)
1 change: 1 addition & 0 deletions pages/hello_move/move_environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Có 3 cách để set up local network:
### Làm sao để chạy docker image với Sui binaries

Step 1: Bạn cần install [Docker](https://docs.docker.com/get-docker/) trên machine của Bạn

Step 2: Pull từ [Official Sui](https://hub.docker.com/r/mysten/sui-tools/tags) Docker image. Bạn có thể xem thêm[ở đây ](https://hub.docker.com/r/mysten/sui-tools/tags).

Đây là các lệnh để thực thi:
Expand Down

0 comments on commit 4b0c691

Please sign in to comment.