How to Undertake Ethereum Development for Blockchain?

blockchain software development using the Ethereum

Need a great ethereum tutorial for blockchain software development? 

If you are, then you have come to the right place. In this ethereum tutorial for blockchain software development, we will discuss all the ins and outs that you should know then undertaking blockchain development using the Ethereum network. 

Ethereum development: Public or private?

Before you embark on a software development project using the Ethereum platform, you need to decide on whether to use a public vs private network blockchain. This matters due to the following reasons:

  • Entrepreneurs or beginners trying to set up a decentralized business model should consider the public Ethereum blockchain since it’s permissionless.

However, if you are implementing a blockchain application in your enterprise, then you will allow only trusted parties to join. In this case, you will need a permissioned blockchain.

  • A business model relying on a completely decentralized transaction validation may find the public Ethereum blockchain attractive. However, if you are implementing in an enterprise context, scalability and high transaction throughput are crucial. You will need a private blockchain.

Read more about these differences in “Public vs private (permissioned) blockchain comparison”.

I recommend you use the Ethereum DApp approach if you work with a public blockchain. On the other hand, use Hyperledger Fabric with its Ethereum Smart contract capability if you need a permissioned blockchain.

In this Ethereum tutorial for Blockchain Software Development, we will discuss both of these approaches.

I will call them “approach #1” and “approach #2”, respectively.

Although “approach #2” doesn’t involve the Ethereum network, it at least includes Ethereum smart contracts.

Ethereum DApp development (approach #1)

Let’s go over Ethereum decentralized applications development, step by step, as follows:

Step #1: Build a team

You need the following roles in your team:

  • UI/UX designer;
  • Ethereum programmers with Solidity programming language skills;
  • Testers to thoroughly test networks;
  • A project manager (PM).

Step #2: Utilize Ethereum development learning resources

Note that Ethereum blockchain development skills are niche, therefore, consider using the following learning resources:

Step #3: Create an Ethereum account and buy Ether

Ether, the native cryptocurrency of Ethereum, is the fuel that drives all ethereum transactions on the network. You need Ether to deploy smart contracts and run your DApp.

You need to create an “Externally Owned Account” (EOA) on Ethereum, which involves the following steps:

  • Use “eth-lightwallet”, an easy-to-use Ethereum wallet.
  • Set it up using their GitHub instructions.
  • Create your public and private keys. Secure the private key, don’t divulge it.

Now, you can buy Ether to start deploying contracts.

Step #4: Install the required tools

You need the following tools to develop an Ethereum DApp:

  • “testrpc”: It’s an easy-to-use blockchain client, which also provides a “Command Line Interface” (CLI). Install and configure it following its GitHub instructions.
  • “Web3.js”: This is an Ethereum JavaScript API used to communicate with the Ethereum blockchain network. Use these instructions to install it.
  • “Truffle”: A development environment for Ethereum, Truffle aids in smart contract compilation, linking, automated testing, build management, and deployment. You can install and configure it using the GitHub instructions. You can create folders for your smart contracts.
  • “MetaMask”: You will need to test ethereum smart contracts before deploying them. MetaMask is a browser extension. It allows you to communicate with Ethereum even if you don’t run a full Ethereum node. Install either Chrome or Firefox extension from its website.

Accept the terms and conditions, create a password, and secure the 12-word private seed for later use. Refer to “How to deploy a smart contract on Ethereum?” for more details.

Step #5: Configure the tools

You need to configure the above-mentioned tools as follows:

  • Open “testrpc” and run an instance.
  • Configure the “aconfig.js” file to make Web.js work.
  • Connect MetaMask to “Ropsten”, an Ethereum test network, which you will use for testing your smart contract. To do this, click the MetaMask mainnet button, and point to Ropsten.

Read “Ultimate guide to convert a web app to a decentralized app DApp” for details. Let’s call it the “reference article 1”.

Step #6: Use “Remix” IDE to code smart contracts

You will need to develop the User Interfaces (UI) of your DApp in the same way that you would do for any web app. You can develop Ethereum smart contracts in parallel.

To do this, use “Remix”. It’s an “Integrated Development Environment” (IDE) for smart contract development. It’s a DApp, therefore, you don’t need to install anything.

Step #7: Test smart contracts in Ropsten

This involves the following actions:

  • Visit MetaMask Ether Faucet to buy dummy Ether. This is required for testing smart contracts in Ropsten. Ropsten is a test network and doesn’t need real Ether.
  • Check and ensure that the MetaMask connection with Ropsten is still open.
  • Go back to Remix, and locate the small “+” sign at the top left, which also has the label “Create”.
  • Click it to deploy your smart contracts to Ropsten, and confirm the action in MetaMask.
  • Test smart contracts.

Read “reference article 1” for more detailed guidance.

Step #8: Deploy smart contracts to the main Ethereum network

Now that you have tested the smart contracts, you will deploy contracts to the main Ethereum network, as follows:

  • You will need the real Ether you bought earlier.
  • Ensure that the testrpc instance is still running.
  • Navigate to your Truffle directory.
  • Use the “truffle deploy” command to deploy your smart contracts.
  • Note down your smart contract address, for later use.

Step #9: Create your crypto token

Now that you have built smart contracts, you will be able to use the knowledge to build your crypto token. Note the following points in this regard:

  • You need to code smart contracts to create crypto tokens on Ethereum.
  • Ethereum has various standards for crypto tokens, e.g., ERC20, ERC721, etc. There are subtle differences between them. ERC20 is the most common standard. You will likely be able to use it for most use cases. Read more about the ERC20 standard in “ERC20 Token Standard”.
  • An Ethereum smart contract for creating a crypto token will need to use a few standard functions such as giving all the initial tokens to the creator, checking whether the sender has enough balance, checking for overflows, and subtracting from the sender, etc.
  • Such a smart contract will also need to set values for some required fields like token name, initial supply, etc.

Read “Create your own crypto-currency with Ethereum” for detailed instructions to create an Ethereum crypto token.

Having reached this part of the ethereum tutorial for Blockchain Software Development, you will have developed, tested, and deployed your Ethereum DApp.

An overview of Ethereum development on Hyperledger Fabric (approach #2)

In an enterprise environment, you need controlled access, data privacy, scalability, and high-transaction throughput. If the public permissionless Ethereum blockchain isn’t your option, but rather a private blockchain is, then Hyperledger Fabric, a project from the Hyperledger Consortium, is a suitable option.

Why Hyperledger Fabric?

Hyperledger Fabric is a good choice if you opt for blockchain software development using the Ethereum network, due to the following reasons:

  • It’s a permissioned enterprise blockchain, therefore, only trusted parties can join.
  • It allows access control. Enterprises can safeguard their sensitive information.
  • Hyperledger Fabric or “Fabric”, as it is commonly called, provides separate channels for confidential transactions.
  • The consensus algorithm mirrors the organizations’ business transaction workflow.
  • Fabric has high scalability and impressive security features.
  • Fabric has been supporting Ethereum smart contracts development since late 2018.

Read about the advantages of Fabric in “Pros and cons of Hyperledger Fabric for blockchain networks”.

How does Fabric support Ethereum smart contracts?

Fabric now includes the following components to support Ethereum smart contract development:

  • EVM (ethereum virtual machine): Developers can now use Hyperledger Burrow on Fabric. Burrow is a Hyperledger project that offers a blockchain client and a basic smart contract interpreter.

The smart contract interpreter uses the EVM concepts, and Fabric developers can code “chaincodes”, i.e., smart contracts in Hyperledger parlance.

  • Accounts: Fabric will use “Contract accounts” (CAs) on the blockchain to store chaincodes. Since there is no cryptocurrency involved here, Fabric will create EOAs on the fly.

I have already explained this in detail in “Using Hyperledger Fabric to setup Ethereum smart contracts”.

  • Ethereum client: “testrpc”, the blockchain client I referred to earlier, has a JSON RPC API. Fabric has now been incorporated for EVM implementation.

Fabric also uses “Fab3” to incorporate “Web3.js” for its’ EVM implementation. You can read about using Fab3 on Fabric EVM here.

  • “Gas Price”: Developers need to pay for “Gas” on the public Ethereum blockchain to execute operations, and they must use Ether for that. Fabric hardcodes a high amount of gas to facilitate the execution of operations.

The gas limit shows how much amount of ether developers need to pay for computations. Gwei is the lowest denomination of ether used to calculate a gas unit price. Operations will fall within that gas limit, therefore, Fabric EVM developers don’t need to pay using Ether.

Implementing approach #2, i.e., Ethereum smart contracts on Fabric

I will now describe the steps to implement Ethereum smart contracts on Fabric, these are as follows:

Step #1: Form a team

You need the following roles in the software development team:

  • UI/UX designers;
  • Software developers with Fabric and “Go” language skills;
  • Ethereum developers with Solidity skills;
  • Testers;
  • A Project Manager.

Step #2: Install the relevant tools

With this approach, you need the following tools:

  • cURL: You can install this tool for file transfers to and from a server, by following these instructions.
  • Docker: This will help in creating, deploying, and running apps using containers. Install Docker using these instructions. This also installs “Docker Composer”, which you will need to build multi-container apps.
  • “Go” language: This is to create your app where you will use the Ethereum smart contracts on Fabric. Follow the installation instructions here.

Step #3: Get helpful samples, binaries, and Docker images

The Fabric project team has made an effort to help developers by providing helpful resources. You can install the following to help expedite some of the work in your project:

  • Code samples;
  • Binaries;
  • Docker images.

Step #4: Clone the Fabric EVM chaincode

You will write Ethereum smart contracts on Fabric, therefore, you need the appropriate tool to interact with them. The EVM chaincode, based on Hyperledger Burrow, is that tool. Install it following these GitHub instructions.

Step #5: Configure the Fabric EVM chaincode:

Now that you have got the sample project from GitHub in the preceding step, you need to configure it. Take the following steps:

  1. Navigate to the “first-network” folder.
  2. Modify the Docker composer CLI file to map to the folder where you had cloned the sample project from GitHub.
  3. Start the network.
  4. Navigate to the Docker CLI container.
  5. Install the EVM chaincode.
  6. Instantiate the EVM chaincode.

You can read “Solidity smart contract on Hyperledger Fabric”, which contains detailed instructions and commands.

Step #6: Write smart contracts using the Remix IDE

Write Solidity smart contracts using Remix IDE, just like we outlined in the public Ethereum blockchain example above.

Step #7: Compile and deploy smart contracts

At this point, you need to take the following steps:

  • Use the Remix IDE to compile the smart contract.
  • Copy the bytecode. You can follow the instructions in the “Solidity smart contract on Hyperledger Fabric” that I referred to earlier.
  • Open a text editor of your choice, and paste the bytecode, which is in JSON format.
  • Use the “peer chaincode invoke” process, for deploying the smart contract. Read the syntax of the command here.

This completes the process of developing Ethereum smart contracts on Hyperledger Fabric.

Planning blockchain software development using the Ethereum Network?

Whether you develop an Ethereum DApp or Ethereum smart contract on Fabric, it will be a complex project. Next in this ethereum tutorial for Blockchain Software Development, we will discuss some technical skills required for building on the ethereum network.

Required Technical Skills:

To build a secure software solution using an ethereum network and blockchain technology, you should have software developers experienced in developing real world projects of blockchain applications using Ganache and Node.js. 

They should also have skills using full-stack technologies like React, Ether.js, and Hardhat for blockchain development.

Moreover, they should be experts in creating apps in the blockchain ecosystem including, NFTs (Non-fungible tokens), DeFi (decentralized finance), cryptocurrencies, etc.

Furthermore, you also need a PM experienced with blockchain software development using the Ethereum network. 

Partner with a Software Development Company:

It is quite difficult to find all the required technical skills described in this ethereum tutorial for blockchain software development in simple freelance developers. 

The freelance market is huge, and freelance platforms do not guarantee freelancers’ skills and past work experience. You are all on your own as far as undertaking a thorough screening and hiring process for your freelance developers.

Most freelance developers are working on multiple gigs and do not guarantee a full-time commitment to your work. If for any reason, your freelancer quits your blockchain development project, you are left on your own to deal with the resulting chaos.

Consider engaging the services of a hybrid software development company. This way, you can outsource blockchain developers according to your project requirements at a moment’s notice with the peace of mind of knowing that they are vetted and experienced for building real world projects.

We hope this ethereum tutorial for Blockchain Software Development gave you enough knowledge to start your ethereum blockchain project.

For more, read our guide “How to find the best software development company?” to find the right partner for your blockchain software development project using the ethereum network.

If you need expert ethereum blockchain developer or dev teams for developing applications using ethereum then share your project details with DevTeam.Space via this form and a dedicated account manager will get in touch to answer any questions that you might have.

Frequently Asked Questions on Blockchain Software Development using Ethereum Network

What is the Ethereum blockchain?

Ethereum is one of the largest blockchain networks and is the second biggest by capital cryptocurrency in the world. It is written in Python, Java, Go, Rust, C++, and C#. Ethereum is a platform that allows the development of blockchain solutions. For more information, read this article.

How big is Ethereum blockchain?

The Ethereum blockchain has passed 1 Terabyte or 1,000 Gigabytes. It has shown healthy growth as many companies launch Ethereum-based blockchain solutions, particularly online gaming companies.

Is Ethereum based on blockchain?

The Ethereum cryptocurrency is blockchain-based. It is run by the Ethereum network, though all the nodes on the network are private individuals or organizations.


Share this article:

Some of Our Projects

alibra
airsign
hit-factor

Tell Us About Your Challenge & Get a Free Strategy Session

Hire Expert Developers
clients
banner-img

DevTeam.Space is a vetted community of expert dev teams supported by an AI-powered agile process.

Companies like Samsung, Airbus, NEC, and startups rely on us to build great online products. We can help you too, by enabling you to hire and effortlessly manage expert developers.