Solidity intro
-
Upload
angello-pozo -
Category
Technology
-
view
31 -
download
2
Transcript of Solidity intro
![Page 1: Solidity intro](https://reader034.fdocuments.us/reader034/viewer/2022042605/58e5ae7e1a28ab85798b48f1/html5/thumbnails/1.jpg)
Setting Up a Solidity
EnvironmentBy Angello Pozo & Jason Robert
![Page 2: Solidity intro](https://reader034.fdocuments.us/reader034/viewer/2022042605/58e5ae7e1a28ab85798b48f1/html5/thumbnails/2.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042605/58e5ae7e1a28ab85798b48f1/html5/thumbnails/3.jpg)
Image of What’s Happening
![Page 4: Solidity intro](https://reader034.fdocuments.us/reader034/viewer/2022042605/58e5ae7e1a28ab85798b48f1/html5/thumbnails/4.jpg)
For Local Development
• Node.js (system program)• Solc (npm package)• Truffle (npm package)• Testrpc (npm Package)
![Page 5: Solidity intro](https://reader034.fdocuments.us/reader034/viewer/2022042605/58e5ae7e1a28ab85798b48f1/html5/thumbnails/5.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042605/58e5ae7e1a28ab85798b48f1/html5/thumbnails/6.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042605/58e5ae7e1a28ab85798b48f1/html5/thumbnails/7.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042605/58e5ae7e1a28ab85798b48f1/html5/thumbnails/8.jpg)
![Page 9: Solidity intro](https://reader034.fdocuments.us/reader034/viewer/2022042605/58e5ae7e1a28ab85798b48f1/html5/thumbnails/9.jpg)
Let’s See it Working!!
• Command line• truffle compile• truffle migrate –reset• truffle test
![Page 10: Solidity intro](https://reader034.fdocuments.us/reader034/viewer/2022042605/58e5ae7e1a28ab85798b48f1/html5/thumbnails/10.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022042605/58e5ae7e1a28ab85798b48f1/html5/thumbnails/11.jpg)
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