So you want to become a Solidity developer but hate wasting time setting up your machine and downloading chain data? If yes, read on.
How about setting up your own private network in 5 minutes on Windows, Mac or Linux?
Install prerequisites
You will only need to have 3 things:
- Kitematic UI for Docker
Once you’re done with that, let’s launch your own Ethereum private network!
Launch your own Ethereum private network
- Open Kitematic
- Click the +NEW button
- Type in: czekaj in the search box
- Find the geth-privnet image and hit CREATE
- When the machine starts, click on the cog button to map port 8545:
- Map port 8545to localhost:8545 and hit SAVE
Congratulations! Your Ethereum private network is already running and mining blocks!
Now let’s connect to it with Mist.
Windows
Modify your Mist desktop shortcut (the real no-terminal way):
"C:Program FilesMistMist.exe" --node-datadir="%HOMEPATH%AppDataRoamingEthereumprivatenet" --rpc http://127.0.0.1:8545 --node-networkid 1234 --swarmurl="http://swarm-gateways.net"
Mac
Run Mist from terminal (Macs have to break the no-terminal rule):
/Applications/Mist.app/Contents/MacOS/Mist --rpc http://127.0.0.1:8545 --node-networkid 1234 --swarmurl="http://swarm-gateways.net" > /dev/null 2>&1 &
Click on the shortcut / run your command. Don’t worry about the warning:
And here it is!
If you wait a couple minutes, you should be able to see some fake ether pouring in to your Main Account.
You’re done. That’s really it!
Now open Remix and start developing your first Smart Contract!
Bonus
You can attach to your network with JavaScript console by running geth attach http://127.0.0.1:8545 but that’s a terminal command so beyond the scope of this tutorial
More info
You can learn more about this Docker image, included accounts and configuration here: https://github.com/czekaj/docker-geth-dev
Original article and pictures take decentral.market site
Комментариев нет:
Отправить комментарий