1
votes

How to let the smart contract programs call the external data? The data are stored in the desktop's hard desk,but need to be updated constantly,and the new content will be delivered by another slave computer regularly.

And what if the contract was depolyed on the private chain?

1

1 Answers

0
votes

How to let the smart contract programs call the external data?

Smart contracts can't call or at least Ethereum contracts can't call. They can be called and they can be triggered, but they can't call by themselves.

The approach you will need to take is to use something like web3js to make a transaction every time you want data to be stored in your smart contract.

And what if the contract was depolyed on the private chain?

The approach would be the same, although you must ensure all the machines involved have access to the private chain.