bin: Adopt resolve script for new NNS contract

Supports both old NNS (neofs-contract v0.11.0)
version and new one NNS.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-10-12 15:27:55 +03:00 committed by Alex Vanin
parent 80fb9b3bc2
commit 28d57c0b13

View file

@ -10,4 +10,4 @@ NNS_ADDR=`curl -s --data '{ "id": 1, "jsonrpc": "2.0", "method": "getcontractsta
${NEOGO} contract testinvokefunction \ ${NEOGO} contract testinvokefunction \
-r http://morph_chain.${LOCAL_DOMAIN}:30333 \ -r http://morph_chain.${LOCAL_DOMAIN}:30333 \
${NNS_ADDR} resolve string:${1} int:16 | jq -r '.stack[0].value' | base64 -d ${NNS_ADDR} resolve string:${1} int:16 | jq -r '.stack[0].value | if type=="array" then .[0].value else . end' | base64 -d