From e7e697c7dbc0d22abab66e591c68578e6a1d780e Mon Sep 17 00:00:00 2001 From: Blair V Date: Wed, 22 Sep 2021 15:15:54 +0300 Subject: [PATCH] init --- .gitignore | 1 + apps/contract-migration/.bash_history | 6 ------ apps/contract-migration/reset.sh | 3 +++ apps/contract-migration/run_job.sh | 5 ----- apps/contract-migration/seed_cic_eth.sh | 2 +- docker-compose.yml | 7 ++++--- scripts/dump.sh | 2 +- 7 files changed, 10 insertions(+), 16 deletions(-) delete mode 100644 apps/contract-migration/.bash_history diff --git a/.gitignore b/.gitignore index bd35ec75..64087110 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ build/ .idea **/.vim **/*secret.yaml +**/*.bash_history diff --git a/apps/contract-migration/.bash_history b/apps/contract-migration/.bash_history deleted file mode 100644 index 48e8e225..00000000 --- a/apps/contract-migration/.bash_history +++ /dev/null @@ -1,6 +0,0 @@ -ls /tmp/cic/config/ -cat /tmp/cic/config/env_reset -exit -cat /tmp/cic/config/ -cat /tmp/cic/config/env_reset -exit diff --git a/apps/contract-migration/reset.sh b/apps/contract-migration/reset.sh index fe9fabcb..b9ad7123 100755 --- a/apps/contract-migration/reset.sh +++ b/apps/contract-migration/reset.sh @@ -120,6 +120,9 @@ export CIC_DEFAULT_TOKEN_SYMBOL=$CIC_DEFAULT_TOKEN_SYMBOL export TOKEN_NAME=$TOKEN_NAME EOF +confini-dump -vv --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 + set +a set +e diff --git a/apps/contract-migration/run_job.sh b/apps/contract-migration/run_job.sh index 50cd8154..fe4a0acd 100755 --- a/apps/contract-migration/run_job.sh +++ b/apps/contract-migration/run_job.sh @@ -22,11 +22,6 @@ fi if [[ $((RUN_MASK & 2)) -eq 2 ]] then >&2 echo -e "\033[;96mRUNNING\033[;39m RUN_MASK 2 - custodial service initialization" - if [ -f $DEV_DATA_DIR/env_reset ]; then - echo "found previous env_reset file" - cat $DEV_DATA_DIR/env_reset - source $DEV_DATA_DIR/env_reset; - fi ./seed_cic_eth.sh if [ $? -ne "0" ]; then >&2 echo -e "\033[;31mFAILED\033[;39m RUN_MASK 2 - custodial service initialization" diff --git a/apps/contract-migration/seed_cic_eth.sh b/apps/contract-migration/seed_cic_eth.sh index 4d0fcd73..eb1bfd59 100755 --- a/apps/contract-migration/seed_cic_eth.sh +++ b/apps/contract-migration/seed_cic_eth.sh @@ -82,7 +82,7 @@ cic-eth-ctl -i $CHAIN_SPEC unlock INIT cic-eth-ctl -i $CHAIN_SPEC unlock SEND cic-eth-ctl -i $CHAIN_SPEC unlock QUEUE -#confini-dump --schema-module chainlib.eth.data.config --schema-module cic_eth.data.config --schema-dir ./config +confini-dump --schema-module chainlib.eth.data.config --schema-module cic_eth.data.config --schema-dir ./config set +a set +e diff --git a/docker-compose.yml b/docker-compose.yml index 2e2b0344..d5ab18af 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -94,7 +94,8 @@ services: RUN_MASK: ${RUN_MASK:-0} # bit flags; 1: contract migrations 2: seed data DEV_FAUCET_AMOUNT: ${DEV_FAUCET_AMOUNT:-0} DEV_ETH_GAS_PRICE: $DEV_ETH_GAS_PRICE - WALLET_KEY_FILE: ./keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c + #DEV_GAS_AMOUNT: "100000000000000000000000" # removed from env_reset + #WALLET_KEY_FILE: ./keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c #removed from env_reset TOKEN_NAME: ${TOKEN_NAME:-Giftable Token} TOKEN_SYMBOL: ${TOKEN_SYMBOL:-GFT} TOKEN_TYPE: ${TOKEN_TYPE:-giftable_erc20_token} @@ -109,8 +110,8 @@ services: TOKEN_SINK_ADDRESS: $TOKEN_SINK_ADDRESS SIGNER_PROVIDER: ${SIGNER_SOCKET_PATH:-http://cic-eth-signer:8000} restart: on-failure - command: ["./run_job.sh"] - #command: ["./reset.sh"] + #command: ["./run_job.sh"] + command: bash -c "while true; do sleep 1; done" # Infinite loop to keep container live doing nothing depends_on: - eth - postgres diff --git a/scripts/dump.sh b/scripts/dump.sh index 642285e0..c18081db 100755 --- a/scripts/dump.sh +++ b/scripts/dump.sh @@ -1 +1 @@ -docker run -v --rm cic-internal-integration_contract-config:/tmp/cic/config busybox cat /tmp/cic/config/env_reset +docker run --rm -v cic-internal-integration_contract-config:/tmp/cic/config busybox cat /tmp/cic/config/env_reset