Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更新了 task6文件 #2154

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mover/Laolong1994/coLearn2411/images/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions mover/Laolong1994/coLearn2411/project/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

53 changes: 53 additions & 0 deletions mover/Laolong1994/coLearn2411/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@


## b站,推特关注

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

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

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

## 每周课程学习

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

## 参加直播答疑

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

## 群里分享学习笔记

- [] 第一篇笔记
- [] 第二篇笔记
- [] 第三篇笔记
- [] 第四篇笔记

## 对外输出学习笔记

- [] 第一篇笔记【学习笔记链接】
- [] 第二篇笔记【学习笔记链接】
- [] 第三篇笔记【学习笔记链接】
- [] 第四篇笔记【学习笔记链接】

## 在HOH社区公众号发布自己的技术文章

- [] 第一篇笔记【公众号文章链接】
- [] 第二篇笔记【公众号文章链接】
- [] 第三篇笔记【公众号文章链接】
- [] 第四篇笔记【公众号文章链接】

## 直播分享学习技巧/工具推荐

- [] 会议截图:![会议记录截图](./images/你的图片地址)

## 提交项目

- [] 项目提交![项目截图](./images/你的图片地址)

Empty file.
37 changes: 37 additions & 0 deletions mover/Laolong1994/code/task1_hellomove/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"

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
/// Module: hellomove
module hellomove::hellomove;
*/


module hellomove::hello {

use std::ascii::{String, string};
use sui::transfer::transfer;

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"Laolong1994"),
};
transfer(hello_move, ctx.sender());
}
}
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
}
*/
34 changes: 34 additions & 0 deletions mover/Laolong1994/code/task2/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 = "E990E28911EB2A7E6099340B01D8E194A261EAD02155CCBC82E937572F837913"
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.4"
edition = "2024.beta"
flavor = "sui"

[env]

[env.mainnet]
chain-id = "35834a8a"
original-published-id = "0x63926a3402c6085c1cea8af0e6ff15f67ae04e4e2d3d54b0c700dfa2d55ab43c"
latest-published-id = "0x63926a3402c6085c1cea8af0e6ff15f67ae04e4e2d3d54b0c700dfa2d55ab43c"
published-version = "1"
24 changes: 24 additions & 0 deletions mover/Laolong1994/code/task2/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "task2"
edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move
publish-at = "0x63926a3402c6085c1cea8af0e6ff15f67ae04e4e2d3d54b0c700dfa2d55ab43c"
# 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" }

[addresses]
task2 = "0x63926a3402c6085c1cea8af0e6ff15f67ae04e4e2d3d54b0c700dfa2d55ab43c"


[dev-dependencies]
# The dev-dependencies section allows overriding dependencies for `--test` and
# `--dev` modes. You can introduce test-only dependencies here.


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

27 changes: 27 additions & 0 deletions mover/Laolong1994/code/task2/sources/laolong1994_coin.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module task2::laolong1994_coin {

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

public struct LAOLONG1994_COIN has drop {}


fun init(usd: LAOLONG1994_COIN, ctx: &mut TxContext) {

let no = none<Url>();
// let url = url::new_unsafe_from_bytes(b"https://q2.itc.cn/images01/20240223/cd0cd2f403d944fea1826a3df2f8d60d.png");
// let yes = some<Url>(url);
let (treasury, coin_metadata) =
create_currency(usd, 8, b"Laolong1994_coin", b"Laolong1994_coin", b"this is Laolong1994_coin",no, ctx);

public_freeze_object(coin_metadata);

public_share_object(treasury);
}


}


25 changes: 25 additions & 0 deletions mover/Laolong1994/code/task2/sources/laolong1994_faucet_coin.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module task2::laolong1994_faucet_coin {

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

public struct LAOLONG1994_FAUCET_COIN has drop {}


fun init(usd: LAOLONG1994_FAUCET_COIN, ctx: &mut TxContext) {

let no = none<Url>();
// let url = url::new_unsafe_from_bytes(b"https://q2.itc.cn/images01/20240223/cd0cd2f403d944fea1826a3df2f8d60d.png");
// let yes = some<Url>(url);
let (treasury, coin_metadata) =
create_currency(usd, 8, b"Laolong1994_faucet_coin", b"Laolong1994_faucet_coin", b"this is Laolong1994_faucet_coin",no, ctx);

public_freeze_object(coin_metadata);

public_share_object(treasury);
}
}


18 changes: 18 additions & 0 deletions mover/Laolong1994/code/task2/tests/task2_1_tests.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module task2_1::task2_1_tests;
// uncomment this line to import the module
// use task2_1::task2_1;

const ENotImplemented: u64 = 0;

#[test]
fun test_task2_1() {
// pass
}

#[test, expected_failure(abort_code = ::task2_1::task2_1_tests::ENotImplemented)]
fun test_task2_1_fail() {
abort ENotImplemented
}
*/
40 changes: 40 additions & 0 deletions mover/Laolong1994/code/task3_Laolong1994nft/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 = "DEDE53BD567ECEDC2009BE853A86F47F6BDC3F1F03A6B00FAED274F07E74A18B"
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.4"
edition = "2024.beta"
flavor = "sui"

[env]

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

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

/// Module: task3
module task3_Laolong1994nft::Laolong1994nft {
use std::string;
use std::string::String;
use sui::object;
use sui::transfer::transfer;
use sui::tx_context::sender;



public struct MyNFT has key {
id: UID,
name: String,
image_url: String,
}

fun init(ctx: &mut TxContext) {
let my_nft = MyNFT {
id: object::new(ctx),
name: string::utf8(b"Laolong1994"),
image_url: string::utf8(b"https://q2.itc.cn/images01/20240223/cd0cd2f403d944fea1826a3df2f8d60d.png")
};

transfer(my_nft,sender(ctx));
}

public entry fun mint(url:String,ctx:&mut TxContext){
let my_nft = MyNFT{
id:object::new(ctx),
name:string::utf8(b"Laolong1994"),
image_url:url,
};
transfer(my_nft,sender(ctx));
}

}
Loading
Loading