Commit 18b5c95f authored by vipwzw's avatar vipwzw

auto ci

parent e6e316b9
...@@ -19,7 +19,7 @@ source ../dapp-test-common.sh ...@@ -19,7 +19,7 @@ source ../dapp-test-common.sh
function chain33_GetExecAddr() { function chain33_GetExecAddr() {
#获取GAME合约地址 #获取GAME合约地址
req='{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"'"$1"'"}]}' req='{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"'"$1"'"}]}'
http_req "$req" ${MAIN_HTTP} '(.error|not) and (.result != null)' "$FUNCNAME" http_req "$req" ${MAIN_HTTP} '(.error|not) and (.result != null)' "$FUNCNAME"
} }
function CreateGameTx() { function CreateGameTx() {
......
...@@ -41,22 +41,22 @@ function init() { ...@@ -41,22 +41,22 @@ function init() {
function configJSCreator() { function configJSCreator() {
req='{"method":"Chain33.CreateTransaction","params":[{"execer":"'${manager_name}'","actionName":"Modify","payload":{"key":"js-creator","op":"add","value":"'${beneficiary}'"}}]}' req='{"method":"Chain33.CreateTransaction","params":[{"execer":"'${manager_name}'","actionName":"Modify","payload":{"key":"js-creator","op":"add","value":"'${beneficiary}'"}}]}'
resok='(.error|not) and (.result != null)' resok='(.error|not) and (.result != null)'
http_req "$req" ${MAIN_HTTP} "$resok" "$FUNCNAME" ".result" http_req "$req" ${MAIN_HTTP} "$resok" "$FUNCNAME" ".result"
chain33_SignRawTx "$RETURN_RESP" "${super_manager}" "${MAIN_HTTP}" chain33_SignRawTx "$RETURN_RESP" "${super_manager}" "${MAIN_HTTP}"
} }
function createJSContract() { function createJSContract() {
req='{"method":"Chain33.CreateTransaction","params":[{"execer":"'${exec_name}'","actionName":"Create","payload":{"name":"'${game}'","code":"'${jsCode}'"}}]}' req='{"method":"Chain33.CreateTransaction","params":[{"execer":"'${exec_name}'","actionName":"Create","payload":{"name":"'${game}'","code":"'${jsCode}'"}}]}'
resok='(.error|not) and (.result != null)' resok='(.error|not) and (.result != null)'
http_req "$req" ${MAIN_HTTP} "$resok" "$FUNCNAME" ".result" http_req "$req" ${MAIN_HTTP} "$resok" "$FUNCNAME" ".result"
chain33_SignRawTx "$RETURN_RESP" "${beneficiary_key}" "${MAIN_HTTP}" chain33_SignRawTx "$RETURN_RESP" "${beneficiary_key}" "${MAIN_HTTP}"
} }
function callJS() { function callJS() {
req='{"method":"Chain33.CreateTransaction","params":[{"execer":"'${user_game}'","actionName":"Call","payload":{"name":"'${game}'","funcname":"hello","args":"{}"}}]}' req='{"method":"Chain33.CreateTransaction","params":[{"execer":"'${user_game}'","actionName":"Call","payload":{"name":"'${game}'","funcname":"hello","args":"{}"}}]}'
resok='(.error|not) and (.result != null)' resok='(.error|not) and (.result != null)'
http_req "$req" ${MAIN_HTTP} "$resok" "$FUNCNAME" ".result" http_req "$req" ${MAIN_HTTP} "$resok" "$FUNCNAME" ".result"
chain33_SignRawTx "$RETURN_RESP" "${beneficiary_key}" "${MAIN_HTTP}" chain33_SignRawTx "$RETURN_RESP" "${beneficiary_key}" "${MAIN_HTTP}"
} }
......
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