-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Makefile: generate RPC bindings #345
Conversation
Also need to bump minimum required go version up to 1.18. |
d38082f
to
29ca934
Compare
@roman-khimov, do we need binding files to be stored in this repo or it's OK to add them to .gitignore? |
29ca934
to
1c0408f
Compare
3141c6b
to
066c6b1
Compare
$(NEOGO) contract compile -i $(2)$(1) -c $(if $(2),$(2),$(1)/)config.yml -m $(2)$(1)/config.json -o $(2)$(1)/$(1)_contract.nef | ||
$(NEOGO) contract compile -i $(2)$(1) -c $(if $(2),$(2),$(1)/)config.yml -m $(2)$(1)/config.json -o $(2)$(1)/$(1)_contract.nef --bindings $(2)$(1)/bindings_config.yml | ||
mkdir -p rpc/$(1) | ||
$(NEOGO) contract generate-rpcwrapper -o rpc/$(1)/rpcbinding.go -m $(2)$(1)/config.json --config $(2)$(1)/bindings_config.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This, btw, should be handled by the Makefile. Makefile is not a shell script, it's all about targets, dependencies and the way they're produced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the only question I wasn't able to fix. Could you, please, review one more time and point out how to create a proper make target depending on all these rpc/...
bindings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's leave it for now.
1f0c100
to
0442927
Compare
Extend contract configuration files with additional types information where needed. Add resulting RPC bindings to the repo. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
There's no more *.manifest.json files, we store manifest in the config.json file (don't know why). Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
0442927
to
3846313
Compare
First of all, RPC bindings must be compiled. After that, if there are some changes in the bindings for the current NeoGo version, then these changes have to be committed. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
Use afa4530c7d739d08df7865440dbe66f55f7e558b commit (the current master). It allows to omit hash parameter for RPC bindings and make them reusable for a set of different networks. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
3846313
to
10a8769
Compare
@smallhive, can you try importing packages from this branch? |
Working on it |
@@ -7,7 +7,7 @@ export GOBIN ?= $(shell pwd)/bin | |||
export CGO_ENABLED=0 | |||
NEOGO ?= $(GOBIN)/cli | |||
VERSION ?= $(shell git describe --tags --dirty --match "v*" --always --abbrev=8 2>/dev/null || cat VERSION 2>/dev/null || echo "develop") | |||
NEOGOORIGMOD = github.com/nspcc-dev/neo-go | |||
NEOGOORIGMOD = github.com/nspcc-dev/neo-go@v0.101.5-0.20230802075307-afa4530c7d73 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AnnaShaleva, since that is a temporary use
, do we need an issue for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will be an issue to upgrade to 0.102.0 anyway. Can be created now, doesn't matter much.
Waiting for 0.102.0 release of neo-go to convert from draft.UPD: we'll use fresh NeoGo master to build SCs and RPC bindings.