diff --git a/mover/PebblerWon/code/whn_nft/Move.lock b/mover/PebblerWon/code/whn_nft/Move.lock new file mode 100644 index 000000000..77e8bb987 --- /dev/null +++ b/mover/PebblerWon/code/whn_nft/Move.lock @@ -0,0 +1,40 @@ +# @generated by Move, please check-in and do not edit manually. + +[move] +version = 3 +manifest_digest = "C960BA2792B226EAAFD19D668602399E3757E8993B1FD66CD999F5E263030CA4" +deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082" +dependencies = [ + { id = "Sui", name = "Sui" }, +] + +[[move.package]] +id = "MoveStdlib" +source = { git = "https://gitee.com/MystenLabs/sui.git", rev = "framework/testnet", subdir = "crates/sui-framework/packages/move-stdlib" } + +[[move.package]] +id = "Sui" +source = { git = "https://gitee.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.1" +edition = "2024.beta" +flavor = "sui" + +[env] + +[env.testnet] +chain-id = "4c78adac" +original-published-id = "0x6aad6ecbb297f7e4a58cc0bb48244208b57de25aa33b414d425deeadc8ae9c40" +latest-published-id = "0x6aad6ecbb297f7e4a58cc0bb48244208b57de25aa33b414d425deeadc8ae9c40" +published-version = "1" + +[env.mainnet] +chain-id = "35834a8a" +original-published-id = "0xfc928db1679248ce9d993664d876d4809e902eeded693a0dd03e13a51cb73da8" +latest-published-id = "0xfc928db1679248ce9d993664d876d4809e902eeded693a0dd03e13a51cb73da8" +published-version = "1" diff --git a/mover/PebblerWon/code/whn_nft/Move.toml b/mover/PebblerWon/code/whn_nft/Move.toml new file mode 100644 index 000000000..ce4e25bb1 --- /dev/null +++ b/mover/PebblerWon/code/whn_nft/Move.toml @@ -0,0 +1,37 @@ +[package] +name = "whn_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 (joesmith@noemail.com)", "John Snow (johnsnow@noemail.com)"] + +[dependencies] +Sui = { git = "https://gitee.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] +whn_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" + diff --git a/mover/PebblerWon/code/whn_nft/sources/whn_nft.move b/mover/PebblerWon/code/whn_nft/sources/whn_nft.move new file mode 100644 index 000000000..2439d4adc --- /dev/null +++ b/mover/PebblerWon/code/whn_nft/sources/whn_nft.move @@ -0,0 +1,28 @@ +/* +/// Module: whn_nft +module whn_nft::whn_nft; +*/ +module whn_nft::whn_nft{ + use std::string::{utf8, String}; + use sui::tx_context::{sender}; + + public struct WhnNft has key, store{ + id:UID, + name:String, + image_url:String, + } + + fun init(ctx:&mut TxContext){ + let firstNft = WhnNft{ + id: object::new(ctx), + name:utf8(b"Pebbler"), + image_url:utf8(b"https://avatars.githubusercontent.com/u/10150276?v=4&size=64"), + }; + transfer::public_transfer(firstNft, sender(ctx)) + } + public entry fun mint(addr: address, name:String,image_url:String,ctx: &mut TxContext){ + let id = object::new(ctx); + let nft = WhnNft{id,name,image_url}; + transfer::public_transfer(nft, addr); + } +} \ No newline at end of file diff --git a/mover/PebblerWon/code/whn_nft/tests/whn_nft_tests.move b/mover/PebblerWon/code/whn_nft/tests/whn_nft_tests.move new file mode 100644 index 000000000..532b1edc7 --- /dev/null +++ b/mover/PebblerWon/code/whn_nft/tests/whn_nft_tests.move @@ -0,0 +1,18 @@ +/* +#[test_only] +module whn_nft::whn_nft_tests; +// uncomment this line to import the module +// use whn_nft::whn_nft; + +const ENotImplemented: u64 = 0; + +#[test] +fun test_whn_nft() { + // pass +} + +#[test, expected_failure(abort_code = ::whn_nft::whn_nft_tests::ENotImplemented)] +fun test_whn_nft_fail() { + abort ENotImplemented +} +*/ diff --git a/mover/PebblerWon/images/task3.png b/mover/PebblerWon/images/task3.png new file mode 100644 index 000000000..c2173699b Binary files /dev/null and b/mover/PebblerWon/images/task3.png differ diff --git a/mover/PebblerWon/readme.md b/mover/PebblerWon/readme.md index 41be78d9e..e4a79f782 100644 --- a/mover/PebblerWon/readme.md +++ b/mover/PebblerWon/readme.md @@ -1,5 +1,5 @@ ## 基本信息 -- Sui钱包地址: `0x1a9dc5b81090ca7201d1a001a8a048e44c694cc55ab2076b3bdbbe401d90ef03` +- Sui钱包地址: `0x60364db3c6fa7128433ad62ce4e32649443a999ab6b54bdcbaf14194ec1a6203` > 首次参与需要完成第一个任务注册好钱包地址才被合并,并且后续学习奖励会打入这个地址 - github: `PebblerWon` @@ -26,10 +26,10 @@ - [✓] `Faucet Coin` address2 mint hash: HmWYnxuuKozdtWgtdBDiSSLMCSxQo5yVvG1jfMFmcaUs ## 03 move NFT -- [] nft package id : -- [] nft object id : -- [] 转账 nft hash: -- [] scan上的NFT截图:![Scan截图](./images/你的图片地址) +- [✓] nft package id : 0xfc928db1679248ce9d993664d876d4809e902eeded693a0dd03e13a51cb73da8 +- [✓] nft object id : 0xbfd36a8882ff9c8c49515fbc00b321ad61c31309ed4239b91fb7e054808c7521 +- [✓] 转账 nft hash: HiWXV8MNVijWa9ECT7r3j4tAZYVYnGkX2Fv8icpyxJFP +- [✓] scan上的NFT截图:![Scan截图](./images/task3.png) ## 04 Move Game - [] game package id :