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!

  • 1
    Maybe this can help you ethereum.stackexchange.com/questions/1737/…
    – Gawey
    Commented Jul 12, 2017 at 8:43
  • thanks. I had seen it before. Thomas answer isn't really helpful. The import works fine. Did you mean the other answer?
    – mik
    Commented Jul 12, 2017 at 8:55

1 Answer 1


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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