From 3e6cf594e3142d3abaded638196a46ad7d70df24 Mon Sep 17 00:00:00 2001 From: Louis Holbrook Date: Wed, 15 Sep 2021 13:36:09 +0000 Subject: [PATCH] fix(contract-migration): Replace missing environment --- apps/contract-migration/reset.sh | 4 +++- docker-compose.yml | 17 +++++++++-------- dump.sh | 1 + 3 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 dump.sh diff --git a/apps/contract-migration/reset.sh b/apps/contract-migration/reset.sh index feb5acb..b9cd99d 100755 --- a/apps/contract-migration/reset.sh +++ b/apps/contract-migration/reset.sh @@ -98,7 +98,7 @@ eth-token-index-add $fee_price_arg -s -u -w -y $WALLET_KEY_FILE -i $CIC_CHAIN_S DEV_FAUCET_ADDRESS=`sarafu-faucet-deploy $fee_price_arg -y $WALLET_KEY_FILE -i $CIC_CHAIN_SPEC -p $RPC_PROVIDER -w -vv --account-index-address $DEV_ACCOUNT_INDEX_ADDRESS $DEV_RESERVE_ADDRESS -s` >&2 echo "set token faucet amount" -sarafu-faucet-set $fee_price_arg -y $WALLET_KEY_FILE -i $CIC_CHAIN_SPEC -p $RPC_PROVIDER -e $DEV_FAUCET_ADDRESS -vv -s --fee-limit 100000 $DEV_FAUCET_AMOUNT +sarafu-faucet-set $fee_price_arg -w -y $WALLET_KEY_FILE -i $CIC_CHAIN_SPEC -p $RPC_PROVIDER -e $DEV_FAUCET_ADDRESS -vv -s --fee-limit 100000 $DEV_FAUCET_AMOUNT >&2 echo "register faucet in registry" eth-contract-registry-set -s -u $fee_price_arg -w -y $WALLET_KEY_FILE -e $CIC_REGISTRY_ADDRESS -i $CIC_CHAIN_SPEC -p $RPC_PROVIDER -vv --identifier Faucet $DEV_FAUCET_ADDRESS @@ -107,6 +107,8 @@ eth-contract-registry-set -s -u $fee_price_arg -w -y $WALLET_KEY_FILE -e $CIC_RE giftable-token-minter -s -u $fee_price_arg -w -y $WALLET_KEY_FILE -e $DEV_RESERVE_ADDRESS -i $CIC_CHAIN_SPEC -p $RPC_PROVIDER -vv $DEV_FAUCET_ADDRESS +#echo "export CIC_DEFAULT_TOKEN_SYMBOL=$TOKEN_SYMBOL" >> ${DEV_DATA_DIR}/env_reset +export CIC_DEFAULT_TOKEN_SYMBOL=$TOKEN_SYMBOL confini-dump --schema-module chainlib.eth.data.config --schema-module cic_eth.data.config --schema-dir ./config --prefix export > ${DEV_DATA_DIR}/env_reset confini-dump --schema-module chainlib.eth.data.config --schema-module cic_eth.data.config --schema-dir ./config diff --git a/docker-compose.yml b/docker-compose.yml index 4601370..563e862 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -102,6 +102,7 @@ services: TOKEN_DEMURRAGE_LEVEL: $TOKEN_DEMURRAGE_LEVEL TOKEN_SINK_ADDRESS: $TOKEN_SINK_ADDRESS TOKEN_TYPE: $TOKEN_TYPE + SIGNER_PROVIDER: ${SIGNER_SOCKET_PATH:-http://cic-eth-signer:8000} command: ["./run_job.sh"] #command: ["./reset.sh"] depends_on: @@ -149,7 +150,7 @@ services: - /bin/bash - -c - | - if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi + if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi ./start_tracker.sh -c /usr/local/etc/cic-cache -vv volumes: - contract-config:/tmp/cic/config/:ro @@ -190,7 +191,7 @@ services: - /bin/bash - -c - | - if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi + if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi /usr/local/bin/cic-cache-taskerd -vv volumes: - contract-config:/tmp/cic/config/:ro @@ -224,7 +225,7 @@ services: - /bin/bash - -c - | - if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi + if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi "/usr/local/bin/uwsgi" \ --wsgi-file /root/cic_cache/runnable/daemons/server.py \ --http :8000 \ @@ -284,7 +285,7 @@ services: - /bin/bash - -c - | - if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi + if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi ./start_tasker.sh --aux-all -q cic-eth -vv cic-eth-signer: @@ -338,7 +339,7 @@ services: # - /bin/bash # - -c # - | - # if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi + # if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi # ./start_tasker.sh --aux-all -q cic-eth -vv # command: [/bin/sh, "./start_tasker.sh", -q, cic-eth, -vv ] @@ -381,7 +382,7 @@ services: - /bin/bash - -c - | - if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi + if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi #./start_tracker.sh -vv -c /usr/local/etc/cic-eth ./start_tracker.sh -vv # command: "/root/start_manager.sh head -vv" @@ -427,7 +428,7 @@ services: - /bin/bash - -c - | - if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi + if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi ./start_dispatcher.sh -q cic-eth -vv # command: "/root/start_dispatcher.sh -q cic-eth -vv" @@ -475,7 +476,7 @@ services: - /bin/bash - -c - | - if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi + if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi ./start_retry.sh -vv # command: "/root/start_retry.sh -q cic-eth -vv" diff --git a/dump.sh b/dump.sh new file mode 100644 index 0000000..dd02ea3 --- /dev/null +++ b/dump.sh @@ -0,0 +1 @@ +docker run -t -v cic-internal-integration_contract-config:/tmp/cic/config cic-internal-integration_contract-migration cat /tmp/cic/config/env_reset