How to get chaincode to read from api's outside of the Hyperledger fabric blockchain

空扰寡人 提交于 2019-12-24 09:58:03

问题


I'm wondering how you can get a hyperledger fabric smart contract to read from external API's ?

A service called oraclize (http://www.oraclize.it/) is used to do this operation in Ethereum blockchains - Is there anything similar for hyperledger fabric smart contracts or any workarounds?


回答1:


In Hyperledger Fabric - smart contracts (the chaincode), could be implemented at the moment with either golang or Java, both of which are Turing complete and provides you with reach set of libraries and frameworks. Among which you can you any network library to get connected with external services, while you need to be extra cautious doing this to make sure your chaincode is deterministic (e.g. two independent executions of the same chaincode calling same external API will get same result back).




回答2:


Riccardo from Oraclize here.

We are actually working on a Oraclize integration with Hyperledger.



来源:https://stackoverflow.com/questions/47436982/how-to-get-chaincode-to-read-from-apis-outside-of-the-hyperledger-fabric-blockc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!