How to call external data using smart contracts?

0 votes
I have a blockchain that requires data from my system's hard disk. The data on the hard disk should be constantly sent to the blockchain to update the value to make the blockchain work properly? How can i let smart contract call the external data?
Jul 16, 2018 in Blockchain by digger
• 26,550 points
33 views

1 answer to this question.

0 votes
Smart contracts can not directly call external data like you want it to happen. To call the external data from smart contracts, you need to make use of web3js or similar API to make transaction with the external source whenever you want the data to be updated.

Note: If you are using a private chain then make sure that all the machines involved have access to the private chain.
answered Jul 16, 2018 by slayer
• 29,050 points

Related Questions In Blockchain

+1 vote
3 answers

Is it possible to store data about arbitrary objects on the blockchain using smart contracts?

Consider following tutorial from Hyperledger Fabric "Getting Started" pages. Basically ...READ MORE

answered Aug 30, 2018 in Blockchain by Artem
112 views
+1 vote
1 answer

How to deploy ethereum smart contracts on a website?

There are many ways to do this: 1 ...READ MORE

answered Mar 26, 2018 in Blockchain by Johnathon
• 9,080 points
86 views
+1 vote
1 answer

How is it possible to achieve privacy and confidentiality in smart contracts??

Any contract code written on the blockchain ...READ MORE

answered Apr 18, 2018 in Blockchain by Shashank
• 10,350 points

edited Aug 7, 2018 by Omkar 105 views
0 votes
1 answer

How to create tokens in smart contracts from node.js?

Any modification to the Ethereum Blockchain will ...READ MORE

answered Jun 26, 2018 in Blockchain by Shashank
• 10,350 points
142 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
141 views
+1 vote
3 answers

Removing double quotes from a string from JSON response in PHP

Just remove the json_encode call, and it should work: $resp ...READ MORE

answered Sep 12, 2018 in Blockchain by digger
• 26,550 points
3,084 views
0 votes
1 answer
0 votes
1 answer

How to access member functions of smart contract using web3?

I have implemented a similar feature and ...READ MORE

answered Aug 13, 2018 in Blockchain by slayer
• 29,050 points
74 views
0 votes
1 answer

How to call smart contract methods from transactions?

You can do this using a wrapper. ...READ MORE

answered Aug 13, 2018 in Blockchain by slayer
• 29,050 points
40 views