Skip to content

Commit

Permalink
Merge pull request #1878 from RaynorZhong/main
Browse files Browse the repository at this point in the history
b站关注,X关注,共学营每周学习
  • Loading branch information
Sifotd authored Nov 16, 2024
2 parents 06b663c + 87c0a9b commit 47911ac
Show file tree
Hide file tree
Showing 15 changed files with 233 additions and 13 deletions.
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 mover/RaynorZhong/co-learn-2411/images/week1.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/RaynorZhong/co-learn-2411/images/week2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions mover/RaynorZhong/co-learn-2411/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

## b站,推特关注

- [] b站,推特关注截图: ![关注截图](./images/你的图片地址)
- [X] b站,推特关注截图: ![关注截图](./images/follow_bilibili.png)![关注截图](./images/follow_x.png)

## 为共学营宣传(在朋友圈或者群聊中转发海报/文章)

- [] 宣传截图:![宣传截图](./images/你的图片地址)

## 每周课程学习

- [] 第一周:![学习记录截图](./images/你的图片地址)
- [] 第二周:![学习记录截图](./images/你的图片地址)
- [X] 第一周:![学习记录截图](./images/week1.png)
- [X] 第二周:![学习记录截图](./images/week2.png)
- [] 第三周:![学习记录截图](./images/你的图片地址)
- [] 第四周:![学习记录截图](./images/你的图片地址)

Expand Down
2 changes: 1 addition & 1 deletion mover/RaynorZhong/code/task1/hello_move/Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies = [
]

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

Expand Down
34 changes: 34 additions & 0 deletions mover/RaynorZhong/code/task2/faucetcoin/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 = "36AAF1CDEC036D88764BAC3DCDE58C0D7D361D80DBC1ED0F543FFC7DC8AA1BA6"
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.2"
edition = "2024.beta"
flavor = "sui"

[env]

[env.mainnet]
chain-id = "35834a8a"
original-published-id = "0xb07129c3ae8286e21399d85fe6ada35f30ed320113e115b6765f19b3cc31b10b"
latest-published-id = "0xb07129c3ae8286e21399d85fe6ada35f30ed320113e115b6765f19b3cc31b10b"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/RaynorZhong/code/task2/faucetcoin/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "faucetcoin"
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]
faucetcoin = "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"

21 changes: 21 additions & 0 deletions mover/RaynorZhong/code/task2/faucetcoin/sources/faucetcoin.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
/// Module: faucetcoin
module faucetcoin::faucetcoin;
*/
module faucetcoin::raynor_faucet_coin{
use sui::coin::{Self,TreasuryCap};

public struct RAYNOR_FAUCET_COIN has drop {}

fun init(witness:RAYNOR_FAUCET_COIN, ctx:&mut TxContext){
let (treasury, metadata) = coin::create_currency(witness, 6, b"RFC", b"raynor faucet coin", b"faucetcoin", option::none(), ctx);

transfer::public_freeze_object(metadata);
transfer::public_share_object(treasury);
}

public fun mint(treasury_cap:&mut TreasuryCap<RAYNOR_FAUCET_COIN>, amount:u64, recipient:address, ctx:&mut TxContext){
let coin = coin::mint(treasury_cap, amount, ctx);
transfer::public_transfer(coin, recipient);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module faucetcoin::faucetcoin_tests;
// uncomment this line to import the module
// use faucetcoin::faucetcoin;
const ENotImplemented: u64 = 0;
#[test]
fun test_faucetcoin() {
// pass
}
#[test, expected_failure(abort_code = ::faucetcoin::faucetcoin_tests::ENotImplemented)]
fun test_faucetcoin_fail() {
abort ENotImplemented
}
*/
34 changes: 34 additions & 0 deletions mover/RaynorZhong/code/task2/mycoin/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 = "1393B3A86BC22B7FE61E23DBB2EF7BE1A330BF07AB402600F7E7CFF6E9DC82F9"
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.2"
edition = "2024.beta"
flavor = "sui"

[env]

[env.mainnet]
chain-id = "35834a8a"
original-published-id = "0x3af0e3f1dfce740a550144bc0a09446274e028fa83ae77a81423cd1ec0736937"
latest-published-id = "0x3af0e3f1dfce740a550144bc0a09446274e028fa83ae77a81423cd1ec0736937"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/RaynorZhong/code/task2/mycoin/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "mycoin"
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]
mycoin = "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"

21 changes: 21 additions & 0 deletions mover/RaynorZhong/code/task2/mycoin/sources/mycoin.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
/// Module: mycoin
module mycoin::mycoin;
*/
module mycoin::raynor_coin{
use sui::coin::{Self,TreasuryCap};

public struct RAYNOR_COIN has drop {}

fun init(witness:RAYNOR_COIN, ctx:&mut TxContext){
let (treasury, metadata) = coin::create_currency(witness, 6, b"RC", b"raynor coin", b"mycoin", option::none(), ctx);

transfer::public_freeze_object(metadata);
transfer::public_transfer(treasury, tx_context::sender(ctx));
}

public fun mint(treasury_cap:&mut TreasuryCap<RAYNOR_COIN>, amount:u64, recipient:address, ctx:&mut TxContext){
let coin = coin::mint(treasury_cap, amount, ctx);
transfer::public_transfer(coin, recipient);
}
}
18 changes: 18 additions & 0 deletions mover/RaynorZhong/code/task2/mycoin/tests/mycoin_tests.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module mycoin::mycoin_tests;
// uncomment this line to import the module
// use mycoin::mycoin;
const ENotImplemented: u64 = 0;
#[test]
fun test_mycoin() {
// pass
}
#[test, expected_failure(abort_code = ::mycoin::mycoin_tests::ENotImplemented)]
fun test_mycoin_fail() {
abort ENotImplemented
}
*/
18 changes: 9 additions & 9 deletions mover/RaynorZhong/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
## 任务

## 01 hello move
- [] Sui cli version: sui 1.37.1-homebrew
- [] Sui钱包截图: ![Sui钱包截图](./images/wallet.png)
- [] package id: 0x22b201c33f9272292876888fb49f5c95a938079ce1ed4ac7a9199018769453f2
- [] package id 在 scan上的查看截图:![Scan截图](./images/packageid.png)
- [X] Sui cli version: sui 1.37.2-homebrew
- [X] Sui钱包截图: ![Sui钱包截图](./images/wallet.png)
- [X] package id: 0x22b201c33f9272292876888fb49f5c95a938079ce1ed4ac7a9199018769453f2
- [X] package id 在 scan上的查看截图:![Scan截图](./images/packageid.png)

## 02 move coin
- [] My Coin package id :
- [] Faucet package id :
- [] 转账 `My Coin` hash:
- [] `Faucet Coin` address1 mint hash:
- [] `Faucet Coin` address2 mint hash:
- [X] My Coin package id : 0x3af0e3f1dfce740a550144bc0a09446274e028fa83ae77a81423cd1ec0736937
- [X] Faucet package id : 0xb07129c3ae8286e21399d85fe6ada35f30ed320113e115b6765f19b3cc31b10b
- [X] 转账 `My Coin` hash: 65jLT3cemJtUKPHYuMktUqA54gbBAX4FqpvBdgqLvaBS
- [X] `Faucet Coin` address1 mint hash: GZzhkwyh3GWeGhQJeCerFRgQD3EuMZCB6rHQhHkmhkex
- [X] `Faucet Coin` address2 mint hash: CeWZzGvkxLiNewpowSRuozvJcRHRaAnw89gx9Q8oBZLL

## 03 move NFT
- [] nft package id :
Expand Down

0 comments on commit 47911ac

Please sign in to comment.