Alex Vanin
a945a947ac
This is useful for auto-generated document tools which parse docs dir. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
1.2 KiB
1.2 KiB
Nicename Resolving with NNS
Steps to start using name resolving:
- Enable NNS resolving in config (
rpc_endpoint
must be a valid neo rpc node, see configs for other examples):
rpc_endpoint: http://morph-chain.frostfs.devenv:30333
resolve_order:
- nns
- Make sure your container is registered in NNS contract. If you use frostfs-dev-env
you can check if your container (e.g. with
container-name
name) is registered in NNS:
$ curl -s --data '{"id":1,"jsonrpc":"2.0","method":"getcontractstate","params":[1]}' \
http://morph-chain.frostfs.devenv:30333 | jq -r '.result.hash'
0x8e6c3cd4b976b28e84a3788f6ea9e2676c15d667
$ docker exec -it morph_chain neo-go \
contract testinvokefunction \
-r http://morph-chain.frostfs.devenv:30333 0x8e6c3cd4b976b28e84a3788f6ea9e2676c15d667 \
resolve string:container-name.container int:16 \
| jq -r '.stack[0].value | if type=="array" then .[0].value else . end' \
| base64 -d && echo
7f3vvkw4iTiS5ZZbu5BQXEmJtETWbi3uUjLNaSs29xrL
- Use container name instead of its
$CID
. For example:
$ curl http://localhost:8082/get_by_attribute/container-name/FileName/object-name