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
ctrainbow authored Nov 14, 2024
2 parents e295251 + fa09c73 commit 4730e7a
Show file tree
Hide file tree
Showing 225 changed files with 5,609 additions and 64 deletions.
37 changes: 37 additions & 0 deletions mover/002/code/task1/hellomove/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "hellomove"
edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move
# license = "" # e.g., "MIT", "GPL", "Apache 2.0"
# authors = ["..."] # e.g., ["Joe Smith ([email protected])", "John Snow ([email protected])"]

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

# For remote import, use the `{ git = "...", subdir = "...", rev = "..." }`.
# Revision can be a branch, a tag, and a commit hash.
# MyRemotePackage = { git = "https://some.remote/host.git", subdir = "remote/path", rev = "main" }

# For local dependencies use `local = path`. Path is relative to the package root
# Local = { local = "../path/to" }

# To resolve a version conflict and force a specific version for dependency
# override use `override = true`
# Override = { local = "../conflicting/version", override = true }

[addresses]
hellomove = "0x0"

# Named addresses will be accessible in Move as `@name`. They're also exported:
# for example, `std = "0x1"` is exported by the Standard Library.
# alice = "0xA11CE"

[dev-dependencies]
# The dev-dependencies section allows overriding dependencies for `--test` and
# `--dev` modes. You can introduce test-only dependencies here.
# Local = { local = "../path/to/dev-build" }

[dev-addresses]
# The dev-addresses section allows overwriting named addresses for the `--test`
# and `--dev` modes.
# alice = "0xB0B"

19 changes: 19 additions & 0 deletions mover/002/code/task1/hellomove/sources/hellomove.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module hellomove::hello ;

use std::ascii::{String, string};
use sui::object::{Self, UID};
use sui::transfer::transfer;
use sui::tx_context::{TxContext};

public struct Hello has key {
id: UID,
say: String
}

fun init(ctx: &mut TxContext) {
let hello_move = Hello {
id: object::new(ctx),
say: string(b"hoh"),
};
transfer(hello_move, ctx.sender());
}
18 changes: 18 additions & 0 deletions mover/002/code/task1/hellomove/tests/hellomove_tests.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module hellomove::hellomove_tests;
// uncomment this line to import the module
// use hellomove::hellomove;
const ENotImplemented: u64 = 0;
#[test]
fun test_hellomove() {
// pass
}
#[test, expected_failure(abort_code = ::hellomove::hellomove_tests::ENotImplemented)]
fun test_hellomove_fail() {
abort ENotImplemented
}
*/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 34 additions & 0 deletions mover/Aydenchange/code/task1/hellomove/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 = 3
manifest_digest = "11BAF94A33662E7D904523341D85F0402E2C1A82A85216775F5E05EC6ADE9D9C"
deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082"
dependencies = [
{ id = "Sui", name = "Sui" },
]

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

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

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

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

[env]

[env.testnet]
chain-id = "4c78adac"
original-published-id = "0xb897790e416c68feeab5302815f8e579890016c620d9a94871fc29f17fcd4b41"
latest-published-id = "0xb897790e416c68feeab5302815f8e579890016c620d9a94871fc29f17fcd4b41"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/Aydenchange/code/task1/hellomove/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "hellomove"
edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move
# license = "" # e.g., "MIT", "GPL", "Apache 2.0"
# authors = ["..."] # e.g., ["Joe Smith ([email protected])", "John Snow ([email protected])"]

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

# For remote import, use the `{ git = "...", subdir = "...", rev = "..." }`.
# Revision can be a branch, a tag, and a commit hash.
# MyRemotePackage = { git = "https://some.remote/host.git", subdir = "remote/path", rev = "main" }

# For local dependencies use `local = path`. Path is relative to the package root
# Local = { local = "../path/to" }

# To resolve a version conflict and force a specific version for dependency
# override use `override = true`
# Override = { local = "../conflicting/version", override = true }

[addresses]
hellomove = "0x0"

# Named addresses will be accessible in Move as `@name`. They're also exported:
# for example, `std = "0x1"` is exported by the Standard Library.
# alice = "0xA11CE"

[dev-dependencies]
# The dev-dependencies section allows overriding dependencies for `--test` and
# `--dev` modes. You can introduce test-only dependencies here.
# Local = { local = "../path/to/dev-build" }

[dev-addresses]
# The dev-addresses section allows overwriting named addresses for the `--test`
# and `--dev` modes.
# alice = "0xB0B"

19 changes: 19 additions & 0 deletions mover/Aydenchange/code/task1/hellomove/sources/hellomove.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module hellomove::hello ;

use std::ascii::{String, string};
use sui::object::{Self, UID};
use sui::transfer::transfer;
use sui::tx_context::{TxContext, sender};

public struct Hello has key {
id: UID,
say: String
}

fun init(ctx: &mut TxContext) {
let hello_move = Hello {
id: object::new(ctx),
say: string(b"Aydenchange"),
};
transfer(hello_move, sender(ctx));
}
18 changes: 18 additions & 0 deletions mover/Aydenchange/code/task1/hellomove/tests/hellomove_tests.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module hellomove::hellomove_tests;
// uncomment this line to import the module
// use hellomove::hellomove;
const ENotImplemented: u64 = 0;
#[test]
fun test_hellomove() {
// pass
}
#[test, expected_failure(abort_code = ::hellomove::hellomove_tests::ENotImplemented)]
fun test_hellomove_fail() {
abort ENotImplemented
}
*/
Binary file added mover/Aydenchange/images/img.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 mover/Aydenchange/images/img_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions mover/Aydenchange/notes/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 2024.11.08
- 安装sui环境网络太差,开始没成功,换节点后瞬间成功
- publish代码时拷贝代码库里的代码报错string没有定义,经过ai指导修改正常运行,后来发现readme里面的代码才是正确的
- publish连接github/gitee一直报错,目前还是没有理解,使用skip指令跳过发布成功
54 changes: 54 additions & 0 deletions mover/Aydenchange/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
## 基本信息
- Sui钱包地址: `0xc30e46691599511840ae7ba036f9bef61aaf6afccafae36202a3bf511fc0d5a5`
> 首次参与需要完成第一个任务注册好钱包地址才被合并,并且后续学习奖励会打入这个地址
- github: `Aydenchange`

## 个人简介
- 工作经验: 8年
- 技术栈: `Java` `React`
> 重要提示 请认真写自己的简介
- 后端开发3年,后转入传统行业从事系统分析师5年,希望入门区块链
- 联系方式: tg: `Wu Ayden`

## 任务

## 01 hello move
- [] Sui cli version:sui 1.37.1-7839b9501066
- [] Sui钱包截图: ![Sui钱包截图](./images/img.png)
- [] package id: 0xb897790e416c68feeab5302815f8e579890016c620d9a94871fc29f17fcd4b41
- [] package id 在 scan上的查看截图:![Scan截图](./images/img_1.png)

## 02 move coin
- [] My Coin package id :
- [] Faucet package id :
- [] 转账 `My Coin` hash:
- [] `Faucet Coin` address1 mint hash:
- [] `Faucet Coin` address2 mint hash:

## 03 move NFT
- [] nft package id :
- [] nft object id :
- [] 转账 nft hash:
- [] scan上的NFT截图:![Scan截图](./images/你的图片地址)

## 04 Move Game
- [] game package id :
- [] deposit Coin hash:
- [] withdraw `Coin` hash:
- [] play game hash:

## 05 Move Swap
- [] swap package id :
- [] call swap CoinA-> CoinB hash :
- [] call swap CoinB-> CoinA hash :

## 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 :
File renamed without changes.
34 changes: 34 additions & 0 deletions mover/ChainRex/code/task7/getflag/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 = 3
manifest_digest = "0348B6DDD825DB2342AA3FBFE1ED7615A488066F5119B163F340ED30C195D886"
deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082"
dependencies = [
{ id = "Sui", name = "Sui" },
]

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

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

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

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

[env]

[env.suiscan-testnet]
chain-id = "4c78adac"
original-published-id = "0x0000000000000000000000000000000000000000000000000000000000000000"
latest-published-id = "0x21c522bac2b85255fdc47d411a1155efc45e9f2f03f6588e978c9e1b972a6318"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/ChainRex/code/task7/getflag/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "getflag"
edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move
# license = "" # e.g., "MIT", "GPL", "Apache 2.0"
# authors = ["..."] # e.g., ["Joe Smith ([email protected])", "John Snow ([email protected])"]

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

# For remote import, use the `{ git = "...", subdir = "...", rev = "..." }`.
# Revision can be a branch, a tag, and a commit hash.
# MyRemotePackage = { git = "https://some.remote/host.git", subdir = "remote/path", rev = "main" }

# For local dependencies use `local = path`. Path is relative to the package root
# Local = { local = "../path/to" }

# To resolve a version conflict and force a specific version for dependency
# override use `override = true`
# Override = { local = "../conflicting/version", override = true }

[addresses]
getflag = "0x0"

# Named addresses will be accessible in Move as `@name`. They're also exported:
# for example, `std = "0x1"` is exported by the Standard Library.
# alice = "0xA11CE"

[dev-dependencies]
# The dev-dependencies section allows overriding dependencies for `--test` and
# `--dev` modes. You can introduce test-only dependencies here.
# Local = { local = "../path/to/dev-build" }

[dev-addresses]
# The dev-addresses section allows overwriting named addresses for the `--test`
# and `--dev` modes.
# alice = "0xB0B"

32 changes: 32 additions & 0 deletions mover/ChainRex/code/task7/getflag/sources/getfalg.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module getflag::getflag {
use std::ascii::{ String };
use std::bcs;
use std::hash::sha3_256;

public struct Answer has key {
id: UID,
flag: vector<u8>
}

fun init(ctx: &mut TxContext) {
let answer = Answer {
id: object::new(ctx),
flag: vector::empty()
};
transfer::share_object(answer)
}

public entry fun get_flag(
answer: &mut Answer,
github_id: String,
flag_str: String,
) {
let mut bcs_flag = bcs::to_bytes(&flag_str);
vector::append<u8>(
&mut bcs_flag,
*github_id.as_bytes()
);
answer.flag = sha3_256(bcs_flag);

}
}
18 changes: 18 additions & 0 deletions mover/ChainRex/code/task7/getflag/tests/getfalg_tests.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module getfalg::getfalg_tests;
// uncomment this line to import the module
// use getfalg::getfalg;
const ENotImplemented: u64 = 0;
#[test]
fun test_getfalg() {
// pass
}
#[test, expected_failure(abort_code = ::getfalg::getfalg_tests::ENotImplemented)]
fun test_getfalg_fail() {
abort ENotImplemented
}
*/
Binary file added mover/ChainRex/images/task7/cli_call.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions mover/ChainRex/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@

## 07 Move CTF Check In

- [] CLI call 截图 : ![截图](./images/你的图片地址)
- [] flag hash :
- [x] CLI call 截图 : ![截图](./images/task7/cli_call.png)
- [x] flag hash : 7AEMibphRNxX2kRj6y7fnr5eRwVQungSUmju9aeQzqvH

## 08 Move CTF Lets Move

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions mover/Hy6ran/co-learn-2411/project/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading

0 comments on commit 4730e7a

Please sign in to comment.