diff --git a/Makefile b/Makefile index e81de671..b9d495ad 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,12 @@ CONTRACT_JSON_FILES = $(filter-out $(CONTRACT_ABI_FILES),$(CONTRACT_BOTH_FILES)) .PHONY: build-contracts bindings-gen-go bindings-gen-ts -build-contracts: +version-check: + forge --version; \ + abigen --version; \ + go version; + +build-contracts: version-check echo "Building contracts"; \ rm -frd ./out; \ forge install; \ @@ -54,7 +59,7 @@ build-contracts: # as they are not publicly exposed, but rather used within the contract itself. # # ABIGen issue ref: https://github.com/ethereum/solidity/issues/9278 -bindings-gen-go: build-contracts +bindings-gen-go: build-contracts echo "Generating Go vIBC bindings..."; \ rm -rfd ./bindings/go/* ; \ for abi_file in $(CONTRACT_ABI_FILES); do \ @@ -65,7 +70,7 @@ bindings-gen-go: build-contracts type=$$(basename $$abi_file .abi.json); \ pkg=$$(basename $$type .sol | tr "[:upper:]" "[:lower:]"); \ mkdir -p ./bindings/go/$$pkg; \ - abigen --abi $$abi_file --pkg $$pkg --type $$type --out ./bindings/go/$$pkg/$$type.go; \ + abigen --abi $$abi_file --pkg $$pkg --type $$type --out ./bindings/go/$$pkg/$$type.go || exit 1; \ done; \ echo Running sanity check on go bindings ; \ go build ./... || exit 1; \