Setting up a personal Ethereum blockchain

You don't need to create a real Ethereum wallet or register any accounts to test the application. In this section, we are going to set up a personal Ethereum blockchain that you can use for application development purposes. You also need an amount of virtual money to test how the application works without putting any real money at risk.

The easiest way to get started with Ethereum development is to use the Ganache tool. Ganache positions itself as a One-Click Blockchain for developers and allows you to do the following:

Quickly fire up a personal Ethereum blockchain that you can use to run tests, execute commands, and inspect state while controlling how the chain operates

(https://www.trufflesuite.com/ganache)

You can find out more about this tool at https://www.trufflesuite.com/ganache.

Setting up the tool is straightforward and doesn't take much time. Follow these steps to install it on your local machine:

  1. Navigate to the https://www.trufflesuite.com/ganache website and find the download button on the main page, as shown in the following screenshot:

You should see different buttons, depending on the operating system you're using. In my case, I received macOS option, but you can always click the Need another OS download? link to see of all the available downloads.
  1. Run the application installer. For macOS, you should see a standard installer experience where you can drag and drop the executable into the Applications folder:

  1. Run the application. On the first run, you should see an Analytics consent dialog, asking you to enable or disable application analytics:

It is up to you to choose whether to leave with analytics enabled or go fully anonymous.

  1. Click the Continue button. At this point, you should see the standard landing page for the application. It should look as follows:

You are going to see Quickstart and New Workspace each time the application starts so that you can decide on what type of actions you want to perform. For now, I strongly recommend going to Quickstart so that you have a one-click blockchain ready for development and testing.

  1. Click the Quickstart button. You should see the main application interface, along with a list of accounts on the main page.
Feel free to explore the options you have and all of the pages and dialog. You can also refer to the online documentation (https://www.trufflesuite.com/docs/ganache/overview) and examples if you want to find out more about the tool.

Note that you also get a few out-of-the-box accounts that have 100 Ether each:

This should be more than enough for you to build a digital wallet application that works with multiple accounts. Having some Ether on each account also helps us to develop and test the transfer functionality without having to spend any money.

Leave the Ganache application running for now. It is going to be our backend service for the rest of this chapter.

Next, let's learn how to enable a typical Electron application with Ethereum support. I am going to explain how to install and configure the JavaScript library so that it can work with Ethereum protocols.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.224.103