-
Notifications
You must be signed in to change notification settings - Fork 896
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yunru-volknet
committed
Dec 2, 2024
1 parent
677879c
commit e0da42d
Showing
26 changed files
with
531 additions
and
31 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
|
||
|
||
## b站,推特关注 | ||
|
||
- [] b站,推特关注截图: ![关注截图]() | ||
|
||
## 为共学营宣传(在朋友圈或者群聊中转发海报/文章) | ||
|
||
- [] 宣传截图:![宣传截图](./images/你的图片地址) | ||
|
||
## 每周课程学习 | ||
|
||
- [] 第一周:![学习记录截图](./images/你的图片地址) | ||
- [] 第二周:![学习记录截图](./images/你的图片地址) | ||
- [] 第三周:![学习记录截图](./images/你的图片地址) | ||
- [] 第四周:![学习记录截图](./images/你的图片地址) | ||
|
||
## 参加直播答疑 | ||
|
||
- [v] 第一周:![学习记录截图](./images/week1_z.png) | ||
- [v] 第二周:![学习记录截图](./images/week1and2_z.png) | ||
- [v] 第三周:![学习记录截图](./images/week3_z.png) | ||
- [] 第四周:![学习记录截图](./images/你的图片地址) | ||
|
||
## 群里分享学习笔记 | ||
|
||
- [] 第一篇笔记 | ||
- [] 第二篇笔记 | ||
- [] 第三篇笔记 | ||
- [] 第四篇笔记 | ||
|
||
## 对外输出学习笔记 | ||
|
||
- [v] 第一篇笔记【https://learnblockchain.cn/article/9967】 | ||
- [v] 第二篇笔记【https://learnblockchain.cn/article/9971】 | ||
- [v] 第三篇笔记【https://learnblockchain.cn/article/9993】 | ||
- [] 第四篇笔记【学习笔记链接】 | ||
|
||
## 在HOH社区公众号发布自己的技术文章 | ||
|
||
- [] 第一篇笔记【公众号文章链接】 | ||
- [] 第二篇笔记【公众号文章链接】 | ||
- [] 第三篇笔记【公众号文章链接】 | ||
- [] 第四篇笔记【公众号文章链接】 | ||
|
||
## 直播分享学习技巧/工具推荐 | ||
|
||
- [] 会议截图:![会议记录截图](./images/你的图片地址) | ||
|
||
## 提交项目 | ||
|
||
- [] 项目提交![项目截图](./images/你的图片地址) | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = "8B7DC3EDF1D81F9E2D46D8251E70F4B8D7097878F02438454C30AEF9F05D81D0" | ||
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.33.0" | ||
edition = "2024.beta" | ||
flavor = "sui" | ||
|
||
[env] | ||
|
||
[env.testnet] | ||
chain-id = "4c78adac" | ||
original-published-id = "0x31bb1d338224a985e688a7f411d90ace0889050ef954adb6e5a78c5aacef435f" | ||
latest-published-id = "0x31bb1d338224a985e688a7f411d90ace0889050ef954adb6e5a78c5aacef435f" | ||
published-version = "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[package] | ||
name = "hello_move" | ||
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] | ||
hello_move = "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
19
mover/yunru-volknet/code/task1/code/task1/sources/hello_move.move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module hello_move::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"hello,yunru-volknet"), | ||
}; | ||
transfer(hello_move, sender(ctx)); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
mover/yunru-volknet/code/task1/code/task1/tests/hello_move_tests.move
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
#[test_only] | ||
module bc001_hello_move::bc001_hello_move_tests { | ||
// uncomment this line to import the module | ||
// use bc001_hello_move::bc001_hello_move; | ||
const ENotImplemented: u64 = 0; | ||
#[test] | ||
fun test_bc001_hello_move() { | ||
// pass | ||
} | ||
#[test, expected_failure(abort_code = ::bc001_hello_move::bc001_hello_move_tests::ENotImplemented)] | ||
fun test_bc001_hello_move_fail() { | ||
abort ENotImplemented | ||
} | ||
} | ||
*/ |
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.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
/// Module: faucet_coin | ||
module faucet_coin::faucet_coin; | ||
*/ | ||
|
||
module faucet_coin::faucet_coin { | ||
use std::option; | ||
use sui::coin::{Self, Coin, TreasuryCap}; | ||
use sui::transfer; | ||
use sui::tx_context::{Self, TxContext}; | ||
|
||
public struct FAUCET_COIN has drop {} | ||
|
||
fun init(witness: FAUCET_COIN, ctx: &mut TxContext) { | ||
let (treasury_cap, metadata) = coin::create_currency<FAUCET_COIN>( | ||
witness, | ||
2, | ||
b"yunru-volknet", | ||
b"y_v's faucet coin", | ||
b"y_v's faucet coin", | ||
option::none(), | ||
ctx | ||
); | ||
transfer::public_freeze_object(metadata); | ||
// transfer::public_transfer(treasury_cap, tx_context::sender(ctx)) | ||
transfer::public_share_object(treasury_cap) | ||
} | ||
|
||
public entry fun mint( | ||
treasury_cap: &mut TreasuryCap<FAUCET_COIN>, amount: u64, recipient: address, ctx: &mut TxContext | ||
) { | ||
coin::mint_and_transfer(treasury_cap, amount, recipient, ctx) | ||
} | ||
|
||
public fun burn(treasury_cap: &mut TreasuryCap<FAUCET_COIN>, coin: Coin<FAUCET_COIN>) { | ||
coin::burn(treasury_cap, coin); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
/// Module: my_coin | ||
module my_coin::my_coin; | ||
*/ | ||
// file: my_coin.move | ||
module my_coin::my_coin { | ||
use std::option; | ||
use sui::coin::{Self, Coin, TreasuryCap}; | ||
use sui::transfer; | ||
use sui::tx_context::{Self, TxContext}; | ||
|
||
struct MY_COIN has drop {} | ||
|
||
fun init(witness: MY_COIN, ctx: &mut TxContext) { | ||
let (treasury_cap, metadata) = coin::create_currency<MY_COIN>( | ||
witness, | ||
2, | ||
b"MY_COIN", | ||
b"y_v", | ||
b"yunru-volknet", | ||
option::none(), | ||
ctx | ||
); | ||
|
||
transfer::public_freeze_object(metadata); | ||
transfer::public_transfer(treasury_cap, tx_context::sender(ctx)); | ||
} | ||
|
||
public fun mint( | ||
treasury_cap: &mut TreasuryCap<MY_COIN>, | ||
amount: u64, | ||
recipient: address, | ||
ctx: &mut TxContext | ||
) { | ||
coin::mint_and_transfer(treasury_cap, amount, recipient, ctx); | ||
} | ||
|
||
public fun burn(treasury_cap: &mut TreasuryCap<MY_COIN>, coin: Coin<MY_COIN>) { | ||
coin::burn(treasury_cap, coin); | ||
} | ||
|
||
#[test_only] | ||
public fun test_init(ctx: &mut TxContext) { | ||
init(MY_COIN {}, ctx); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
/// Module: my_nft | ||
module my_nft::my_nft; | ||
*/ | ||
module my_nft::my_nft{ | ||
use std::string; | ||
use std::string::String; | ||
use sui::transfer::transfer; | ||
use sui::tx_context::sender; | ||
|
||
public struct MyNFT has key , store{ | ||
id:UID, | ||
name:String, | ||
image_url:String, | ||
} | ||
|
||
fun init(ctx: &mut TxContext){ | ||
let nft = MyNFT{ | ||
id:object::new(ctx), | ||
name:string::utf8(b"yunru NFT"), | ||
image_url: string::utf8(b"https://th.bing.com/th/id/OIP.ttGXVHEedmY51ZM3yCsU_gAAAA?rs=1&pid=ImgDetMain") , | ||
}; | ||
transfer(nft, sender(ctx)); | ||
|
||
} | ||
|
||
public entry fun mint_and_transfer_nft( | ||
image_url: String, | ||
name:String, | ||
ctx: &mut TxContext | ||
) { | ||
let id = object::new(ctx); | ||
let nft = MyNFT { | ||
id, | ||
name, | ||
image_url, | ||
}; | ||
transfer(nft, sender(ctx)); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
[package] | ||
name = "game_520" | ||
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" } | ||
|
||
faucet_coin = { local = "../faucet_coin" } | ||
|
||
# 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] | ||
game_520 = "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" | ||
|
Oops, something went wrong.