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!

up vote 4 down vote accepted

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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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