提交 91825898 编写于 作者: K Kevin Heifner

Add loading ot exchange contract to test. #798

上级 623e43e8
......@@ -70,7 +70,7 @@ killAll()
cleanup()
{
rm -rf tn_data_0
rm -rf tn_data_00
rm -rf test_wallet_0
}
......@@ -275,9 +275,14 @@ fi
# create another new account via initb
ACCOUNT_INFO="$(programs/eosc/eosc --host $SERVER --port $PORT --wallet-port 8899 create account initb currency $PUB_KEY2 $PUB_KEY3)"
verifyErrorCode "eosc create account"
verifyErrorCode "eosc create account currency"
# create another new account via inita
ACCOUNT_INFO="$(programs/eosc/eosc --host $SERVER --port $PORT --wallet-port 8899 create account inita exchange $PUB_KEY2 $PUB_KEY3)"
verifyErrorCode "eosc create account exchange"
waitForNextBlock
## now transfer from testera to currency using keys from testera
# lock via lock_all
......@@ -379,7 +384,7 @@ fi
# upload a contract
INFO="$(programs/eosc/eosc --host $SERVER --port $PORT --wallet-port 8899 set contract currency contracts/currency/currency.wast contracts/currency/currency.abi)"
verifyErrorCode "eosc set contract testera"
verifyErrorCode "eosc set contract currency"
count=`echo $INFO | grep -c "processed"`
if [ $count == 0 ]; then
error "FAILURE - set contract failed: $INFO"
......@@ -440,6 +445,20 @@ if [ $count == 0 ]; then
error "FAILURE - get table currency account failed: $ACCOUNT_INFO"
fi
#
# Exchange Contract Tests
#
# upload exchange contract
INFO="$(programs/eosc/eosc --host $SERVER --port $PORT --wallet-port 8899 set contract exchange contracts/exchange/exchange.wast contracts/exchange/exchange.abi)"
verifyErrorCode "eosc set contract exchange"
count=`echo $INFO | grep -c "processed"`
if [ $count == 0 ]; then
error "FAILURE - set contract exchange failed: $INFO"
fi
getTransactionId "$INFO"
#
# Producer
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册