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
Helen2022a authored Dec 3, 2024
2 parents 40e70d6 + 86fde05 commit c5840d2
Show file tree
Hide file tree
Showing 289 changed files with 29,703 additions and 249 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.
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.
8 changes: 4 additions & 4 deletions mover/0xHoGan/co-learn-2411/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## b站,推特关注

- [] b站关注截图: ![关注截图](./images/b站关注.png)
- [] b站关注截图: ![关注截图](./images/b站关注.png)


## 为共学营宣传(在朋友圈或者群聊中转发海报/文章)
Expand All @@ -11,15 +11,15 @@

## 每周课程学习

- [] 第一周:![学习记录截图](./images/task1/11月5日课程学习.png)
- [] 第二周:![学习记录截图](./images/task3/11月12日课程学习.png)
- [] 第一周:![学习记录截图](./images/11月5日课程学习.png)
- [] 第二周:![学习记录截图](./images/11月12日课程学习001.png) ![学习记录截图](./images/11月12日课程学习002.png)
- [] 第三周:![学习记录截图](./images/你的图片地址)
- [] 第四周:![学习记录截图](./images/你的图片地址)

## 参加直播答疑

- [] 第一周:![学习记录截图](./images/你的图片地址)
- [] 第二周:![学习记录截图](./images/你的图片地址)
- [] 第二周:![学习记录截图](./images/11月18日直播.png)
- [] 第三周:![学习记录截图](./images/你的图片地址)
- [] 第四周:![学习记录截图](./images/你的图片地址)

Expand Down
40 changes: 40 additions & 0 deletions mover/0xHoGan/code/task2/move_coin/Move.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# @generated by Move, please check-in and do not edit manually.

[move]
version = 3
manifest_digest = "8EB223C8F40D0F546D3CD1F4773472F9D95459A9E8E5F61FE9A5E8BE25350372"
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.38.2"
edition = "2024.beta"
flavor = "sui"

[env]

[env.testnet]
chain-id = "4c78adac"
original-published-id = "0xf818b69412b173c0683cdbbdb988c3a4c028dde21343a44b9ee41e7f689c0e90"
latest-published-id = "0xf818b69412b173c0683cdbbdb988c3a4c028dde21343a44b9ee41e7f689c0e90"
published-version = "1"

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

29 changes: 29 additions & 0 deletions mover/0xHoGan/code/task2/move_coin/sources/hogan.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module move_coin::hogan;

use std::option::{some};
use sui::url;
use sui::coin::{create_currency, mint, TreasuryCap};
use sui::transfer::{ public_transfer, public_freeze_object};

public struct HOGAN has drop{}

fun init(hogan: HOGAN, ctx: &mut TxContext){
let url = url::new_unsafe_from_bytes(b"https://0xhogan.4everland.store/Logo.jpg");
let yes = some<url::Url>(url);
let (treasury, coin_metadata) = create_currency(
hogan,
8,
b"0xHoGan",
b"0xHoGan",
b"this is 0xHoGan Coin",
yes,
ctx
);
public_freeze_object(coin_metadata);
public_transfer(treasury, ctx.sender());
}

public entry fun mint_my_coin(cap: &mut TreasuryCap<HOGAN>, amount: u64, recipient: address, ctx: &mut TxContext) {
let hogan_coin = mint(cap, amount, ctx);
public_transfer(hogan_coin, recipient);
}
32 changes: 32 additions & 0 deletions mover/0xHoGan/code/task2/move_coin/sources/hogan_faucet.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module move_coin::hogan_faucet;

use std::option::{some};
use sui::url;
use sui::coin::{create_currency, mint, TreasuryCap};
use sui::transfer::{public_freeze_object, public_share_object, public_transfer};

public struct HOGAN_FAUCET has drop{}

fun init(hogan_faucet: HOGAN_FAUCET, ctx: &mut TxContext) {
let url = url::new_unsafe_from_bytes(b"https://0xhogan.4everland.store/Logo.jpg");
let yes = some<url::Url>(url);
let (treasury, coin_metadata) = create_currency(
hogan_faucet,
8,
b"0xHoGan Faucet",
b"0xHoGan Faucet",
b"this is 0xHoGan Faucet",
yes,
ctx
);
public_freeze_object(coin_metadata);
public_share_object(treasury);
}

public entry fun mint_faucet_coin(cap: &mut TreasuryCap<HOGAN_FAUCET>, amount: u64, recipient_one: address, recipient_two: address, ctx: &mut TxContext) {
let hogan_faucet = mint(cap, amount, ctx);
public_transfer(hogan_faucet,recipient_one);

let hogan_faucet = mint(cap, amount, ctx);
public_transfer(hogan_faucet,recipient_two);
}
18 changes: 18 additions & 0 deletions mover/0xHoGan/code/task2/move_coin/tests/move_coin_tests.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module move_coin::move_coin_tests;
// uncomment this line to import the module
// use move_coin::move_coin;
const ENotImplemented: u64 = 0;
#[test]
fun test_move_coin() {
// pass
}
#[test, expected_failure(abort_code = ::move_coin::move_coin_tests::ENotImplemented)]
fun test_move_coin_fail() {
abort ENotImplemented
}
*/
34 changes: 34 additions & 0 deletions mover/0xHoGan/code/task2/my_coin/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 = "0A4652D38CF3C3FDB79EC6C1C98FCFF7B2E933E12B84A1DA267DB28F66AFECE3"
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.3"
edition = "2024.beta"
flavor = "sui"

[env]

[env.testnet]
chain-id = "4c78adac"
original-published-id = "0xe360557b35aac76874b5982ece61816d38c13d0db7b601222dc875a969aec30c"
latest-published-id = "0xe360557b35aac76874b5982ece61816d38c13d0db7b601222dc875a969aec30c"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/0xHoGan/code/task2/my_coin/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "my_coin"
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]
my_coin = "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"

16 changes: 16 additions & 0 deletions mover/0xHoGan/code/task2/my_coin/sources/rmd.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module my_coin::rmd;

use std::option::{none};
use sui::url::Url;
use sui::coin::create_currency;
use sui::transfer::{public_freeze_object, public_share_object};

public struct RMD has drop{}

fun init(rmd: RMD, ctx: &mut TxContext) {
let no = none<Url>();
let (treasury, coin_metadata) =
create_currency(rmd, 8, b"RMB",b"RMB",b"this is RMD",no, ctx);
public_freeze_object(coin_metadata);
public_share_object(treasury);
}
19 changes: 19 additions & 0 deletions mover/0xHoGan/code/task2/my_coin/sources/usd.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module my_coin::usd;

use sui::coin::create_currency;
use std::option::{none};
use sui::url::Url;
use sui::transfer::{public_transfer, public_freeze_object};

public struct USD has drop{}

fun init(usd: USD, ctx: &mut TxContext) {
let no = none<Url>();
// let url = url::new_unsafe_from_bytes(b"");
// let yes = some<Url>(url);
let (treasury, coin_metadata) =
create_currency(usd, 8, b"USD", b"USD", b"This is USD", no, ctx);

public_freeze_object(coin_metadata);
public_transfer(treasury, ctx.sender());
}
18 changes: 18 additions & 0 deletions mover/0xHoGan/code/task2/my_coin/tests/my_coin_tests.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module my_coin::my_coin_tests;
// uncomment this line to import the module
// use my_coin::my_coin;
const ENotImplemented: u64 = 0;
#[test]
fun test_my_coin() {
// pass
}
#[test, expected_failure(abort_code = ::my_coin::my_coin_tests::ENotImplemented)]
fun test_my_coin_fail() {
abort ENotImplemented
}
*/
34 changes: 34 additions & 0 deletions mover/0xHoGan/code/task3/display_nft/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 = "6B7A8AED2C1EF029F8D2281D36C6E8AADD6050481843FF50F3E1DB6F5CE02FC4"
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.3"
edition = "2024.beta"
flavor = "sui"

[env]

[env.testnet]
chain-id = "4c78adac"
original-published-id = "0x8c28580665094a8c67d43d30bd5abd47aca14afd179cb6bafad29be8fa3c6ca3"
latest-published-id = "0x8c28580665094a8c67d43d30bd5abd47aca14afd179cb6bafad29be8fa3c6ca3"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/0xHoGan/code/task3/display_nft/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "display_nft"
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]
display_nft = "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"

Loading

0 comments on commit c5840d2

Please sign in to comment.