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
You can use Ganache for development or the testnet of your own
- Clone it:
git clone [email protected]:tomochain/dex-smart-contract.git
- Install truffle:
yarn global add truffle
-
Run
yarn install
-
Update .env file with your mnemonic words (You can check file
.env.sample
for more information) -
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)
- Clone it:
git clone [email protected]:tomochain/dex-deploy.git
- Run docker environment
yarn start-env
OR
yarn reset-env
in case you want to reset MongoDB, Redis, RabbitMQ data
- Update file
seed-data.sh
Update line 2. NETWORK="development" with your network of choice
It can be "development", "tomochainTestnet" or "tomochain"
- Generate seed and import seed data into mongo
yarn seeds
- Clone it:
git clone [email protected]:tomochain/dex-server.git
-
Checkout
develop
branch -
Update file
seed-data.sh
Update line 2. NETWORK="development" with your network of choice
It can be "development", "tomochainTestnet" or "tomochain"
- Update config.yaml
yarn seeds
- Start the server
yarn start
- Clone it:
git clone [email protected]:tomochain/dex-client.git
- Install dependencies
yarn
- Install
sass
:
https://sass-lang.com/install
- Copy token addresses into file
src/config/addresses.json
:
yarn query-tokens
- Start the development server
yarn start
This command will also compile sass files