Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
pragma solidity ^0.4.23;
import "";
contract OracleTest is usingOraclize {
bool public isTrue;
event NewOraclizeQuery(string _description);
event NewOracleResultCount(bool _isTrue);
function OracleTest() public {
function __callback(bytes32 myid, string result) public {
if (msg.sender != oraclize_cbAddress()) revert();
isTrue = (keccak256(result) == keccak256("true"));
function update() public payable {
NewOraclizeQuery("Oraclize query was sent, standing by for the answer..");
oraclize_query("URL", 'json(');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment