Chapter 13

Ten Free Ethereum Resources

IN THIS CHAPTER

Bullet Examining top free Ethereum frameworks

Bullet Exploring free Ethereum IDEs

Bullet Interacting with the Ethereum blockchain for free

Bullet Keeping your dApps secure for free

Bullet Highlighting great free resources to learn Ethereum

Many free resources are available to help you develop advanced Ethereum dApps. In Chapter 4 you learn about different tools in four categories: blockchain client, test blockchain, testing framework, and IDE. You don’t have to search very hard to find lots of free resources in nearly every category. In Chapter 6 you learn about different options for establishing your Ethereum wallet, some of which are free. The options in those chapters are worth exploring. In Chapters 5 and 6 you install five free tools to help you develop and manage Ethereum dApps. Because you’ve already learned about five effective free tools in Chapters 5 and 6, I won’t cover them again in this chapter.

In Dummies Part of Tens fashion, in this chapter you learn about ten more free tools to help you create your own Ethereum blockchain dApps. Some of the resources in this chapter are alternatives to the tools you used in the book’s examples, and other complement the tools you’re already using. Each of the resources in this chapter has unique features and should be on your list of interesting research ideas. They’re all free and they’re all worthwhile additions to your Ethereum development toolbox.

Exploring Alternative Ethereum Development Frameworks

You use the Truffle framework for the examples in this book. Although Truffle is the most common framework in use, it isn’t the only one. Depending on your needs and preferences, you should look at a couple alternatives. At the end of the day, choose the development framework that fits most closely with your experience and makes developing dApps for Ethereum as frustration-free as possible.

Managing you development with Populus

The Populus framework provides many of the same features as Truffle. However, because Truffle focuses on the JavaScript environment, you have to write lots of JavaScript code to automate tasks, test, and maintain dApps using Truffle. That’s fine if you have lots of experience with JavaScript and are comfortable in the environment. But if you don’t know JavaScript or don’t want to invest time to learn it, you may want to look at a framework based on something else.

Populus is a Python-based Ethereum development framework. If you have Python experience or just like working with Python, Populus may be worth looking into. You can get Populus by navigating to https://populus.readthedocs.io/en/latest. This web page includes a quick start guide, documentation, and instructions on installing and using Populus. If you like Python, try out Populus to see how it compares with Truffle.

Technical stuff Populus requires that you have Python already installed. Because the Python 2.7 End of Life (EOL) is scheduled for November 2020, you should install Python version 3. Go to https://populus.readthedocs.io/en/latest to find the most current Python version for your operating system.

Exploring Ethereum blockchain containers with Cliquebait

Cliquebait is another Ethereum development framework alternative to Truffle. Instead of running a blockchain environment natively on your computer’s operating system, Cliquebait uses Docker containers, which are similar to a lightweight virtual machines. Docker allows you to launch multiple containers, all running as separate virtual machines (VMs), with far less overhead than running multiple standard VMs. Each standard VM that you launch runs a full copy of an operating system, along with virtual copies of the hardware that the VM’s operating system needs to run. A container, such as a Docker container, runs only the operating system components and virtual hardware that the programs need. The result is virtualization with lower resource requirements.

Cliquebait provides a Docker image that provides a single-node Ethereum blockchain that you can use to develop and test your smart contracts. It also supports launching multiple Docker containers to simulate a multi-node blockchain, all running on your computer.

Docker must be installed before you can install and run Cliquebait. Go to https://docs.docker.com/docker-for-windows/install for instructions on downloading and installing Docker. After you have Docker installed, go to https://github.com/f-o-a-m/cliquebait for instructions in using Cliquebait.

Selecting a Free Integrated Development Environment

The IDE you choose to write code will be the most visible tool in your dApp development toolkit. You’ll spend more time using (or fighting) your IDE, so finding the right one is crucial to being productive. The best IDE is in the eye of the beholder. You should try several IDEs and choose the one that is most comfortable to you.

Developing Solidity code with Atom

Atom, like the Visual Studio Code IDE you used in the book’s examples, isn’t strictly a blockchain-based IDE. It’s a powerful general-purpose IDE with Solidity plug-ins. When you add the Etheratom plug-in, you get syntax highlighting, code completion, and the capability to call the Solidity compiler with a single keystroke.

Figure 13-1 is the main Atom interface. It looks and feels much like VS Code, with a character of its own. You can get the Atom IDE at https://atom.io. After installing Atom, go to https://atom.io/packages/etheratom for instructions on installing the Etheratom plug-in.

Screen capture depicting Atom IDE main desktop.

FIGURE 13-1: Atom IDE main desktop.

Going online with Remix

An alternative to installing an IDE on your own computer is to use a browser-based IDE. Remix is a popular IDE that you can access from any web browser. It enables you to write code in Solidity, and then deploy to a blockchain. With Remix, you can easily select a specific Solidity compiler version, along with many features and options you’ll find helpful when developing dApps in Solidity.

To get started with Remix, navigate to https://remix.ethereum.org. You can add code from your local computer or you can write it right from the Remix editor. Figure 13-2 shows Remix with the SupplyChain.sol smart contract you created in Chapter 9.

Screen capture depicting Remix with the SupplyChain.sol smart contract.

FIGURE 13-2: Remix web-based IDE.

Keeping it simple with EthFiddle

Another web-based Solidity IDE is EthFiddle. EthFiddle is a great choice for a straightforward web-based IDE for writing and compiling Solidity smart contracts. Unlike Remix, EthFiddle doesn’t provide a way to deploy your code. Figure 13-3 shows the SupplyChain.sol smart contract you created in Chapter 9 in the EthFiddle IDE. Navigate to https://ethfiddle.com to get started in EthFiddle.

Screen capture depicting the SupplyChain.sol smart contract.

FIGURE 13-3: EthFiddle web-based IDE.

Exploring Ethereum Clients and APIs

After you write your smart contract code, you’ll need to deploy it to an Ethereum client and then be able to access the blockchain to test and invoke your code after it’s in production. As with frameworks and IDEs, many high-quality free resources are available.

Swapping your Ethereum client to Parity

Parity is an Ethereum client that runs a node on an Ethereum blockchain network. Although geth, the Ethereum client you used for the exercises in this book, is more popular, Parity is a good alternative that boasts several advantages over geth, including the following:

  • Faster: Syncs the full Ethereum blockchain in just hours and is built to reduce CPU and network load.
  • Lower disk space use: Prunes the Ethereum blocks to use less local disk space.
  • Web-based GUI: Provides easy-to-access features through a user-friendly web-browser interface.

Navigate to https://www.parity.io/ethereum to get started with Parity. If you want to use the Parity UI, navigate to https://github.com/Parity-JS/shell/releases to find the latest release. Figure 13-4 shows a newly installed Parity UI. Note that the first time you run the Parity UI, it runs Parity and starts the sync process with the live Ethereum network.

Screen capture depicting the newly installed Parity.

FIGURE 13-4: Parity UI.

Interacting with Ethereum by using Web3.js

In Chapter 10 you discover how to interact with your smart contracts. Although the techniques you learn make it possible to access blockchain data and run your functions, they aren’t elegant. By far the most common way to interact with Ethereum smart contracts is through a collection of libraries written in JavaScript named Web3.js. You can write code in JavaScript or any language that supports JavaScript calls. From there, Web3.js makes it easy to interact with Ethereum data and functions.

Navigate to https://github.com/ethereum/web3.js to get the latest version of Web3.js, and go to https://web3js.readthedocs.io for the latest Web3.js documentation.

Technical stuff If you’re looking for a good Web3.js tutorial, go to www.dappuniversity.com/articles/web3-js-intro and check out Dapp Tutorial’s introduction.

Focusing on Wallets and Security

Security is always a concern when developing Ethereum dApps. The nature of blockchain technology makes the deliberate focus on security a required design goal. Building security into dApps depends on having the right building blocks and a solid method to maintain security after deployment. Two free resources that help you write and maintain secure dApps are the Mist wallet and the OpenZeppelin security library.

Protecting your crypto-assets in Mist

Mist is both an Ethereum wallet and an Ethereum browser. Mist is the official wallet for Ethereum, developed by the Ethereum Foundation. It also provides access to dApps, similar to the way popular web browsers give you access to websites around the Internet. Mist does more than just browse blockchain apps; it provides a suite of tools for interacting with the Ethereum network. With Mist, you can generate smart contracts, pool cryptocurrency, and share information among participants who don’t trust one another. Mist attempts to make Ethereum blockchain access as easy as possible.

To get started with Mist, use a traditional web browser to navigate to https://github.com/ethereum/mist/releases and download the latest Mist release for your operating system. After you install Mist, you can launch the browser to create an account or interact with the Ethereum blockchain with a variety of tools.

Securing your dApps with OpenZeppelin

One of the hardest parts of developing smart contracts in an Ethereum environment is making them secure from the beginning. Although it may be easy to consider security from the beginning of the design phase, writing secure smart contract code is more difficult. The OpenZeppelin library is a collection of Solidity code that helps you to implement secure code in your smart contracts.

You can import OpenZeppelin in your smart contracts and then take advantage of the many implementations of Ethereum standards, such as ERC-20 tokens, instead of having to implement them yourself. OpenZeppelin keeps you from having to reinvent the security wheel in your Solidity smart contract code.

To get started with OpenZeppelin, navigate to https://openzeppelin.org for instructions on installing and using this valuable library.

Learning More About Developing Ethereum dApps

You learned a lot about Solidity and developing dApps for the Ethereum blockchain in this book. If you want to learn more about Ethereum development and have a lot of fun in the process, check out CryptoZombies. CryptoZombies is a step-by-step Solidity tutorial in which you develop a blockchain-based game involving a zombie army you create. As you gain experience, your zombies level up and gain new skills. Navigate to https://cryptozombies.io to get started building your own Ethereum game — and zombie army.

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

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