EOSIO cleos 命令大全(附)—— 参数 JSON 格式
EOSIO版本:EOSIO Dawn 3.0
最后更新日期:2018-04-21
说明:以下所有命令均为实际操作结果。
cleos 子命令中有几个参数需要以 JSON 形式提交,以下是相关格式:
1、cleos set account permission - authority
root@eos:/alidata1/eos# cleos set account permission -j wengyingfeng test {a}
Error 3120004: Invalid authority
Ensure that your authority JSON follows the following format!
{
"threshold":"uint32_t",
"keys":[{ "key":"public_key", "weight":"uint16_t" }],
"accounts":[{
"permission":{ "actor":"account_name", "permission":"permission_name" },
"weight":"uint16_t"
}]
}e.g.
{
"threshold":"1",
"keys":[{ "key":"EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", "weight":"1" }],
"accounts":[{
"permission":{ "actor":"initb", "permission":"social" },
"weight":"1
}]
}
2、cleos push transaction - transaction
root@eos:/alidata1/eos# cleos push transaction {a}
Error 3120006: Invalid transaction
Ensure that your transaction JSON follows the following format!\n"
{
"ref_block_num":"uint16_t",
"ref_block_prefix":"uint32_t",
"expiration":"YYYY-MM-DDThh:mm",
"region": "uint16_t",
"read_scope":[ "account_name" ],
"write_scope":[ "account_name" ],
"actions":[{
"account":"account_name",
"name":"action_name",
"authorization":[{ "actor":"account_name","permission":"permission_name" }],
"data":"bytes"
}]
}"e.g.
{
"ref_block_num":"1000",
"ref_block_prefix":"3463702842",
"expiration":"2018-01-23T01:51:05",
"region": "0",
"read_scope":[ "initb", "initc" ],
"write_scope":[ "initb", "initc" ],
"actions":[{
"account":"eosio",
"name":"transfer",
"authorization":[{ "actor":"initb","permission":"active" }],
"data":"000000008093dd74000000000094dd74e80300000000000000"
}]
}
3、cleos push transactions - transactions
root@eos:/alidata1/eos# cleos push transactions {a}
Error 3120006: Invalid transaction
Ensure that your transaction JSON follows the following format!\n"
{
"ref_block_num":"uint16_t",
"ref_block_prefix":"uint32_t",
"expiration":"YYYY-MM-DDThh:mm",
"region": "uint16_t",
"read_scope":[ "account_name" ],
"write_scope":[ "account_name" ],
"actions":[{
"account":"account_name",
"name":"action_name",
"authorization":[{ "actor":"account_name","permission":"permission_name" }],
"data":"bytes"
}]
}"e.g.
{
"ref_block_num":"1000",
"ref_block_prefix":"3463702842",
"expiration":"2018-01-23T01:51:05",
"region": "0",
"read_scope":[ "initb", "initc" ],
"write_scope":[ "initb", "initc" ],
"actions":[{
"account":"eosio",
"name":"transfer",
"authorization":[{ "actor":"initb","permission":"active" }],
"data":"000000008093dd74000000000094dd74e80300000000000000"
}]
}
EOSIO cleos 命令大全(一) —— version
网友评论