module MyModule {
import 0x0.LibraCoin;
// The identity function for coins: takes a LibraCoin.T as input and hands it back
public id(c: LibraCoin.T): LibraCoin.T {
return move(c);
}
}
usage: <command> <args>
Use the following commands:
account | a
Account operations
query | q
Query operations
transfer | transferb | t | tb
<sender_account_address>|<sender_account_ref_id> <receiver_account_address>|<receiver_account_ref_id> <number_of_coins> [gas_unit_price_in_micro_libras (default=0)] [max_gas_amount_in_micro_libras (default 100000)] Suffix 'b' is for blocking.
Transfer coins (in libra) from account to another.
dev
Local Move development
help | h
Prints this help
quit | q!
Exit this client
Please, input commands:
libra%
接下来我们就可以通过命令行和libra进行交互了。
创建账号并送测试币
之前的文章我们也讲到了怎么创建账号,这里直接列命令:
libra% account create
>> Creating/retrieving next account from wallet
Created/retrieved account #0 address 810abcc08dbed34ea15d7eb261b8001da6a62d72acdbf87714dd243a175f9b62
libra% account mintb 0 100
>> Minting coins
waiting ....transaction is stored!
Finished minting!
Successfully compiled a program at /var/folders/tq/8gxrrmhx16376zxd5r4h9hhn_x1zq3/T/.tmpigAZCx
发布编译好的Module
使用dev publish来发布上一步编译好的Module:
libra% dev publish 0 /var/folders/tq/8gxrrmhx16376zxd5r4h9hhn_x1zq3/T/.tmpigAZCx
waiting .....transaction is stored!
no events emitted.
Successfully published module