4

I'm having some issues replicating oraclize's Mix use of the oraclizeAPI.sol (which is imported from github) on my local remix - and later on a private blockchain.
Now: I've tried to import the file locally and via git:

//import "./oraclizeAPI.sol";
import "github.com/oraclize/ethereum-api/oraclizeAPI_0.4.sol";

There is an exception when I try to create the contract which uses oraclizeAPI.sol (DieselPrice.sol).
After debugging I can see that the issue happens in the function 'oraclize_setNetwork' in oraclizeAPI.sol, which I believe goes through a list of networks, non of which my private blockchain.
How can I edit this code in order to be able to use oraclize? Or is there another procedure that I need to do?
Thanks in advance!

mik
  • 199
  • 4
  • 1
    Maybe this can help you https://ethereum.stackexchange.com/questions/1737/cant-get-oraclize-to-work – Gawey Jul 12 '17 at 08:43
  • thanks. I had seen it before. Thomas answer isn't really helpful. The import works fine. Did you mean the other answer? – mik Jul 12 '17 at 08:55

1 Answers1

4

If you are using a private blockchain, you need something to bridge it with the Oraclize service. Oraclize provides a utility for this, in the case that you're using an Ethereum blockchain, you can use the ethereum-bridge.

Here is a comprehensive guide on how to setup the bridge with testrpc. In the case you're using testrpc, you can use that guide, if it's a private blockchain using a different client, then just skip the testrpc steps, although you will still want an unlocked account accessible, to be able to deploy the required contracts on your privatenet. Link to the guide: https://ethereum.stackexchange.com/a/11389/5819

DenisM
  • 1,021
  • 8
  • 11