Hot answers tagged

5

If not do I need to have cron run every minute on my system and monitor the weather api and if its sunny, it will execute the smart contract on EOS? Yes, you'd need to make an explicit call to the blockchain yourself as the network cannot make calls to external services. The closest native mechanism you may have to "self-execution" is deferred transactions:...


2

Contracts can't query off-chain data since that would make it impossible to reproduce the contracts' behavior. If you need to feed data into a contract, send it in an action. The contract can reject actions from unauthorized parties.


1

There needs to be an external service, usually called oracle that writes this data to blockchain. Then contracts read this data off from the oracle contract. Oracles can be third parties, compensated for writing this data. Or in the case of early ecosystem, you just run the oracle yourself on your server with a simple script that does Fetching the data, ...


1

I'm not sure but I think that's the purpose of Inbound Oracles to write data on the chain. You should develop an application that reads data from somewhere and input to your smart contract weather table. And then you can always read from it inside your contracts much faster without spending cpu bandwith... The problem is that you would need the storage ...


Only top voted, non community-wiki answers of a minimum length are eligible