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

complete task1 & task2 #2193

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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/yufin/coLearn2411/images/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

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

53 changes: 53 additions & 0 deletions mover/yufin/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 added mover/yufin/code/readme.md
Empty file.
1 change: 1 addition & 0 deletions mover/yufin/code/task1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
34 changes: 34 additions & 0 deletions mover/yufin/code/task1/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 = "2E267C18D553336099CDD31F7063857679825E46CD06EC67CC7F7FB0C20317C1"
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.39.3"
edition = "2024.beta"
flavor = "sui"

[env]

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

[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]
task1 = "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/yufin/code/task1/sources/task1.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module task1::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"yufin"),
};
transfer(hello_move, sender(ctx));
}
}
18 changes: 18 additions & 0 deletions mover/yufin/code/task1/tests/task1_tests.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module task1::task1_tests;
// uncomment this line to import the module
// use task1::task1;

const ENotImplemented: u64 = 0;

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

#[test, expected_failure(abort_code = ::task1::task1_tests::ENotImplemented)]
fun test_task1_fail() {
abort ENotImplemented
}
*/
1 change: 1 addition & 0 deletions mover/yufin/code/task2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
40 changes: 40 additions & 0 deletions mover/yufin/code/task2/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 = "E7A65BF39B740E195045E87B46B06936199C063AFE29D8948B9C6B9B853033A8"
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.39.3"
edition = "2024.beta"
flavor = "sui"

[env]

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

[env.mainnet]
chain-id = "35834a8a"
original-published-id = "0xe31a18ace543a8d317824b15718a54cf0477e5c93bcedb2f4c5d877dedc16a18"
latest-published-id = "0xe31a18ace543a8d317824b15718a54cf0477e5c93bcedb2f4c5d877dedc16a18"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/yufin/code/task2/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "task2"
edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move
# license = "" # e.g., "MIT", "GPL", "Apache 2.0"
# authors = ["..."] # e.g., ["Joe Smith (joesmith@noemail.com)", "John Snow (johnsnow@noemail.com)"]

[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]
task2 = "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"

44 changes: 44 additions & 0 deletions mover/yufin/code/task2/deployed/call.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
sui client call --package 0x2 \
--module coin \
--function mint_and_transfer \
--type-args 0xf66e365f9f900eeb6ba09bc71a7bafb854cd864455050eb9829a5308bc92bc4a::mycoin::MYCOIN \
--args 0xedf277a00b6c8c9204a4b4c5c1057fecd463d304d7d5223353d87ef85fe8ee5f 10000000000 0x35728af3acdf166c1adf4c756a84a830b9557588cb010d081e3857c53fcc1df7


#0x2::coin::TreasuryCap<0xf66e365f9f900eeb6ba09bc71a7bafb854cd864455050eb9829a5308bc92bc4a::mycoin::MYCOIN>


# 0x115adc3cce5ec094078e6a17c65336a2780a0ec579042f11aeda3f5a8d3b8d3d::mycoin::MYCOIN /treasuryCap pkgId 0x1e56a66eaa1689ae9df96448bde288a35da907d0708d23468b6632b8faf9f287
# 0x115adc3cce5ec094078e6a17c65336a2780a0ec579042f11aeda3f5a8d3b8d3d::faucet::FAUCET /treasuryCap pkgId 0x1d7613be77a2f2959bac0313b4f10e8af7ac79784c948f43250431c7705ab2b8
sui client call --package 0x2 \
--module coin \
--function mint_and_transfer \
--type-args 0x115adc3cce5ec094078e6a17c65336a2780a0ec579042f11aeda3f5a8d3b8d3d::mycoin::MYCOIN \
--args 0x1e56a66eaa1689ae9df96448bde288a35da907d0708d23468b6632b8faf9f287 10000000000 0x35728af3acdf166c1adf4c756a84a830b9557588cb010d081e3857c53fcc1df7

sui client call --package 0x2 \
--module coin \
--function mint_and_transfer \
--type-args 0x115adc3cce5ec094078e6a17c65336a2780a0ec579042f11aeda3f5a8d3b8d3d::faucet::FAUCET \
--args 0x1d7613be77a2f2959bac0313b4f10e8af7ac79784c948f43250431c7705ab2b8 100000000 0x35728af3acdf166c1adf4c756a84a830b9557588cb010d081e3857c53fcc1df7



# mainnet
sui client call --package 0x2 \
--module coin \
--function mint_and_transfer \
--type-args 0xe31a18ace543a8d317824b15718a54cf0477e5c93bcedb2f4c5d877dedc16a18::mycoin::MYCOIN \
--args 0xb17e46efb97b496d3d97a8f91cbf90d97e5600a4cd3ffc14c6ce03829832275f 10000000000 0x7b8e0864967427679b4e129f79dc332a885c6087ec9e187b53451a9006ee15f2

sui client call --package 0x2 \
--module coin \
--function mint_and_transfer \
--type-args 0xe31a18ace543a8d317824b15718a54cf0477e5c93bcedb2f4c5d877dedc16a18::faucet::FAUCET \
--args 0x27f568ea398fb03090762d97295d7165eb5f34d4ad4e13507c9841218ba25206 100000000 0x35728af3acdf166c1adf4c756a84a830b9557588cb010d081e3857c53fcc1df7

sui client call --package 0x2 \
--module coin \
--function mint_and_transfer \
--type-args 0xe31a18ace543a8d317824b15718a54cf0477e5c93bcedb2f4c5d877dedc16a18::faucet::FAUCET \
--args 0x27f568ea398fb03090762d97295d7165eb5f34d4ad4e13507c9841218ba25206 100000000 0xdf572b1ffb53dc559c39a8c18b1c6622d77fa10850adcd5b2bb495f0e7665796
Loading
Loading