Skip to content
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
46 changes: 46 additions & 0 deletions mover/nhatlapross/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## Basic Information
- Sui Wallet Address: `0x3808b95f4603b8140b5d2082d4d6970ded65f49dac8980db525fe6f0a0f05396`
> First-time participants must complete the registration of the wallet address through the first task to have it merged. You should use this address for subsequent tasks. We will also use this address to credit the learning rewards.
- Github: `nhatlapross`

## Personal Introduction
- Work Experience: `1 years`
- Tech Stack: `C# typescript html`
> Important: Please take your personal introduction seriously.
- Years of experience in web2 development, particularly interested in Move, aiming to use Move as an entry point into blockchain. (This is just an example, please write your own introduction and feel free to add more details.)
- Contact: telegram `@AlvinIchikun`

## Tasks

### 01 hello move
- [x] Sui CLI Version: sui 1.39.3-5d4350d66d2b
- [x] Sui Wallet Screenshot: ![](images/suiwallet.png)
- [x] Package ID: 0x9b93c085bbafba5f539a9ee9d0859e996a2adc3ee40b8fa184ae108e17e50795
- [x] Package ID's Screenshot from Explorer: ![](images/Task1PackageID.png)

### 02 move coin
- [x] `My Coin` Package ID:0x956140d5ede902167fa66c06b97510bf576888bac73b3c3b757cd473bab144cd
- [x] `Faucet Coin` Package ID: 0x4f6267abc4f4af0f0c7caafed20630cc9081d16dfa49228d07a48469b8418d92
- [x] Transfer `My Coin` hash: HVLFaH8BNpLTyPvrwNrt6xVcAHNHoFnGmnba79cdc4su
- [x] `Faucet Coin` address 1 mint hash:4SuWJBgwDmG8RhVYFWJsdWQDxS75Gu5ntmxKe4RM9SEQ
- [x] `Faucet Coin` address 2 mint hash:F3rLkXySLUt4xjKCimWqV8WjnT2gDSQMuN2cpnvqjkYr

### 03 move nft
- [x] NFT Package ID: 0xa5b1cf9c2f44ef86d1a954212a043140c003a84fc0059a21489d351564eea532
- [x] NFT Object ID: 0xb3473d47f573dd70760581c7d2d7006154913f80a5d7843d40dc47f155cfc7ad
- [x] Transfer NFT hash: Cxbqj92fk6j9uFwECiZ9onj55fJ7iBSs7K7TDuCxAtjW
- [x] NFT's Screenshot from Explorer: ![](images/AlvinNFT.png)

### 04 move game
- [x] Game Package ID:0x4d0c262d9ebe5fa24c68256e647a54501472a720cae4496cc71bb92fa4ec579c
- [x] Deposit Coin Hash:https://suiscan.xyz/devnet/tx/XawNhfQphkTNzpvGiivNJCkfVBK3bqrrN5ZEWb35d3J
- [x] Withdraw Coin Hash:4wuP1HMwB39gGebiyHcE3yizmFYSoL8v12xnaQEp5dkD
- [x] Play Game Hash:5DvPjTwpTTADk1PMvYa3ua431t7bBUwV15QLsiLhk2vq

### 05 move swap
- [ ] Swap Package ID:
- [ ] Call Swap Coin A -> Coin B hash:
- [ ] Call Swap Coin B -> Coin A hash:

### 06 dapp-kit SDK PTB
- [ ] Save Hash:
Empty file.
Empty file.
1 change: 1 addition & 0 deletions mover/nhatlapross/code/task1/hello_nhatlapross/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
34 changes: 34 additions & 0 deletions mover/nhatlapross/code/task1/hello_nhatlapross/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 = "22FA8F6B7AA00AB4EB42634D56E1912D16C0E646859580DC6761BF48E15A197A"
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.devnet]
chain-id = "7f81d47e"
original-published-id = "0x9b93c085bbafba5f539a9ee9d0859e996a2adc3ee40b8fa184ae108e17e50795"
latest-published-id = "0x9b93c085bbafba5f539a9ee9d0859e996a2adc3ee40b8fa184ae108e17e50795"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/nhatlapross/code/task1/hello_nhatlapross/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "hello_nhatlapross"
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]
hello_nhatlapross = "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,20 @@
module hello_nhatlapross::hello_world {
use std::string;

/// An object that contains an arbitrary string
public struct Hello_nhatlapross has key, store {
id: UID,
/// A string contained in the object
text: string::String
}

#[lint_allow(self_transfer)]
public entry fun say_hello_nhatlapross(ctx: &mut TxContext) {
let object = Hello_nhatlapross {
id: object::new(ctx),
text: string::utf8(b"Hello handsome boy,Nhat!")
};
transfer::public_transfer(object, tx_context::sender(ctx));
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module hello_nhatlapross::hello_nhatlapross_tests;
// uncomment this line to import the module
// use hello_nhatlapross::hello_nhatlapross;

const ENotImplemented: u64 = 0;

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

#[test, expected_failure(abort_code = ::hello_nhatlapross::hello_nhatlapross_tests::ENotImplemented)]
fun test_hello_nhatlapross_fail() {
abort ENotImplemented
}
*/
1 change: 1 addition & 0 deletions mover/nhatlapross/code/task2/alvin_coin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
34 changes: 34 additions & 0 deletions mover/nhatlapross/code/task2/alvin_coin/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 = "12AAC98FF9ED4D0425E11B9154A48308AE44C60329F28F6C9B34DD43A3CB52C7"
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.devnet]
chain-id = "7f81d47e"
original-published-id = "0x4f6267abc4f4af0f0c7caafed20630cc9081d16dfa49228d07a48469b8418d92"
latest-published-id = "0x4f6267abc4f4af0f0c7caafed20630cc9081d16dfa49228d07a48469b8418d92"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/nhatlapross/code/task2/alvin_coin/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "alvin_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]
alvin_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"

6 changes: 6 additions & 0 deletions mover/nhatlapross/code/task2/alvin_coin/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package id: 0x956140d5ede902167fa66c06b97510bf576888bac73b3c3b757cd473bab144cd
Treasurycap id: 0xe95ff8979f7f7e5d02ca52e064afed70a6918787fc968a6e5efdeca5422caaab

sui client call --package 0x956140d5ede902167fa66c06b97510bf576888bac73b3c3b757cd473bab144cd --module alvin_coin --function mint_token --args 0xe95ff8979f7f7e5d02ca52e064afed70a6918787fc968a6e5efdeca5422caaab

sui client call --package 0x2 --module coin --function mint_and_transfer --args 0xe95ff8979f7f7e5d02ca52e064afed70a6918787fc968a6e5efdeca5422caaab 10000000 0xd9322ea3470365d34b29de778623ba99be18b870702059837c4acf774b9796d7 --type-args 0x956140d5ede902167fa66c06b97510bf576888bac73b3c3b757cd473bab144cd::alvin_coin::ALVIN_COIN
37 changes: 37 additions & 0 deletions mover/nhatlapross/code/task2/alvin_coin/sources/alvin_coin.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
/// Module: alvin_coin
module alvin_coin::alvin_coin;
*/

// For Move coding conventions, see
// https://docs.sui.io/concepts/sui-move-concepts/conventions


module 0x0::alvin_coin{
use sui::coin::{Self,TreasuryCap};
use sui::tx_context::{Self, TxContext};
use sui::transfer;
use sui::url;
public struct ALVIN_COIN has drop {}

fun init(witness: ALVIN_COIN,ctx: &mut TxContext) {
let ascii_url = std::ascii::string(b"https://coffee-teenage-wolf-435.mypinata.cloud/ipfs/QmTkTRCQpPVRwibQ1DeTF9JLyEkQmgL1rjsAS8XE6nFEMi");
let icon_url = url::new_unsafe(ascii_url);
let icon_url_option = option::some(icon_url);
let(treasury, coinmetadata) = coin::create_currency(witness,
5,
b"ALC",
b"Alvin Coin",
b"My first coin",
icon_url_option,
ctx);

transfer::public_freeze_object(coinmetadata);
transfer::public_share_object(treasury);
}

public entry fun mint_token(treasury: &mut TreasuryCap<ALVIN_COIN>,ctx: &mut TxContext) {
let coin_object = coin::mint(treasury,350000,ctx);
transfer::public_transfer(coin_object, ctx.sender());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module alvin_coin::alvin_coin_tests;
// uncomment this line to import the module
// use alvin_coin::alvin_coin;

const ENotImplemented: u64 = 0;

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

#[test, expected_failure(abort_code = ::alvin_coin::alvin_coin_tests::ENotImplemented)]
fun test_alvin_coin_fail() {
abort ENotImplemented
}
*/
1 change: 1 addition & 0 deletions mover/nhatlapross/code/task2/faucet_coin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
26 changes: 26 additions & 0 deletions mover/nhatlapross/code/task2/faucet_coin/Move.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# @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.39.3"
edition = "2024.beta"
flavor = "sui"
37 changes: 37 additions & 0 deletions mover/nhatlapross/code/task2/faucet_coin/Move.toml
Original file line number Diff line number Diff line change
@@ -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"

Loading