Commit bfddabbc authored by 袁兴强's avatar 袁兴强 Committed by vipwzw

fix evm rpc test

parent 98d25c0a
......@@ -124,19 +124,15 @@ function queryTransaction() {
else
res=$(curl -s --data-binary '{"jsonrpc":"2.0","id":2,"method":"Chain33.QueryTransaction","params":[{"hash":"'"${txHash}"'"}]}' -H 'content-type:text/plain;' ${MAIN_HTTP})
if [ "${evm_addr}" == "" ]; then
if [ "$ispara" == "true" ]; then
evm_addr=$(echo "${res}" | jq -r ".result.receipt.logs[0].log.contractName")
if [ "$ispara" == false ]; then
evm_addr="user.evm.${txHash}"
else
evm_addr=$(echo "${res}" | jq -r ".result.receipt.logs[1].log.contractName")
evm_addr="user.p.para.user.evm.${txHash}"
fi
fi
if [ "${evm_contractAddr}" == "" ]; then
if [ "$ispara" == "true" ]; then
evm_contractAddr=$(echo "${res}" | jq -r ".result.receipt.logs[0].log.contractAddr")
else
evm_contractAddr=$(echo "${res}" | jq -r ".result.receipt.logs[1].log.contractAddr")
fi
evm_contractAddr=$(curl -ksd '{"method":"Chain33.ConvertExectoAddr","params":[{"execname":"'"${evm_addr}"'"}]}' ${MAIN_HTTP} | jq -r ".result")
fi
return 0
......
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