provable-things / ethereum-api

Provable API for Ethereum smart contracts
https://docs.provable.xyz/#ethereum
MIT License
801 stars 428 forks source link

Oracle failing in online compiler #57

Closed Brianspha closed 6 years ago

Brianspha commented 6 years ago

Hi there for some reason the oracle fails to send a query when i try run it on the online remix compiler

i tried the example contracts and this is the message i get

VM error: revert. revert The transaction has been reverted to the initial state. Note: The constructor should be payable if you send value. Debug the transaction to get more information.

it fails on this line in the api's contract

OraclizeI oraclize; modifier oraclizeAPI { if((address(OAR)==0)||(getCodeSize(address(OAR))==0)) oraclize_setNetwork(networkID_auto);

    if(address(oraclize) != OAR.getAddress()) //it fails here
        oraclize = OraclizeI(OAR.getAddress());

    _;
}

I was running the WolframAlpha example this happens with all the contracts

D-Nice commented 6 years ago

If testing with JVM, can you please confirm that you are using http://dapps.oraclize.it/browser-solidity/ which is our fork of remix with Oraclize module integrated, and using <=solc 0.4.20 for compatibility reasons?

D-Nice commented 6 years ago

closing due to inactivity, recommended browser IDE to use is now the official Remix one, which is currently bundled by default with the Oraclize plugin under settings tab.