From 71e22fb637ba2c3fbfa706324343e11419dd425a Mon Sep 17 00:00:00 2001 From: nolash Date: Wed, 26 May 2021 09:09:36 +0200 Subject: [PATCH] Add token symbol flag --- apps/data-seeding/README.md | 56 ++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/apps/data-seeding/README.md b/apps/data-seeding/README.md index 32dde8d6..f894ae98 100644 --- a/apps/data-seeding/README.md +++ b/apps/data-seeding/README.md @@ -128,6 +128,8 @@ The keystore file used for transferring external opening balances tracker is rel All external balance transactions are saved in raw wire format in `/txs`, with transaction hash as file name. +If the contract migrations have been executed with the default "giftable" token contract, then the `token_symbol` in the `import_balance` scripts should be set to `GFT`. + #### Alternative 1 - Sovereign wallet import - `eth` @@ -143,7 +145,7 @@ After the script completes, keystore files for all generated accouts will be fou Then run: -`python eth/import_balance.py -v -c config -r -p --offset -y ../keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c ` +`python eth/import_balance.py -v -c config -r -p --token-symbol --offset -y ../keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c ` @@ -151,7 +153,7 @@ Then run: Run in sequence, in first terminal: -`python cic_eth/import_balance.py -v -c config -p -r -y ../keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c --head out` +`python cic_eth/import_balance.py -v -c config -p -r --token-symbol -y ../keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c --head out` In another terminal: @@ -168,13 +170,38 @@ If you have previously run the `cic_ussd` import incompletely, it could be a goo Then, in sequence, run in first terminal: -`python cic_eth/import_balance.py -v -c config -p -r -y ../keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c out` +`python cic_eth/import_balance.py -v -c config -p -r --token-symbol -y ../keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c out` In second terminal: `python cic_ussd/import_users.py -v -c config out` + +### Step 4 - Metadata import (optional) + +The metadata import scripts can be run at any time after step 1 has been completed. + + +#### Importing user metadata + +To import the main user metadata structs, run: + +`node cic_meta/import_meta.js ` + +Monitors a folder for output from the `import_users.py` script, adding the metadata found to the `cic-meta` service. + +If _number of users_ is omitted the script will run until manually interrupted. + + + +#### Importing phone pointer + +`node cic_meta/import_meta_phone.js ` + +If you imported using `cic_ussd`, the phone pointer is _already added_ and this script will do nothing. + + ##### Importing pins and ussd data (optional) Once the user imports are complete the next step should be importing the user's pins and auxiliary ussd data. This can be done in 3 steps: @@ -199,29 +226,6 @@ The balance script is a celery task worker, and will not exit by itself in its c The connection parameters for the `cic-ussd-server` is currently _hardcoded_ in the `import_users.py` script file. -### Step 4 - Metadata import (optional) - -The metadata import scripts can be run at any time after step 1 has been completed. - - -#### Importing user metadata - -To import the main user metadata structs, run: - -`node cic_meta/import_meta.js ` - -Monitors a folder for output from the `import_users.py` script, adding the metadata found to the `cic-meta` service. - -If _number of users_ is omitted the script will run until manually interrupted. - - -#### Importing phone pointer - -`node cic_meta/import_meta_phone.js ` - -If you imported using `cic_ussd`, the phone pointer is _already added_ and this script will do nothing. - - ### Step 5 - Verify `python verify.py -v -c config -r -p `