IBM / loyalty-points-evm-fabric

Sample use of Ethereum smart contract in Hyperledger Fabric
https://developer.ibm.com/patterns/loyalty-points-fabric-evm/
Apache License 2.0
53 stars 49 forks source link

Use Solidity contract with Truffle - Error #15

Open gnurtcouq opened 5 years ago

gnurtcouq commented 5 years ago

Hi,

I follow doc (https://github.com/Aniket-Engg/loyalty-points-evm-fabric/commit/23ee52b5c3d23cde959bc21e45783265af40df2d#diff-35d83bebf85b66640bd3eb135d4ef379) to install truffle and compile LoyaltyPoints.sol in truffle. Everything is OK, but when I run command to interact with the smart contract in truffle console as:

web3.eth.accounts

The output does not show the account number. Instead it show:

Accounts { currentProvider: [Getter/Setter], _requestManager: RequestManager { provider: HttpProvider { host: 'http://127.0.0.1:7545', httpAgent: [Object], timeout: 0, headers: undefined, connected: true, send: [Function], _alreadyWrapped: true }, ...

Any ideal how to fix this?

horeaporutiu commented 5 years ago

@gnurtcouq Are you still able to deploy the application and do the following steps after the view the eth accounts step?

Not sure exactly how to fix this, but will add this as a feature request for future code patterns (focus on using Truffle to interact with smart contract)