diff --git a/Makefile b/Makefile index c8381d9538..6f0267ba32 100644 --- a/Makefile +++ b/Makefile @@ -202,8 +202,13 @@ mocks: @bash ./scripts/mocks-generate.sh .PHONY: mocks +precompiles: + @echo "--> Generating bindings for precompiled contracts" + @bash ./scripts/bindings-stateful-precompiles.sh +.PHONY: precompiles + # generate also includes Go code formatting -generate: proto-gen openapi specs typescript docs-zetacored mocks fmt +generate: proto-gen openapi specs typescript docs-zetacored mocks precompiles fmt .PHONY: generate diff --git a/scripts/bindings-stateful-precompiles.sh b/scripts/bindings-stateful-precompiles.sh new file mode 100755 index 0000000000..cd649ed24c --- /dev/null +++ b/scripts/bindings-stateful-precompiles.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# Generic function to generate bindings +function bindings() { + cd $1 + go generate > /dev/null 2>&1 + echo "Generated bindings for $1" +} + +# List of bindings to generate +bindings ./precompiles/prototype +