2

So the library Oraclize if I understand correctly, allows you on solidity to get a result from a URL inside a callback.

But I also read that you can't communicate with the external world in Ethereum (because it's non-deterministic), so I don't understand how Oraclize manages to call URLs although Oraclize is itself a smart-contract.

  • Must read for security, trust, reliability: ethereum.stackexchange.com/questions/201/… tl;dr: "Oraclize is a decent step forward, but it's not the final solution. Be careful that you use their service in a manner appropriate to the risk level of your application!" – eth Jun 26 at 22:12
2

The URL fetching happens entirely outside of Ethereum. The process is like this:

  1. Your contract calls out to the Oraclize contract, requesting data from some URL.
  2. The Oraclize contract logs an event saying what URL your contract asked for and what your contract's address is.
  3. Some code running outside the blockchain observes that logged event and fetches the URL.
  4. That off-chain code sends a transaction to your contract's callback function with the requested data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.