Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

完成task1 #1523

Closed
wants to merge 2 commits into from
Closed
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
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.