Think 2021: New tools have the developer ecosystem and IBM building together Learn more

Develop a blockchain application with an Ethereum smart contract deployed on a Hyperledger Fabric network

Hyperledger Fabric and Ethereum have been paving the way for the creation of blockchain applications. They both provide developers with tools and architectural frameworks for creating decentralized applications. The Fabric architecture now allows you to use a Fabric-Ethereum Virtual Machine (EVM) plugin to write smart contracts with Ethereum languages such as Solidity. You can deploy this contract onto a Hyperledger Fabric network and interact with the contract using web3 library through a fab proxy. This initiative brings the two worlds closer together and opens the door for Ethereum developers to deploy their smart contracts on the Hyperledger Fabric network for their blockchain applications — thus combining the scaling and security of Hyperledger with the ease of use of creating smart contracts with Solidity.

Hyperledger Fabric provides a permissioned network with a modular architecture, which allows for greater flexibility and resiliency. Fabric networks can be deployed locally using Docker for development, hosted on the cloud, and used as a service such as IBM Blockchain. Hyperledger Fabric’s configurable architecture makes it ideal for use cases across industries as well as for incorporating with different architectural frameworks. In addition, Fabric leverages consensus protocols that do not require a native cryptocurrency to incent costly mining or executing smart contracts.

Combining the Fabric network with Ethereum tools gives blockchain app developers a broader array of tools and structures to choose from. Ethereum introduced smart contract languages like Solidity which provide a clear methodology for writing smart contracts. The Ethereum web3 libraries make it easier for developers to create blockchain apps that interact with smart contracts. The web3 library is now available in multiple languages through web3.js, the original and most popular framework for JavaScript. In addition, Ethereum tools like Truffle and Ganache make it easier for developers to simulate Ethereum accounts, and start creating smart contracts and developing decentralized applications with web3. These applications can now be delivered on a Hyperledger Fabric network using the Fabric EVM plugin.

The pattern Create a blockchain app for loyalty points with Hyperledger Fabric Ethereum Virtual Machine demonstrates a customer loyalty points application that uses the Fabric-EVM plugin. The app allows members to register on the network and perform transactions with partners on the network. These transactions simulate the processes of earning points through purchases and redeeming points on specific deals. The smart contract tracks all of these transactions, and the app stores the registered member and partner data.

Check out how Ethereum smart contracts and applications can be deployed on Hyperledger Fabric network!