Skip to content

Latest commit

 

History

History
127 lines (107 loc) · 2.22 KB

Deployment_step_by_step.md

File metadata and controls

127 lines (107 loc) · 2.22 KB

I. Prerequisites

0.1. Configure Golang development environment

https://golang.org/doc/install

0.2. Download go-ethereum source code

https://geth.ethereum.org/install/#build-it-from-source-code

II. Blockchain

You can use Ganache for development or the testnet of your own

III. dex-smart-contract

  1. Clone it:
git clone [email protected]:tomochain/dex-smart-contract.git
  1. Install truffle:
yarn global add truffle
  1. Run yarn install

  2. Update .env file with your mnemonic words (You can check file .env.sample for more information)

  3. Deploy smart contracts to blockchain:

yarn deploy-contracts

This command will deploy smart contract to your local blockchain (--network development)

OR

truffle migrate --network tomochainTestnet

This command will deploy smart contract to Tomochain Testnet

OR

truffle migrate --network tomochain

This command will deploy smart contract to Tomochain Mainnet (but don't use for now)


IV. dex-deploy

  1. Clone it:
git clone [email protected]:tomochain/dex-deploy.git
  1. Run docker environment
yarn start-env

OR

yarn reset-env

in case you want to reset MongoDB, Redis, RabbitMQ data

  1. Update file seed-data.sh
Update line 2. NETWORK="development" with your network of choice

It can be "development", "tomochainTestnet" or "tomochain"
  1. Generate seed and import seed data into mongo
yarn seeds

V. dex-server

  1. Clone it:
git clone [email protected]:tomochain/dex-server.git
  1. Checkout develop branch

  2. Update file seed-data.sh

Update line 2. NETWORK="development" with your network of choice

It can be "development", "tomochainTestnet" or "tomochain"
  1. Update config.yaml
yarn seeds
  1. Start the server
yarn start

VI. dex-client

  1. Clone it:
git clone [email protected]:tomochain/dex-client.git
  1. Install dependencies
yarn
  1. Install sass:
https://sass-lang.com/install
  1. Copy token addresses into file src/config/addresses.json:
yarn query-tokens
  1. Start the development server
yarn start

This command will also compile sass files


DONE