MENU

Checklist for developing smart contracts

December 15, 2018
0
1190
0

To start developing smart contracts in solidity, here is a check list of applications that will make your life easy.

Note: Instructions here are geared towards Mac operating system.

Remix

Remix is an online Integrated Development Environment (IDE) where solidity smart contracts can be written. It can then be compiled and tested locally or combined with Metamask and deployed on testnet for instance.

Editors – Atom or Sublime

Atom or Sublime are popular editors. Atom is open source (ie free) while Sublime costs $80USD. While solidity smart contracts are written in remix, editors are useful to handle json, javascript and regular text files.

Metamask

Metamask is a browser extension that allows smart contracts to connect to various blockchains. It can be thought of as a bridge connecting the two together.

Geth

Geth or Go Ethereum is an Ethereum client which when run, acts as a node to connect to the Ethereum blockchain. It can be configured to point to mainnet, testnet or even set up in private mode. The following command will tell you if you have geth installed or not.

> geth version
Geth
Version: 1.8.14-stable
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.10.3
Operating System: darwin
GOPATH=
GOROOT=/usr/local/Cellar/go/1.10.3/libexec

To install geth, follow the instructions here

Node

You will also require NodeJS which is a javascript run time environment for building network applications. Node.js is used to create fast web servers by companies like Walmart, eBay and Netflix.

Node is required to be installed along with the node network package manager (npm) before we can install Truffle below. To check if you have node installed, run:

> node -v 
v11.2.0
> npm -v
6.4.1

To install node run

> brew install node

To uninstall:

> brew uninstall node

Truffle

It is fine to create smart contracts in Remix and deploy to the blockchain via Metamask however, there is a lot of copy and pasting and screen switching. Truffle is designed as a development framework that provides simple commands to compile and deploy smart contracts based on configuration files. It also provides automated testing capabilities as well.

> truffle version
Truffle v4.1.14 (core: 4.1.14)
Solidity v0.4.24 (solc-js)

To install truffle run:

> sudo npm install -g truffle

To uninstall truffle run:

> sudo npm uninstall -g truffle

Ganache

Ganache is a personal blockchain for Ethereum development you can use to deploy contracts, develop your applications, and run tests. It use to be called TestRPC and is still available as a command line or with a nice user interface. The user friendly interface provides a much nicer experience for beginners.

Ethereum Wallet or Mist

Here is where some get confused between Ethereum wallet and Mist. There are both options available at: https://github.com/ethereum/mist/releases. Ethereum wallet is a pure wallet application where as Mist is a decentralized App or dApp browser that includes the Ethereum wallet dApp. ie if you use Mist, you get a 2 for 1 deal.

There are a number of applications and these can be remembered via the anagram GRANT-MGM

Geth, Remix, Atom, Node, Truffle – Metamask, Ganache and Mist

Here is a simple bash script that will check if geth, node, npm and truffle exist on your system.

https://github.com/seandotau/tools_checklist

Leave a Comment!

Your email address will not be published. Required fields are marked *