diff --git a/mover/Sy711/code/readme.md b/mover/Sy711/code/readme.md new file mode 100644 index 000000000..e69de29bb diff --git a/mover/Sy711/code/task2/faucet/Move.lock b/mover/Sy711/code/task2/faucet/Move.lock new file mode 100644 index 000000000..087bdd220 --- /dev/null +++ b/mover/Sy711/code/task2/faucet/Move.lock @@ -0,0 +1,34 @@ +# @generated by Move, please check-in and do not edit manually. + +[move] +version = 3 +manifest_digest = "F8CFCF256E2F1BB7CD401C27799A09C40777C5C100F0DFA253E86DD7F0D4ED1B" +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.35.0" +edition = "2024.beta" +flavor = "sui" + +[env] + +[env.mainnet] +chain-id = "35834a8a" +original-published-id = "0xb3743a94cbc755521c27fb5d91e2c8b34ea5b0df899654c20d2f965d301bb7dd" +latest-published-id = "0xb3743a94cbc755521c27fb5d91e2c8b34ea5b0df899654c20d2f965d301bb7dd" +published-version = "1" diff --git a/mover/Sy711/code/task2/faucet/Move.toml b/mover/Sy711/code/task2/faucet/Move.toml new file mode 100644 index 000000000..1b517a2be --- /dev/null +++ b/mover/Sy711/code/task2/faucet/Move.toml @@ -0,0 +1,37 @@ +[package] +name = "faucet_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 (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] +faucet_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" + diff --git a/mover/Sy711/code/task2/faucet/sources/faucet_coin.move b/mover/Sy711/code/task2/faucet/sources/faucet_coin.move new file mode 100644 index 000000000..85aa63174 --- /dev/null +++ b/mover/Sy711/code/task2/faucet/sources/faucet_coin.move @@ -0,0 +1,51 @@ +/// Module: faucet_coin +module faucet_coin::faucet_coin { + use sui::coin::{Self, Coin, TreasuryCap}; + use sui::balance; + + public struct FAUCET_COIN has drop {} + + public struct MySupply has key, store { + id: UID, + supply: balance::Supply + } + + + #[allow(lint(share_owned))] + fun init(witness: FAUCET_COIN, ctx: &mut TxContext) { + let (treasury_cap, coin_metadata) = coin::create_currency( + witness, + 6, + b"SY711_FAUCET", + b"SY711_FAUCET", + b"Sy711 Faucet Coin", + option::none(), + ctx + ); + + // https://zh.blog.sui.io/linter-compile-warnings-update/ + sui::transfer::public_share_object(coin_metadata); + + let supply = coin::treasury_into_supply(treasury_cap); + transfer::public_transfer(MySupply { + id: object::new(ctx), + supply + }, ctx.sender()); + } + + public entry fun mint(supply: &mut MySupply, value: u64, ctx: &mut TxContext) { + let balance = balance::increase_supply(&mut supply.supply, value); + let coin = coin::from_balance(balance, ctx); + transfer::public_transfer(coin, ctx.sender()); + } + + public fun burn(treasury_cap: &mut TreasuryCap, coin: Coin) { + coin::burn(treasury_cap, coin); + } + + #[test_only] + public fun test_init(ctx: &mut tx_context::TxContext) { + init(FAUCET_COIN{}, ctx); + } +} + diff --git a/mover/Sy711/code/task2/mycoin/Move.lock b/mover/Sy711/code/task2/mycoin/Move.lock new file mode 100644 index 000000000..936c2a86b --- /dev/null +++ b/mover/Sy711/code/task2/mycoin/Move.lock @@ -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.35.0" +edition = "2024.beta" +flavor = "sui" + +[env] + +[env.mainnet] +chain-id = "35834a8a" +original-published-id = "0xc1c3bc0379fb47eb69add8e7ea01acd42eaa65f6bb7ac5dcf2b5faa235dbd126" +latest-published-id = "0xc1c3bc0379fb47eb69add8e7ea01acd42eaa65f6bb7ac5dcf2b5faa235dbd126" +published-version = "1" diff --git a/mover/Sy711/code/task2/mycoin/Move.toml b/mover/Sy711/code/task2/mycoin/Move.toml new file mode 100644 index 000000000..e77f86f6a --- /dev/null +++ b/mover/Sy711/code/task2/mycoin/Move.toml @@ -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 (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] +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" + diff --git a/mover/Sy711/code/task2/mycoin/sources/mycoin.move b/mover/Sy711/code/task2/mycoin/sources/mycoin.move new file mode 100644 index 000000000..32fac2978 --- /dev/null +++ b/mover/Sy711/code/task2/mycoin/sources/mycoin.move @@ -0,0 +1,37 @@ +module mycoin::mycoin { + use sui::coin::{Self, Coin, TreasuryCap}; + + public struct MYCOIN has drop {} + + fun init(witness: MYCOIN, ctx: &mut TxContext) { + let (treasury, metadata) = coin::create_currency( + witness, + 6, + b"SY711_COIN", + b"SY711Coin", + b"SY711'scoin", + option::none(), + ctx + ); + + transfer::public_freeze_object(metadata); + + transfer::public_transfer(treasury, ctx.sender()); + } + + public fun mint( + treasury_cap: &mut TreasuryCap, amount: u64, recipient: address, ctx: &mut TxContext + ) { + coin::mint_and_transfer(treasury_cap, amount, recipient, ctx) + } + + public fun burn(treasury_cap: &mut TreasuryCap, coin: Coin) { + coin::burn(treasury_cap, coin); + } + + #[test_only] + public fun test_init(ctx: &mut TxContext) { + init(MYCOIN {}, ctx) + } +} + diff --git a/mover/Sy711/notes/readme.md b/mover/Sy711/notes/readme.md new file mode 100644 index 000000000..e69de29bb diff --git a/mover/Sy711/readme.md b/mover/Sy711/readme.md new file mode 100644 index 000000000..432a3eb37 --- /dev/null +++ b/mover/Sy711/readme.md @@ -0,0 +1,46 @@ +## 基本信息 +-Sui钱包地址: '0x65f4d257afcf154f109970c8239d6078c89be5454b61fb91a9d9483de44bc885` +> 首次参与需要完成第一个任务注册好钱包地址才被合并,并且后续学习奖励会打入这个地址 +-github: 'Sy711` + +## 个人简介 +-工作经验:0 +-技术栈: 'Python' 'Go' 'java' 'mysql` +> 重要提示 请认真写自己的简介 +-学过区块链知识,对Move特别感兴趣,想通过Move深入了解区块链 +-联系方式: tg: '19100109702` + +## 任务 + +## 01 你好移动 +- []Sui cli 版本:sui 1.35.0-40d9ec7ecd5d +- []Sui钱包截图: ![Sui钱包截图](./images/Sy711_0bbf.png +- []软件包 ID:0xc684442abff68a9f092630a9a4569036eba99cab5bfe4630162ffc776878a8af +- []package id 在 scan上的查看截图:![扫描截图](./images/你好_move_package_id.png + +## 02 移动硬币 +- []我的 Coin 包裹 ID :0xc1c3bc0379fb47eb69add8e7ea01acd42eaa65f6bb7ac5dcf2b5faa235dbd126 +- []水龙头包装 ID :0xb3743a94cbc755521c27fb5d91e2c8b34ea5b0df899654c20d2f965d301bb7dd +- []转账 'My Coin' hash: 5dLZFurm3eWg7RyXrYD1V33Y3rZfvXprccM793HqnuL7 +- [] `Faucet Coin' address1 mint 哈希值:6z6rT1xycZgg5dP9xxgZJV7XZuXxdvwtxrqYEuBkqdd6 +- [] `Faucet Coin' address2 mint 哈希值:59gaGKKR1NeVbGu4i6P54gd754pMDBy8sH1JMqKmeFmz + +## 03 移动 NFT +- []NFT 包 ID : +- []NFT 对象 ID : +- []转账 NFT 哈希: +- []scan上的NFT截图:![Scan截图](./images/你的图片地址) + +## 04 移动游戏 +- []游戏包 ID : +- []存入 Coin 哈希: +- []提取 'Coin' 哈希: +- []Play Game Hash 进行游戏哈希: + +## 05 移动交换 +- []交换包 ID : +- []call swap CoinA-> CoinB 哈希值 : +- []call swap CoinB-> CoinA 哈希值 : + +## 06 SDK PTB 开发工具包 +- []保存哈希 : \ No newline at end of file