In my contract I am just doing a basic query to WolframAlpha
function testOracle(){
oraclize_query("WolframAlpha", "random number between 0 and 100");}
I also have the __callback function:
function __callback(bytes32 myid, uint256 result) {
if (msg.sender != oraclize_cbAddress()) {throw;}
randomNum = result;
I have also gained my localhost OAR
OAR = OraclizeAddrResolverI(.......);
When I do:
testrpc
node bridge
truffle migrate --reset
I get the results from the oracle query in the bridge console:
{"myid":"..................",
"result":"12","proof":null}
But whenever I am in the truffle console and do: (randomNum is public)
var contract = contract.deployed()
contract.randomNum.call()
I get 0 as the result even though I know the result is 12 in the bridge console as I've seen it. How am i able to retrieve the results from the contract using truffle?