Commit 989f4a5a authored by vipwzw's avatar vipwzw

auto ci

parent 0cfcfa15
...@@ -25,7 +25,7 @@ echo_rst() { ...@@ -25,7 +25,7 @@ echo_rst() {
fi fi
} }
oracle_AddPublisher(){ oracle_AddPublisher() {
echo "=============== # Add publisher ===============" echo "=============== # Add publisher ==============="
ispara=$(echo '"'"${MAIN_HTTP}"'"' | jq '.|contains("8901")') ispara=$(echo '"'"${MAIN_HTTP}"'"' | jq '.|contains("8901")')
echo "ispara=$ispara" echo "ispara=$ispara"
...@@ -43,11 +43,11 @@ oracle_publish_transaction() { ...@@ -43,11 +43,11 @@ oracle_publish_transaction() {
echo "#response: $resp" echo "#response: $resp"
ok=$(jq '(.error|not) and (.result != "")' <<<"$resp") ok=$(jq '(.error|not) and (.result != "")' <<<"$resp")
[ "$ok" == true ] [ "$ok" == true ]
echo_rst "$FUNCNAME" "$?" echo_rst "$FUNCNAME" "$?"
rawtx=$(jq -r ".result" <<<"$resp") rawtx=$(jq -r ".result" <<<"$resp")
signAndSendRawTx "$rawtx" "${oracle_publisher_addr}" signAndSendRawTx "$rawtx" "${oracle_publisher_addr}"
eventId="${txhash}" eventId="${txhash}"
echo "eventId $eventId" echo "eventId $eventId"
} }
oracle_prePublishResult_transaction() { oracle_prePublishResult_transaction() {
...@@ -58,9 +58,9 @@ oracle_prePublishResult_transaction() { ...@@ -58,9 +58,9 @@ oracle_prePublishResult_transaction() {
echo "#response: $resp" echo "#response: $resp"
ok=$(jq '(.error|not) and (.result != "")' <<<"$resp") ok=$(jq '(.error|not) and (.result != "")' <<<"$resp")
[ "$ok" == true ] [ "$ok" == true ]
echo_rst "$FUNCNAME" "$?" echo_rst "$FUNCNAME" "$?"
rawtx=$(jq -r ".result" <<<"$resp") rawtx=$(jq -r ".result" <<<"$resp")
signAndSendRawTx "$rawtx" "${oracle_publisher_addr}" signAndSendRawTx "$rawtx" "${oracle_publisher_addr}"
} }
oracle_eventAbort_transaction() { oracle_eventAbort_transaction() {
...@@ -71,9 +71,9 @@ oracle_eventAbort_transaction() { ...@@ -71,9 +71,9 @@ oracle_eventAbort_transaction() {
echo "#response: $resp" echo "#response: $resp"
ok=$(jq '(.error|not) and (.result != "")' <<<"$resp") ok=$(jq '(.error|not) and (.result != "")' <<<"$resp")
[ "$ok" == true ] [ "$ok" == true ]
echo_rst "$FUNCNAME" "$?" echo_rst "$FUNCNAME" "$?"
rawtx=$(jq -r ".result" <<<"$resp") rawtx=$(jq -r ".result" <<<"$resp")
signAndSendRawTx "$rawtx" "${oracle_publisher_addr}" signAndSendRawTx "$rawtx" "${oracle_publisher_addr}"
} }
oracle_resultAbort_transaction() { oracle_resultAbort_transaction() {
...@@ -84,9 +84,9 @@ oracle_resultAbort_transaction() { ...@@ -84,9 +84,9 @@ oracle_resultAbort_transaction() {
echo "#response: $resp" echo "#response: $resp"
ok=$(jq '(.error|not) and (.result != "")' <<<"$resp") ok=$(jq '(.error|not) and (.result != "")' <<<"$resp")
[ "$ok" == true ] [ "$ok" == true ]
echo_rst "$FUNCNAME" "$?" echo_rst "$FUNCNAME" "$?"
rawtx=$(jq -r ".result" <<<"$resp") rawtx=$(jq -r ".result" <<<"$resp")
signAndSendRawTx "$rawtx" "${oracle_publisher_addr}" signAndSendRawTx "$rawtx" "${oracle_publisher_addr}"
} }
oracle_publishResult_transaction() { oracle_publishResult_transaction() {
...@@ -97,9 +97,9 @@ oracle_publishResult_transaction() { ...@@ -97,9 +97,9 @@ oracle_publishResult_transaction() {
echo "#response: $resp" echo "#response: $resp"
ok=$(jq '(.error|not) and (.result != "")' <<<"$resp") ok=$(jq '(.error|not) and (.result != "")' <<<"$resp")
[ "$ok" == true ] [ "$ok" == true ]
echo_rst "$FUNCNAME" "$?" echo_rst "$FUNCNAME" "$?"
rawtx=$(jq -r ".result" <<<"$resp") rawtx=$(jq -r ".result" <<<"$resp")
signAndSendRawTx "$rawtx" "${oracle_publisher_addr}" signAndSendRawTx "$rawtx" "${oracle_publisher_addr}"
} }
# 签名并发送 # 签名并发送
...@@ -230,4 +230,4 @@ function main() { ...@@ -230,4 +230,4 @@ function main() {
echo "=========== # oracle rpc test end=============" echo "=========== # oracle rpc test end============="
} }
main "$1" main "$1"
\ No newline at end of file
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