Skip to content

Commit

Permalink
Merge branch 'move-cn:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sch678 authored Aug 1, 2024
2 parents 6d68959 + 7c8b234 commit 8be59be
Show file tree
Hide file tree
Showing 3,149 changed files with 281,201 additions and 4,011 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
20 changes: 20 additions & 0 deletions .github/workflows/pr-commenter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on:
pull_request_target:

jobs:
pr:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: mshick/add-pr-comment@v2
if: always()
with:
message: |
**必须加入社区发出PR才会被合并, 超过一周不发的默认放弃奖励*
- QQ群: 79489587
- TG群: [Move中文](https://t.me/move_cn)

message-failure: |
Uh oh!
64 changes: 20 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,33 @@
# letsmove
## letsmove
Let's Move 一项学Move获得SUI的激励计划,鼓励更多的人学习Move语言

## 如何参与
- 复制 `mover` 目录下的 `001` 并且用自己的 `github id` 命名复制的目录
-`readme.md` 里面填写个人信息 后面的任务模板暂时不管
- 提交PR
- 必须加入社区群发出PR 才会被合并
## 带奖励的学习任务
[学习任务](./task)

## 社区 & 问答
- [move中文 TG](https://t.me/move_cn)
- [Sui中文 TG](https://t.me/sui_dev_cn)
- QQ群: 79489587

## bootcamp视频
| 期数 | 视频 | 源码 |
|:-----------------|-------------------------------------------------|:----------------------------------------:|
| 2024年4-6月 TinTin | [B站](https://www.bilibili.com/video/BV1Rm42177Kx) | [课程源码](https://github.com/move-cn/tintin-bootcamp) |

## 如何完成任务并获取奖励
- 在自己`github id`目录的 readme.md 对应的任务列表填写完成信息
- 提交PR 如果只完成 task 1 用 `完成 task 1` 取名 完成多个 用 `完成 task 1 2 3` 等取名
- 审核任务完成会把Sui打入 `readme.md` 提供的Sui地址

## 重要提醒
- 必须包含作业源代码
- task 1 必须包含自己的`github id` 也就是 hello `github id`
- task 2 必须是自己 `github id` 开头的Coin名字,水龙头的Coin是 `github id` + `Faucet`
- task 3 NFT必须是自己 github 的头像作为图片
- task 4 的game 必须包含自己的 `github id`的元素, 必须包含随机数,必须用task2的 `Faucet Coin`
- task 5 swap 必须是 swap 自己发行的 task2 两个 Coin的互换,包名必须是自己的`github id`
- task 6 必须在一个PTB内完成三步,必须包含当前时间的因子,必须用dapp-kit


## 奖励明细 请仔细阅读要求

| 任务 | 名称 | 人民币等值Token | 说明 |
|:-------------------------------------------|------------|:----------:|:-----------------------|
| [task 1](task/01.hello_move.md) | hello move | ¥20 | 完成第一个合约部署上链 |
| [task 2](task/02.move_coin.md) | move coin | ¥20 | 完成Coin协议学习,并发布两个Coin上链 |
| [task 3](task/03.move_nft.md) | move nft | ¥20 | 完成NFT的学习,并发布NFT上链 |
| [task 4](task/04.move_game.md) | move game | ¥20 | 完成链上游戏学习,并上链交互 |
| [task 5](task/05.move_swap.md) | move swap | ¥20 | 完成Swap学习,并上链交互 |
| [task 6](task/06.SDK_PTB_NAVI.md) | sdk ptb | ¥20(NAVX) | 完成SDK学习,并用SDK完成链上交互 |
| [defi](https://dacade.org/communities/sui) | defi | 95SUI | 完成Defi学习挑战 |



## 学习资料

### 书籍
| 书名 | 中文 | 英文 | 配套视频 |
|:--------------------|--------------------------------------|:----------------------------------------------------:|:---------------------------------------------------------:|
| Move 导论 | [中文](https://intro-zh.sui-book.com/) | [Sui Move Intro Course](https://intro.sui-book.com/) | [bilibili](https://www.bilibili.com/video/BV1RY411v7YU) [Youtube](https://www.youtube.com/watch?v=lZHjmo2ngu0) |
| Sui Book | [中文](https://sui-book.com) | | |
| Sui Move by Example | [中文](https://examples.sui-book.com/) | [Sui Move by Example](https://examples.sui.io/) | |
| Move Book | [中文](https://move-book.com/cn/) | [英文](https://move-book.com/) | |
| Let's Move Sui | | [let's move](https://letsmovesui.com/) | |
| 书名 | 中文 | 英文 | 配套视频 |
|:--------------------|-------------------------------------------------|:----------------------------------------------------:|:---------------------------------------------------------:|
| Move Book | [中文](https://move.sui-book.com/index.html) | [英文](https://move-book.com/) | |
| Move Reference | [中文](https://reference.sui-book.com/index.html) | [英文](https://move-book.com/reference/) | |
| Move 导论 | [中文](https://intro-zh.sui-book.com/) | [Sui Move Intro Course](https://intro.sui-book.com/) | [bilibili](https://www.bilibili.com/video/BV1RY411v7YU) [Youtube](https://www.youtube.com/watch?v=lZHjmo2ngu0) |
| Let's Move Sui | [中文](https://movesui.sui-book.com/) | [let's move](https://letsmovesui.com/) | |
| Sui Book | [中文](https://sui-book.com) | | |
| Sui Move by Example | [中文](https://examples.sui-book.com/) | [Sui Move by Example](https://examples.sui.io/) | |
| 轻松入门Move | [轻松入门Move](https://easy.sui-book.com/) | | |
| Move Master | [中文](https://master.sui-book.com/) | [move master](https://metaschool.so/sui) | |
| move castle | [中文](https://movecastle.sui-book.com/) | [move castle](https://learn.movecastle.info/courses/move-on-sui) | |

[学习路径](learning_map.md)

### 文档
- [官方文档](https://docs.sui.io/)
Expand Down
52 changes: 52 additions & 0 deletions learning_map.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 学习路径

## 步骤一:前置安装

### 安装Sui Wallet
采用Google插件
https://chromewebstore.google.com/detail/sui-wallet/opcgpfmipidbgpenhmajoajpbobppdil

### 安装Nodejs
具体安装过程需要自行探索
https://nodejs.org/en

### 安装编译器
VSCODE 和 RustRover 二选一即可
#### RustRover
RustRover的报错和提示比较友好,也有成熟的插件
https://www.jetbrains.com.cn/rust/
#### VSCODE
容易上手,通用性强
https://code.visualstudio.com/

### 配置开发环境
https://docs.sui.io/guides/developer/getting-started/sui-install
建议采用从Github下载二进制文件,对小白更友好


## 步骤二:基本语法学习
[bilibili教学视频](https://www.bilibili.com/video/BV1Rm42177Kx/) (视频包括基本语法的学习和实战演练 )
课程相关代码库:
- https://github.com/404ll/letsmove/tree/main/tutorial/bootcamp
- Swap以及Coin的代码库 https://github.com/uvd/sui-swap-course

完整入门手册,非常详细
- [轻松入门move](https://easy.sui-book.com/chapter_1.htm)


## 步骤三:深入学习以及完成task

区块链浏览器:https://suivision.xyz/

由于教学视频的时间限制,手把手教学来完成每一个task基本是不现实的,同时已有的学习资料已经完全足够从入门到熟练掌握
因此需要学员有强大的内驱力和学习能力,从已有的文档和代码库中,寻找和学习所需的知识点

基于官方标准库,可以查询和了解每一个函数的功能及使用方法
- https://github.com/MystenLabs/sui/tree/main/crates/sui-framework

探索官方文档(包括Coin协议等等)
- https://docs.sui.io




8 changes: 8 additions & 0 deletions mover/001/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@

## 06 Dapp-kit SDK PTB
- [] save hash :

## 07 Move CTF Check In
- [] CLI call 截图 : ![截图](./images/你的图片地址)
- [] flag hash :

## 08 Move CTF Lets Move
- [] proof :
- [] flag hash :
Binary file added mover/001/scan.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
99 changes: 99 additions & 0 deletions mover/0x-wen/code/hello_dapp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Sui dApp Starter Template

This dApp was created using `@mysten/create-dapp` that sets up a basic React
Client dApp using the following tools:

- [React](https://react.dev/) as the UI framework
- [TypeScript](https://www.typescriptlang.org/) for type checking
- [Vite](https://vitejs.dev/) for build tooling
- [Radix UI](https://www.radix-ui.com/) for pre-built UI components
- [ESLint](https://eslint.org/) for linting
- [`@mysten/dapp-kit`](https://sdk.mystenlabs.com/dapp-kit) for connecting to
wallets and loading data
- [pnpm](https://pnpm.io/) for package management

## Deploying your Move code

### Install Sui cli

Before deploying your move code, ensure that you have installed the Sui CLI. You
can follow the [Sui installation instruction](https://docs.sui.io/build/install)
to get everything set up.

This template uses `devnet` by default, so we'll need to set up a devnet
environment in the CLI:

```bash
sui client new-env --alias devnet --rpc https://fullnode.devnet.sui.io:443
sui client switch --env devnet
```

If you haven't set up an address in the sui client yet, you can use the
following command to get a new address:

```bash
sui client new-address secp256k1
```

This well generate a new address and recover phrase for you. You can mark a
newly created address as you active address by running the following command
with your new address:

```bash
sui client switch --address 0xYOUR_ADDRESS...
```

We can ensure we have some Sui in our new wallet by requesting Sui from the
faucet (make sure to replace the address with your address):

```bash
curl --location --request POST 'https://faucet.devnet.sui.io/gas' \
--header 'Content-Type: application/json' \
--data-raw '{
"FixedAmountRequest": {
"recipient": "<YOUR_ADDRESS>"
}
}'
```

### Publishing the move package

The move code for this template is located in the `move` directory. To publish
it, you can enter the `move` directory, and publish it with the Sui CLI:

```bash
cd move
sui client publish --gas-budget 100000000 counter
```

In the output there will be an object with a `"packageId"` property. You'll want
to save that package ID to the `src/constants.ts` file as `PACKAGE_ID`:

```ts
export const DEVNET_COUNTER_PACKAGE_ID = "<YOUR_PACKAGE_ID>";
```

Now that we have published the move code, and update the package ID, we can
start the app.

## Starting your dApp

To install dependencies you can run

```bash
pnpm install
```

To start your dApp in development mode run

```bash
pnpm dev
```

## Building

To build your app for deployment you can run

```bash
pnpm build
```
59 changes: 59 additions & 0 deletions mover/0x-wen/code/hello_dapp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!doctype html>
<html lang="en" class="dark-theme" style="color-scheme: dark">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Sui dApp Starter</title>

<style>
/*
Josh's Custom CSS Reset
https://www.joshwcomeau.com/css/custom-css-reset/
*/
*,
*::before,
*::after {
box-sizing: border-box;
}
* {
margin: 0;
}
body {
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
img,
picture,
video,
canvas,
svg {
display: block;
max-width: 100%;
}
input,
button,
textarea,
select {
font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
overflow-wrap: break-word;
}
#root,
#__next {
isolation: isolate;
}
</style>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
34 changes: 34 additions & 0 deletions mover/0x-wen/code/hello_dapp/move/counter/Move.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# @generated by Move, please check-in and do not edit manually.

[move]
version = 2
manifest_digest = "3700BE3663FD5EAE7AF34BC8B36CFF2AA9C8D280DDEE9324B30BE9F9BFDDD64D"
deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082"
dependencies = [
{ name = "Sui" },
]

[[move.package]]
name = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/testnet", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
name = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/testnet", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ name = "MoveStdlib" },
]

[move.toolchain-version]
compiler-version = "1.27.2"
edition = "2024.beta"
flavor = "sui"

[env]

[env.testnet]
chain-id = "4c78adac"
original-published-id = "0x54fae9c956cc1a2ef3f1436e1fa008a7230d7f79070c58bfc070c5d893315483"
latest-published-id = "0x54fae9c956cc1a2ef3f1436e1fa008a7230d7f79070c58bfc070c5d893315483"
published-version = "1"
10 changes: 10 additions & 0 deletions mover/0x-wen/code/hello_dapp/move/counter/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "counter"
version = "0.0.1"
edition = "2024.beta"

[dependencies]
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet" }

[addresses]
counter = "0x0"
Loading

0 comments on commit 8be59be

Please sign in to comment.