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

## Personal Introduction
- Work Experience: `1 years`
- Tech Stack: `Go` `Vue` , 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 ``

## Tasks

### 01 hello move
- [x] Sui CLI Version: `sui 1.38.3-44dc210152dd`
- [x] Sui Wallet Screenshot:
![](images/sui_wallet.png)
- [x] Package ID: `0x3acb045590a2fff1c79c9eaa4aa0fbba10bd01a5f9f8efb333a22c1b6c04c1b3`
- [x] Package ID's Screenshot from Explorer:
![](images/publish_package_explorer.png)

### 02 move coin
- [x] `My Coin` Package ID: `0x6469ec5f6532002827c5e19c8b251d07bef978b7c44360c89263f6cead55f7c5`
- [x] `Faucet Coin` Package ID: `0x237bf03c0d69dcc4bfc05dea0a01a3fab23aa8f91bc7ae9050400188a2f4e57a`
- [x] Transfer `My Coin` hash: `8Fj5jHKrTBi1z21vHgRim7uWs1V9zTC4BFdXVVi9YAJQ`
- [x] `Faucet Coin` address 1 mint hash: `BpNnf86nqd7KQSAK1eLYaAKoHyzt3pzsK8ijzAhs5uqj`
- [x] `Faucet Coin` address 2 mint hash: `CY1X9By8o2jjSg241LGpmiVqhMjDCBBaFXF1ERAgrZSh`

### 03 move nft
- [ ] NFT Package ID:
- [ ] NFT Object ID:
- [ ] Transfer NFT hash:
- [ ] NFT's Screenshot from Explorer: Link to image uploaded to `images` folder.

### 04 move game
- [ ] Game Package ID:
- [ ] Deposit Coin Hash:
- [ ] Withdraw Coin Hash:
- [ ] Play Game Hash:

### 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.
34 changes: 34 additions & 0 deletions mover/codingandcoffeerighthand/code/task1/hello_move/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.38.3"
edition = "2024.beta"
flavor = "sui"

[env]

[env.testnet]
chain-id = "4c78adac"
original-published-id = "0x3acb045590a2fff1c79c9eaa4aa0fbba10bd01a5f9f8efb333a22c1b6c04c1b3"
latest-published-id = "0x3acb045590a2fff1c79c9eaa4aa0fbba10bd01a5f9f8efb333a22c1b6c04c1b3"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/codingandcoffeerighthand/code/task1/hello_move/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"

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// hello_move.move
module hello_move::hello {
use std::string::String;

public struct HelloMoveObject has key {
id: UID,
message: String,
}

public entry fun hello(ctx: &mut TxContext) {
let hello_move = HelloMoveObject {
id: object::new(ctx),
message: b"hello codingandcoffeerighthand".to_string()
};
transfer::transfer(hello_move, tx_context::sender(ctx))
}
}
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
}
*/
34 changes: 34 additions & 0 deletions mover/codingandcoffeerighthand/code/task2/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 = "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.38.3"
edition = "2024.beta"
flavor = "sui"

[env]

[env.testnet]
chain-id = "4c78adac"
original-published-id = "0x237bf03c0d69dcc4bfc05dea0a01a3fab23aa8f91bc7ae9050400188a2f4e57a"
latest-published-id = "0x237bf03c0d69dcc4bfc05dea0a01a3fab23aa8f91bc7ae9050400188a2f4e57a"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/codingandcoffeerighthand/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"

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module faucet_coin::faucet_coin;
use sui::coin::{Self, TreasuryCap};
use sui::url;

public struct FAUCET_COIN has drop {}

public struct TreasuryCapKeeper has key, store {
id: UID,
cap: TreasuryCap<FAUCET_COIN>
}

fun init(otw: FAUCET_COIN,ctx: &mut TxContext){
let (treasury_cap, metadata) = coin::create_currency(
otw,
6,
b"FCC",
b"codingandcoffeerighthand Faucet Coin",
b"This Faucet coin is coin that anyone can mint.",
option::some(url::new_unsafe_from_bytes(b"https://avatars.githubusercontent.com/u/105044388")),
ctx
);
transfer::public_freeze_object(metadata);
transfer::public_share_object(TreasuryCapKeeper {
id: object::new(ctx),
cap : treasury_cap
});
}

public entry fun mint(keeper: &mut TreasuryCapKeeper, amount: u64, recipient: address, ctx: &mut TxContext) {
coin::mint_and_transfer(&mut keeper.cap, amount, recipient, ctx);
}

public fun get_cap(keeper: &TreasuryCapKeeper): &TreasuryCap<FAUCET_COIN> {
&keeper.cap
}
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
}
*/
34 changes: 34 additions & 0 deletions mover/codingandcoffeerighthand/code/task2/my_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 = "0A4652D38CF3C3FDB79EC6C1C98FCFF7B2E933E12B84A1DA267DB28F66AFECE3"
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.38.3"
edition = "2024.beta"
flavor = "sui"

[env]

[env.testnet]
chain-id = "4c78adac"
original-published-id = "0x6469ec5f6532002827c5e19c8b251d07bef978b7c44360c89263f6cead55f7c5"
latest-published-id = "0x6469ec5f6532002827c5e19c8b251d07bef978b7c44360c89263f6cead55f7c5"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/codingandcoffeerighthand/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"

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module my_coin::my_coin;
use sui::coin::{Self, TreasuryCap};
use sui::url;

public struct MY_COIN has drop {}

fun init(witness: MY_COIN, ctx: &mut TxContext) {
let (treasury_cap, metadata) = coin::create_currency(
witness,
6,
b"MYCOIN",
b"codingandcoffeerighthand Coin",
b"Only codingandcoffeerighthand can min.",
option::some(url::new_unsafe_from_bytes(b"https://avatars.githubusercontent.com/u/105044388")),
ctx
);
transfer::public_freeze_object(metadata);
transfer::public_transfer(treasury_cap, tx_context::sender(ctx));
}
public entry fun mint(c: &mut TreasuryCap<MY_COIN>, amount: u64, recipient: address, ctx: &mut TxContext) {
coin::mint_and_transfer(c, amount, recipient, ctx)
}
Loading