forked from cerc-io/laconicd-deprecated
deploy network and contract (#395)
* deploy network and contract * update binary names * install deps * contract script * use POST req to sent tx * add github actions * fix lint * update makefile * go mod verify and tidy * define amount on gentx * gitignore * install solcjs * install tools, clean up, fix deployment * include make contract-tools * use node in actions env * fix binary path Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
This commit is contained in:
co-authored by
Federico Kunze
Federico Kunze
parent
d6783707dc
commit
5a29e808d3
@@ -182,10 +182,47 @@ RUNSIM = $(TOOLS_DESTDIR)/runsim
|
||||
runsim: $(RUNSIM)
|
||||
$(RUNSIM):
|
||||
@echo "Installing runsim..."
|
||||
@(cd /tmp && go get github.com/cosmos/tools/cmd/runsim@v1.0.0)
|
||||
@(cd /tmp && ${GO_MOD} go get github.com/cosmos/tools/cmd/runsim@v1.0.0)
|
||||
|
||||
contract-tools:
|
||||
ifeq (, $(shell which stringer))
|
||||
@echo "Installing stringer..."
|
||||
@go install golang.org/x/tools/cmd/stringer
|
||||
else
|
||||
@echo "stringer already installed; skipping..."
|
||||
endif
|
||||
|
||||
ifeq (, $(shell which go-bindata))
|
||||
@echo "Installing go-bindata..."
|
||||
@go install github.com/kevinburke/go-bindata/go-bindata
|
||||
else
|
||||
@echo "go-bindata already installed; skipping..."
|
||||
endif
|
||||
|
||||
ifeq (, $(shell which gencodec))
|
||||
@echo "Installing gencodec..."
|
||||
@go install github.com/fjl/gencodec
|
||||
else
|
||||
@echo "gencodec already installed; skipping..."
|
||||
endif
|
||||
|
||||
ifeq (, $(shell which protoc-gen-go))
|
||||
@echo "Installing protoc-gen-go..."
|
||||
@go install github.com/golang/protobuf/protoc-gen-go
|
||||
else
|
||||
@echo "protoc-gen-go already installed; skipping..."
|
||||
endif
|
||||
|
||||
ifeq (, $(shell which solcjs))
|
||||
@echo "Installing solcjs..."
|
||||
@apt-get install -f -y protobuf-compiler
|
||||
@npm install -g solc@0.5.11
|
||||
else
|
||||
@echo "solcjs already installed; skipping..."
|
||||
endif
|
||||
|
||||
tools: tools-stamp
|
||||
tools-stamp: runsim
|
||||
tools-stamp: contract-tools runsim
|
||||
# Create dummy file to satisfy dependency and avoid
|
||||
# rebuilding when this Makefile target is hit twice
|
||||
# in a row.
|
||||
@@ -217,6 +254,12 @@ test-import:
|
||||
test-rpc:
|
||||
./scripts/integration-test-all.sh -q 1 -z 1 -s 2
|
||||
|
||||
test-contract:
|
||||
@type "npm" 2> /dev/null || (echo 'Npm does not exist. Please install node.js and npm."' && exit 1)
|
||||
@type "solcjs" 2> /dev/null || (echo 'Solcjs does not exist. Please install solcjs using make contract-tools."' && exit 1)
|
||||
@type "protoc" 2> /dev/null || (echo 'Failed to install protoc. Please reinstall protoc using make contract-tools.' && exit 1)
|
||||
bash scripts/contract-test.sh
|
||||
|
||||
test-sim-nondeterminism:
|
||||
@echo "Running non-determinism test..."
|
||||
@go test -mod=readonly $(SIMAPP) -run TestAppStateDeterminism -Enabled=true \
|
||||
@@ -249,7 +292,7 @@ test-sim-multi-seed-short: runsim
|
||||
@echo "Running multi-seed application simulation. This may take awhile!"
|
||||
@$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 10 TestFullAppSimulation
|
||||
|
||||
.PHONY: test test-unit test-race test-import test-rpc
|
||||
.PHONY: test test-unit test-race test-import test-rpc test-contract
|
||||
|
||||
.PHONY: test-sim-nondeterminism test-sim-custom-genesis-fast test-sim-import-export test-sim-after-import \
|
||||
test-sim-custom-genesis-multi-seed test-sim-multi-seed-long test-sim-multi-seed-short
|
||||
|
||||
Reference in New Issue
Block a user