Hi guys, welcome to the first episode of Eat The Blocks Today we are going to set up our development environment for developing Ethereum smart contract so before we go any further I'd like you to make sure that you already have nodejs installed and if possible it'll be better if you have installed the latest version which is at the time of this recording is 8
So we're going to jump to a console here okay and we're going to install the Solidity compiler for nodejs so type npm install -g and then solc which is just the name of the NPM package for the Solidity compiler So I've already installed it on my computer so you're not going to see anything spectacular So wait a bit so one important thing to note here is that I specify to use the global flag so that you can use the Solidity compiler for different projects and you won't need to reinstall it for each project But if you want you can just install it locally So to check that the installation worked you just need to type solc I think is that js and I just press ENTER and see what it does say wait a bit "Must provide a file" ok it works so it means that I have it installed
However I found that there is something even better than actually a lot of people don't know It's a sort of a blockchain simulator written with nodejs, that mimic perfectly all the features of a normal Ethereum client But it doesn't actually connect to a testnet It just run a blockchain in memory and when you launch the network it creates some test accounts that you control and when you, mmm, when you stop the process then everything is forgotten, and you can just restart the blockchain as many times as you want so that's really the option that offer the most flexibility and I really recommend to use this for your development For our tutorial on Eat The Blocks it's what we're going to use
So let's jump to the console and install it There is an NPM package for it so npm install again we set the global ethereumjs-testrpc okay let's wait a bit Again I've already installed it before so it's just going to tell me that I already have it but for you it's going probably going to take a bit more time and once it has installed then we again going to check that it's working well So if you want to check that it's working well then this time the command-line is not reading intuitive it's called testrpc so testrpc enter Okay cool it works so here we can see that it created some accounts for me here
So I will be able to use all those accounts for my development and below we can see that it also give me all the private keys So means that I control those accounts yeah And it's listening on localhost port 8545 Okay that's cool Great we have everything we need
First we have the Solidity compiler and then we have an Ethereum testnet client Both of them are NPM global package so you can use them easily across different projects So for our next project we're going to create our obligatory HelloWorld smart contract So stay tuned if you want to learn about this If you like this channel, please subscribe
Thank you see you for the next episode Bye bye!