Merge branch 'willruddick-master-patch-60286' into 'master'
Update misc-commands.md See merge request grassrootseconomics/cic-docs!88
This commit is contained in:
commit
986b457bc6
@ -1,67 +1,19 @@
|
|||||||
# Environment
|
# Environment
|
||||||
|
deploy contracts
|
||||||
|
set up system accounts
|
||||||
|
throw some gas and tokens around for system accounts
|
||||||
|
start all services
|
||||||
|
|
||||||
git clone https://gitlab.com/grassrootseconomics/cic-internal-integration/
|
git clone https://gitlab.com/grassrootseconomics/cic-internal-integration/
|
||||||
|
|
||||||
sudo RUN_MASK=3 COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 DEV_FAUCET_AMOUNT=100000000 TOKEN_TYPE=erc20_demurrage_token CIC_DEFAULT_TOKEN_SYMBOL=SARAFU docker-compose up --build
|
sudo RUN_MASK=3 COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 DEV_FAUCET_AMOUNT=100000000 TOKEN_TYPE=erc20_demurrage_token CIC_DEFAULT_TOKEN_SYMBOL=SARAFU docker-compose up --build
|
||||||
that should set you up, and then you need to determine when the setup is done by running:
|
that should set you up, and then you need to determine when the setup is done by running:
|
||||||
|
|
||||||
docker container ls -a
|
sudo docker logs -f cic-internal-integration_contract-migration_1
|
||||||
then choosing the name of the contract migration container:
|
|
||||||
|
|
||||||
docker logs -f <docker_container_name_of_contract_migration>
|
|
||||||
when that logs exits, you're good
|
when that logs exits, you're good
|
||||||
|
|
||||||
|
# Create users
|
||||||
## no containers or volumes leftover from previous attempts
|
https://gitlab.com/grassrootseconomics/cic-internal-integration/-/tree/lash/migration-fix/apps/data-seeding#alternative-3-ussd-import-cic_ussd
|
||||||
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
|
# Token Creation
|
||||||
@ -71,9 +23,10 @@ git clone https://gitlab.com/nolash/grassroots-app
|
|||||||
|
|
||||||
## Setup:
|
## Setup:
|
||||||
sudo docker-compose down -v
|
sudo docker-compose down -v
|
||||||
sudo RUN_MASK=3 docker-compose up –build
|
|
||||||
|
|
||||||
<cic-internal-integration>/apps/data-seeding:
|
sudo RUN_MASK=3 COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 DEV_FAUCET_AMOUNT=100000000 TOKEN_TYPE=erc20_demurrage_token CIC_DEFAULT_TOKEN_SYMBOL=SARAFU docker-compose up --build
|
||||||
|
|
||||||
|
sudo RUN_MASK=3 docker-compose up –build
|
||||||
|
|
||||||
## Deploy token
|
## Deploy token
|
||||||
erc20-demurrage-token-deploy –help
|
erc20-demurrage-token-deploy –help
|
||||||
@ -83,7 +36,6 @@ erc20-demurrage-token-deploy –help
|
|||||||
(venv) wor@gecon:~/src/ge/erc20-demurrage-token/python$ eth-get -p http://localhost:63545 0xcf38135da34784a9db226772dcf740089f466241ba82ab4a2f4b5265fcb23a4d
|
(venv) wor@gecon:~/src/ge/erc20-demurrage-token/python$ eth-get -p http://localhost:63545 0xcf38135da34784a9db226772dcf740089f466241ba82ab4a2f4b5265fcb23a4d
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
giftable-token-gift -p http://localhost:63545 -y ./keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c -i evm:bloxberg:8996 -vv -w -a <token_address> --recipient <recipient_address> <amount>
|
giftable-token-gift -p http://localhost:63545 -y ./keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c -i evm:bloxberg:8996 -vv -w -a <token_address> --recipient <recipient_address> <amount>
|
||||||
|
|
||||||
giftable-token-gift -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 -vv -w -a 0x6ca3cb14aa6f761712e1c18646afba4d5ae249e8 100
|
giftable-token-gift -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 -vv -w -a 0x6ca3cb14aa6f761712e1c18646afba4d5ae249e8 100
|
||||||
|
Loading…
Reference in New Issue
Block a user