All Projects → IBM → hyperledger-fabric-evm-demo

IBM / hyperledger-fabric-evm-demo

Licence: Apache-2.0 license
hyperledger-fabric-evm-demo

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

fabric-evm-demo

This repo contains a Web3.js client app that invokes methods on a Solidity smart contract that is running in Hyperledger Fabric. The demo includes a Web3 proxy server that translates Web3 calls to and from the corresponding Hyperledger Fabric GRPC API calls.

Running the App

  1. First deploy the contract. When initializing the contract pass in four proposals with any names. The specific proposal names do not matter, four proposals are needed for the dApp. For example, you can use: [ "0x61", "0x62", "0x63", "0x64" ].

For this step, you need a running Hyperledger Fabric cluster that has the EVM Chaincode (EVMCC) installed. Follow the tutorial to learn how to install the EVMCC and get Fab3 running.

  1. Update the provider variable with the address of your instance of the Fab3 proxy.
var provider = "https://localhost:5000"
  1. Update the contract address with the contract address of the contract you deployed in step 1.

  2. To run the dApp, run the following commands at the root of this repo.

npm install
npm start

Once tested locally, you can easily deploy the application to a Cloud Foundry environment, e.g. IBM Cloud

  1. Update the provided manifest with the desired name of your application.

  2. Build the artifacts necessary by running the following command:

yarn build
  1. Push to Cloud Foundry.
cf push

And here's the repo with the bits you need to deploy a Fabric network with the EVMCC installed to the IBM Cloud Kubernetes Service(IKS).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].