ESSAY / NOTE
Sui Move 常用命令
# sui hello_world
编译
sui move build
跳过最新版拉取
sui move build --skip-fetch-latest-git-deps
部署
sui client publish --gas-budget 3000 --skip-fetch-latest-git-deps
调用
export PACKAGE_ID= Created Objects ID
sui client call --function mint --module hello_world --package $PACKAGE_ID --gas-budget 3000
带参数
sui client call --function mint --module hello_world --package 0x068ca1b6f4c6c3204f406cb64f7c5a38ede61b93 --args "welcome back" --gas-budget 3000
sui explore
explorer.sui.io
https://explorer.sui.io/object/0x20c01c836530f55fd120f426fad14e596701f9bc
https://explorer.sui.io/object/0xe93d6f1533a3127d2a6149c108e79c16650cb5ed
sui币object ID合并
sui client call --package 0x2 --module pay --function join_vec --gas-budget 10000 \
--type-args 0x2::sui::SUI \
--args 0x143eb2a4cf4ef9b40554688d2b4bc56418aa07a4 '["0xf0276f4329eb7ecc9e60f417a25e91b94caf1ee6", "0xfbfbeec6b53e2b62d34da81083b1ec902b2e6a1a"]'
# move hello_world2
拓展 move-cli安装
先安装rust
rustc -V
git clone https://github.com/move-language/move.git
cargo install --path move/language/tools/move-cli
move -h
创建hello_world2
move new hello_world2
替换.toml
MoveNursery = { git = "https://github.com/move-language/move.git", subdir = "language/move-stdlib/nursery", rev = "main" }
move build
move sandbox run sources/hello_world.move
# token deploy
sui client active-address
sui client publish --gas-budget 10000
sui client call [OPTIONS] --package --module --function --gas-budget
sui client call --package 0xa4cc162240baf971ba883eb8a1b9684c4d8f1e33 --module usdt --function mint_me --gas-budget 10000 \
--args 0x7fd97c53768e868d19b71699be9a0e563d18c488 10000