Git Product home page Git Product logo

ibm / vote-hyperledger-ethereum Goto Github PK

View Code? Open in Web Editor NEW
71.0 15.0 40.0 819 KB

Voting DApp using Web3, Solidity, Hyperledger Fabric and Chaincode EVM

Home Page: https://developer.ibm.com/patterns/voting-app-hyperledger-ethereum/

License: Apache License 2.0

Shell 100.00%
ethereum ethereum-dapp ethereum-blockchain hyperledger-fabric hyperledger web3 solidity solidity-contracts chaincode evm

vote-hyperledger-ethereum's Issues

Changes on fabric-chaincode-evm

Hello. I noticed there were changes on fabric-chaincode-evm code, and some stuff needs to be changed for the tutorial to work:

export FABPROXY_CONFIG=$HOME/go/src/github.com/hyperledger/fabric-chaincode-evm/examples/first-network-sdk-config.yaml
export FABPROXY_USER=User1
export FABPROXY_ORG=Org1
export FABPROXY_CHANNEL=mychannel
export FABPROXY_CCID=evmcc
export PORT=5000
cd $GOROOT/fabric-chaincode-evm
go build -o fab3 ./fabproxy/cmd
./fab3

needs to be changed to:

export FAB3_CONFIG=$GOROOT/fabric-chaincode-evm/examples/first-network-sdk-config.yaml
export FAB3_USER=User1
export FAB3_ORG=Org1
export FAB3_CHANNEL=mychannel
export FAB3_CCID=evmcc
export FAB3_PORT=5000
cd $GOROOT/fabric-chaincode-evm
make fab3
bin/fab3

Errors: web3.eth.contract is not a constructor (or a function)

Hello!

When I tried to use your both of your instruction, I have error mgs depends on the version of web3js
If I used v0.20 I have: TypeError: web3.eth.contract is not a function
If v1.00-beta.55:
TypeError: web3.eth.contract is not a constructor
at Object. (/home/usr/go/src/github.com/hyperledger/web3-fabric-voting-dapp/server.js:20:18)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! [email protected] start: node server.js
npm ERR! Exit status 7
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

This error I have after npm -install & npm -start

And I changed VoteContract = new web3.eth.contract(abi) for web3 v 1.0

Could you help me please?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.