solidity intro

11
Setting Up a Solidity Environment By Angello Pozo & Jason Robert

Upload: angello-pozo

Post on 06-Apr-2017

30 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Solidity intro

Setting Up a Solidity

EnvironmentBy Angello Pozo & Jason Robert

Page 2: Solidity intro

What is Solidity?

• Compiles down to op codes that are run on Ethereum• Use the Blockchain as a server and a DB

Page 3: Solidity intro

Image of What’s Happening

Page 4: Solidity intro

For Local Development

• Node.js (system program)• Solc (npm package)• Truffle (npm package)• Testrpc (npm Package)

Page 5: Solidity intro

Installing Node

Mac1.Install Homebrew (

https://brew.sh) 2.Open command line

1. brew install node2. node -v

Windows• Go to https://nodejs.org/en/ • Open command line

• node -v

Page 6: Solidity intro

Install Global NPM Packages

1. In command line 1. npm install solc –g2. npm install truffle –g3. npm install ethereumjs-testrpc -g

Page 7: Solidity intro

Creating Project with Truffle

• In the command line• cd ~ && mkdir code && cd code• truffle init• ls -la

• Open a new terminal tab or window• testrpc

Page 8: Solidity intro
Page 9: Solidity intro

Let’s See it Working!!

• Command line• truffle compile• truffle migrate –reset• truffle test

Page 10: Solidity intro

Minor Change to Tests

• Go to link• Short http://bit.ly/2o6lM5L• Raw https://

gist.github.com/sogoiii/d3b512aab0623d4ad1da5c5bde3d3323

• Copy and paste over the `./test/metacoin.js` file• Run `truffle test` in command line

Page 11: Solidity intro

Contact Us @ www.hellosugoi.com

• Angello Pozo • [email protected]• https://medium.com/@

angellopozo

• Jason Robert• [email protected] • https://medium.com/@jason.

robert

Follow us on Twitter: @hellosugoi