[Soft Dev: Blockchain]: Ethereum Dev Environment Setup

Goal:

Setup an environment to develop decentralized applications via Ethereum.

The teacher

With help from Mark Muskardin @ www.ethereumfundamentals.com

The network

The coolest place for Blockchain in ‘The City’ (San Francisco)…

Starfish Mission https://www.starfishcommunity.com/.

They have meetups every other day and great place to network and know about blockchain technology.

The meetup

https://www.meetup.com/Starfish-Mission/

The final goal

My big goal is to be an Ethereum Dapp Developer in 2020.

Install:

  1. Truffle – helps compile contracts to local blockchain or ethereum blockchain.
  2. Ganache – local blockchain lives on PC.
  3. MetaMask – crypto wallet, connects to ethereum blockchain via chrome extension.
  4. Front-end Template – will be using UI code called React Dapp Boilerplate, configs and settings for production level Dapps.

Prerequisites:

Assume already installed or needs to be installed beforehand.

  1. Ubuntu, https://ubuntu.com/download/desktop
  2. Google Chrome: https://www.google.com/chrome/
  3. Node.js, https://nodejs.org/en/
  4. npm, https://www.npmjs.com/

Ubuntu

I’ll leave this one open on how to install Ubuntu.

Here are a link: https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop#0

Chrome

Here is link to install: https://www.google.com/chrome/

Node.js

Assuming Ubuntu installed and running, open the terminal and type the following to install Nodejs.

sudo apt-get install nodejs

Npm

sudo apt-get install npm

Setup:

Truffle:

Once again open the terminal and type the commands to install truffle via npm where the flag ‘-g’ install npm globally.

sudo npm install -g truffle

Ganache:

Note two versions:

  • Ganache CLI – terminal based
  • Ganache GUI – GUI based

We will use Ganache GUI since its more friendly and intuitive.

Go here and install Ganache: https://www.trufflesuite.com/ganache

After the download, go via command line into download directory and run the commands to allow Ganache to be launched.

chmod +x ganache-2.1.2-linux-x86_64.AppImage
./ganache-2.1.2-linux-x86_64.AppImage

Click on ‘Quickstart’ to create your local blockchain.

MetaMask:

Install

Install MetaMask via Chrome extensions.

Setup wallet

Follow the prompts on screen by first ‘Create a Wallet.’

Remember to save the back up passphase somewhere safe.

Change networks

We need to change to local network our blockchain is running on.

BUT BEFORE YOU DO MAKE SURE THE PORT MATCHES ON BOTH GANACHE AND METAMASK.

Its usually easier to run MetaMask first and find out which port its running on. Second open Ganache ‘Settings’ and navigate to ‘Server’ and ensure Port matches MetaMask port.

Import using account seed phrase

Although you are connected to the private blockchain, please logout immediately until you see this screen.

Click on ‘Import using account seed phrase.’

From ‘Ganache’ interface before, type in the mnemonic passphrase and save it and keep it safe. It’s like our recover sentence to our private key.

Go ahead and type it in, enter a new password and continue.

Hooray your RICH!!! Not really…

Front-end:

UI foundation for Ethereum Dapps built with:

  1. React
  2. Redux
  3. Webpack
  4. Material-UI

Before we have a front-end we need to do a couple things on the command line like unboxing the contents the boilerplate into local dir.

# make dir
mkdir proof-of-existance
# install 
truffle unbox hackingbeauty/react-dapp-boilerplate

Last thing to do is launch our server locally.

npm run start

If everything went correctly you should see this!


Links:

  1. Truffle: https://www.trufflesuite.com/
  2. Ganache: https://www.trufflesuite.com/ganache
  3. Metamask: https://metamask.io/
  4. Ethereum Fundamentals: www.ethereumfundamentals.com

Leave a Reply

Discover more from deepHomeBrew

Subscribe now to keep reading and get access to the full archive.

Continue reading