Skip to content

Commit

Permalink
Merge pull request #1 from Elysiamobi/Elysiamobi-patch-1
Browse files Browse the repository at this point in the history
完成task1
  • Loading branch information
Elysiamobi authored Sep 12, 2024
2 parents f904d81 + 56b7cbe commit dd78709
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 0 deletions.
Empty file added mover/Elysiamobi/code/readme.md
Empty file.
34 changes: 34 additions & 0 deletions mover/Elysiamobi/code/task01/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 = 2
manifest_digest = "66EBD02717FFAA1E3B1D2F79189C3E50B196C99F6AE1EA8CA2CD5B14543D310E"
deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082"
dependencies = [
{ name = "Sui" },
]

[[move.package]]
name = "MoveStdlib"
source = { git = "https://gitee.com/WGB5445/sui.git", rev = "framework/testnet", subdir = "crates\\sui-framework\\packages\\move-stdlib" }

[[move.package]]
name = "Sui"
source = { git = "https://gitee.com/WGB5445/sui.git", rev = "framework/testnet", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ name = "MoveStdlib" },
]

[move.toolchain-version]
compiler-version = "1.33.0"
edition = "2024.beta"
flavor = "sui"

[env]

[env.testnet]
chain-id = "4c78adac"
original-published-id = "0x447116ef5a56c63143e10afb0cfaf29676b0e76fce99b51c122df4dbc738169f"
latest-published-id = "0x447116ef5a56c63143e10afb0cfaf29676b0e76fce99b51c122df4dbc738169f"
published-version = "1"
37 changes: 37 additions & 0 deletions mover/Elysiamobi/code/task01/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://gitee.com/WGB5445/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"

29 changes: 29 additions & 0 deletions mover/Elysiamobi/code/task01/sources/hello_move.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/// Module: task1
module hello_move::hello_world {
use std::string;
use sui::event::emit;
public struct HelloWorldObject has key, store{
id: UID,
text: string::String
}

public struct NewHelloWorld has copy, drop {
id: ID,
}

#[lint_allow(self_transfer)]
public entry fun mint(ctx: &mut TxContext) {
let id = object::new(ctx);
let emit_id = object::uid_to_inner(&id);
let object = HelloWorldObject {
id: id,
text: string::utf8(b"Hello Elysiamobi!")
};
emit(NewHelloWorld {
id: emit_id,
});

transfer::public_transfer(object, tx_context::sender(ctx));
}
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.

0 comments on commit dd78709

Please sign in to comment.