caoyang@cccy hello_world % aptos init --network testnetConfiguring for profile defaultConfiguring for network TestnetEnter your private key as a hex literal (0x...) [Current: None | No input: Generate new key (or keep one if present)]# 按回车键No key given, generating key...Account 0x869babd17f0891d535f25fb6e407cc3dc53e2744538ab959f04b799bc83a59d9 doesn't exist, creating it and funding it with 100000000 OctasAccount 0x869babd17f0891d535f25fb6e407cc3dc53e2744538ab959f04b799bc83a59d9 funded successfully---Aptos CLI is now set up for account 0x869babd17f0891d535f25fb6e407cc3dc53e2744538ab959f04b799bc83a59d9 as profile default! Run `aptos --help` for more information about commands
返回结果
{ "Result": "Success"}
写入程序代码
cd sources# 可以使用任何编辑软件写入# vim hello_move.move
写入
module 0x42::hello { #[test_only] use std::string; #[test_only] use std::debug::print; #[test] fun test() { let hello = string::utf8(b"hello_world"); print(&hello); }}
caoyang@cccy sources % aptos move test{ "Error": "Unexpected error: Failed to run tests: Unable to resolve packages for package 'hello_move': While resolving dependency 'AptosFramework' in package 'hello_move': Failed to fetch to latest Git state for package 'AptosFramework', to skip set --skip-fetch-latest-git-deps | Exit status: exit status: 128"}