update makefile env variables

This commit is contained in:
Andrea Franz 2020-07-01 12:35:30 +02:00
parent 67edf8f149
commit 7e9f98b50d
No known key found for this signature in database
GPG Key ID: 4F0D2F2D9DE7F29D

View File

@ -1,3 +1,5 @@
-include .env
CONTRACTS_PATH="./contracts"
RELAYER_DOCKER_FILE="./_assets/Dockerfile.relayer"
RELAYER_DOCKER_IMAGE="redeem-relayer"
@ -20,16 +22,16 @@ endif
ifndef KEYSTORES_PATH
$(error KEYSTORES_PATH is undefined)
endif
ifndef RELAYER_BUCKET
$(error RELAYER_BUCKET is undefined)
ifndef BUCKET
$(error BUCKET is undefined)
endif
run-relayer: check-relayer-env-variables
node scripts/relay.js \
--endpoint $(ENDPOINT) \
--endpoint=$(ENDPOINT) \
--account=$(KEYSTORES_PATH)/keystore.json \
--passfile=$(KEYSTORES_PATH)/keystore-passfile.txt \
--bucket=$(RELAYER_BUCKET)
--bucket=$(BUCKET)
build-relayer-docker-image:
docker build -t $(RELAYER_DOCKER_IMAGE) -f $(RELAYER_DOCKER_FILE) .
@ -39,11 +41,11 @@ docker-run-relayer: check-relayer-env-variables
-v $$(realpath $(KEYSTORES_PATH)):$(CONTAINER_KEYSTORES_PATH) \
-e KEYSTORES_PATH=$(CONTAINER_KEYSTORES_PATH) \
-e ENDPOINT=$(ENDPOINT) \
-e RELAYER_BUCKET=$(RELAYER_BUCKET) \
-e BUCKET=$(BUCKET) \
-e PORT=$(PORT) \
--name $(RELAYER_DOCKER_CONTAINER_NAME) \
--rm \
-P \
-p $(PORT):$(PORT) \
$(RELAYER_DOCKER_IMAGE) make run-relayer
docker-kill-relayer:
@ -54,18 +56,26 @@ docker-stop-relayer:
deploy-erc20-factory:
node scripts/create-redeemable.js \
--endpoint $(ENDPOINT) \
--endpoint=$(ENDPOINT) \
--account=$(ACCOUNT) \
--passfile=$(PASSFILE) \
--deploy-factory
deploy-erc20-bucket:
node scripts/create-redeemable.js \
--endpoint $(ENDPOINT) \
--endpoint=$(ENDPOINT) \
--account=$(ACCOUNT) \
--passfile=$(PASSFILE) \
--deploy-bucket \
--factory=$(ERC20_FACTORY) \
--token=$(ERC20_TOKEN_ADDRESS) \
--validity-in-days=$(ERC20_BUCKET_VALIDITY) \
--relayer-uri="$(RELAYER_URI)"
create-erc20-redeemables:
node scripts/create-redeemable.js \
--endpoint=$(ENDPOINT) \
--account=$(ACCOUNT) \
--passfile=$(PASSFILE) \
--file=$(ERC20_BUCKET_FILE) \
--bucket=$(BUCKET)