欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 汽车 > 时评 > 3.task1 suimove helloword 上链

3.task1 suimove helloword 上链

2025/9/16 1:24:06 来源:https://blog.csdn.net/wusandaofwy/article/details/143726268  浏览:    关键词:3.task1 suimove helloword 上链

1.创建项目

sui move new hello_world

2.代码部分

module hello_move::hello {use std::ascii::{String, string};use sui::object::{Self,UID};use sui::transfer::transfer;use sui::tx_context::{TxContext, sender};public struct Hello has key{id:UID,say: String}fun init(ctx: &mut TxContext) {let hello_move = Hello {id:object::new(ctx),say: string(b"move"),};transfer(hello_move, sender(ctx));}
}

3.发布到链上

sui client publish 

问题:

网络问题 ,切换为国内源

move.toml中修改


[dependencies]
Sui = { git = "https://gitee.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet" }

没钱

从水龙头拿钱

“水龙头”通常指的是一种分发加密货币或代币的机制,尤其是通过小额赠送或奖励的方式来吸引用户参与。

sui client faucet

查看钱

sui client gas

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词