/openst-contracts

OpenST is a framework for building token economies on Ethereum

Primary LanguageJavaScriptGNU Lesser General Public License v3.0LGPL-3.0

OpenST Payments - Advance Payment infrastructure on top of the OpenST network

Latest version Travis Downloads per month Gitter: JOIN CHAT

While OpenST 0.9 is available as-is for anyone to use, we caution that this is early stage software and under heavy ongoing development and improvement. Please report bugs and suggested improvements.

Install OpenST Payments

npm install @openstfoundation/openst-payments --save

Start Dynamo

Start DynamoDb with specified path (in dbPath). Delete the Dynamo DB data file if already exists.

> java -Djava.library.path=~/dynamodb_local_latest/DynamoDBLocal_lib/ -jar ~/dynamodb_local_latest/DynamoDBLocal.jar -sharedDb -dbPath ~/openst-setup/logs/ 

Run Test Chain

cd mocha_test/scripts/
sh start_test_chain.sh

Deploy

Set ENV Variables

cd mocha_test/scripts
source env_vars.sh

Init DynamoDB

DynamoDB initial migrations for shard management are run in it and one shard is created and registered for storing token balance.

node tools/dynamo_db_init.js

Deploy Branded Token Contract:

node tools/deploy/EIP20TokenMock.js conversionRate symbol name decimals gasPrice configStrategyFile

Deploy Pricer Contract:

node tools/deploy/pricer.js brandedTokenContractAddress baseCurrency gasPrice chainID configStrategyFile

Deploy Workers Contract:

node tools/deploy/workers.js gasPrice chainId configStrategyFile

Deploy Airdrop Contract:

node tools/deploy/airdrop.js brandedTokenContractAddress baseCurrency workerContractAddress airdropBudgetHolder gasPrice chainId configStrategyFile

Sourcing env_vars again

cd mocha_test/scripts
source env_vars.sh

Deploy price-oracle

cd mocha_test/scripts
source deploy_price_oracle.sh

Create Airdrop Tables:

node migrations/create_tables.js

For complete documentation of all the services of OpenST Platform, please refer Developer Guide.