chore: log
This commit is contained in:
@@ -23,6 +23,7 @@ impl Command for CommandImpl {
|
||||
}
|
||||
let (pri_key, pub_key) = make_key_pair();
|
||||
let json_key_pair = JsonKeyPair::from(pri_key, pub_key, tag.map(|t| t.into()));
|
||||
success!("Write gen key file: {}", output);
|
||||
fs::write(output, json_key_pair.to_json()?.as_bytes())?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -64,14 +64,14 @@ impl ContractEngineCredit {
|
||||
"query" => {
|
||||
let params: CreditContractQueryParameters = serde_json::from_str(&tx_body.parameters)?;
|
||||
let c = load_credit_contract(¶ms.name)?;
|
||||
information!("Query: {}, credit: {}", ¶ms.account, c.query(tx, ¶ms.account));
|
||||
success!("Query: {}, credit: {}", ¶ms.account, c.query(tx, ¶ms.account));
|
||||
},
|
||||
"query_all" => {
|
||||
let params: CreditContractQueryAllParameters = serde_json::from_str(&tx_body.parameters)?;
|
||||
let c = load_credit_contract(¶ms.name)?;
|
||||
let map = c.query_all(tx);
|
||||
map.iter().for_each(|(k , v)| {
|
||||
information!("Query: {}, credit: {}", k, v);
|
||||
success!("Query: {}, credit: {}", k, v);
|
||||
});
|
||||
},
|
||||
_ => return simple_error!("Unknown action: {}", action),
|
||||
|
||||
Reference in New Issue
Block a user