-
Notifications
You must be signed in to change notification settings - Fork 890
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dyingforge
committed
Dec 1, 2024
1 parent
e428d63
commit 06873f0
Showing
22 changed files
with
6,683 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,40 @@ | ||
# @generated by Move, please check-in and do not edit manually. | ||
|
||
[move] | ||
version = 2 | ||
manifest_digest = "BEB784F16EE5325B301568460CA0FBCD88B2B6A2D4BC93E5DD996A333558EBF8" | ||
version = 3 | ||
manifest_digest = "E7A65BF39B740E195045E87B46B06936199C063AFE29D8948B9C6B9B853033A8" | ||
deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082" | ||
dependencies = [ | ||
{ name = "Sui" }, | ||
{ id = "Sui", name = "Sui" }, | ||
] | ||
|
||
[[move.package]] | ||
name = "MoveStdlib" | ||
id = "MoveStdlib" | ||
source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/testnet", subdir = "crates/sui-framework/packages/move-stdlib" } | ||
|
||
[[move.package]] | ||
name = "Sui" | ||
id = "Sui" | ||
source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/testnet", subdir = "crates/sui-framework/packages/sui-framework" } | ||
|
||
dependencies = [ | ||
{ name = "MoveStdlib" }, | ||
{ id = "MoveStdlib", name = "MoveStdlib" }, | ||
] | ||
|
||
[move.toolchain-version] | ||
compiler-version = "1.30.1" | ||
compiler-version = "1.37.3" | ||
edition = "2024.beta" | ||
flavor = "sui" | ||
|
||
[env] | ||
|
||
[env.testnet] | ||
chain-id = "4c78adac" | ||
original-published-id = "0x7777cc5a4430abe62395b76ca5ec7610abacbc1b83b208802a9cf9384ebe9150" | ||
latest-published-id = "0x7777cc5a4430abe62395b76ca5ec7610abacbc1b83b208802a9cf9384ebe9150" | ||
original-published-id = "0x4b63c51e2b4543ba9d105ccdcc9bb166808c49d30fd657f6b6f8d628ecb54dbc" | ||
latest-published-id = "0x4b63c51e2b4543ba9d105ccdcc9bb166808c49d30fd657f6b6f8d628ecb54dbc" | ||
published-version = "1" | ||
|
||
[env.mainnet] | ||
chain-id = "35834a8a" | ||
original-published-id = "0xd0ed551927a06ebc54ed5aaaf9e45ccf8b0c5ee1da96fdc91ecd90cea3ae1b0c" | ||
latest-published-id = "0xd0ed551927a06ebc54ed5aaaf9e45ccf8b0c5ee1da96fdc91ecd90cea3ae1b0c" | ||
original-published-id = "0xc33104fcf22a2ef5e2736a698104fb82436b4c3f70fdc2f2bfa6b2c383c9c532" | ||
latest-published-id = "0xc33104fcf22a2ef5e2736a698104fb82436b4c3f70fdc2f2bfa6b2c383c9c532" | ||
published-version = "1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[package] | ||
name = "hackquest" | ||
name = "task2" | ||
edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move | ||
# license = "" # e.g., "MIT", "GPL", "Apache 2.0" | ||
# authors = ["..."] # e.g., ["Joe Smith ([email protected])", "John Snow ([email protected])"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
module task2::my_token_faucet{ | ||
use sui::coin::{Self, Coin, TreasuryCap}; | ||
use sui::transfer; | ||
use sui::tx_context::{Self, TxContext}; | ||
|
||
public struct MY_TOKEN_FAUCET has drop {} | ||
|
||
fun init(witness: MY_TOKEN_FAUCET, ctx: &mut TxContext) { | ||
let (treasury, metadata) = coin::create_currency(witness, 6, b"OVO", b"dyingforgefaucet Coin", b"My_faucet_Coin", option::none(), ctx ); | ||
transfer::public_freeze_object(metadata); | ||
transfer::public_share_object(treasury); | ||
} | ||
|
||
public entry fun mint_in_my_module(treasury_cap: &mut TreasuryCap<MY_TOKEN_FAUCET>, amount: u64, recipient: address, ctx: &mut TxContext) { | ||
let coin = coin::mint(treasury_cap, amount, ctx); | ||
transfer::public_transfer(coin, recipient); | ||
} | ||
} | ||
module task2::my_token_faucet; | ||
|
||
use sui::coin::{Self, Coin, TreasuryCap}; | ||
use sui::transfer; | ||
use sui::tx_context::{Self, TxContext}; | ||
|
||
public struct MY_TOKEN_FAUCET has drop {} | ||
|
||
fun init(witness: MY_TOKEN_FAUCET, ctx: &mut TxContext) { | ||
let (treasury, metadata) = coin::create_currency( | ||
witness, | ||
6, | ||
b"OVO", | ||
b"dyingforgefaucet Coin", | ||
b"My_faucet_Coin", | ||
option::none(), | ||
ctx, | ||
); | ||
transfer::public_freeze_object(metadata); | ||
transfer::public_share_object(treasury); | ||
} | ||
|
||
public entry fun mint_in_my_module( | ||
treasury_cap: &mut TreasuryCap<MY_TOKEN_FAUCET>, | ||
amount: u64, | ||
recipient: address, | ||
ctx: &mut TxContext, | ||
) { | ||
let coin = coin::mint(treasury_cap, amount, ctx); | ||
transfer::public_transfer(coin, recipient); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
module task2::my_token{ | ||
use sui::coin::{Self, Coin, TreasuryCap}; | ||
use sui::transfer; | ||
use sui::tx_context::{Self, TxContext}; | ||
|
||
public struct MY_TOKEN has drop {} | ||
|
||
fun init(witness: MY_TOKEN, ctx: &mut TxContext) { | ||
let (treasury, metadata) = coin::create_currency(witness, 6, b"OVZ", b"dyingforge Coin", b"My_token", option::none(), ctx ); | ||
transfer::public_freeze_object(metadata); | ||
transfer::public_transfer(treasury, tx_context::sender(ctx)); | ||
} | ||
|
||
public entry fun mint_in_my_module(treasury_cap: &mut TreasuryCap<MY_TOKEN>, amount: u64, recipient: address, ctx: &mut TxContext) { | ||
let coin = coin::mint(treasury_cap, amount, ctx); | ||
transfer::public_transfer(coin, recipient); | ||
} | ||
} | ||
module task2::my_token; | ||
|
||
use sui::coin::{Self, Coin, TreasuryCap}; | ||
use sui::transfer; | ||
use sui::tx_context::{Self, TxContext}; | ||
|
||
public struct MY_TOKEN has drop {} | ||
|
||
fun init(witness: MY_TOKEN, ctx: &mut TxContext) { | ||
let (treasury, metadata) = coin::create_currency( | ||
witness, | ||
6, | ||
b"OVZ", | ||
b"dyingforge Coin", | ||
b"My_token", | ||
option::none(), | ||
ctx, | ||
); | ||
transfer::public_freeze_object(metadata); | ||
transfer::public_transfer(treasury, tx_context::sender(ctx)); | ||
} | ||
|
||
public entry fun mint_in_my_module( | ||
treasury_cap: &mut TreasuryCap<MY_TOKEN>, | ||
amount: u64, | ||
recipient: address, | ||
ctx: &mut TxContext, | ||
) { | ||
let coin = coin::mint(treasury_cap, amount, ctx); | ||
transfer::public_transfer(coin, recipient); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!doctype html> | ||
<html lang="en" class="dark-theme" style="color-scheme: dark"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Sui dApp Starter</title> | ||
|
||
<style> | ||
/* | ||
Josh's Custom CSS Reset | ||
https://www.joshwcomeau.com/css/custom-css-reset/ | ||
*/ | ||
*, | ||
*::before, | ||
*::after { | ||
box-sizing: border-box; | ||
} | ||
* { | ||
margin: 0; | ||
} | ||
body { | ||
line-height: 1.5; | ||
-webkit-font-smoothing: antialiased; | ||
} | ||
img, | ||
picture, | ||
video, | ||
canvas, | ||
svg { | ||
display: block; | ||
max-width: 100%; | ||
} | ||
input, | ||
button, | ||
textarea, | ||
select { | ||
font: inherit; | ||
} | ||
p, | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
overflow-wrap: break-word; | ||
} | ||
#root, | ||
#__next { | ||
isolation: isolate; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
mnemonic=witness impact tomato sample skill machine casual party scrap slow elegant romance |
Oops, something went wrong.