-
Notifications
You must be signed in to change notification settings - Fork 0
/
local-kyc-complete-setup.txt
71 lines (58 loc) · 2.49 KB
/
local-kyc-complete-setup.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Set Up KYC
Nginx conf to run SimpleToken Web and Api
server {
listen 8080;
server_name kyc.developmentost.com;
location /api/ {
proxy_pass http://kyc.developmentost.com:4000;
}
location / {
proxy_pass http://kyc.developmentost.com:5000;
}
}
Run simpletoken web on port 5000
rails s -p 5000
Run simpletoken api on port 4000
rails s -p 4000
Set Up Kyc whitelisting process
STEP 1: Download OpenStPlatfrom code and follow steps for openStSetup
> git clone git@github.com:OpenSTFoundation/openst-platform.git
> cd openst-platform
> export OPENST_PLATFORM_PATH=$(pwd)
> npm install
> node $OPENST_PLATFORM_PATH/tools/setup/index.js
> cd ~/openst-setup/bin
> START GETH:-
sh run-value.sh
> Open a new terminal and run
geth attach http://127.0.0.1:8545
> eth.accounts and use 2nd address for whitelisting and update ST_DEPLOYER_ADDR in PublicOps in Step 2
In GETH TERMINAL-
GENERATE ETH ADDRESSES IN VALUE CHAIN & TRANSFER ETH COMMANDS
whitelister = personal.newAccount("testtest")
deployer="ST_DEPLOYER_ADDR"
personal.unlockAccount(deployer, "testtest")
eth.sendTransaction({from:deployer,to: whitelister,value: 200})
STEP 2: git clone SimpleTokenOpsPublicApi repository
> cd ~/workspace/projects/SimpleTokenOpsPublicAPI/
> npm install
> source set_env_vars.sh
> Overwrite following environment variables
export ST_DEPLOYER_ADDR='0x0000000000000000000000000000000000000000' - An address which has eth balance
export ST_DEPLOYER_ADDR_PASSPHRASE='testtest'
export ST_DEPLOYER_GETH_PROVIDER='http://127.0.0.1:8545'
> node executables/deploy_whitelist_contract.js
> Copy 'GenericWhitelist Contract Deployed' address
> Use above contract address as Client's contract address &
whitelister address can be any address which has Eth Balance.
Set Contract & Whitelister address in client_whitelist_details.
STEP 3: SETUP PUBLIC OPS AND PRIVATE OPS
> git clone SimpleTokenOpsPublicAPI and SimpleTokenOpsPrivateAPI
> Run "source set_env_vars.sh" for both repos.
> Run "npm install" for both repos.
> Follow Readme.md files of both repos and export all variables in two different consoles.
> Overwrite below Variables in SimpleTokenOpsPublic
export ST_API_BASE_URL='http://kyc.developmentost.com:8080/api'
> Overwrite below Variables in SimpleTokenOpsPrivate
export ST_WHITELIST_ACCOUNT_PASSPHRASE='testtest'
> Run node servers with command node ./bin/www