Commit fce0fae5 authored by 张振华's avatar 张振华

update

parent 30e239ab
......@@ -125,3 +125,17 @@ chain33_SignRawTx() {
echo "signedTx null error"
fi
}
chain33_QueryBalance() {
local addr=$1
local MAIN_HTTP=$2
req='"method":"Chain33.GetAllExecBalance","params":[{"addr":"'"${addr}"'"}]'
#echo "#request: $req"
resp=$(curl -ksd "{$req}" ${MAIN_HTTP})
echo "#response: $resp"
ok=$(jq '(.error|not) and (.result != "")' <<<"$resp")
[ "$ok" == true ]
echo_rst "$FUNCNAME" "$?"
echo "$resp" | jq -r ".result"
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment