Digital Developer Conference: Cloud Security 2021 – Build the skills to secure your cloud and data Register free

Develop a voting application using Hyperledger and Ethereum


This code pattern shows you how to build a decentralized application that invokes methods on a Solidity smart contract running in Hyperledger Fabric. It includes a Fabric proxy server that translates Web3 calls to and from a running Hyperledger Fabric and Chaincode Ethereum Virtual Machine (EVM) combined framework that enables the deployment of these smart contracts.


This decentralized voting application is a simple app that uses Hyperledger Fabric Network and Chaincode EVM to compile Web3 and Solidity smart contract deployments.

Developers who are more familiar with Ethereum tools and coding can apply their knowledge of Ethereum on the Hyperledger infrastructure.

Once you’ve completed this code pattern, you will understand how to use both permissioned (Hyperledger) and permissionless (Ethereum) blockchain frameworks together.



This app is built with Ethereum standards, meaning it uses the “gas” execution fee to pay for transactions. The Hyperledger Fabric and its network only host this decentralized app and make it easy to deploy and process Solidity smart contracts. The replacement for Ethereum’s gas in the Hyperledger Fabric in general is a digital token that’s created with chaincode.

To get started, you’ll clone the repo and start owning the project. But before you do that, make sure you have all the required tools and their necessary versions.

The following steps are a brief introduction to the installation process:

  1. Install Hyperledger Fabric binaries and Docker images, clone the necessary repos for the project, and start the Fabric network.
  2. Build and start the Fab Proxy on port 5000.
  3. Install Web3, Solidity, and the required dependencies to run the decentralized application. DApp will be listening on port 3000.


For more detailed instructions, review the README.