- Docker and Docker-compose
- Install MetaMask extension.
- Open MetaMask and create an account. Note down your passphrase.
- Connect MetaMask to the Ropsten testnet.
- Transfer some ether to your address.
- Sign up and create a new project with Infura. Under project/settings/keys, in ENDPOINTS select 'ROPSTEN' and copy the url that starts with: https://ropsten.infura.io/v3/...
- Clone this git repo and cd into it
- Run
docker-compose up
- Run
docker exec -it blockchain /bin/bash
(in a new terminal) - Run
truffle develop
- Create a
.env
file at the root of the project and set values according to yours.REACT_APP_API_URL=http://127.0.0.1:8545 ROPSTEN_API=https://ropsten.infura.io/v3/<YOUR_API_KEY> MNEMONIC=<YOUR_META_MASK_PASSPHRASE>
If you want to deploy your DApp to a local network and test it, you need to disable your MetaMask extension.
- Run
truffle develop
- Run
migrate
This will compile, migrate and deploy your SC to a local testnet - Open a browser window at localhost:3000
Ropsten is a testnet equivalent to ethererum mainnet.
- Run
truffle deploy --network ropsten
// This will compile and deploy your SC to the ropsten testnet. - Open a browser window at localhost:3000 (in Chrome)
- Connect MetaMask to the site.