diff --git a/misc-commands.md b/misc-commands.md index 7e24b12..20740dd 100644 --- a/misc-commands.md +++ b/misc-commands.md @@ -1,13 +1,69 @@ +# Environment + +## no containers or volumes leftover from previous attempts +cd apps/data-seeding + +python -m venv ~/code/cic/venv/ +source ~/code/cic/venv/bin/activate +python -m pip install --upgrade pip +## setup modified requirements.txt for Mac (make sure to pull through latest changes into cic-base) +pip install requirements-magic==0.0.1a2 +python ~/code/gitlab/grassrootseconomics/python-requirements-magic/requirements_magic/runnable/update.py ~/code/cic/requirements.txt ~/code/gitlab/grassrootseconomics/cic-internal-integration/apps/data-seeding/requirements.txt ~/code/gitlab/grassrootseconomics/cic-base/full_graph_requirements.txt ~/code/gitlab/grassrootseconomics/cic-base/full_requirements.txt ~/code/gitlab/grassrootseconomics/cic-base/requirements.txt > ~/code/cic/requirements-new.txt +## install dependencies +pip install -r ~/code/cic/requirements-new.txt --extra-index-url https://pip.grassrootseconomics.net:8433 --index https://pypi.org/simple +## Step 1 - Data creation + +python create_import_users.py --gift-threshold 10000 --dir ~/code/cic/out 50 + +## Step 2 - Services +### open new terminal window +cd ../.. +### docker-compose down -v + +docker-compose up eth postgres redis +RUN_MASK=1 docker-compose up --build contract-migration +### (wait until complete) +docker-compose up --build cic-eth-tasker +RUN_MASK=2 docker-compose up contract-migration +### (wait until complete) + +docker-compose up --build cic-eth-tracker cic-eth-dispatcher +docker-compose up --build cic-cache-tracker +docker-compose up --build cic-cache-tasker cic-cache-server cic-eth-retrier cic-meta-server cic-notify-tasker cic-user-ussd-server cic-user-tasker + +# Step 3 - User Imports +## custodial engine import scripts +## run in sequence, in first terminal + +python cic_eth/import_balance.py -v -c config -p http://localhost:63545 -r 0xea6225212005e86a4490018ded4bf37f3e772161 -y ../contract-migration/keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c --head ~/code/cic/out +## in another terminal with venv +python cic_eth/import_users.py -v -c config --redis-host-callback redis ~/code/cic/out +## check the cic-cache DB's tx table +## Step 4 - Metadata import + +nvm use 14.17.0 +## temporary: lock "cic-client-meta": "0.0.7-alpha.6" in package.json +npm install +node cic_meta/import_meta.js ~/code/cic/out 50 +node cic_meta/import_meta_phone.js ~/code/cic/out 50 + +## Step 5 - Verify +## python verify.py -v -c config -r 0xea6225212005e86a4490018ded4bf37f3e772161 -p http://localhost:63545 --token-symbol GFT --exclude ussd --skip-custodial ~/code/cic/out +python verify.py -v -c config -r 0xea6225212005e86a4490018ded4bf37f3e772161 -p http://localhost:63545 --token-symbol GFT --exclude ussd --exclude metadata --exclude metadata_phone --exclude ussd_pins --skip-custodial ~/code/cic/out + + +# Token Creation + git clone https://gitlab.com/nolash/grassroots-app -##Setup: +## Setup: sudo docker-compose down -v sudo RUN_MASK=3 docker-compose up –build /apps/data-seeding: -##Deploy token +## Deploy token erc20-demurrage-token-deploy –help (venv) wor@gecon:~/src/ge/erc20-demurrage-token/python$ PYTHONPATH=. python erc20_demurrage_token/runnable/deploy.py -p http://localhost:63545 -y /home/wor/src/ge/cic-internal-integration/apps/contract-migration/keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c -i evm:bloxberg:8996 --name "Chama Token" --symbol "CHM" -vv -ww -c config --supply-limit 1000000