Quickest Start To Ethereum

Standard Disclaimer: This probably isn't the "best" way to do it, but it's the fastest "get to working in a reasonable way" that I know of.

Quickest Start To Ethereum Toolkit

So you've decided to dive into Ethereum development, and you think the tools are hard to use. Well, you're not wrong. I had the same problem, so I put this guide together to get from zero to smart contracts as quickly as possible.

This uses the following tools:

  • truffle
  • ethereumjs-testrpc
  • webpack

Later, I'll write about how to do the same stuff with geth and python toolsets.

Prerequisites

Before starting, you'll need these tools:

  • node - Recent version of Node (8 or better I think)
  • make

First steps

First of all go get this gist.:

# get the repo
git clone https://gist.github.com/val314159/d2695398dc8745fc7ef847917a2f8738 quickest-start  
cd quickest-start  

Pre-Install

Let's install the things your environment needs to function. Stuff like truffle and testrpc

Run the following. You might need to type in your password for sudo.

make preinstall  

Run testrpc

You need to run a "fake" blockchain. This is a pretend blockchain for development that will be replaced later with a real one.

  • In a seperate window, run
make testrpc  
  • To run in the background, just run
make testrpc-bg  

Run the webpack server in dev mode

The first time you run this, it will

  • pull down some sample contracts
  • compile them
  • migrate them to the testrpc blockchain you're running
  • launch a development server on localhost:8080
  • build the webpack site files

Run:

make serve-webpack-dev  

It will also stay up and recompile and updates to the javascript, but it won't update new contracts automatically

Compile and Migrate contracts

To update contracts on your blockchain, you need to compile your Solidity files and migrate them. This will do all that:

make migrate--reset  

Get a browser going

To see the fruits of your labor, go to:

localhost:8000

And you should see 10000 META in your account.

Run tests

You can even run the tests when the server's still running.

make test