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.
- 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.
- Update the provider variable with the address of your instance of the Fab3 proxy.
var provider = "https://localhost:5000"
-
Update the contract address with the contract address of the contract you deployed in step 1.
-
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
-
Update the provided manifest with the desired name of your application.
-
Build the artifacts necessary by running the following command:
yarn build
- 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).