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
44 changes: 44 additions & 0 deletions mover/minhnd410/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Basic Information
- Sui Wallet Address: `0xf6429b3bfe3fa36cf6a56695f2fe9ad071dc03ed47d5178bf7d740711da1c442`
- Github: `minhnd410`

## Personal Introduction
- Work Experience: `8`
- Tech Stack: `C#`, `Javascript` , ...
- Nearly 8 years of experience in web application development and driving digital transformation for small and medium-sized enterprises in Vietnam, I have successfully deployed and operated numerous products using my preferred programming stack: C#, .NET, SQL Server, and various JavaScript frameworks on Azure Cloud. I believe that Move is a promising programming language that can help me to enter the blockchain world. I am excited to learn more about it.
- Contact: telegram `minhnd410`

## Tasks

### 01 hello move
- [x] Sui CLI Version: sui 1.39.3-homebrew
- [x] Sui Wallet Screenshot: [images/task1-sui-wallet.png](./images/task1-sui-wallet.png)
- [x] Package ID: `0x6e86b0b8422822c6990455df426b165f6acc78707fe1d75a4f7884eb58ef891b`
- [x] Package ID's [images/task1-package-id.png](./images/task1-package-id.png)

### 02 move coin
- [x] `My Coin` Package ID: `0xe59be9ecc6460b70eac6b8c207ae2d7453901c9b017e3ef88a767548450d6db0`
- [x] `Faucet Coin` Package ID: `0xe47b867c5383eb363abdb5d7762f1b64641c37e9b24c295fbba49f56e719671f`
- [x] Transfer `My Coin` hash: `3BBYHkJWrG4CpKp3dXBEMPBDyrYPuuRwoqWtfzew8MzM`
- [x] `Faucet Coin` address 1 mint hash: `AcMLxT8rpWusZp6eLD3fXNezYGGqyLaMqJ4EYEXEL6yQ`
- [x] `Faucet Coin` address 2 mint hash: `FPEpyALHSZZSvCsKsbu6s4R4R5MzARMXdvCdAhf3hHWu`

### 03 move nft
- [x] NFT Package ID: `0x51349746bf9269633ae178c868fb24822f6433a2c33d912371b79afb7d86625b`
- [x] NFT Object ID: `0x8f3768b0d74b7625e66ddce7518c56515b90005547b618b91b96ed61b7f38f9e`
- [x] Transfer NFT hash: `BuK71qhfa2svJyk3X9LUohmduXFJ3ddzfw5u4rkHrK3y`
- [x] NFT's Screenshot from Explorer: [images/task3-nft.png](./images/task3-nft.png)

### 04 move game
- [x] Game Package ID: `0x94083fe279e3e43eea4eaed795741b19f912f0dd762c4540b68f2f9f3e7d1d8c`
- [x] Deposit Coin Hash: `B1pxtAXVXQXx9ZovxSfZ4KtS9nVsdKshUTQmVAUnid41`
- [x] Withdraw Coin Hash: `CQpraQptnpd4fRH3RbfWZJJotS3itVAT7YCzos2emd2F`
- [x] Play Game Hash: `9TJariQyfuP474SNTPpjmvLjZf5DiDHZJDa5mPM7UY5j`

### 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:
27 changes: 27 additions & 0 deletions mover/minhnd410/code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## Command used

```bash
# Create new package
sui move new task1

# Build the project
sui move build

# Run the test
sui move test

# Import seed phrase from sui wallet
sui keytool import <SEED_PHRASE> ed25519 "m/44'/784'/0'/0'/0'"

# Check if address is active
sui client addresses

# Switch to the desired address
sui client switch --address <ALIAS_NAME / ADDRESS>

# Request faucet
sui client faucet --address <ADDRESS>

# Publish the package
sui client publish
```
1 change: 1 addition & 0 deletions mover/minhnd410/code/task1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
34 changes: 34 additions & 0 deletions mover/minhnd410/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 = "8B7DC3EDF1D81F9E2D46D8251E70F4B8D7097878F02438454C30AEF9F05D81D0"
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 = "0x6e86b0b8422822c6990455df426b165f6acc78707fe1d75a4f7884eb58ef891b"
latest-published-id = "0x6e86b0b8422822c6990455df426b165f6acc78707fe1d75a4f7884eb58ef891b"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/minhnd410/code/task1/Move.toml
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 (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_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"

9 changes: 9 additions & 0 deletions mover/minhnd410/code/task1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Command used

```bash
# Build the project
sui move build

# Run the test
sui move test
```
44 changes: 44 additions & 0 deletions mover/minhnd410/code/task1/sources/hello_move.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
module hello_move::mover;

use std::string::{Self, String};

public struct Mover has key, store {
id: UID,
github_id: String,
}

fun init(ctx: &mut TxContext) {
let mover = Mover {
id: object::new(ctx),
github_id: string::utf8(b"minhnd410"),
};

transfer::transfer(mover, ctx.sender());
}

public fun github_id(self: &Mover): String {
self.github_id
}

#[test]
fun test_mover() {
use sui::test_scenario;

let admin = @0xAD;

let mut scenario = test_scenario::begin(admin);
{
init(scenario.ctx());
};

scenario.next_tx(admin);
{
let mover = scenario.take_from_sender<Mover>();
// Verify number of created swords
assert!(mover.github_id() == string::utf8(b"minhnd410"), 1);
// Return the Forge object to the object pool
scenario.return_to_sender(mover);
};

scenario.end();
}
18 changes: 18 additions & 0 deletions mover/minhnd410/code/task1/tests/hello_move_tests.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module hello_move::hello_move_tests;
// uncomment this line to import the module
// use hello_move::hello_move;

const ENotImplemented: u64 = 0;

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

#[test, expected_failure(abort_code = ::hello_move::hello_move_tests::ENotImplemented)]
fun test_hello_move_fail() {
abort ENotImplemented
}
*/
7 changes: 7 additions & 0 deletions mover/minhnd410/code/task2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```bash
# Mint coin
sui client call --function mint --module minhnd410 --package 0xe59be9ecc6460b70eac6b8c207ae2d7453901c9b017e3ef88a767548450d6db0 --args 0xb36752efb2c95063557a924eb89385d29ea2adc08a69fd68723556a7637f423f 1000000 0xf6429b3bfe3fa36cf6a56695f2fe9ad071dc03ed47d5178bf7d740711da1c442

sui client call --function mint --module minhnd410_Faucet --package 0xe47b867c5383eb363abdb5d7762f1b64641c37e9b24c295fbba49f56e719671f --args 0x126bdf130cc2c2aafbc1bb98de6c2c406d19421b780f751b567d5003cd4dedd8 1000000 0xa1646edd2b1acb5a3da109896d7e2aaee0cc9ac0ee3882c40f62c71bf1da18e2

```
1 change: 1 addition & 0 deletions mover/minhnd410/code/task2/move_coin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
34 changes: 34 additions & 0 deletions mover/minhnd410/code/task2/move_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 = "8EB223C8F40D0F546D3CD1F4773472F9D95459A9E8E5F61FE9A5E8BE25350372"
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 = "0xe59be9ecc6460b70eac6b8c207ae2d7453901c9b017e3ef88a767548450d6db0"
latest-published-id = "0xe59be9ecc6460b70eac6b8c207ae2d7453901c9b017e3ef88a767548450d6db0"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/minhnd410/code/task2/move_coin/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "move_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]
move_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"

31 changes: 31 additions & 0 deletions mover/minhnd410/code/task2/move_coin/sources/minhnd410.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module move_coin::minhnd410;

use sui::coin::{Self, TreasuryCap};
use sui::url::{new_unsafe};

public struct MINHND410 has drop {}

fun init(witness: MINHND410, ctx: &mut TxContext) {
let token_url = new_unsafe(std::ascii::string(b"https://strapi-dev.scand.app/uploads/sui_c07df05f00.png"));
let (treasury, metadata) = coin::create_currency(
witness,
6,
b"MINHND410",
b"minhnd410 coin",
b"task 2 - coin",
option::some(token_url),
ctx,
);
transfer::public_freeze_object(metadata);
transfer::public_transfer(treasury, ctx.sender())
}

public fun mint(
treasury_cap: &mut TreasuryCap<MINHND410>,
amount: u64,
recipient: address,
ctx: &mut TxContext,
) {
let coin = coin::mint(treasury_cap, amount, ctx);
transfer::public_transfer(coin, recipient)
}
18 changes: 18 additions & 0 deletions mover/minhnd410/code/task2/move_coin/tests/move_coin_tests.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module move_coin::move_coin_tests;
// uncomment this line to import the module
// use move_coin::move_coin;

const ENotImplemented: u64 = 0;

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

#[test, expected_failure(abort_code = ::move_coin::move_coin_tests::ENotImplemented)]
fun test_move_coin_fail() {
abort ENotImplemented
}
*/
1 change: 1 addition & 0 deletions mover/minhnd410/code/task2/move_faucet_coin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
34 changes: 34 additions & 0 deletions mover/minhnd410/code/task2/move_faucet_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 = "ED8E02F3BAA177E30ED58083BAD0B87A059B6412A5ADE8A9643EB728516A7C30"
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 = "0xe47b867c5383eb363abdb5d7762f1b64641c37e9b24c295fbba49f56e719671f"
latest-published-id = "0xe47b867c5383eb363abdb5d7762f1b64641c37e9b24c295fbba49f56e719671f"
published-version = "1"
Loading