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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ yarn-error.log*
sui.log.*
.history
*.Identifier
mover/TranPhong/code/task5
mover/TranPhong/code/task3
mover/TranPhong/code/task1
mover/TranPhong/code/task4
.codegpt
46 changes: 0 additions & 46 deletions mover/001/README.md

This file was deleted.

Empty file removed mover/001/notes/README.md
Empty file.
54 changes: 54 additions & 0 deletions mover/TranPhong/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
## Basic Information

- Sui Wallet Address: `0x522211228cb0e4c6d8e8ba4132041be98482ceecde2cd218c52cedf295cac0b2`
> 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: `https://github.com/Tr4nMorDev`

## Personal Introduction

- Work Experience: `<1 years`
- Tech Stack: `sui move` , etc.
> 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 `Mortal Phong`

## Tasks

### 01 hello move

- [x] Sui CLI Version: sui 1.39.1
- [x] Sui Wallet Screenshot: ![](images/image.png)
- [x] Package ID: 0xacb26b1f982e93221433c488e7fb5bb579a6333dd34d904a82debbe0488fd4fb
- [x] Package ID's Screenshot from Explorer: ![](images/image%20copy.png)

### 02 move coin

- [x] `My Coin` Package ID : 0xec85ef67f70a352ee3a701826a3493c4017c1fc93d4e99ee73f122790ac64423
- [x] `Faucet Coin` Package ID : 0x94d31d3251b4bbac513157b414bb52910badc5b6e2beadd37d9af0f336127a66
- [x] Transfer `My Coin` hash: 5tFM1YdzmBBSGb4ShSbtZZaZpdjtpbv1PTuE3SQDTcqu
- [x] `Faucet Coin` address 1 mint hash: CCZBP3BhK9g88tEcwbuBVzCzCiQMGJc9V5ssx583hBJs
- [x] `Faucet Coin` address 2 mint hash: C1MmXEiQ17q4a26weMYZFyh7ohf8mtT76tDq24XCRAM

### 03 move nft

- [x] NFT Package ID: 0x11bb35e3630974ca1fb3d8387430adba0f21f29969f4cba49671a6fa0f779d45
- [x] NFT Object ID: 0x6f359686abadccf19ba706b15752b5d29ad35489a01dfe4f108874134dc7d557
- [x] Transfer NFT hash: Du9RH12keroDSfyPEj4hWLKmm3WCsdVg7i3CTGU1XtvH
- [x] NFT's Screenshot from Explorer: ![](images/image%20copy%202.png)

### 04 move game

- [x] Game Package ID: 0x6aa4a4344a3a0ede2d206c0d574c216d56ecda889889ca926f155730ae2d6a30
- [x] Deposit Coin Hash: DEXKfMf1WZBBXEv9bRyCtgHAiPpa2Q5b2Z5Q3nSeSVet
- [x] Withdraw Coin Hash: FdfXoPyVasgQiPP4vvPP8rjHSX6Q4HpLnnT3VdKyVhwJ
- [x] Play Game Hash: GZuRLKiHqQGqCtNrTbKR2niUmuedqrBRYG62JSEmrfAs

### 05 move swap

- [x] Swap Package ID: 0x50edd4d0b8c17300020d11b6a9a7ea439453427c2aef8ee4f0e1a0c9a9aab0db
- [x] Call Swap Coin A -> Coin B hash: 9tAPGdpb2DZ1JTExr6QX623x7QThRz16sk2vApY9eEGx
- [x] Call Swap Coin B -> Coin A hash: 22v5Uwzhbk1DA8nhCMxLHYQavJvtWhvZa9VGWjVtwbaM

### 06 dapp-kit SDK PTB

- [x] Save Hash: 9dmzJpAnckPVwNRoo6nMv35rWY65V51i5sYYD2n23Z6c
File renamed without changes.
24 changes: 24 additions & 0 deletions mover/TranPhong/code/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions mover/TranPhong/code/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"@simplewebauthn/types": "^12.0.0"
}
}
1 change: 1 addition & 0 deletions mover/TranPhong/code/task2/faucet_coin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
37 changes: 37 additions & 0 deletions mover/TranPhong/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"

23 changes: 23 additions & 0 deletions mover/TranPhong/code/task2/faucet_coin/sources/faucet_coin.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module 0x0::faucet_coin {
use sui::coin::{TreasuryCap ,Self };
// use sui::tx_context::{Self,TxContext};

//Otw
public struct FAUCET_COIN has drop {}
fun init (witness: FAUCET_COIN , ctx : &mut TxContext){
let(treasury , coinmetadata) = coin::create_currency(
witness,
5 ,
b"Coin faucet",
b"pet's",
b"idea",
option::none(),
ctx);
transfer::public_freeze_object(coinmetadata); // đóng băng ojb coin này không thể chuyển nhượng nữanữa
transfer::public_share_object(treasury);
}
public entry fun mint_token( treasury : &mut TreasuryCap<FAUCET_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 faucet_coin::faucet_coin_tests;
// uncomment this line to import the module
// use faucet_coin::faucet_coin;

const ENotImplemented: u64 = 0;

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

#[test, expected_failure(abort_code = ::faucet_coin::faucet_coin_tests::ENotImplemented)]
fun test_faucet_coin_fail() {
abort ENotImplemented
}
*/
1 change: 1 addition & 0 deletions mover/TranPhong/code/task2/my_coin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
37 changes: 37 additions & 0 deletions mover/TranPhong/code/task2/my_coin/Move.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[package]
name = "my_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]
my_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"

24 changes: 24 additions & 0 deletions mover/TranPhong/code/task2/my_coin/sources/my_coin.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module 0x0::my_coin {
use sui::coin::{TreasuryCap ,Self };
// use sui::tx_context::{Self,TxContext};
use sui::transfer;

//Otw
public struct MY_COIN has drop {}
fun init (witness: MY_COIN , ctx : &mut TxContext){
let(treasury , coinmetadata) = coin::create_currency(
witness,
5 ,
b"Coin my",
b"pet's ",
b"idea",
option::none(),
ctx);
transfer::public_freeze_object(coinmetadata); // đóng băng ojb coin này không thể chuyển nhượng nữanữa
transfer::public_transfer(treasury, ctx.sender());
}
public entry fun mint_token( treasury : &mut TreasuryCap<MY_COIN> ,ctx : &mut TxContext ){
let coin_object = coin::mint(treasury, 350000, ctx);
transfer::public_transfer(coin_object, ctx.sender());
}
}
18 changes: 18 additions & 0 deletions mover/TranPhong/code/task2/my_coin/tests/my_coin_tests.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
#[test_only]
module my_coin::my_coin_tests;
// uncomment this line to import the module
// use my_coin::my_coin;

const ENotImplemented: u64 = 0;

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

#[test, expected_failure(abort_code = ::my_coin::my_coin_tests::ENotImplemented)]
fun test_my_coin_fail() {
abort ENotImplemented
}
*/
35 changes: 35 additions & 0 deletions mover/TranPhong/code/task6/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Sui dApp Starter Template

This dApp was created using `@mysten/create-dapp` that sets up a basic React
Client dApp using the following tools:

- [React](https://react.dev/) as the UI framework
- [TypeScript](https://www.typescriptlang.org/) for type checking
- [Vite](https://vitejs.dev/) for build tooling
- [Radix UI](https://www.radix-ui.com/) for pre-built UI components
- [ESLint](https://eslint.org/)
- [`@mysten/dapp-kit`](https://sdk.mystenlabs.com/dapp-kit) for connecting to
wallets and loading data
- [pnpm](https://pnpm.io/) for package management

## Starting your dApp

To install dependencies you can run

```bash
pnpm install
```

To start your dApp in development mode run

```bash
pnpm dev
```

## Building

To build your app for deployment you can run

```bash
pnpm build
```
Loading