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

fix evm rpc test

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