Commit 54e4e578 authored by linj's avatar linj Committed by vipwzw

update token test shell token balance

parent 7c7e8a70
...@@ -280,8 +280,8 @@ function token_create() { ...@@ -280,8 +280,8 @@ function token_create() {
echo "wrong finish created total" echo "wrong finish created total"
exit 1 exit 1
fi fi
${1} token token_balance -a 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 -e token -s GD ${1} token balance -a 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 -e token -s GD
balance=$(${1} token token_balance -a 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 -e token -s GD | jq -r '.[]|.balance') balance=$(${1} token balance -a 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 -e token -s GD | jq -r '.[]|.balance')
if [ "${balance}" != "10000.0000" ]; then if [ "${balance}" != "10000.0000" ]; then
echo "wrong para token genesis create, should be 10000.0000" echo "wrong para token genesis create, should be 10000.0000"
exit 1 exit 1
...@@ -294,8 +294,8 @@ function token_transfer() { ...@@ -294,8 +294,8 @@ function token_transfer() {
echo "${hash}" echo "${hash}"
query_tx "${1}" "${hash}" query_tx "${1}" "${hash}"
${1} token token_balance -a 1GGF8toZd96wCnfJngTwXZnWCBdWHYYvjw -e token -s GD ${1} token balance -a 1GGF8toZd96wCnfJngTwXZnWCBdWHYYvjw -e token -s GD
balance=$(${1} token token_balance -a 1GGF8toZd96wCnfJngTwXZnWCBdWHYYvjw -e token -s GD | jq -r '.[]|.balance') balance=$(${1} token balance -a 1GGF8toZd96wCnfJngTwXZnWCBdWHYYvjw -e token -s GD | jq -r '.[]|.balance')
if [ "${balance}" != "11.0000" ]; then if [ "${balance}" != "11.0000" ]; then
echo "wrong para token transfer, should be 11.0000" echo "wrong para token transfer, should be 11.0000"
exit 1 exit 1
...@@ -308,8 +308,8 @@ function token_transfer() { ...@@ -308,8 +308,8 @@ function token_transfer() {
# $ ./build/chain33-cli exec addr -e user.p.para.paracross # $ ./build/chain33-cli exec addr -e user.p.para.paracross
# 19WJJv96nKAU4sHFWqGmsqfjxd37jazqii # 19WJJv96nKAU4sHFWqGmsqfjxd37jazqii
${1} token token_balance -a 19WJJv96nKAU4sHFWqGmsqfjxd37jazqii -e token -s GD ${1} token balance -a 19WJJv96nKAU4sHFWqGmsqfjxd37jazqii -e token -s GD
balance=$(${1} token token_balance -a 19WJJv96nKAU4sHFWqGmsqfjxd37jazqii -e token -s GD | jq -r '.[]|.balance') balance=$(${1} token balance -a 19WJJv96nKAU4sHFWqGmsqfjxd37jazqii -e token -s GD | jq -r '.[]|.balance')
if [ "${balance}" != "11.0000" ]; then if [ "${balance}" != "11.0000" ]; then
echo "wrong para token send exec, should be 11.0000" echo "wrong para token send exec, should be 11.0000"
exit 1 exit 1
...@@ -320,8 +320,8 @@ function token_transfer() { ...@@ -320,8 +320,8 @@ function token_transfer() {
echo "${hash}" echo "${hash}"
query_tx "${1}" "${hash}" query_tx "${1}" "${hash}"
${1} token token_balance -a 19WJJv96nKAU4sHFWqGmsqfjxd37jazqii -e token -s GD ${1} token balance -a 19WJJv96nKAU4sHFWqGmsqfjxd37jazqii -e token -s GD
balance=$(${1} token token_balance -a 19WJJv96nKAU4sHFWqGmsqfjxd37jazqii -e token -s GD | jq -r '.[]|.balance') balance=$(${1} token balance -a 19WJJv96nKAU4sHFWqGmsqfjxd37jazqii -e token -s GD | jq -r '.[]|.balance')
if [ "${balance}" != "0.0000" ]; then if [ "${balance}" != "0.0000" ]; then
echo "wrong para token withdraw, should be 0.0000" echo "wrong para token withdraw, should be 0.0000"
exit 1 exit 1
...@@ -426,8 +426,8 @@ function token_create_on_mainChain() { ...@@ -426,8 +426,8 @@ function token_create_on_mainChain() {
echo "wrong finish created total" echo "wrong finish created total"
exit 1 exit 1
fi fi
${CLI} token token_balance -a 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -e token -s FZM ${CLI} token balance -a 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -e token -s FZM
balance=$(${CLI} token token_balance -a 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -e token -s FZM | jq -r '.[]|.balance') balance=$(${CLI} token balance -a 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -e token -s FZM | jq -r '.[]|.balance')
if [ "${balance}" != "10000.0000" ]; then if [ "${balance}" != "10000.0000" ]; then
echo "wrong para token genesis create, should be 10000.0000" echo "wrong para token genesis create, should be 10000.0000"
exit 1 exit 1
......
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