...by Daniel Szego
quote
"On a long enough timeline we will all become Satoshi Nakamoto.."
Daniel Szego

Friday, December 29, 2017

Solidity and Truffle Tips and Tricks - setting up Truffle development environment


As I install a brand new environment usually with a brand VMware image, it is time to summarize the necessary steps instead of google-ing them always again and again.

1. Install brand new Ubuntu, I usually use the 16.04 version.

2. Installing open vmware tools:

 sudo apt-get install open-vm-tools
 sudo apt-get install open-vm-tools-desktop

3. Install packages:

 sudo apt-get update && sudo apt-get -y upgrade
 sudo apt-get -y install curl git vim build-essential

4. Install NodeJS:

 curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
 sudo apt-get install -y nodejs
 sudo npm install -g express

5. Install Truffle

 sudo npm install -g truffle

6. Install TestRPC

 sudo npm install -g ethereumjs-testrpc

7. Test: you can test the whole installation for instance by initializing a new project by Truffle:

 mkdir test
 cd test
 truffle init
 truffle develop

8.  Install Visual Studio Code, you can install fully from command prompt with the help of the following commands:

 curl https://packages.microsoft.com/keys/microsoft.asc | gpg -- dearmor > microsoft.gpg
 sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
 sudo sh -c 'echo "deb [arch=amd64]  https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
 sudo apt-get update
 sudo apt-get install code

9. Last but not least, install the solidity extension under Visual Studio Code extentions